mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated twoPhaseEulerFoam solver and tutorials
This commit is contained in:
@ -234,4 +234,4 @@
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
||||
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
alphaf*rUaAf/rhoa + betaf*rUbAf/rhob
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
@ -66,9 +66,13 @@
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
pEqn.solve
|
||||
(
|
||||
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
|
||||
);
|
||||
|
||||
if (nonOrth == pimple.nNonOrthCorr())
|
||||
{
|
||||
surfaceScalarField SfGradp(pEqn.flux()/Dp);
|
||||
|
||||
|
||||
@ -10,27 +10,12 @@
|
||||
)
|
||||
);
|
||||
|
||||
scalar preAlphaExp
|
||||
(
|
||||
readScalar(ppProperties.lookup("preAlphaExp"))
|
||||
);
|
||||
scalar preAlphaExp(readScalar(ppProperties.lookup("preAlphaExp")));
|
||||
|
||||
scalar alphaMax
|
||||
(
|
||||
readScalar(ppProperties.lookup("alphaMax"))
|
||||
);
|
||||
scalar alphaMax(readScalar(ppProperties.lookup("alphaMax")));
|
||||
|
||||
scalar expMax
|
||||
(
|
||||
readScalar(ppProperties.lookup("expMax"))
|
||||
);
|
||||
scalar expMax(readScalar(ppProperties.lookup("expMax")));
|
||||
|
||||
dimensionedScalar g0
|
||||
(
|
||||
ppProperties.lookup("g0")
|
||||
);
|
||||
dimensionedScalar g0(ppProperties.lookup("g0"));
|
||||
|
||||
Switch packingLimiter
|
||||
(
|
||||
ppProperties.lookup("packingLimiter")
|
||||
);
|
||||
Switch packingLimiter(ppProperties.lookup("packingLimiter"));
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
#include "readTimeControls.H"
|
||||
#include "readPISOControls.H"
|
||||
|
||||
int nAlphaCorr(readInt(pisoDict.lookup("nAlphaCorr")));
|
||||
int nAlphaCorr(readInt(pimple.dict().lookup("nAlphaCorr")));
|
||||
|
||||
Switch correctAlpha(pisoDict.lookup("correctAlpha"));
|
||||
Switch correctAlpha(pimple.dict().lookup("correctAlpha"));
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,6 +42,8 @@ Description
|
||||
#include "phaseModel.H"
|
||||
#include "kineticTheoryModel.H"
|
||||
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@ -58,6 +60,8 @@ int main(int argc, char *argv[])
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
@ -71,27 +75,34 @@ int main(int argc, char *argv[])
|
||||
runTime++;
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "alphaEqn.H"
|
||||
|
||||
#include "liftDragCoeffs.H"
|
||||
|
||||
#include "UEqns.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
for (pimple.start(); pimple.loop(); pimple++)
|
||||
{
|
||||
#include "pEqn.H"
|
||||
#include "alphaEqn.H"
|
||||
|
||||
if (correctAlpha && corr<nCorr-1)
|
||||
#include "liftDragCoeffs.H"
|
||||
|
||||
#include "UEqns.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=0; corr<pimple.nCorr(); corr++)
|
||||
{
|
||||
#include "alphaEqn.H"
|
||||
#include "pEqn.H"
|
||||
|
||||
if (correctAlpha && !pimple.finalIter())
|
||||
{
|
||||
#include "alphaEqn.H"
|
||||
}
|
||||
}
|
||||
|
||||
#include "DDtU.H"
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
#include "kEpsilon.H"
|
||||
}
|
||||
}
|
||||
|
||||
#include "DDtU.H"
|
||||
|
||||
#include "kEpsilon.H"
|
||||
|
||||
#include "write.H"
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
|
||||
Reference in New Issue
Block a user