db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
67 lines
1.8 KiB
C
67 lines
1.8 KiB
C
{
|
|
word gammaScheme("div(phi,gamma)");
|
|
word gammarScheme("div(phirb,gamma)");
|
|
|
|
surfaceScalarField phir("phir", phic*interface.nHatf());
|
|
|
|
for (int gCorr=0; gCorr<nGammaCorr; gCorr++)
|
|
{
|
|
surfaceScalarField phiGamma =
|
|
fvc::flux
|
|
(
|
|
phi,
|
|
gamma,
|
|
gammaScheme
|
|
)
|
|
+ fvc::flux
|
|
(
|
|
-fvc::flux(-phir, scalar(1) - gamma, gammarScheme),
|
|
gamma,
|
|
gammarScheme
|
|
);
|
|
|
|
Pair<tmp<volScalarField> > vDotAlphal =
|
|
twoPhaseProperties->vDotAlphal();
|
|
const volScalarField& vDotcAlphal = vDotAlphal[0]();
|
|
const volScalarField& vDotvAlphal = vDotAlphal[1]();
|
|
|
|
volScalarField Sp
|
|
(
|
|
IOobject
|
|
(
|
|
"Sp",
|
|
runTime.timeName(),
|
|
mesh
|
|
),
|
|
vDotvAlphal - vDotcAlphal
|
|
);
|
|
|
|
volScalarField Su
|
|
(
|
|
IOobject
|
|
(
|
|
"Su",
|
|
runTime.timeName(),
|
|
mesh
|
|
),
|
|
// Divergence term is handled explicitly to be
|
|
// consistent with the explicit transport solution
|
|
divU*gamma
|
|
+ vDotcAlphal
|
|
);
|
|
|
|
//MULES::explicitSolve(gamma, phi, phiGamma, 1, 0);
|
|
//MULES::explicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0);
|
|
MULES::implicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0);
|
|
|
|
rhoPhi +=
|
|
(runTime.deltaT()/totalDeltaT)
|
|
*(phiGamma*(rho1 - rho2) + phi*rho2);
|
|
}
|
|
|
|
Info<< "Liquid phase volume fraction = "
|
|
<< gamma.weightedAverage(mesh.V()).value()
|
|
<< " Min(gamma) = " << min(gamma).value()
|
|
<< " Max(gamma) = " << max(gamma).value()
|
|
<< endl;
|
|
}
|