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/interPhaseChangeFoam/alphaEqnSubCycle.H

54 lines
975 B
C
Raw Normal View History

2010-09-22 18:13:13 +00:00
surfaceScalarField rhoPhi
(
IOobject
(
"rhoPhi",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0)
);
{
label nAlphaCorr
(
readLabel(piso.lookup("nAlphaCorr"))
);
label nAlphaSubCycles
(
readLabel(piso.lookup("nAlphaSubCycles"))
);
surfaceScalarField phic = mag(phi/mesh.magSf());
2010-09-22 18:13:13 +00:00
phic = min(interface.cAlpha()*phic, max(phic));
volScalarField divU = fvc::div(phi);
2010-09-22 18:13:13 +00:00
dimensionedScalar totalDeltaT = runTime.deltaT();
if (nAlphaSubCycles > 1)
{
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
!(++alphaSubCycle).end();
)
{
2010-09-22 18:13:13 +00:00
# include "alphaEqn.H"
}
}
else
{
2010-09-22 18:13:13 +00:00
# include "alphaEqn.H"
}
2010-09-22 18:13:13 +00:00
if (nOuterCorr == 1)
{
interface.correct();
}
2010-09-22 18:13:13 +00:00
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
}