mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
41 lines
918 B
C
41 lines
918 B
C
{
|
|
#include "alphaControls.H"
|
|
|
|
surfaceScalarField phic(mag(phi/mesh.magSf()));
|
|
phic = min(interface.cAlpha()*phic, max(phic));
|
|
|
|
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
|
|
|
|
if (nAlphaSubCycles > 1)
|
|
{
|
|
dimensionedScalar totalDeltaT = runTime.deltaT();
|
|
surfaceScalarField rhoPhiSum
|
|
(
|
|
IOobject
|
|
(
|
|
"rhoPhiSum",
|
|
runTime.timeName(),
|
|
mesh
|
|
),
|
|
mesh,
|
|
dimensionedScalar("0", rhoPhi.dimensions(), 0)
|
|
);
|
|
|
|
for
|
|
(
|
|
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
|
!(++alphaSubCycle).end();
|
|
)
|
|
{
|
|
#include "alphaEqns.H"
|
|
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
|
}
|
|
|
|
rhoPhi = rhoPhiSum;
|
|
}
|
|
else
|
|
{
|
|
#include "alphaEqns.H"
|
|
}
|
|
}
|