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
31 lines
697 B
C
31 lines
697 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(0.0*rhoPhi);
|
|
|
|
for
|
|
(
|
|
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
|
!(++alphaSubCycle).end();
|
|
)
|
|
{
|
|
#include "alphaEqns.H"
|
|
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
|
}
|
|
|
|
rhoPhi = rhoPhiSum;
|
|
}
|
|
else
|
|
{
|
|
#include "alphaEqns.H"
|
|
}
|
|
}
|