interFoam solvers update: PIMPLE
This commit is contained in:
parent
83ffa19dbc
commit
c9d2fdcb2d
13 changed files with 142 additions and 93 deletions
|
@ -49,7 +49,7 @@ int main(int argc, char *argv[])
|
|||
# include "createTime.H"
|
||||
# include "createDynamicFvMesh.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "readPIMPLEControls.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "createFields.H"
|
||||
# include "readTimeControls.H"
|
||||
|
@ -96,31 +96,36 @@ int main(int argc, char *argv[])
|
|||
# include "meshCourantNo.H"
|
||||
}
|
||||
|
||||
twoPhaseProperties.correct();
|
||||
|
||||
# include "alphaEqnSubCycle.H"
|
||||
|
||||
# include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
// Pressure-velocity corrector
|
||||
int oCorr = 0;
|
||||
do
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
twoPhaseProperties.correct();
|
||||
|
||||
p = pd + rho*gh;
|
||||
# include "alphaEqnSubCycle.H"
|
||||
|
||||
if (pd.needReference())
|
||||
{
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pdRefCell)
|
||||
);
|
||||
}
|
||||
# include "UEqn.H"
|
||||
|
||||
turbulence->correct();
|
||||
// --- PISO loop
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
||||
p = pd + rho*gh;
|
||||
|
||||
if (pd.needReference())
|
||||
{
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pdRefCell)
|
||||
);
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
} while (++oCorr < nOuterCorr);
|
||||
|
||||
runTime.write();
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "readPIMPLEControls.H"
|
||||
|
||||
bool correctPhi = true;
|
||||
if (piso.found("correctPhi"))
|
||||
if (pimple.found("correctPhi"))
|
||||
{
|
||||
correctPhi = Switch(piso.lookup("correctPhi"));
|
||||
correctPhi = Switch(pimple.lookup("correctPhi"));
|
||||
}
|
||||
|
||||
bool checkMeshCourantNo = false;
|
||||
if (piso.found("checkMeshCourantNo"))
|
||||
if (pimple.found("checkMeshCourantNo"))
|
||||
{
|
||||
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo"));
|
||||
checkMeshCourantNo = Switch(pimple.lookup("checkMeshCourantNo"));
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
label nAlphaCorr
|
||||
(
|
||||
readLabel(piso.lookup("nAlphaCorr"))
|
||||
readLabel(pimple.lookup("nAlphaCorr"))
|
||||
);
|
||||
|
||||
label nAlphaSubCycles
|
||||
(
|
||||
readLabel(piso.lookup("nAlphaSubCycles"))
|
||||
readLabel(pimple.lookup("nAlphaSubCycles"))
|
||||
);
|
||||
|
||||
if (nAlphaSubCycles > 1)
|
||||
|
|
|
@ -49,17 +49,17 @@ Description
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "correctPhi.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "readPIMPLEControls.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "createFields.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "correctPhi.H"
|
||||
# include "CourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -67,42 +67,47 @@ int main(int argc, char *argv[])
|
|||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readPISOControls.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
# include "readPIMPLEControls.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "CourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
twoPhaseProperties.correct();
|
||||
|
||||
#include "alphaEqnSubCycle.H"
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
// Pressure-velocity corrector
|
||||
int oCorr = 0;
|
||||
do
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
twoPhaseProperties.correct();
|
||||
|
||||
#include "continuityErrs.H"
|
||||
# include "alphaEqnSubCycle.H"
|
||||
|
||||
p = pd + rho*gh;
|
||||
# include "UEqn.H"
|
||||
|
||||
if (pd.needReference())
|
||||
{
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pdRefCell)
|
||||
);
|
||||
}
|
||||
// --- PISO loop
|
||||
for (int corr = 0; corr < nCorr; corr++)
|
||||
{
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
# include "continuityErrs.H"
|
||||
|
||||
p = pd + rho*gh;
|
||||
|
||||
if (pd.needReference())
|
||||
{
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pdRefCell)
|
||||
);
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
} while (++oCorr < nOuterCorr);
|
||||
|
||||
runTime.write();
|
||||
|
||||
|
|
|
@ -115,8 +115,13 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 3;
|
||||
cAlpha 1;
|
||||
}
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
|
|
|
@ -107,12 +107,16 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 3;
|
||||
cAlpha 1;
|
||||
}
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
cAlpha 1;
|
||||
pRefPoint ( 0.51 0.51 0.51 );
|
||||
pRefValue 0;
|
||||
}
|
||||
|
|
|
@ -111,8 +111,13 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 2;
|
||||
cAlpha 1;
|
||||
}
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
|
|
|
@ -91,12 +91,16 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 2;
|
||||
cAlpha 1;
|
||||
}
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
cAlpha 1.5;
|
||||
correctPhi no;
|
||||
|
||||
pdRefPoint (0 0 0.15);
|
||||
|
|
|
@ -91,12 +91,16 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 2;
|
||||
cAlpha 1;
|
||||
}
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
cAlpha 1.5;
|
||||
correctPhi no;
|
||||
|
||||
pdRefPoint (0 0 0.15);
|
||||
|
|
|
@ -91,12 +91,17 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 2;
|
||||
cAlpha 1;
|
||||
}
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
cAlpha 1.5;
|
||||
correctPhi no;
|
||||
|
||||
pdRefPoint (0 0 0.15);
|
||||
|
|
|
@ -91,12 +91,16 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 2;
|
||||
cAlpha 1;
|
||||
}
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
cAlpha 1.5;
|
||||
correctPhi no;
|
||||
|
||||
pdRefPoint (0 0 0.15);
|
||||
|
|
|
@ -49,15 +49,19 @@ solvers
|
|||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
cAlpha 1;
|
||||
}
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nCorrectors 3;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 2;
|
||||
cAlpha 1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -115,12 +115,16 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 1;
|
||||
cAlpha 1;
|
||||
}
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 4;
|
||||
cAlpha 2;
|
||||
nAlphaSubCycles 1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
Reference in a new issue