mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
bubbleFoam, twoPhaseEulerFoam: Added storage of pressure from the previous iteration for PIMPLE
This commit is contained in:
@ -34,6 +34,7 @@ Description
|
|||||||
#include "nearWallDist.H"
|
#include "nearWallDist.H"
|
||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
|
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -47,6 +48,9 @@ int main(int argc, char *argv[])
|
|||||||
#include "readGravitationalAcceleration.H"
|
#include "readGravitationalAcceleration.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
#include "CourantNo.H"
|
||||||
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
pimpleControl pimple(mesh);
|
pimpleControl pimple(mesh);
|
||||||
|
|
||||||
@ -54,16 +58,23 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.loop())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
#include "readBubbleFoamControls.H"
|
#include "readBubbleFoamControls.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
|
runTime++;
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
// --- Pressure-velocity PIMPLE corrector loop
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
for (pimple.start(); pimple.loop(); pimple++)
|
for (pimple.start(); pimple.loop(); pimple++)
|
||||||
{
|
{
|
||||||
|
if (pimple.nOuterCorr() != 1)
|
||||||
|
{
|
||||||
|
p.storePrevIter();
|
||||||
|
}
|
||||||
|
|
||||||
#include "alphaEqn.H"
|
#include "alphaEqn.H"
|
||||||
#include "liftDragCoeffs.H"
|
#include "liftDragCoeffs.H"
|
||||||
#include "UEqns.H"
|
#include "UEqns.H"
|
||||||
@ -73,7 +84,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
|
|
||||||
if (correctAlpha)
|
if (correctAlpha && !pimple.finalIter())
|
||||||
{
|
{
|
||||||
#include "alphaEqn.H"
|
#include "alphaEqn.H"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ Application
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Solver for a system of 2 incompressible fluid phases with one phase
|
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
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
for (pimple.start(); pimple.loop(); pimple++)
|
for (pimple.start(); pimple.loop(); pimple++)
|
||||||
{
|
{
|
||||||
|
if (pimple.nOuterCorr() != 1)
|
||||||
|
{
|
||||||
|
p.storePrevIter();
|
||||||
|
}
|
||||||
|
|
||||||
#include "alphaEqn.H"
|
#include "alphaEqn.H"
|
||||||
|
|
||||||
#include "liftDragCoeffs.H"
|
#include "liftDragCoeffs.H"
|
||||||
|
|
||||||
#include "UEqns.H"
|
#include "UEqns.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
|
|||||||
Reference in New Issue
Block a user