Skip to content
Snippets Groups Projects
Commit d81d99d4 authored by Henry's avatar Henry
Browse files

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

parent 6f505d83
Branches
Tags
No related merge requests found
......@@ -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"
}
......
......@@ -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++)
{
#include "alphaEqn.H"
if (pimple.nOuterCorr() != 1)
{
p.storePrevIter();
}
#include "alphaEqn.H"
#include "liftDragCoeffs.H"
#include "UEqns.H"
// --- PISO loop
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment