mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
MULES: Add support for explicit correction interPhaseChangeFoam: Add option for explicit MULES or as correction to an upwind solution Deprecate implicit form of MULES
45 lines
899 B
C
45 lines
899 B
C
surfaceScalarField rhoPhi
|
|
(
|
|
IOobject
|
|
(
|
|
"rhoPhi",
|
|
runTime.timeName(),
|
|
mesh
|
|
),
|
|
mesh,
|
|
dimensionedScalar("0", dimMass/dimTime, 0)
|
|
);
|
|
|
|
{
|
|
#include "alphaControls.H"
|
|
|
|
surfaceScalarField phic(mag(phi/mesh.magSf()));
|
|
phic = min(interface.cAlpha()*phic, max(phic));
|
|
|
|
volScalarField divU(fvc::div(phi));
|
|
|
|
if (nAlphaSubCycles > 1)
|
|
{
|
|
dimensionedScalar totalDeltaT = runTime.deltaT();
|
|
surfaceScalarField rhoPhiSum("rhoPhiSum", rhoPhi);
|
|
|
|
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;
|
|
}
|