Merge branch 'nextRelease' into feature/fullyIntegratedRealGasThermo
Conflicts: src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C
This commit is contained in:
commit
09a06be1a4
1841 changed files with 49348 additions and 21279 deletions
|
@ -10,7 +10,7 @@
|
|||
# on the foam-extend CDash service hosted on SourceForge.Net
|
||||
# See here: http://foam-extend.sourceforge.net/CDash/index.php
|
||||
#
|
||||
set(CTEST_PROJECT_NAME "foam-extend-3.2")
|
||||
set(CTEST_PROJECT_NAME "foam-extend-4.0")
|
||||
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
|
|
|
@ -86,3 +86,6 @@ Contents:
|
|||
Inno Gatin
|
||||
Alexey Matveichev
|
||||
Vuko Vukcevic
|
||||
Robert Keser
|
||||
Cesare Guardino
|
||||
Ilaria De Dominicis
|
||||
|
|
|
@ -27,3 +27,5 @@
|
|||
);
|
||||
|
||||
# include "createPhi.H"
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -35,6 +35,7 @@ Description
|
|||
#include "fft.H"
|
||||
#include "calcEk.H"
|
||||
#include "graph.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -44,6 +45,9 @@ int main(int argc, char *argv[])
|
|||
|
||||
#include "createTime.H"
|
||||
#include "createMeshNoClear.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
#include "readTransportProperties.H"
|
||||
#include "createFields.H"
|
||||
#include "readTurbulenceProperties.H"
|
||||
|
@ -57,8 +61,6 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readPISOControls.H"
|
||||
|
||||
force.internalField() = ReImSum
|
||||
(
|
||||
fft::reverseTransform
|
||||
|
@ -83,7 +85,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
// --- PISO loop
|
||||
|
||||
for (int corr=1; corr<=1; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<< (
|
||||
0.5*nu*average
|
||||
(
|
||||
magSqr(fvc::grad(U) + fvc::grad(U)().T())
|
||||
magSqr(fvc::grad(U) + T(fvc::grad(U)))
|
||||
)
|
||||
).value() << endl;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -41,19 +41,20 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nCalculating temperature distribution\n" << endl;
|
||||
|
||||
while (runTime.loop())
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readSIMPLEControls.H"
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
solve
|
||||
(
|
||||
|
|
|
@ -34,7 +34,9 @@
|
|||
fvc::makeAbsolute(phi, U);
|
||||
}
|
||||
|
||||
for(int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
||||
mesh.schemesDict().setFluxRequired(pcorr.name());
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
|
|
|
@ -47,4 +47,5 @@
|
|||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
||||
setRefCell(p, piso.dict(), pRefCell, pRefValue);
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -34,6 +34,7 @@ Author
|
|||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -45,6 +46,9 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createDynamicFvMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
# include "initTotalVolume.H"
|
||||
|
||||
|
@ -54,7 +58,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
while (runTime.loop())
|
||||
{
|
||||
# include "readPISOControls.H"
|
||||
# include "checkTotalVolume.H"
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
@ -75,10 +78,8 @@ int main(int argc, char *argv[])
|
|||
// Solve potential flow equations
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
p.storePrevIter();
|
||||
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian
|
||||
|
@ -98,7 +99,7 @@ int main(int argc, char *argv[])
|
|||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -49,4 +49,5 @@
|
|||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -31,6 +31,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -43,8 +44,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
# include "readSIMPLEControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -52,7 +55,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
p.storePrevIter();
|
||||
|
||||
|
@ -75,7 +78,7 @@ int main(int argc, char *argv[])
|
|||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -39,6 +40,9 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
|
||||
|
||||
|
@ -48,13 +52,11 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "CourantNo.H"
|
||||
|
||||
while (runTime.loop())
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readSIMPLEControls.H"
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
solve
|
||||
(
|
||||
|
|
|
@ -64,6 +64,7 @@ Description
|
|||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
#include "bound.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -73,11 +74,14 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
# include "readCombustionProperties.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "createTimeControls.H"
|
||||
# include "CourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
|
@ -90,7 +94,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "CourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
|
@ -102,7 +105,7 @@ int main(int argc, char *argv[])
|
|||
# include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
# include "bEqn.H"
|
||||
# include "ftEqn.H"
|
||||
|
|
|
@ -66,6 +66,7 @@ Description
|
|||
#include "Switch.H"
|
||||
#include "bound.H"
|
||||
#include "dynamicRefineFvMesh.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -75,12 +76,14 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "createTime.H"
|
||||
# include "createDynamicFvMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
# include "readCombustionProperties.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "createFields.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "createTimeControls.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
scalar StCoNum = 0.0;
|
||||
|
@ -92,7 +95,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "CourantNo.H"
|
||||
|
||||
# include "setDeltaT.H"
|
||||
|
@ -168,7 +170,7 @@ int main(int argc, char *argv[])
|
|||
# include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
# include "bEqn.H"
|
||||
# include "ftEqn.H"
|
||||
|
|
|
@ -219,7 +219,7 @@ tmp<fvVectorMatrix> PDRkEpsilon::divDevRhoReff(volVectorField& U) const
|
|||
{
|
||||
return
|
||||
(
|
||||
- fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T()))
|
||||
- fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(T(fvc::grad(U))))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
volSymmTensorField invA = inv(I*UEqn.A() + drag->Dcu());
|
||||
|
||||
if (momentumPredictor)
|
||||
if (piso.momentumPredictor())
|
||||
{
|
||||
U = invA & (UEqn.H() - betav*fvc::grad(p));
|
||||
U.correctBoundaryConditions();
|
||||
|
|
|
@ -163,3 +163,5 @@
|
|||
fields.add(h);
|
||||
fields.add(hu);
|
||||
flameWrinkling->addXi(fields);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -3,7 +3,7 @@ rho = thermo.rho();
|
|||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = invA & UEqn.H();
|
||||
|
||||
if (transonic)
|
||||
if (piso.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -15,7 +15,7 @@ if (transonic)
|
|||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -26,7 +26,7 @@ if (transonic)
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ else
|
|||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -52,7 +52,7 @@ else
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
UEqn.relax();
|
||||
|
||||
if (momentumPredictor)
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ Description
|
|||
#include "laminarFlameSpeed.H"
|
||||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -64,11 +65,14 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
# include "readCombustionProperties.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "createTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
|
@ -79,7 +83,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
|
@ -87,7 +90,7 @@ int main(int argc, char *argv[])
|
|||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
||||
while (pimple.loop())
|
||||
{
|
||||
# include "rhoEqn.H"
|
||||
# include "UEqn.H"
|
||||
|
@ -103,7 +106,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
|
|
@ -132,3 +132,5 @@
|
|||
fields.add(b);
|
||||
fields.add(h);
|
||||
fields.add(hu);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -3,7 +3,7 @@ rho = thermo.rho();
|
|||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
if (transonic)
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -15,7 +15,7 @@ if (transonic)
|
|||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -26,7 +26,7 @@ if (transonic)
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ else
|
|||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -52,7 +52,7 @@ else
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Description
|
|||
#include "basicPsiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "OFstream.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -44,8 +45,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "createEngineTime.H"
|
||||
# include "createEngineMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "createTimeControls.H"
|
||||
# include "readEngineTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
@ -57,7 +62,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
while (runTime.run())
|
||||
{
|
||||
# include "readPISOControls.H"
|
||||
# include "readEngineTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
@ -74,7 +78,7 @@ int main(int argc, char *argv[])
|
|||
# include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
# include "hEqn.H"
|
||||
# include "pEqn.H"
|
||||
|
|
|
@ -57,3 +57,5 @@
|
|||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt =
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
UEqn.relax();
|
||||
|
||||
if (momentumPredictor)
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
|
|
|
@ -107,3 +107,5 @@ DimensionedField<scalar, volMesh> chemistrySh
|
|||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -42,6 +42,7 @@ Description
|
|||
#include "OFstream.H"
|
||||
#include "volPointInterpolation.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -50,11 +51,15 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createEngineTime.H"
|
||||
# include "createEngineMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "readCombustionProperties.H"
|
||||
# include "createSpray.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "createTimeControls.H"
|
||||
# include "readEngineTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
@ -66,7 +71,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
while (runTime.run())
|
||||
{
|
||||
# include "readPISOControls.H"
|
||||
# include "readEngineTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
@ -102,13 +106,13 @@ int main(int argc, char *argv[])
|
|||
# include "rhoEqn.H"
|
||||
# include "UEqn.H"
|
||||
|
||||
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
||||
while (pimple.loop())
|
||||
{
|
||||
# include "YEqn.H"
|
||||
# include "hsEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ rho = thermo.rho();
|
|||
volScalarField A = UEqn.A();
|
||||
U = UEqn.H()/A;
|
||||
|
||||
if (transonic)
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -12,7 +12,7 @@ if (transonic)
|
|||
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -25,7 +25,7 @@ if (transonic)
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ else
|
|||
phi = fvc::interpolate(rho)
|
||||
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -49,7 +49,7 @@ else
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ Description
|
|||
#include "IFstream.H"
|
||||
#include "OFstream.H"
|
||||
#include "Switch.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -48,12 +49,15 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "readCombustionProperties.H"
|
||||
# include "createSpray.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "createTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
|
@ -63,7 +67,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
while (runTime.run())
|
||||
{
|
||||
# include "readPISOControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
|
@ -97,13 +100,13 @@ int main(int argc, char *argv[])
|
|||
# include "rhoEqn.H"
|
||||
# include "UEqn.H"
|
||||
|
||||
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
||||
while (pimple.loop())
|
||||
{
|
||||
# include "YEqn.H"
|
||||
# include "hsEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ rho = thermo.rho();
|
|||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
if (transonic)
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -15,7 +15,7 @@ if (transonic)
|
|||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -28,7 +28,7 @@ if (transonic)
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ else
|
|||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -56,7 +56,7 @@ else
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
if (momentumPredictor)
|
||||
if (piso.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ Description
|
|||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
#include "OFstream.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -66,9 +67,13 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "createEngineTime.H"
|
||||
# include "createEngineMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
# include "readCombustionProperties.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "createTimeControls.H"
|
||||
# include "readEngineTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
@ -80,7 +85,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
while (runTime.run())
|
||||
{
|
||||
# include "readPISOControls.H"
|
||||
# include "readEngineTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
@ -96,7 +100,7 @@ int main(int argc, char *argv[])
|
|||
# include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
# include "ftEqn.H"
|
||||
# include "bEqn.H"
|
||||
|
|
|
@ -3,7 +3,7 @@ rho = thermo.rho();
|
|||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
if (transonic)
|
||||
if (piso.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -12,7 +12,7 @@ if (transonic)
|
|||
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -23,7 +23,7 @@ if (transonic)
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ else
|
|||
phi = fvc::interpolate(rho)
|
||||
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -45,7 +45,7 @@ else
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -7,30 +7,14 @@ fvVectorMatrix UEqn
|
|||
|
||||
UEqn.relax();
|
||||
|
||||
if (oCorr == nOuterCorr - 1)
|
||||
{
|
||||
solve
|
||||
solve
|
||||
(
|
||||
UEqn
|
||||
==
|
||||
fvc::reconstruct
|
||||
(
|
||||
UEqn
|
||||
==
|
||||
fvc::reconstruct
|
||||
(
|
||||
fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
- fvc::snGrad(p)*mesh.magSf()
|
||||
),
|
||||
mesh.solutionDict().solver("UFinal")
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
solve
|
||||
(
|
||||
UEqn
|
||||
==
|
||||
fvc::reconstruct
|
||||
(
|
||||
fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
- fvc::snGrad(p)*mesh.magSf()
|
||||
)
|
||||
);
|
||||
}
|
||||
fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
- fvc::snGrad(p)*mesh.magSf()
|
||||
),
|
||||
mesh.solutionDict().solver((U.select(pimple.finalIter())))
|
||||
);
|
||||
|
|
|
@ -128,3 +128,5 @@ if (composition.contains("fu"))
|
|||
}
|
||||
|
||||
fields.add(hs);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -33,6 +33,7 @@ Description
|
|||
#include "hsCombustionThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "combustionModel.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
#include "radiationModel.H"
|
||||
|
||||
|
@ -43,11 +44,14 @@ int main(int argc, char *argv[])
|
|||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "createRadiationModel.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
|
@ -57,7 +61,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readPISOControls.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
@ -68,7 +71,7 @@ int main(int argc, char *argv[])
|
|||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
|
||||
|
@ -76,7 +79,7 @@ int main(int argc, char *argv[])
|
|||
#include "fuhsEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ surfaceScalarField phiU
|
|||
|
||||
phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf());
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
surfaceScalarField rhorUAf = fvc::interpolate(rho*rUA);
|
||||
|
||||
|
@ -30,16 +30,12 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|||
|
||||
closedVolume = p.needReference();
|
||||
|
||||
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
|
||||
{
|
||||
pEqn.solve(mesh.solutionDict().solver(p.name() + "Final"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve(mesh.solutionDict().solver(p.name()));
|
||||
}
|
||||
pEqn.solve
|
||||
(
|
||||
mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
UEqn.relax();
|
||||
|
||||
if (momentumPredictor)
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
|
|
|
@ -96,3 +96,5 @@ DimensionedField<scalar, volMesh> chemistrySh
|
|||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -3,7 +3,7 @@ rho = thermo.rho();
|
|||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
if (transonic)
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -15,7 +15,7 @@ if (transonic)
|
|||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -26,7 +26,7 @@ if (transonic)
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ else
|
|||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -52,7 +52,7 @@ else
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ Description
|
|||
#include "psiChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -43,11 +44,14 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
# include "readChemistryProperties.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "createTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
|
@ -58,7 +62,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
|
@ -68,14 +71,14 @@ int main(int argc, char *argv[])
|
|||
# include "chemistry.H"
|
||||
# include "rhoEqn.H"
|
||||
|
||||
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
||||
while (pimple.loop())
|
||||
{
|
||||
# include "UEqn.H"
|
||||
# include "YEqn.H"
|
||||
# include "hsEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
UEqn.relax();
|
||||
|
||||
if (momentumPredictor)
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
|
|
|
@ -97,3 +97,5 @@ DimensionedField<scalar, volMesh> chemistrySh
|
|||
mesh,
|
||||
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
if (transonic)
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phiv =
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
|
@ -22,7 +22,7 @@
|
|||
fvc::interpolate(thermo.psi())*phiv
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -31,21 +31,12 @@
|
|||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
if
|
||||
pEqn.solve
|
||||
(
|
||||
ocorr == nOuterCorr
|
||||
&& corr == nCorr
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solutionDict().solver(p.name() + "Final"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
@ -60,7 +51,7 @@
|
|||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -69,21 +60,12 @@
|
|||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
if
|
||||
pEqn.solve
|
||||
(
|
||||
ocorr == nOuterCorr
|
||||
&& corr == nCorr
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solutionDict().solver(p.name() + "Final"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ Description
|
|||
#include "rhoChemistryModel.H"
|
||||
#include "chemistrySolver.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -44,11 +45,14 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
# include "readChemistryProperties.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "createTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
|
@ -59,7 +63,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
|
@ -69,14 +72,14 @@ int main(int argc, char *argv[])
|
|||
# include "chemistry.H"
|
||||
# include "rhoEqn.H"
|
||||
|
||||
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
||||
while (pimple.loop())
|
||||
{
|
||||
# include "UEqn.H"
|
||||
# include "YEqn.H"
|
||||
# include "hsEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
|
|
@ -70,14 +70,14 @@
|
|||
|
||||
|
||||
// Create numeric flux
|
||||
// numericFlux<roeFlux, BarthJespersenLimiter> dbnsFlux
|
||||
numericFlux<rusanovFlux, BarthJespersenLimiter> dbnsFlux
|
||||
autoPtr<basicNumericFlux> dbnsFluxPtr = basicNumericFlux::New
|
||||
(
|
||||
p,
|
||||
U,
|
||||
T,
|
||||
thermo()
|
||||
);
|
||||
basicNumericFlux& dbnsFlux = dbnsFluxPtr();
|
||||
|
||||
// Create mass flux alias for easier coupling with other code components
|
||||
const surfaceScalarField& phi = dbnsFlux.rhoFlux();
|
||||
|
|
|
@ -54,6 +54,7 @@ int main(int argc, char *argv[])
|
|||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
# include "createTimeControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -70,13 +70,14 @@
|
|||
|
||||
|
||||
// Create numeric flux
|
||||
numericFlux<rusanovFlux, BarthJespersenLimiter> dbnsFlux
|
||||
autoPtr<basicNumericFlux> dbnsFluxPtr = basicNumericFlux::New
|
||||
(
|
||||
p,
|
||||
U,
|
||||
T,
|
||||
thermo()
|
||||
);
|
||||
basicNumericFlux& dbnsFlux = dbnsFluxPtr();
|
||||
|
||||
// Create mass flux alias for easier coupling with other code components
|
||||
const surfaceScalarField& phi = dbnsFlux.rhoFlux();
|
||||
|
|
|
@ -55,6 +55,7 @@ int main(int argc, char *argv[])
|
|||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
# include "createTimeControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
if (momentumPredictor)
|
||||
if (piso.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
|
|
|
@ -59,3 +59,5 @@
|
|||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt =
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -12,7 +12,7 @@ if (realFluid)
|
|||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -24,7 +24,7 @@ if (realFluid)
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ if (realFluid)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (transonic)
|
||||
if (piso.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -44,7 +44,7 @@ else
|
|||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -55,7 +55,7 @@ else
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ else
|
|||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -81,7 +81,7 @@ else
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ Description
|
|||
#include "fvCFD.H"
|
||||
#include "basicPsiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -45,9 +46,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
|
@ -59,7 +63,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
|
@ -71,7 +74,7 @@ int main(int argc, char *argv[])
|
|||
#include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
#include "hEqn.H"
|
||||
#include "pEqn.H"
|
||||
|
|
|
@ -37,7 +37,7 @@ SourceFiles
|
|||
#ifndef mixedFixedValueSlipFvPatchField_H
|
||||
#define mixedFixedValueSlipFvPatchField_H
|
||||
|
||||
#include "transformFvPatchField.H"
|
||||
#include "transformFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -45,7 +45,7 @@ namespace Foam
|
|||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class mixedFixedValueSlipFvPatch Declaration
|
||||
Class mixedFixedValueSlipFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
|
|
|
@ -45,7 +45,7 @@ int main(int argc, char *argv[])
|
|||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
# include "readThermophysicalProperties.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "createTimeControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -139,7 +139,7 @@ int main(int argc, char *argv[])
|
|||
+ aphiv_neg*(rho_neg*(e_neg + 0.5*magSqr(U_neg)) + p_neg)
|
||||
+ aSf*p_pos - aSf*p_neg;
|
||||
|
||||
volTensorField tauMC("tauMC", mu*dev2(fvc::grad(U)().T()));
|
||||
volTensorField tauMC("tauMC", mu*dev2(Foam::T(fvc::grad(U))));
|
||||
|
||||
// --- Solve density
|
||||
solve(fvm::ddt(rho) + fvc::div(phi));
|
||||
|
|
|
@ -7,34 +7,20 @@ tmp<fvVectorMatrix> UEqn
|
|||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
if (oCorr == nOuterCorr - 1)
|
||||
{
|
||||
if (mesh.solutionDict().relax("UFinal"))
|
||||
{
|
||||
UEqn().relax(mesh.solutionDict().relaxationFactor("UFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
UEqn().relax(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UEqn().relax();
|
||||
}
|
||||
UEqn().relax
|
||||
(
|
||||
mesh.solutionDict().equationRelaxationFactor(U.select(pimple.finalIter()))
|
||||
);
|
||||
|
||||
volScalarField rUA = 1.0/UEqn().A();
|
||||
|
||||
if (momentumPredictor)
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
if (oCorr == nOuterCorr-1)
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p), mesh.solutionDict().solver("UFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
}
|
||||
solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p),
|
||||
mesh.solutionDict().solver((U.select(pimple.finalIter())))
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -39,10 +39,7 @@
|
|||
|
||||
# include "compressibleCreatePhi.H"
|
||||
|
||||
dimensionedScalar pMin
|
||||
(
|
||||
mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
|
||||
);
|
||||
dimensionedScalar pMin(pimple.dict().lookup("pMin"));
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
|
@ -62,3 +59,5 @@
|
|||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt =
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -8,16 +8,11 @@
|
|||
DpDt
|
||||
);
|
||||
|
||||
if (oCorr == nOuterCorr-1)
|
||||
{
|
||||
hEqn.relax();
|
||||
hEqn.solve(mesh.solutionDict().solver("hFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
hEqn.relax();
|
||||
hEqn.solve();
|
||||
}
|
||||
hEqn.relax
|
||||
(
|
||||
mesh.solutionDict().equationRelaxationFactor(h.select(pimple.finalIter()))
|
||||
);
|
||||
hEqn.solve(mesh.solutionDict().solver((h.select(pimple.finalIter()))));
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
|
|
|
@ -3,12 +3,12 @@ rho = thermo.rho();
|
|||
volScalarField rUA = 1.0/UEqn().A();
|
||||
U = rUA*UEqn().H();
|
||||
|
||||
if (nCorr <= 1)
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
UEqn.clear();
|
||||
}
|
||||
|
||||
if (transonic)
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -20,7 +20,7 @@ if (transonic)
|
|||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -29,21 +29,12 @@ if (transonic)
|
|||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
if
|
||||
pEqn.solve
|
||||
(
|
||||
oCorr == nOuterCorr-1
|
||||
&& corr == nCorr-1
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solutionDict().solver("pFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -58,7 +49,7 @@ else
|
|||
//+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
// Pressure corrector
|
||||
fvScalarMatrix pEqn
|
||||
|
@ -68,21 +59,12 @@ else
|
|||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
if
|
||||
pEqn.solve
|
||||
(
|
||||
oCorr == nOuterCorr-1
|
||||
&& corr == nCorr-1
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solutionDict().solver("pFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ Description
|
|||
#include "basicPsiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "bound.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -45,8 +46,12 @@ int main(int argc, char *argv[])
|
|||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createTimeControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -55,7 +60,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "readPIMPLEControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
|
@ -63,22 +67,16 @@ int main(int argc, char *argv[])
|
|||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
if (nOuterCorr != 1)
|
||||
{
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "hEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
if (momentumPredictor)
|
||||
if (piso.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
|
|
|
@ -56,3 +56,5 @@
|
|||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt =
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -3,7 +3,7 @@ rho = thermo.rho();
|
|||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
if (transonic)
|
||||
if (piso.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -15,7 +15,7 @@ if (transonic)
|
|||
)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -26,7 +26,7 @@ if (transonic)
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ else
|
|||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -52,7 +52,7 @@ else
|
|||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ Description
|
|||
#include "fvCFD.H"
|
||||
#include "basicPsiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -41,9 +42,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
|
@ -55,7 +59,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
|
@ -67,7 +70,7 @@ int main(int argc, char *argv[])
|
|||
#include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr = 1; corr <= nCorr; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
#include "hEqn.H"
|
||||
#include "pEqn.H"
|
||||
|
|
|
@ -7,37 +7,23 @@ tmp<fvVectorMatrix> UEqn
|
|||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
if (oCorr == nOuterCorr-1)
|
||||
{
|
||||
if (mesh.solutionDict().relax("UFinal"))
|
||||
{
|
||||
UEqn().relax(mesh.solutionDict().relaxationFactor("UFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
UEqn().relax(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UEqn().relax();
|
||||
}
|
||||
UEqn().relax
|
||||
(
|
||||
mesh.solutionDict().equationRelaxationFactor(U.select(pimple.finalIter()))
|
||||
);
|
||||
|
||||
mrfZones.addCoriolis(rho, UEqn());
|
||||
pZones.addResistance(UEqn());
|
||||
|
||||
volScalarField rUA = 1.0/UEqn().A();
|
||||
|
||||
if (momentumPredictor)
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
if (oCorr == nOuterCorr-1)
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p), mesh.solutionDict().solver("UFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
}
|
||||
solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p),
|
||||
mesh.solutionDict().solver((U.select(pimple.finalIter())))
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -39,10 +39,7 @@
|
|||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
dimensionedScalar pMin
|
||||
(
|
||||
mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
|
||||
);
|
||||
dimensionedScalar pMin(pimple.dict().lookup("pMin"));
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
|
@ -68,3 +65,5 @@
|
|||
|
||||
porousZones pZones(mesh);
|
||||
Switch pressureImplicitPorosity(false);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -3,12 +3,12 @@ rho = thermo.rho();
|
|||
volScalarField rUA = 1.0/UEqn().A();
|
||||
U = rUA*UEqn().H();
|
||||
|
||||
if (nCorr <= 1)
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
UEqn.clear();
|
||||
}
|
||||
|
||||
if (transonic)
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -21,7 +21,7 @@ if (transonic)
|
|||
);
|
||||
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -30,21 +30,12 @@ if (transonic)
|
|||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
if
|
||||
pEqn.solve
|
||||
(
|
||||
oCorr == nOuterCorr-1
|
||||
&& corr == nCorr-1
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solutionDict().solver("pFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -60,7 +51,7 @@ else
|
|||
);
|
||||
mrfZones.relativeFlux(fvc::interpolate(rho), phi);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
// Pressure corrector
|
||||
fvScalarMatrix pEqn
|
||||
|
@ -70,21 +61,12 @@ else
|
|||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
if
|
||||
pEqn.solve
|
||||
(
|
||||
oCorr == nOuterCorr-1
|
||||
&& corr == nCorr-1
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solutionDict().solver("pFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ Description
|
|||
#include "bound.H"
|
||||
#include "MRFZones.H"
|
||||
#include "porousZones.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -47,8 +48,12 @@ int main(int argc, char *argv[])
|
|||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createTimeControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -57,7 +62,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "readPIMPLEControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
|
@ -65,7 +69,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
if (nOuterCorr != 1)
|
||||
if (!pimple.firstIter())
|
||||
{
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
|
@ -74,13 +78,13 @@ int main(int argc, char *argv[])
|
|||
#include "rhoEqn.H"
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "hEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
|
|
@ -34,12 +34,7 @@
|
|||
{
|
||||
pZones.addResistance(UEqn());
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p)
|
||||
). initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
||||
trAU = 1.0/UEqn().A();
|
||||
trAU().rename("rAU");
|
||||
|
|
|
@ -43,12 +43,10 @@
|
|||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
||||
dimensionedScalar pMin
|
||||
(
|
||||
mesh.solutionDict().subDict("SIMPLE").lookup("pMin")
|
||||
);
|
||||
dimensionedScalar pMin(simple.dict().lookup("pMin"));
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
|
@ -71,12 +69,9 @@
|
|||
if (pZones.size())
|
||||
{
|
||||
// nUCorrectors for pressureImplicitPorosity
|
||||
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
||||
if (simple.dict().found("nUCorrectors"))
|
||||
{
|
||||
nUCorr = readInt
|
||||
(
|
||||
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
||||
);
|
||||
nUCorr = readInt(simple.dict().lookup("nUCorrectors"));
|
||||
}
|
||||
|
||||
if (nUCorr > 0)
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
|
||||
hEqn.relax();
|
||||
|
||||
eqnResidual = hEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
hEqn.solve().initialResidual();
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
|
@ -12,7 +12,7 @@ UEqn.clear();
|
|||
phi = fvc::interpolate(rho*U) & mesh.Sf();
|
||||
bool closedVolume = adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
tmp<fvScalarMatrix> tpEqn;
|
||||
|
||||
|
@ -26,18 +26,10 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|||
}
|
||||
|
||||
tpEqn().setReference(pRefCell, pRefValue);
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = tpEqn().solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
}
|
||||
else
|
||||
{
|
||||
tpEqn().solve();
|
||||
}
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
tpEqn().solve();
|
||||
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= tpEqn().flux();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ Description
|
|||
#include "basicPsiThermo.H"
|
||||
#include "RASModel.H"
|
||||
#include "porousZones.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -42,6 +43,9 @@ int main(int argc, char *argv[])
|
|||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
|
@ -49,16 +53,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.loop())
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
|
@ -72,8 +70,6 @@ int main(int argc, char *argv[])
|
|||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
|
|
@ -8,9 +8,4 @@
|
|||
|
||||
UEqn().relax();
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn() == -fvc::grad(p)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
|
|
|
@ -42,17 +42,11 @@
|
|||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
||||
dimensionedScalar rhoMax
|
||||
(
|
||||
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax")
|
||||
);
|
||||
|
||||
dimensionedScalar rhoMin
|
||||
(
|
||||
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin")
|
||||
);
|
||||
dimensionedScalar rhoMax(simple.dict().lookup("rhoMax"));
|
||||
dimensionedScalar rhoMin(simple.dict().lookup("rhoMin"));
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
|
||||
hEqn.relax();
|
||||
|
||||
eqnResidual = hEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
hEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
// initialize values for convergence checks
|
||||
|
||||
scalar eqnResidual = 1, maxResidual = 0;
|
||||
scalar convergenceCriterion = 0;
|
||||
|
||||
simple.readIfPresent("convergence", convergenceCriterion);
|
||||
|
|
@ -9,7 +9,7 @@ UEqn.clear();
|
|||
|
||||
bool closedVolume = false;
|
||||
|
||||
if (transonic)
|
||||
if (simple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
|
@ -17,7 +17,7 @@ if (transonic)
|
|||
fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf())
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -26,22 +26,13 @@ if (transonic)
|
|||
);
|
||||
|
||||
// Relax the pressure equation to ensure diagonal-dominance
|
||||
pEqn.relax(mesh.solutionDict().relaxationFactor("pEqn"));
|
||||
pEqn.relax();
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
|
@ -52,7 +43,7 @@ else
|
|||
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
|
||||
closedVolume = adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -61,18 +52,9 @@ else
|
|||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
// Retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
eqnResidual = pEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ Description
|
|||
#include "fvCFD.H"
|
||||
#include "basicPsiThermo.H"
|
||||
#include "RASModel.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -41,6 +42,9 @@ int main(int argc, char *argv[])
|
|||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
|
@ -48,16 +52,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.loop())
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readSIMPLEControls.H"
|
||||
# include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
# include "UEqn.H"
|
||||
|
@ -72,8 +70,6 @@ int main(int argc, char *argv[])
|
|||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
|
|
@ -94,3 +94,5 @@
|
|||
rho*Cv*T + 0.5*rho*magSqr(rhoU/rho),
|
||||
T.boundaryField().types()
|
||||
);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -127,3 +127,4 @@
|
|||
fields.add(magRhoU);
|
||||
fields.add(H);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -36,6 +36,7 @@ Description
|
|||
#include "MUSCL.H"
|
||||
#include "LimitedScheme.H"
|
||||
#include "boundaryTypes.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -45,8 +46,12 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
# include "readThermodynamicProperties.H"
|
||||
# include "createFields.H"
|
||||
# include "createTimeControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -56,8 +61,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
Info<< "Time = " << runTime.value() << nl << endl;
|
||||
|
||||
# include "readPISOControls.H"
|
||||
scalar HbyAblend = readScalar(piso.lookup("HbyAblend"));
|
||||
scalar HbyAblend = readScalar(pimple.dict().lookup("HbyAblend"));
|
||||
|
||||
# include "readTimeControls.H"
|
||||
|
||||
|
@ -71,7 +75,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "setDeltaT.H"
|
||||
|
||||
for (int outerCorr = 0; outerCorr < nOuterCorr; outerCorr++)
|
||||
while (pimple.loop())
|
||||
{
|
||||
magRhoU = mag(rhoU);
|
||||
H = (rhoE + p)/rho;
|
||||
|
@ -117,7 +121,7 @@ int main(int argc, char *argv[])
|
|||
psi = 1.0/(R*T);
|
||||
p = rho/psi;
|
||||
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
volScalarField rrhoUA = 1.0/rhoUEqn.A();
|
||||
surfaceScalarField rrhoUAf("rrhoUAf", fvc::interpolate(rrhoUA));
|
||||
|
@ -137,8 +141,6 @@ int main(int argc, char *argv[])
|
|||
)
|
||||
+ HbyAblend*fvc::ddtPhiCorr(rrhoUA, rho, rhoU, phi);
|
||||
|
||||
p.boundaryField().updateCoeffs();
|
||||
|
||||
surfaceScalarField phiGradp =
|
||||
rrhoUAf*mesh.magSf()*fvc::snGrad(p);
|
||||
|
||||
|
|
|
@ -5,20 +5,9 @@
|
|||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
if (oCorr == nOuterCorr - 1)
|
||||
{
|
||||
if (mesh.solutionDict().relax("UFinal"))
|
||||
{
|
||||
UEqn.relax(mesh.solutionDict().relaxationFactor("UFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
UEqn.relax(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UEqn.relax();
|
||||
}
|
||||
UEqn.relax
|
||||
(
|
||||
mesh.solutionDict().equationRelaxationFactor(U.select(pimple.finalIter()))
|
||||
);
|
||||
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# include "createTimeControls.H"
|
||||
|
||||
bool correctPhi
|
||||
(
|
||||
pimple.dict().lookupOrDefault("correctPhi", false)
|
||||
);
|
||||
|
||||
bool checkMeshCourantNo
|
||||
(
|
||||
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||
);
|
|
@ -51,3 +51,5 @@
|
|||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -17,21 +17,10 @@
|
|||
// viscous heating?
|
||||
);
|
||||
|
||||
if (oCorr == nOuterCorr - 1)
|
||||
{
|
||||
if (mesh.solutionDict().relax("eFinal"))
|
||||
{
|
||||
eEqn.relax(mesh.solutionDict().relaxationFactor("eFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
eEqn.relax(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
eEqn.relax();
|
||||
}
|
||||
eEqn.relax
|
||||
(
|
||||
mesh.solutionDict().equationRelaxationFactor(e.select(pimple.finalIter()))
|
||||
);
|
||||
|
||||
eEqn.solve();
|
||||
|
||||
|
@ -54,4 +43,5 @@
|
|||
|
||||
// Recalculate density
|
||||
rho = thermo.rho();
|
||||
rho.correctBoundaryConditions();
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
# include "limitU.H"
|
||||
|
||||
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
// Calculate phi for boundary conditions
|
||||
phi = rhof*
|
||||
|
@ -36,25 +36,13 @@
|
|||
- fvm::laplacian(rho*rUA, p)
|
||||
);
|
||||
|
||||
if
|
||||
pEqn.solve
|
||||
(
|
||||
// oCorr == nOuterCorr - 1
|
||||
corr == nCorr - 1
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve
|
||||
(
|
||||
mesh.solutionDict().solver(p.name() + "Final")
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve(mesh.solutionDict().solver(p.name()));
|
||||
}
|
||||
mesh.solutionDict().solver(p.select(pimple.finalInnerIter()))
|
||||
);
|
||||
|
||||
// Calculate the flux
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phid2 + pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
# include "readTimeControls.H"
|
||||
# include "readPIMPLEControls.H"
|
||||
#include "readTimeControls.H"
|
||||
|
||||
bool correctPhi = false;
|
||||
if (pimple.found("correctPhi"))
|
||||
{
|
||||
correctPhi = Switch(pimple.lookup("correctPhi"));
|
||||
}
|
||||
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
|
||||
|
||||
bool checkMeshCourantNo = false;
|
||||
if (pimple.found("checkMeshCourantNo"))
|
||||
{
|
||||
checkMeshCourantNo = Switch(pimple.lookup("checkMeshCourantNo"));
|
||||
}
|
||||
checkMeshCourantNo = pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
|
|
@ -47,6 +47,7 @@ Author
|
|||
#include "specie.H"
|
||||
#include "basicPsiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -56,8 +57,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
# include "createTime.H"
|
||||
# include "createDynamicFvMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "createControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -105,8 +110,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
// --- PIMPLE loop
|
||||
label oCorr = 0;
|
||||
do
|
||||
while (pimple.loop())
|
||||
{
|
||||
# include "rhoEqn.H"
|
||||
# include "eEqn.H"
|
||||
|
@ -122,13 +126,13 @@ int main(int argc, char *argv[])
|
|||
// but psi and rho are not
|
||||
surfaceScalarField rhoReff = rhof - psisf*fvc::interpolate(p);
|
||||
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
} while (++oCorr < nOuterCorr);
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
|
|
|
@ -5,20 +5,9 @@
|
|||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
if (oCorr == nOuterCorr - 1)
|
||||
{
|
||||
if (mesh.solutionDict().relax("UFinal"))
|
||||
{
|
||||
UEqn.relax(mesh.solutionDict().relaxationFactor("UFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
UEqn.relax(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UEqn.relax();
|
||||
}
|
||||
UEqn.relax
|
||||
(
|
||||
mesh.solutionDict().equationRelaxationFactor(U.select(pimple.finalIter()))
|
||||
);
|
||||
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
|
|
@ -50,3 +50,5 @@
|
|||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -14,21 +14,10 @@
|
|||
// viscous heating?
|
||||
);
|
||||
|
||||
if (oCorr == nOuterCorr - 1)
|
||||
{
|
||||
if (mesh.solutionDict().relax("eFinal"))
|
||||
{
|
||||
eEqn.relax(mesh.solutionDict().relaxationFactor("eFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
eEqn.relax(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
eEqn.relax();
|
||||
}
|
||||
eEqn.relax
|
||||
(
|
||||
mesh.solutionDict().equationRelaxationFactor(e.select(pimple.finalIter()))
|
||||
);
|
||||
|
||||
eEqn.solve();
|
||||
|
||||
|
@ -39,4 +28,5 @@
|
|||
|
||||
// Recalculate density
|
||||
rho = thermo.rho();
|
||||
rho.correctBoundaryConditions();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
U = UEqn.H()/UEqn.A();
|
||||
|
||||
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
// Calculate phi for boundary conditions
|
||||
phi = rhof*
|
||||
|
@ -36,7 +36,7 @@
|
|||
pEqn.solve();
|
||||
|
||||
// Calculate the flux
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phid2 + pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ Author
|
|||
#include "fvCFD.H"
|
||||
#include "basicPsiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -50,8 +51,12 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "createTimeControls.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -60,7 +65,6 @@ int main(int argc, char *argv[])
|
|||
while (runTime.run())
|
||||
{
|
||||
# include "readTimeControls.H"
|
||||
# include "readPIMPLEControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
|
@ -69,8 +73,7 @@ int main(int argc, char *argv[])
|
|||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- PIMPLE loop
|
||||
label oCorr = 0;
|
||||
do
|
||||
while (pimple.loop())
|
||||
{
|
||||
# include "rhoEqn.H"
|
||||
# include "eEqn.H"
|
||||
|
@ -86,13 +89,13 @@ int main(int argc, char *argv[])
|
|||
// but psi and rho are not
|
||||
surfaceScalarField rhoReff = rhof - psisf*fvc::interpolate(p);
|
||||
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
} while (++oCorr < nOuterCorr);
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
scalar sumLocalContErr =
|
||||
sumLocalContErr =
|
||||
(sum(mag(rho - rho0 - psi*(p - p0)))/sum(rho)).value();
|
||||
|
||||
scalar globalContErr = (sum(rho - rho0 - psi*(p - p0))/sum(rho)).value();
|
||||
globalContErr = (sum(rho - rho0 - psi*(p - p0))/sum(rho)).value();
|
||||
|
||||
cumulativeContErr += globalContErr;
|
||||
|
||||
|
|
|
@ -42,3 +42,5 @@
|
|||
|
||||
|
||||
# include "compressibleCreatePhi.H"
|
||||
|
||||
mesh.schemesDict().setFluxRequired(p.name());
|
||||
|
|
|
@ -31,6 +31,7 @@ Description
|
|||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -39,6 +40,9 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
# include "readThermodynamicProperties.H"
|
||||
# include "readTransportProperties.H"
|
||||
# include "createFields.H"
|
||||
|
@ -52,14 +56,12 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readPIMPLEControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
|
||||
# include "rhoEqn.H"
|
||||
|
||||
// --- PIMPLE loop
|
||||
label oCorr = 0;
|
||||
do
|
||||
while (pimple.loop())
|
||||
{
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
|
@ -71,7 +73,7 @@ int main(int argc, char *argv[])
|
|||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
while (pimple.correct())
|
||||
{
|
||||
volScalarField rAU("rAU", 1.0/UEqn.A());
|
||||
surfaceScalarField rhorAUf
|
||||
|
@ -113,7 +115,7 @@ int main(int argc, char *argv[])
|
|||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
} while (++oCorr < nOuterCorr);
|
||||
}
|
||||
|
||||
|
||||
// Correct density
|
||||
|
|
|
@ -10,9 +10,4 @@
|
|||
|
||||
UEqn.relax();
|
||||
|
||||
eqnResidual = solve
|
||||
(
|
||||
UEqn == -fvc::grad(p)
|
||||
).initialResidual();
|
||||
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
// check convergence
|
||||
|
||||
if (maxResidual < convergenceCriterion)
|
||||
{
|
||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
||||
runTime.writeAndEnd();
|
||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue