mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Now the interFoam and compressibleInterFoam families of solvers use the same alphaEqn formulation and supporting all of the MULES options without code-duplication. The semi-implicit MULES support allows running with significantly larger time-steps but this does reduce the interface sharpness.
42 lines
792 B
C
42 lines
792 B
C
if (nAlphaSubCycles > 1)
|
|
{
|
|
dimensionedScalar totalDeltaT = runTime.deltaT();
|
|
surfaceScalarField rhoPhiSum
|
|
(
|
|
IOobject
|
|
(
|
|
"rhoPhiSum",
|
|
runTime.timeName(),
|
|
mesh
|
|
),
|
|
mesh,
|
|
dimensionedScalar("0", rhoPhi.dimensions(), 0)
|
|
);
|
|
|
|
tmp<volScalarField> trSubDeltaT;
|
|
|
|
if (LTS)
|
|
{
|
|
trSubDeltaT =
|
|
fv::localEulerDdt::localRSubDeltaT(mesh, nAlphaSubCycles);
|
|
}
|
|
|
|
for
|
|
(
|
|
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
|
!(++alphaSubCycle).end();
|
|
)
|
|
{
|
|
#include "alphaEqn.H"
|
|
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
|
}
|
|
|
|
rhoPhi = rhoPhiSum;
|
|
}
|
|
else
|
|
{
|
|
#include "alphaEqn.H"
|
|
}
|
|
|
|
rho == alpha1*rho1 + alpha2*rho2;
|