interFoam solvers update: PIMPLE

This commit is contained in:
Hrvoje Jasak 2013-10-22 15:52:36 +01:00
parent 83ffa19dbc
commit c9d2fdcb2d
13 changed files with 142 additions and 93 deletions

View file

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
# include "createTime.H" # include "createTime.H"
# include "createDynamicFvMesh.H" # include "createDynamicFvMesh.H"
# include "readGravitationalAcceleration.H" # include "readGravitationalAcceleration.H"
# include "readPISOControls.H" # include "readPIMPLEControls.H"
# include "initContinuityErrs.H" # include "initContinuityErrs.H"
# include "createFields.H" # include "createFields.H"
# include "readTimeControls.H" # include "readTimeControls.H"
@ -96,6 +96,10 @@ int main(int argc, char *argv[])
# include "meshCourantNo.H" # include "meshCourantNo.H"
} }
// Pressure-velocity corrector
int oCorr = 0;
do
{
twoPhaseProperties.correct(); twoPhaseProperties.correct();
# include "alphaEqnSubCycle.H" # include "alphaEqnSubCycle.H"
@ -121,6 +125,7 @@ int main(int argc, char *argv[])
} }
turbulence->correct(); turbulence->correct();
} while (++oCorr < nOuterCorr);
runTime.write(); runTime.write();

View file

@ -1,14 +1,14 @@
# include "readTimeControls.H" # include "readTimeControls.H"
# include "readPISOControls.H" # include "readPIMPLEControls.H"
bool correctPhi = true; bool correctPhi = true;
if (piso.found("correctPhi")) if (pimple.found("correctPhi"))
{ {
correctPhi = Switch(piso.lookup("correctPhi")); correctPhi = Switch(pimple.lookup("correctPhi"));
} }
bool checkMeshCourantNo = false; bool checkMeshCourantNo = false;
if (piso.found("checkMeshCourantNo")) if (pimple.found("checkMeshCourantNo"))
{ {
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo")); checkMeshCourantNo = Switch(pimple.lookup("checkMeshCourantNo"));
} }

View file

@ -1,11 +1,11 @@
label nAlphaCorr label nAlphaCorr
( (
readLabel(piso.lookup("nAlphaCorr")) readLabel(pimple.lookup("nAlphaCorr"))
); );
label nAlphaSubCycles label nAlphaSubCycles
( (
readLabel(piso.lookup("nAlphaSubCycles")) readLabel(pimple.lookup("nAlphaSubCycles"))
); );
if (nAlphaSubCycles > 1) if (nAlphaSubCycles > 1)

View file

@ -53,7 +53,7 @@ int main(int argc, char *argv[])
# include "createTime.H" # include "createTime.H"
# include "createMesh.H" # include "createMesh.H"
# include "readGravitationalAcceleration.H" # include "readGravitationalAcceleration.H"
#include "readPISOControls.H" # include "readPIMPLEControls.H"
# include "initContinuityErrs.H" # include "initContinuityErrs.H"
# include "createFields.H" # include "createFields.H"
# include "readTimeControls.H" # include "readTimeControls.H"
@ -67,7 +67,7 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
#include "readPISOControls.H" # include "readPIMPLEControls.H"
# include "readTimeControls.H" # include "readTimeControls.H"
# include "CourantNo.H" # include "CourantNo.H"
# include "setDeltaT.H" # include "setDeltaT.H"
@ -76,6 +76,10 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
// Pressure-velocity corrector
int oCorr = 0;
do
{
twoPhaseProperties.correct(); twoPhaseProperties.correct();
# include "alphaEqnSubCycle.H" # include "alphaEqnSubCycle.H"
@ -103,6 +107,7 @@ int main(int argc, char *argv[])
} }
turbulence->correct(); turbulence->correct();
} while (++oCorr < nOuterCorr);
runTime.write(); runTime.write();

View file

@ -115,8 +115,13 @@ solvers
PISO PISO
{ {
momentumPredictor no; cAlpha 1;
nCorrectors 3; }
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 3; nAlphaSubCycles 3;

View file

@ -107,12 +107,16 @@ solvers
PISO PISO
{ {
momentumPredictor no; cAlpha 1;
nCorrectors 3; }
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1;
pRefPoint ( 0.51 0.51 0.51 ); pRefPoint ( 0.51 0.51 0.51 );
pRefValue 0; pRefValue 0;
} }

View file

@ -111,8 +111,13 @@ solvers
PISO PISO
{ {
momentumPredictor no; cAlpha 1;
nCorrectors 2; }
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 3; nAlphaSubCycles 3;

View file

@ -91,12 +91,16 @@ solvers
PISO PISO
{ {
momentumPredictor no; cAlpha 1;
nCorrectors 2; }
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no; correctPhi no;
pdRefPoint (0 0 0.15); pdRefPoint (0 0 0.15);

View file

@ -91,12 +91,16 @@ solvers
PISO PISO
{ {
momentumPredictor no; cAlpha 1;
nCorrectors 2; }
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no; correctPhi no;
pdRefPoint (0 0 0.15); pdRefPoint (0 0 0.15);

View file

@ -91,12 +91,17 @@ solvers
PISO PISO
{ {
momentumPredictor no; cAlpha 1;
nCorrectors 2; }
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no; correctPhi no;
pdRefPoint (0 0 0.15); pdRefPoint (0 0 0.15);

View file

@ -91,12 +91,16 @@ solvers
PISO PISO
{ {
momentumPredictor no; cAlpha 1;
nCorrectors 2; }
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no; correctPhi no;
pdRefPoint (0 0 0.15); pdRefPoint (0 0 0.15);

View file

@ -49,15 +49,19 @@ solvers
relTol 0; relTol 0;
} }
} }
PISO PISO
{
cAlpha 1;
}
PIMPLE
{ {
momentumPredictor yes; momentumPredictor yes;
nCorrectors 3; nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 2; nAlphaSubCycles 2;
cAlpha 1;
} }
// ************************************************************************* // // ************************************************************************* //

View file

@ -115,12 +115,16 @@ solvers
PISO PISO
{ {
momentumPredictor no; cAlpha 1;
nCorrectors 2; }
nNonOrthogonalCorrectors 1; PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 4;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 4; nAlphaSubCycles 1;
cAlpha 2;
} }
// ************************************************************************* // // ************************************************************************* //