36 lines
977 B
C++
36 lines
977 B
C++
|
{
|
||
|
word alphaScheme("div(phi,alpha)");
|
||
|
word alpharScheme("div(phirb,alpha)");
|
||
|
|
||
|
surfaceScalarField phic = mag(phi/mesh.magSf());
|
||
|
phic = min(interface.cAlpha()*phic, max(phic));
|
||
|
surfaceScalarField phir = phic*interface.nHatf();
|
||
|
|
||
|
for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
|
||
|
{
|
||
|
surfaceScalarField phiAlpha =
|
||
|
fvc::flux
|
||
|
(
|
||
|
phi,
|
||
|
alpha1,
|
||
|
alphaScheme
|
||
|
)
|
||
|
+ fvc::flux
|
||
|
(
|
||
|
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
|
||
|
alpha1,
|
||
|
alpharScheme
|
||
|
);
|
||
|
|
||
|
MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
|
||
|
|
||
|
rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
|
||
|
}
|
||
|
|
||
|
Info<< "Liquid phase volume fraction = "
|
||
|
<< alpha1.weightedAverage(mesh.V()).value()
|
||
|
<< " Min(alpha1) = " << min(alpha1).value()
|
||
|
<< " Max(alpha1) = " << max(alpha1).value()
|
||
|
<< endl;
|
||
|
}
|