mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -41,17 +41,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createMeshNoClear.H"
|
||||||
|
#include "readTransportProperties.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "readTurbulenceProperties.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createMeshNoClear.H"
|
|
||||||
# include "readTransportProperties.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "readTurbulenceProperties.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< nl << "Starting time loop" << endl;
|
Info<< nl << "Starting time loop" << endl;
|
||||||
|
|
||||||
@ -59,7 +58,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
|
|
||||||
force.internalField() = ReImSum
|
force.internalField() = ReImSum
|
||||||
(
|
(
|
||||||
@ -69,7 +68,7 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
# include "globalProperties.H"
|
#include "globalProperties.H"
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
@ -102,7 +101,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
phi -= pEqn.flux();
|
phi -= pEqn.flux();
|
||||||
|
|
||||||
# include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
U -= rUA*fvc::grad(p);
|
U -= rUA*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|||||||
@ -77,7 +77,6 @@ int main(int argc, char *argv[])
|
|||||||
#include "readCombustionProperties.H"
|
#include "readCombustionProperties.H"
|
||||||
#include "readEnvironmentalProperties.H"
|
#include "readEnvironmentalProperties.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "readPISOControls.H"
|
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
|||||||
@ -61,50 +61,49 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
# include "createMesh.H"
|
#include "createMesh.H"
|
||||||
# include "readCombustionProperties.H"
|
#include "readCombustionProperties.H"
|
||||||
# include "readEnvironmentalProperties.H"
|
#include "readEnvironmentalProperties.H"
|
||||||
# include "createFields.H"
|
#include "createFields.H"
|
||||||
# include "readPISOControls.H"
|
#include "initContinuityErrs.H"
|
||||||
# include "initContinuityErrs.H"
|
#include "readTimeControls.H"
|
||||||
# include "readTimeControls.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "setInitialDeltaT.H"
|
||||||
# include "setInitialDeltaT.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
# include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
# include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
{
|
{
|
||||||
# include "ftEqn.H"
|
#include "ftEqn.H"
|
||||||
# include "bEqn.H"
|
#include "bEqn.H"
|
||||||
# include "huEqn.H"
|
#include "huEqn.H"
|
||||||
# include "hEqn.H"
|
#include "hEqn.H"
|
||||||
|
|
||||||
if (!ign.ignited())
|
if (!ign.ignited())
|
||||||
{
|
{
|
||||||
hu == h;
|
hu == h;
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|||||||
@ -67,7 +67,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "createEngineTime.H"
|
#include "createEngineTime.H"
|
||||||
#include "createEngineMesh.H"
|
#include "createEngineMesh.H"
|
||||||
#include "readPISOControls.H"
|
|
||||||
#include "readCombustionProperties.H"
|
#include "readCombustionProperties.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
|
|||||||
@ -43,14 +43,13 @@ int main(int argc, char *argv[])
|
|||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "readPISOControls.H"
|
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -40,14 +40,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createTime.H"
|
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
@ -55,17 +54,17 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "readSIMPLEControls.H"
|
#include "readSIMPLEControls.H"
|
||||||
# include "initConvergenceCheck.H"
|
#include "initConvergenceCheck.H"
|
||||||
|
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
rho.storePrevIter();
|
rho.storePrevIter();
|
||||||
|
|
||||||
// Pressure-velocity SIMPLE corrector
|
// Pressure-velocity SIMPLE corrector
|
||||||
{
|
{
|
||||||
# include "UEqn.H"
|
#include "UEqn.H"
|
||||||
# include "hEqn.H"
|
#include "hEqn.H"
|
||||||
# include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
@ -75,7 +74,7 @@ int main(int argc, char *argv[])
|
|||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
# include "convergenceCheck.H"
|
#include "convergenceCheck.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|||||||
@ -42,14 +42,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "readThermodynamicProperties.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createTime.H"
|
|
||||||
# include "createMesh.H"
|
|
||||||
# include "readThermodynamicProperties.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
@ -57,10 +56,10 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.value() << nl << endl;
|
Info<< "Time = " << runTime.value() << nl << endl;
|
||||||
|
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
scalar HbyAblend = readScalar(piso.lookup("HbyAblend"));
|
scalar HbyAblend = readScalar(piso.lookup("HbyAblend"));
|
||||||
|
|
||||||
# include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
scalar CoNum = max
|
scalar CoNum = max
|
||||||
(
|
(
|
||||||
@ -70,7 +69,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "Max Courant Number = " << CoNum << endl;
|
Info<< "Max Courant Number = " << CoNum << endl;
|
||||||
|
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
for (int outerCorr=0; outerCorr<nOuterCorr; outerCorr++)
|
for (int outerCorr=0; outerCorr<nOuterCorr; outerCorr++)
|
||||||
{
|
{
|
||||||
@ -145,7 +144,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
phi -= phiGradp;
|
phi -= phiGradp;
|
||||||
|
|
||||||
# include "resetPhiPatches.H"
|
#include "resetPhiPatches.H"
|
||||||
|
|
||||||
surfaceScalarField rhof =
|
surfaceScalarField rhof =
|
||||||
mvConvection.interpolationScheme()()(rho)()
|
mvConvection.interpolationScheme()()(rho)()
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
basicPsiThermo& thermo = pThermo();
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& e = thermo.e();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
|
|||||||
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
solve(UEqn == -fvc::grad(p));
|
solve(UEqn == -fvc::grad(p));
|
||||||
|
|
||||||
#include "hEqn.H"
|
#include "eEqn.H"
|
||||||
|
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
|
|||||||
@ -36,14 +36,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting iteration loop\n" << endl;
|
Info<< "\nStarting iteration loop\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -58,27 +58,25 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< nl << "Starting time loop" << endl;
|
Info<< nl << "Starting time loop" << endl;
|
||||||
|
|
||||||
while (runTime.loop())
|
while (runTime.loop())
|
||||||
{
|
{
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "readBPISOControls.H"
|
#include "readBPISOControls.H"
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
|
||||||
{
|
{
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
@ -120,7 +118,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
U -= rUA*fvc::grad(p);
|
U -= rUA*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
@ -154,7 +152,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
phiB -= pBEqn.flux();
|
phiB -= pBEqn.flux();
|
||||||
|
|
||||||
# include "magneticFieldErr.H"
|
#include "magneticFieldErr.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|||||||
@ -38,14 +38,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
|
||||||
#include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
#include "createMesh.H"
|
|
||||||
#include "createFields.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< nl << "Calculating value(price of comodities)" << endl;
|
Info<< nl << "Calculating value(price of comodities)" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -30,18 +30,18 @@ Description
|
|||||||
|
|
||||||
Uses the Boussinesq approximation:
|
Uses the Boussinesq approximation:
|
||||||
\f[
|
\f[
|
||||||
rho_{eff} = 1 - beta(T - T_{ref})
|
rho_{k} = 1 - beta(T - T_{ref})
|
||||||
\f]
|
\f]
|
||||||
|
|
||||||
where:
|
where:
|
||||||
\f$ rho_{eff} \f$ = the effective (driving) density
|
\f$ rho_{k} \f$ = the effective (driving) kinematic density
|
||||||
beta = thermal expansion coefficient [1/K]
|
beta = thermal expansion coefficient [1/K]
|
||||||
T = temperature [K]
|
T = temperature [K]
|
||||||
\f$ T_{ref} \f$ = reference temperature [K]
|
\f$ T_{ref} \f$ = reference temperature [K]
|
||||||
|
|
||||||
Valid when:
|
Valid when:
|
||||||
\f[
|
\f[
|
||||||
rho_{eff} << 1
|
rho_{k} << 1
|
||||||
\f]
|
\f]
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -47,14 +47,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -36,15 +36,14 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
@ -52,8 +51,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
@ -92,7 +91,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
U -= rUA*fvc::grad(p);
|
U -= rUA*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|||||||
@ -37,15 +37,14 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createMeshNoClear.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createMeshNoClear.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
@ -53,8 +52,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "readPISOControls.H"
|
#include "readPISOControls.H"
|
||||||
# include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
|
||||||
fluid.correct();
|
fluid.correct();
|
||||||
|
|
||||||
@ -95,7 +94,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
U -= rUA*fvc::grad(p);
|
U -= rUA*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|||||||
@ -42,29 +42,28 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createDynamicFvMesh.H"
|
||||||
|
#include "readPIMPLEControls.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createDynamicFvMesh.H"
|
|
||||||
# include "readPIMPLEControls.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "readTimeControls.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
# include "readControls.H"
|
#include "readControls.H"
|
||||||
# include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
|
||||||
// Make the fluxes absolute
|
// Make the fluxes absolute
|
||||||
fvc::makeAbsolute(phi, U);
|
fvc::makeAbsolute(phi, U);
|
||||||
|
|
||||||
# include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
@ -74,7 +73,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (mesh.changing() && correctPhi)
|
if (mesh.changing() && correctPhi)
|
||||||
{
|
{
|
||||||
# include "correctPhi.H"
|
#include "correctPhi.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make the fluxes relative to the mesh motion
|
// Make the fluxes relative to the mesh motion
|
||||||
@ -82,7 +81,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (mesh.changing() && checkMeshCourantNo)
|
if (mesh.changing() && checkMeshCourantNo)
|
||||||
{
|
{
|
||||||
# include "meshCourantNo.H"
|
#include "meshCourantNo.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- PIMPLE loop
|
// --- PIMPLE loop
|
||||||
@ -93,7 +92,7 @@ int main(int argc, char *argv[])
|
|||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=0; corr<nCorr; corr++)
|
for (int corr=0; corr<nCorr; corr++)
|
||||||
@ -138,7 +137,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
// Explicitly relax pressure for momentum corrector
|
// Explicitly relax pressure for momentum corrector
|
||||||
if (ocorr != nOuterCorr-1)
|
if (ocorr != nOuterCorr-1)
|
||||||
|
|||||||
@ -38,14 +38,13 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createTime.H"
|
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
# include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
@ -53,15 +52,15 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
# include "readSIMPLEControls.H"
|
#include "readSIMPLEControls.H"
|
||||||
# include "initConvergenceCheck.H"
|
#include "initConvergenceCheck.H"
|
||||||
|
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
|
|
||||||
// Pressure-velocity SIMPLE corrector
|
// Pressure-velocity SIMPLE corrector
|
||||||
{
|
{
|
||||||
# include "UEqn.H"
|
#include "UEqn.H"
|
||||||
# include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
@ -72,7 +71,7 @@ int main(int argc, char *argv[])
|
|||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
# include "convergenceCheck.H"
|
#include "convergenceCheck.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|||||||
@ -55,7 +55,6 @@ int main(int argc, char *argv[])
|
|||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createClouds.H"
|
#include "createClouds.H"
|
||||||
#include "createRadiationModel.H"
|
#include "createRadiationModel.H"
|
||||||
#include "readPISOControls.H"
|
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
|
|||||||
@ -61,7 +61,6 @@ int main(int argc, char *argv[])
|
|||||||
#include "createClouds.H"
|
#include "createClouds.H"
|
||||||
#include "createMulticomponentPointSources.H"
|
#include "createMulticomponentPointSources.H"
|
||||||
#include "createPorousZones.H"
|
#include "createPorousZones.H"
|
||||||
#include "readPISOControls.H"
|
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
|
|||||||
@ -53,7 +53,6 @@ int main(int argc, char *argv[])
|
|||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createClouds.H"
|
#include "createClouds.H"
|
||||||
#include "createRadiationModel.H"
|
#include "createRadiationModel.H"
|
||||||
#include "readPISOControls.H"
|
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
|
|||||||
@ -43,17 +43,16 @@ Description
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "readMechanicalProperties.H"
|
||||||
|
#include "readThermalProperties.H"
|
||||||
|
#include "readSolidDisplacementFoamControls.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
|
||||||
# include "createTime.H"
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
# include "createMesh.H"
|
|
||||||
# include "readMechanicalProperties.H"
|
|
||||||
# include "readThermalProperties.H"
|
|
||||||
# include "readSolidDisplacementFoamControls.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nCalculating displacement field\n" << endl;
|
Info<< "\nCalculating displacement field\n" << endl;
|
||||||
|
|
||||||
@ -61,7 +60,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Iteration: " << runTime.value() << nl << endl;
|
Info<< "Iteration: " << runTime.value() << nl << endl;
|
||||||
|
|
||||||
# include "readSolidDisplacementFoamControls.H"
|
#include "readSolidDisplacementFoamControls.H"
|
||||||
|
|
||||||
int iCorr = 0;
|
int iCorr = 0;
|
||||||
scalar initialResidual = 0;
|
scalar initialResidual = 0;
|
||||||
@ -123,7 +122,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
} while (initialResidual > convergenceTolerance && ++iCorr < nCorr);
|
} while (initialResidual > convergenceTolerance && ++iCorr < nCorr);
|
||||||
|
|
||||||
# include "calculateStress.H"
|
#include "calculateStress.H"
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
|||||||
@ -150,13 +150,13 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
|||||||
const polyMesh& mesh = this->cloud().pMesh();
|
const polyMesh& mesh = this->cloud().pMesh();
|
||||||
|
|
||||||
// Momentum transfer coefficient
|
// Momentum transfer coefficient
|
||||||
const scalar ptc =
|
const scalar utc =
|
||||||
td.cloud().drag().ptc(U - Uc_, d, rhoc_, muc_) + ROOTVSMALL;
|
td.cloud().drag().utc(U - Uc_, d, rhoc_, muc_) + ROOTVSMALL;
|
||||||
|
|
||||||
// Momentum source due to particle forces
|
// Momentum source due to particle forces
|
||||||
const vector PFCoupled =
|
const vector FCoupled =
|
||||||
mass*td.cloud().forces().calcCoupled(cellI, dt, rhoc_, rho, Uc_, U);
|
mass*td.cloud().forces().calcCoupled(cellI, dt, rhoc_, rho, Uc_, U);
|
||||||
const vector PFNonCoupled =
|
const vector FNonCoupled =
|
||||||
mass*td.cloud().forces().calcNonCoupled(cellI, dt, rhoc_, rho, Uc_, U);
|
mass*td.cloud().forces().calcNonCoupled(cellI, dt, rhoc_, rho, Uc_, U);
|
||||||
|
|
||||||
|
|
||||||
@ -165,15 +165,15 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
|||||||
|
|
||||||
// Update velocity - treat as 3-D
|
// Update velocity - treat as 3-D
|
||||||
const scalar As = this->areaS(d);
|
const scalar As = this->areaS(d);
|
||||||
const vector ap = Uc_ + (PFCoupled + PFNonCoupled + Su)/(ptc*As);
|
const vector ap = Uc_ + (FCoupled + FNonCoupled + Su)/(utc*As);
|
||||||
const scalar bp = 6.0*ptc/(rho*d);
|
const scalar bp = 6.0*utc/(rho*d);
|
||||||
|
|
||||||
IntegrationScheme<vector>::integrationResult Ures =
|
IntegrationScheme<vector>::integrationResult Ures =
|
||||||
td.cloud().UIntegrator().integrate(U, dt, ap, bp);
|
td.cloud().UIntegrator().integrate(U, dt, ap, bp);
|
||||||
|
|
||||||
vector Unew = Ures.value();
|
vector Unew = Ures.value();
|
||||||
|
|
||||||
dUTrans += dt*(ptc*As*(Ures.average() - Uc_) - PFCoupled);
|
dUTrans += dt*(utc*As*(Ures.average() - Uc_) - FCoupled);
|
||||||
|
|
||||||
// Apply correction to velocity and dUTrans for reduced-D cases
|
// Apply correction to velocity and dUTrans for reduced-D cases
|
||||||
meshTools::constrainDirection(mesh, mesh.solutionD(), Unew);
|
meshTools::constrainDirection(mesh, mesh.solutionD(), Unew);
|
||||||
|
|||||||
@ -64,7 +64,7 @@ const Foam::dictionary& Foam::DragModel<CloudType>::dict() const
|
|||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
Foam::scalar Foam::DragModel<CloudType>::ptc
|
Foam::scalar Foam::DragModel<CloudType>::utc
|
||||||
(
|
(
|
||||||
const vector& Ur,
|
const vector& Ur,
|
||||||
const scalar d,
|
const scalar d,
|
||||||
|
|||||||
@ -121,8 +121,8 @@ public:
|
|||||||
virtual scalar Cd(const scalar Re) const = 0;
|
virtual scalar Cd(const scalar Re) const = 0;
|
||||||
|
|
||||||
//- Return momentum transfer coefficient
|
//- Return momentum transfer coefficient
|
||||||
// Drag force per unit particle surface area = ptc(U - Up)
|
// Drag force per unit particle surface area = utc(U - Up)
|
||||||
scalar ptc
|
scalar utc
|
||||||
(
|
(
|
||||||
const vector& Ur,
|
const vector& Ur,
|
||||||
const scalar d,
|
const scalar d,
|
||||||
|
|||||||
@ -181,7 +181,7 @@ public:
|
|||||||
//- Flag to identify whether model fully describes the parcel
|
//- Flag to identify whether model fully describes the parcel
|
||||||
virtual bool fullyDescribed() const;
|
virtual bool fullyDescribed() const;
|
||||||
|
|
||||||
//- Return flag to identify whether or not injection in cellI is
|
//- Return flag to identify whether or not injection of parcelI is
|
||||||
// permitted
|
// permitted
|
||||||
virtual bool validInjection(const label parcelI);
|
virtual bool validInjection(const label parcelI);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -280,7 +280,7 @@ bool Foam::ConeInjectionMP<CloudType>::fullyDescribed() const
|
|||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
bool Foam::ConeInjectionMP<CloudType>::validInjection(const label parcelI)
|
bool Foam::ConeInjectionMP<CloudType>::validInjection(const label)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,7 +191,7 @@ public:
|
|||||||
//- Flag to identify whether model fully describes the parcel
|
//- Flag to identify whether model fully describes the parcel
|
||||||
virtual bool fullyDescribed() const;
|
virtual bool fullyDescribed() const;
|
||||||
|
|
||||||
//- Return flag to identify whether or not injection in cellI is
|
//- Return flag to identify whether or not injection of parcelI is
|
||||||
// permitted
|
// permitted
|
||||||
virtual bool validInjection(const label parcelI);
|
virtual bool validInjection(const label parcelI);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -181,7 +181,7 @@ public:
|
|||||||
//- Flag to identify whether model fully describes the parcel
|
//- Flag to identify whether model fully describes the parcel
|
||||||
virtual bool fullyDescribed() const;
|
virtual bool fullyDescribed() const;
|
||||||
|
|
||||||
//- Return flag to identify whether or not injection in cellI is
|
//- Return flag to identify whether or not injection of parcelI is
|
||||||
// permitted
|
// permitted
|
||||||
virtual bool validInjection(const label parcelI);
|
virtual bool validInjection(const label parcelI);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -161,7 +161,7 @@ protected:
|
|||||||
const scalar time1
|
const scalar time1
|
||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Additional flag to identify whether or not injection in cellI is
|
//- Additional flag to identify whether or not injection of parcelI is
|
||||||
// permitted
|
// permitted
|
||||||
virtual bool validInjection(const label parcelI) = 0;
|
virtual bool validInjection(const label parcelI) = 0;
|
||||||
|
|
||||||
|
|||||||
@ -170,7 +170,7 @@ public:
|
|||||||
//- Flag to identify whether model fully describes the parcel
|
//- Flag to identify whether model fully describes the parcel
|
||||||
virtual bool fullyDescribed() const;
|
virtual bool fullyDescribed() const;
|
||||||
|
|
||||||
//- Return flag to identify whether or not injection in cellI is
|
//- Return flag to identify whether or not injection of parcelI is
|
||||||
// permitted
|
// permitted
|
||||||
virtual bool validInjection(const label parcelI);
|
virtual bool validInjection(const label parcelI);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -105,8 +105,7 @@ Foam::ManualInjection<CloudType>::ManualInjection
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Determine volume of particles to inject
|
// Determine volume of particles to inject
|
||||||
this->volumeTotal_ = sum(pow(diameters_, 3))
|
this->volumeTotal_ = sum(pow3(diameters_))*mathematicalConstant::pi/6.0;
|
||||||
*mathematicalConstant::pi/6.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -153,7 +153,7 @@ public:
|
|||||||
//- Flag to identify whether model fully describes the parcel
|
//- Flag to identify whether model fully describes the parcel
|
||||||
virtual bool fullyDescribed() const;
|
virtual bool fullyDescribed() const;
|
||||||
|
|
||||||
//- Return flag to identify whether or not injection in cellI is
|
//- Return flag to identify whether or not injection of parcelI is
|
||||||
// permitted
|
// permitted
|
||||||
virtual bool validInjection(const label parcelI);
|
virtual bool validInjection(const label parcelI);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -123,9 +123,9 @@ public:
|
|||||||
//- Flag to identify whether model fully describes the parcel
|
//- Flag to identify whether model fully describes the parcel
|
||||||
virtual bool fullyDescribed() const;
|
virtual bool fullyDescribed() const;
|
||||||
|
|
||||||
//- Return flag to identify whether or not injection in cellI is
|
//- Return flag to identify whether or not injection of parcelI is
|
||||||
// permitted
|
// permitted
|
||||||
virtual bool validInjection(const label cellI);
|
virtual bool validInjection(const label parcelI);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,26 @@ License
|
|||||||
#include "PatchPostProcessing.H"
|
#include "PatchPostProcessing.H"
|
||||||
#include "IOPtrList.H"
|
#include "IOPtrList.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template <class CloudType>
|
||||||
|
Foam::label Foam::PatchPostProcessing<CloudType>::applyToPatch
|
||||||
|
(
|
||||||
|
const label globalPatchI
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
forAll(patchIds_, patchI)
|
||||||
|
{
|
||||||
|
if (patchIds_[patchI] == globalPatchI)
|
||||||
|
{
|
||||||
|
return patchI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
@ -80,9 +100,8 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing
|
|||||||
mesh_(owner.mesh()),
|
mesh_(owner.mesh()),
|
||||||
patchNames_(this->coeffDict().lookup("patches")),
|
patchNames_(this->coeffDict().lookup("patches")),
|
||||||
patchData_(patchNames_.size()),
|
patchData_(patchNames_.size()),
|
||||||
globalToLocalPatchIds_(patchNames_.size())
|
patchIds_(patchNames_.size())
|
||||||
{
|
{
|
||||||
labelList localToGlobal(patchNames_.size());
|
|
||||||
forAll(patchNames_, patchI)
|
forAll(patchNames_, patchI)
|
||||||
{
|
{
|
||||||
label id = mesh_.boundaryMesh().findPatchID(patchNames_[patchI]);
|
label id = mesh_.boundaryMesh().findPatchID(patchNames_[patchI]);
|
||||||
@ -99,12 +118,7 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing
|
|||||||
<< "Available patches are: " << mesh_.boundaryMesh().names() << nl
|
<< "Available patches are: " << mesh_.boundaryMesh().names() << nl
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
localToGlobal[patchI] = id;
|
patchIds_[patchI] = id;
|
||||||
}
|
|
||||||
|
|
||||||
forAll(localToGlobal, patchI)
|
|
||||||
{
|
|
||||||
globalToLocalPatchIds_[localToGlobal[patchI]] = patchI;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,8 +146,8 @@ void Foam::PatchPostProcessing<CloudType>::postPatch
|
|||||||
const label patchI
|
const label patchI
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label localPatchI = globalToLocalPatchIds_[patchI];
|
label localPatchI = applyToPatch(patchI);
|
||||||
if (patchData_[localPatchI].size() < maxStoredParcels_)
|
if (localPatchI >= 0 && patchData_[localPatchI].size() < maxStoredParcels_)
|
||||||
{
|
{
|
||||||
patchData_[localPatchI].append(p.clone());
|
patchData_[localPatchI].append(p.clone());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class PatchPostProcessing Declaration
|
Class PatchPostProcessing Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
@ -59,7 +59,7 @@ class PatchPostProcessing
|
|||||||
//- Reference to the mesh
|
//- Reference to the mesh
|
||||||
const polyMesh& mesh_;
|
const polyMesh& mesh_;
|
||||||
|
|
||||||
//- Maximum number of parcels to store per patch
|
//- Maximum number of parcels to store
|
||||||
label maxStoredParcels_;
|
label maxStoredParcels_;
|
||||||
|
|
||||||
//- List of patch names
|
//- List of patch names
|
||||||
@ -68,8 +68,14 @@ class PatchPostProcessing
|
|||||||
//- List of parcel data per patch
|
//- List of parcel data per patch
|
||||||
List<DynamicList<autoPtr<parcelType> > > patchData_;
|
List<DynamicList<autoPtr<parcelType> > > patchData_;
|
||||||
|
|
||||||
//- Mapping from global to local patch ids
|
//- Mapping from local to global patch ids
|
||||||
labelList globalToLocalPatchIds_;
|
labelList patchIds_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Returns local patchI if patch is in patchIds_ list
|
||||||
|
label applyToPatch(const label globalPatchI) const;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -109,8 +115,8 @@ public:
|
|||||||
//- Return const access to the list of patch names
|
//- Return const access to the list of patch names
|
||||||
inline const wordList& patchNames() const;
|
inline const wordList& patchNames() const;
|
||||||
|
|
||||||
//- Return const mapping from global to local patch ids
|
//- Return const mapping from local to global patch ids
|
||||||
inline const labelList& globalToLocalPatchIds() const;
|
inline const labelList& patchIds() const;
|
||||||
|
|
||||||
|
|
||||||
// Evaluation
|
// Evaluation
|
||||||
|
|||||||
@ -47,9 +47,9 @@ const Foam::wordList& Foam::PatchPostProcessing<CloudType>::patchNames() const
|
|||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
const Foam::labelList&
|
const Foam::labelList&
|
||||||
Foam::PatchPostProcessing<CloudType>::globalToLocalPatchIds() const
|
Foam::PatchPostProcessing<CloudType>::patchIds() const
|
||||||
{
|
{
|
||||||
return globalToLocalPatchIds_;
|
return patchIds_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -181,7 +181,7 @@ public:
|
|||||||
//- Flag to identify whether model fully describes the parcel
|
//- Flag to identify whether model fully describes the parcel
|
||||||
virtual bool fullyDescribed() const;
|
virtual bool fullyDescribed() const;
|
||||||
|
|
||||||
//- Return flag to identify whether or not injection in cellI is
|
//- Return flag to identify whether or not injection of parcelI is
|
||||||
// permitted
|
// permitted
|
||||||
virtual bool validInjection(const label parcelI);
|
virtual bool validInjection(const label parcelI);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -181,7 +181,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return flag to identify whether or not injection in cellI is
|
//- Return flag to identify whether or not injection of parcelI is
|
||||||
// permitted
|
// permitted
|
||||||
virtual bool validInjection(const label parcelI);
|
virtual bool validInjection(const label parcelI);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -266,7 +266,7 @@ public:
|
|||||||
virtual scalar mug(scalar p, scalar T) const = 0;
|
virtual scalar mug(scalar p, scalar T) const = 0;
|
||||||
|
|
||||||
//- Liquid thermal conductivity [W/(m K)]
|
//- Liquid thermal conductivity [W/(m K)]
|
||||||
virtual scalar K(scalar p, scalar T) const =0;
|
virtual scalar K(scalar p, scalar T) const = 0;
|
||||||
|
|
||||||
//- Vapour thermal conductivity [W/(m K)]
|
//- Vapour thermal conductivity [W/(m K)]
|
||||||
virtual scalar Kg(scalar p, scalar T) const = 0;
|
virtual scalar Kg(scalar p, scalar T) const = 0;
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Foam::solidMixture::solidMixture
|
|||||||
const dictionary& thermophysicalProperties
|
const dictionary& thermophysicalProperties
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
components_(thermophysicalProperties.lookup("solidFuelComponents")),
|
components_(thermophysicalProperties.lookup("solidComponents")),
|
||||||
properties_(components_.size())
|
properties_(components_.size())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,7 @@ public:
|
|||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
inline autoPtr<hConstThermo> clone() const;
|
inline autoPtr<hConstThermo> clone() const;
|
||||||
|
|
||||||
// Selector from Istream
|
//- Selector from Istream
|
||||||
inline static autoPtr<hConstThermo> New(Istream& is);
|
inline static autoPtr<hConstThermo> New(Istream& is);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@ solvers
|
|||||||
solver PCG;
|
solver PCG;
|
||||||
preconditioner DIC;
|
preconditioner DIC;
|
||||||
tolerance 1e-08;
|
tolerance 1e-08;
|
||||||
relTol 0;
|
relTol 0.01;
|
||||||
}
|
}
|
||||||
|
|
||||||
U
|
U
|
||||||
@ -30,7 +30,7 @@ solvers
|
|||||||
solver PBiCG;
|
solver PBiCG;
|
||||||
preconditioner DILU;
|
preconditioner DILU;
|
||||||
tolerance 1e-05;
|
tolerance 1e-05;
|
||||||
relTol 0;
|
relTol 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
T
|
T
|
||||||
@ -38,7 +38,7 @@ solvers
|
|||||||
solver PBiCG;
|
solver PBiCG;
|
||||||
preconditioner DILU;
|
preconditioner DILU;
|
||||||
tolerance 1e-05;
|
tolerance 1e-05;
|
||||||
relTol 0;
|
relTol 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
k
|
k
|
||||||
@ -46,7 +46,7 @@ solvers
|
|||||||
solver PBiCG;
|
solver PBiCG;
|
||||||
preconditioner DILU;
|
preconditioner DILU;
|
||||||
tolerance 1e-05;
|
tolerance 1e-05;
|
||||||
relTol 0;
|
relTol 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
epsilon
|
epsilon
|
||||||
@ -54,7 +54,7 @@ solvers
|
|||||||
solver PBiCG;
|
solver PBiCG;
|
||||||
preconditioner DILU;
|
preconditioner DILU;
|
||||||
tolerance 1e-05;
|
tolerance 1e-05;
|
||||||
relTol 0;
|
relTol 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
R
|
R
|
||||||
@ -62,7 +62,7 @@ solvers
|
|||||||
solver PBiCG;
|
solver PBiCG;
|
||||||
preconditioner DILU;
|
preconditioner DILU;
|
||||||
tolerance 1e-05;
|
tolerance 1e-05;
|
||||||
relTol 0;
|
relTol 0.1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ FoamFile
|
|||||||
(
|
(
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type directMapped;
|
type directMappedPatch;
|
||||||
nFaces 30;
|
nFaces 30;
|
||||||
startFace 27238;
|
startFace 27238;
|
||||||
sampleMode nearestCell;
|
sampleMode nearestCell;
|
||||||
|
|||||||
48
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/T
Normal file
48
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/T
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.5 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 265;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
ground
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 265;
|
||||||
|
}
|
||||||
|
|
||||||
|
igloo_region0
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 265;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_seal_0
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 303;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_herring_1
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 303;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
48
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/U
Normal file
48
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/U
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.5 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
ground
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
igloo_region0
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_seal_0
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_herring_1
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
50
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/alphat
Normal file
50
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/alphat
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.5 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object alphat;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
ground
|
||||||
|
{
|
||||||
|
type alphatWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
igloo_region0
|
||||||
|
{
|
||||||
|
type alphatWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_seal_0
|
||||||
|
{
|
||||||
|
type alphatWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_herring_1
|
||||||
|
{
|
||||||
|
type alphatWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
50
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/epsilon
Normal file
50
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/epsilon
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object epsilon;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -3 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0.01;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
ground
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
igloo_region0
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_seal_0
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_herring_1
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
50
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/k
Normal file
50
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/k
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0.1;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
ground
|
||||||
|
{
|
||||||
|
type kQRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
igloo_region0
|
||||||
|
{
|
||||||
|
type kQRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_seal_0
|
||||||
|
{
|
||||||
|
type kQRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_herring_1
|
||||||
|
{
|
||||||
|
type kQRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
50
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/nut
Normal file
50
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/nut
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object nut;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
ground
|
||||||
|
{
|
||||||
|
type nutWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
igloo_region0
|
||||||
|
{
|
||||||
|
type nutWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_seal_0
|
||||||
|
{
|
||||||
|
type nutWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_herring_1
|
||||||
|
{
|
||||||
|
type nutWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
52
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/p
Normal file
52
tutorials/mesh/snappyHexMesh/iglooWithFridges/0/p
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.5 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
ground
|
||||||
|
{
|
||||||
|
type fixedFluxBuoyantPressure;
|
||||||
|
rho rhok;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
igloo_region0
|
||||||
|
{
|
||||||
|
type fixedFluxBuoyantPressure;
|
||||||
|
rho rhok;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_seal_0
|
||||||
|
{
|
||||||
|
type fixedFluxBuoyantPressure;
|
||||||
|
rho rhok;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
twoFridgeFreezers_herring_1
|
||||||
|
{
|
||||||
|
type fixedFluxBuoyantPressure;
|
||||||
|
rho rhok;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
9
tutorials/mesh/snappyHexMesh/iglooWithFridges/Allrun
Executable file
9
tutorials/mesh/snappyHexMesh/iglooWithFridges/Allrun
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication snappyHexMesh -overwrite
|
||||||
|
runApplication setFields
|
||||||
|
runApplication buoyantBoussinesqSimpleFoam
|
||||||
|
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.5 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object RASProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
RASModel kEpsilon;
|
||||||
|
|
||||||
|
turbulence on;
|
||||||
|
|
||||||
|
printCoeffs on;
|
||||||
|
|
||||||
|
laminarCoeffs
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
kEpsilonCoeffs
|
||||||
|
{
|
||||||
|
Cmu 0.09;
|
||||||
|
C1 1.44;
|
||||||
|
C2 1.92;
|
||||||
|
C3 0.85;
|
||||||
|
alphah 1;
|
||||||
|
alphak 1;
|
||||||
|
alphaEps 0.76923;
|
||||||
|
}
|
||||||
|
|
||||||
|
RNGkEpsilonCoeffs
|
||||||
|
{
|
||||||
|
Cmu 0.0845;
|
||||||
|
C1 1.42;
|
||||||
|
C2 1.68;
|
||||||
|
C3 -0.33;
|
||||||
|
alphah 1;
|
||||||
|
alphak 1.39;
|
||||||
|
alphaEps 1.39;
|
||||||
|
eta0 4.38;
|
||||||
|
beta 0.012;
|
||||||
|
}
|
||||||
|
|
||||||
|
LaunderSharmaKECoeffs
|
||||||
|
{
|
||||||
|
Cmu 0.09;
|
||||||
|
C1 1.44;
|
||||||
|
C2 1.92;
|
||||||
|
C3 -0.33;
|
||||||
|
alphah 1;
|
||||||
|
alphak 1;
|
||||||
|
alphaEps 0.76923;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRRCoeffs
|
||||||
|
{
|
||||||
|
Cmu 0.09;
|
||||||
|
Clrr1 1.8;
|
||||||
|
Clrr2 0.6;
|
||||||
|
C1 1.44;
|
||||||
|
C2 1.92;
|
||||||
|
alphah 1;
|
||||||
|
Cs 0.25;
|
||||||
|
Ceps 0.15;
|
||||||
|
alphaR 1;
|
||||||
|
alphaEps 0.76923;
|
||||||
|
}
|
||||||
|
|
||||||
|
LaunderGibsonRSTMCoeffs
|
||||||
|
{
|
||||||
|
Cmu 0.09;
|
||||||
|
Clg1 1.8;
|
||||||
|
Clg2 0.6;
|
||||||
|
C1 1.44;
|
||||||
|
C2 1.92;
|
||||||
|
alphah 1;
|
||||||
|
C1Ref 0.5;
|
||||||
|
C2Ref 0.3;
|
||||||
|
Cs 0.25;
|
||||||
|
Ceps 0.15;
|
||||||
|
alphaR 1;
|
||||||
|
alphaEps 0.76923;
|
||||||
|
}
|
||||||
|
|
||||||
|
wallFunctionCoeffs
|
||||||
|
{
|
||||||
|
kappa 0.4187;
|
||||||
|
E 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.5 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object environmentalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
g g [0 1 -2 0 0 0 0] (0 0 -9.81);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -40,27 +40,32 @@ edges
|
|||||||
|
|
||||||
patches
|
patches
|
||||||
(
|
(
|
||||||
patch maxY
|
empty maxY
|
||||||
(
|
(
|
||||||
(3 7 6 2)
|
(3 7 6 2)
|
||||||
)
|
)
|
||||||
patch minX
|
|
||||||
|
empty minX
|
||||||
(
|
(
|
||||||
(0 4 7 3)
|
(0 4 7 3)
|
||||||
)
|
)
|
||||||
patch maxX
|
|
||||||
|
empty maxX
|
||||||
(
|
(
|
||||||
(2 6 5 1)
|
(2 6 5 1)
|
||||||
)
|
)
|
||||||
patch minY
|
|
||||||
|
empty minY
|
||||||
(
|
(
|
||||||
(1 5 4 0)
|
(1 5 4 0)
|
||||||
)
|
)
|
||||||
patch minZ
|
|
||||||
|
wall ground
|
||||||
(
|
(
|
||||||
(0 3 2 1)
|
(0 3 2 1)
|
||||||
)
|
)
|
||||||
patch maxZ
|
|
||||||
|
empty maxZ
|
||||||
(
|
(
|
||||||
(4 5 6 7)
|
(4 5 6 7)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -0,0 +1,42 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.5.x |
|
||||||
|
| \\ / A nd | Web: http://www.openfoam.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
|
||||||
|
root "";
|
||||||
|
case "";
|
||||||
|
instance "";
|
||||||
|
local "";
|
||||||
|
|
||||||
|
class dictionary;
|
||||||
|
object transportProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
transportModel Newtonian;
|
||||||
|
|
||||||
|
// Laminar viscosity
|
||||||
|
nu nu [0 2 -1 0 0 0 0] 1e-05;
|
||||||
|
|
||||||
|
// Thermal expansion coefficient
|
||||||
|
beta beta [0 0 0 -1 0 0 0] 3e-03;
|
||||||
|
|
||||||
|
// Reference temperature
|
||||||
|
TRef TRef [0 0 0 1 0 0 0] 300;
|
||||||
|
|
||||||
|
// Laminar Prandtl number
|
||||||
|
Pr Pr [0 0 0 0 0 0 0] 0.9;
|
||||||
|
|
||||||
|
// Turbulent Prandtl number
|
||||||
|
Prt Prt [0 0 0 0 0 0 0] 0.7;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -15,25 +15,25 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
startFrom latestTime;
|
startFrom startTime;
|
||||||
|
|
||||||
startTime 0;
|
startTime 0;
|
||||||
|
|
||||||
stopAt endTime;
|
stopAt endTime;
|
||||||
|
|
||||||
endTime 100;
|
endTime 1000;
|
||||||
|
|
||||||
deltaT 1;
|
deltaT 1;
|
||||||
|
|
||||||
writeControl timeStep;
|
writeControl timeStep;
|
||||||
|
|
||||||
writeInterval 1;
|
writeInterval 100;
|
||||||
|
|
||||||
purgeWrite 0;
|
purgeWrite 0;
|
||||||
|
|
||||||
writeFormat ascii;
|
writeFormat ascii;
|
||||||
|
|
||||||
writePrecision 7;
|
writePrecision 6;
|
||||||
|
|
||||||
writeCompression uncompressed;
|
writeCompression uncompressed;
|
||||||
|
|
||||||
|
|||||||
@ -17,33 +17,40 @@ FoamFile
|
|||||||
|
|
||||||
ddtSchemes
|
ddtSchemes
|
||||||
{
|
{
|
||||||
default Euler;
|
default steadyState;
|
||||||
}
|
}
|
||||||
|
|
||||||
gradSchemes
|
gradSchemes
|
||||||
{
|
{
|
||||||
default Gauss linear;
|
default Gauss linear;
|
||||||
grad(p) Gauss linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
divSchemes
|
divSchemes
|
||||||
{
|
{
|
||||||
default none;
|
default none;
|
||||||
div(phi,U) Gauss linear;
|
div(phi,U) Gauss upwind;
|
||||||
|
div(phi,T) Gauss upwind;
|
||||||
|
div(phi,k) Gauss upwind;
|
||||||
|
div(phi,epsilon) Gauss upwind;
|
||||||
|
div(phi,R) Gauss upwind;
|
||||||
|
div(R) Gauss linear;
|
||||||
|
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
{
|
{
|
||||||
default none;
|
default none;
|
||||||
laplacian(nu,U) Gauss linear corrected;
|
laplacian(nuEff,U) Gauss linear corrected;
|
||||||
laplacian(1|A(U),p) Gauss linear corrected;
|
laplacian((1|A(U)),p) Gauss linear corrected;
|
||||||
laplacian(diffusivity,cellMotionU) Gauss linear uncorrected;
|
laplacian(kappaEff,T) Gauss linear corrected;
|
||||||
|
laplacian(DkEff,k) Gauss linear corrected;
|
||||||
|
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||||
|
laplacian(DREff,R) Gauss linear corrected;
|
||||||
}
|
}
|
||||||
|
|
||||||
interpolationSchemes
|
interpolationSchemes
|
||||||
{
|
{
|
||||||
default linear;
|
default linear;
|
||||||
interpolate(HbyA) linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
snGradSchemes
|
snGradSchemes
|
||||||
|
|||||||
@ -16,15 +16,73 @@ FoamFile
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
solvers
|
solvers
|
||||||
{}
|
|
||||||
|
|
||||||
PISO
|
|
||||||
{
|
{
|
||||||
nCorrectors 2;
|
p
|
||||||
|
{
|
||||||
|
solver PCG;
|
||||||
|
preconditioner DIC;
|
||||||
|
tolerance 1e-08;
|
||||||
|
relTol 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
U
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
T
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
k
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
epsilon
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
R
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMPLE
|
||||||
|
{
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pRefCell 0;
|
pRefCell 0;
|
||||||
pRefValue 0;
|
pRefValue 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
rho 1;
|
||||||
|
p 0.3;
|
||||||
|
U 0.7;
|
||||||
|
T 0.7;
|
||||||
|
k 0.7;
|
||||||
|
epsilon 0.7;
|
||||||
|
R 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -42,40 +42,39 @@ geometry
|
|||||||
min (0 0 0);
|
min (0 0 0);
|
||||||
max (1 1 1);
|
max (1 1 1);
|
||||||
}
|
}
|
||||||
//fridgeFreezer
|
|
||||||
//{
|
fridgeFreezer
|
||||||
// type searchableSurfaceCollection;
|
{
|
||||||
//
|
type searchableSurfaceCollection;
|
||||||
// mergeSubRegions true;
|
|
||||||
//
|
mergeSubRegions true;
|
||||||
// // Note: the two parts of fridgeFreezer abut. This can give problems
|
|
||||||
// // in snapping if the nearest point on the surface is the
|
freezer
|
||||||
// // internal face.
|
{
|
||||||
// freezer
|
surface box1;
|
||||||
// {
|
scale (1 1 1);
|
||||||
// surface box1;
|
transform
|
||||||
// scale (1 1 1);
|
{
|
||||||
// transform
|
type cartesian;
|
||||||
// {
|
origin (0 0 0);
|
||||||
// type cartesian;
|
e1 (1 0 0);
|
||||||
// origin (0 0 0);
|
e3 (0 0 1);
|
||||||
// e1 (1 0 0);
|
}
|
||||||
// e3 (0 0 1);
|
}
|
||||||
// }
|
fridge
|
||||||
// }
|
{
|
||||||
// fridge
|
surface box1;
|
||||||
// {
|
scale (1 1 1.1);
|
||||||
// surface box1;
|
transform
|
||||||
// scale (1 1 1.1);
|
{
|
||||||
// transform
|
type cartesian;
|
||||||
// {
|
origin (0 0 1);
|
||||||
// type cartesian;
|
e1 (1 0 0);
|
||||||
// origin (0 0 1);
|
e3 (0 0 1);
|
||||||
// e1 (1 0 0);
|
}
|
||||||
// e3 (0 0 1);
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
//}
|
|
||||||
twoFridgeFreezers
|
twoFridgeFreezers
|
||||||
{
|
{
|
||||||
type searchableSurfaceCollection;
|
type searchableSurfaceCollection;
|
||||||
@ -84,15 +83,6 @@ geometry
|
|||||||
|
|
||||||
seal
|
seal
|
||||||
{
|
{
|
||||||
//surface fridgeFreezer;
|
|
||||||
//scale (1.0 1.0 1.0);
|
|
||||||
//transform
|
|
||||||
//{
|
|
||||||
// type cartesian;
|
|
||||||
// origin (2 2 0);
|
|
||||||
// e1 (1 0 0);
|
|
||||||
// e3 (0 0 1);
|
|
||||||
//}
|
|
||||||
surface box1;
|
surface box1;
|
||||||
scale (1.0 1.0 2.1);
|
scale (1.0 1.0 2.1);
|
||||||
transform
|
transform
|
||||||
@ -105,15 +95,6 @@ geometry
|
|||||||
}
|
}
|
||||||
herring
|
herring
|
||||||
{
|
{
|
||||||
//surface fridgeFreezer;
|
|
||||||
//scale (1.0 1.0 1.0);
|
|
||||||
//transform
|
|
||||||
//{
|
|
||||||
// type cartesian;
|
|
||||||
// origin (3.5 3 0);
|
|
||||||
// e1 (1 0 0);
|
|
||||||
// e3 (0 0 1);
|
|
||||||
//}
|
|
||||||
surface box1;
|
surface box1;
|
||||||
scale (1.0 1.0 2.1);
|
scale (1.0 1.0 2.1);
|
||||||
transform
|
transform
|
||||||
|
|||||||
@ -12,7 +12,7 @@ do
|
|||||||
|
|
||||||
if [ "$case" = "damBreak" ]
|
if [ "$case" = "damBreak" ]
|
||||||
then
|
then
|
||||||
cp $case/0/gamma.org $case/0/gamma
|
cp $case/0/alpha1.org $case/0/alpha1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user