This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H

36 lines
635 B
C
Raw Normal View History

2010-09-22 18:13:13 +00:00
label nAlphaCorr
(
2013-10-22 14:52:36 +00:00
readLabel(pimple.lookup("nAlphaCorr"))
2010-09-22 18:13:13 +00:00
);
label nAlphaSubCycles
(
2013-10-22 14:52:36 +00:00
readLabel(pimple.lookup("nAlphaSubCycles"))
2010-09-22 18:13:13 +00:00
);
if (nAlphaSubCycles > 1)
{
dimensionedScalar totalDeltaT = runTime.deltaT();
surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
!(++alphaSubCycle).end();
)
{
# include "alphaEqn.H"
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
}
rhoPhi = rhoPhiSum;
}
else
{
# include "alphaEqn.H"
}
interface.correct();
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;