bubbleFoam, twoPhaseEulerFoam: Added storage of pressure from the previous iteration for PIMPLE

This commit is contained in:
Henry
2011-07-09 22:24:28 +01:00
parent 6f505d8318
commit d81d99d490
2 changed files with 21 additions and 7 deletions

View File

@ -34,6 +34,7 @@ Description
#include "nearWallDist.H"
#include "wallFvPatch.H"
#include "Switch.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -47,6 +48,9 @@ int main(int argc, char *argv[])
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
pimpleControl pimple(mesh);
@ -54,16 +58,23 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
while (runTime.run())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "readBubbleFoamControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
{
if (pimple.nOuterCorr() != 1)
{
p.storePrevIter();
}
#include "alphaEqn.H"
#include "liftDragCoeffs.H"
#include "UEqns.H"
@ -73,7 +84,7 @@ int main(int argc, char *argv[])
{
#include "pEqn.H"
if (correctAlpha)
if (correctAlpha && !pimple.finalIter())
{
#include "alphaEqn.H"
}

View File

@ -26,7 +26,7 @@ Application
Description
Solver for a system of 2 incompressible fluid phases with one phase
dispersed, e.g. gas bubbles in a liquid.
dispersed, e.g. gas bubbles in a liquid or solid particles in a gas.
\*---------------------------------------------------------------------------*/
@ -78,10 +78,13 @@ int main(int argc, char *argv[])
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
{
if (pimple.nOuterCorr() != 1)
{
p.storePrevIter();
}
#include "alphaEqn.H"
#include "liftDragCoeffs.H"
#include "UEqns.H"
// --- PISO loop