mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: reactingParcelFoam: moved hs out of PISO loop and added pFinal
This commit is contained in:
@ -26,7 +26,18 @@ if (transonic)
|
|||||||
parcels.Srho()
|
parcels.Srho()
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve
|
||||||
|
(
|
||||||
|
mesh.solver
|
||||||
|
(
|
||||||
|
p.select
|
||||||
|
(
|
||||||
|
finalIter
|
||||||
|
&& corr == nCorr-1
|
||||||
|
&& nonOrth == nNonOrthCorr
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == nNonOrthCorr)
|
||||||
{
|
{
|
||||||
@ -54,7 +65,18 @@ else
|
|||||||
parcels.Srho()
|
parcels.Srho()
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve
|
||||||
|
(
|
||||||
|
mesh.solver
|
||||||
|
(
|
||||||
|
p.select
|
||||||
|
(
|
||||||
|
finalIter
|
||||||
|
&& corr == nCorr-1
|
||||||
|
&& nonOrth == nNonOrthCorr
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == nNonOrthCorr)
|
||||||
{
|
{
|
||||||
@ -66,7 +88,10 @@ else
|
|||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "compressibleContinuityErrs.H"
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
U -= rAU*fvc::grad(p);
|
U -= rAU*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
|
|
||||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,23 +78,32 @@ int main(int argc, char *argv[])
|
|||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
// --- PIMPLE loop
|
// --- PIMPLE loop
|
||||||
for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
|
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
||||||
{
|
{
|
||||||
|
bool finalIter = oCorr == nOuterCorr-1;
|
||||||
|
if (finalIter)
|
||||||
|
{
|
||||||
|
mesh.data::add("finalIteration", true);
|
||||||
|
}
|
||||||
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=0; corr<nCorr; corr++)
|
||||||
{
|
{
|
||||||
#include "hsEqn.H"
|
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
|
if (finalIter)
|
||||||
|
{
|
||||||
|
mesh.data::remove("finalIteration");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
|
||||||
|
|
||||||
rho = thermo.rho();
|
|
||||||
|
|
||||||
if (runTime.write())
|
if (runTime.write())
|
||||||
{
|
{
|
||||||
chemistry.dQ()().write();
|
chemistry.dQ()().write();
|
||||||
|
|||||||
Reference in New Issue
Block a user