Permalink
Browse files

twoPhaseEulerFoam: rationalization of twoPhaseEulerFoam and compressi…

…bleTwoPhaseEulerFoam
  • Loading branch information...
Henry Henry
Henry authored and Henry committed Nov 14, 2012
1 parent 44edc93 commit b1a8efdd7fa5a7e2757fea37d9f68d0dbadec3a8
@@ -1,7 +1,4 @@
{
- label nAlphaCorr(readLabel(pimple.dict().lookup("nAlphaCorr")));
- label nAlphaSubCycles(readLabel(pimple.dict().lookup("nAlphaSubCycles")));
-
word alphaScheme("div(phi,alpha1)");
word alpharScheme("div(phir,alpha1)");
@@ -13,7 +10,7 @@
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
surfaceScalarField phipp(ppMagf*fvc::snGrad(alpha1)*mesh.magSf());
phir += phipp;
- phic += fvc::interpolate(alpha1)*phipp;
+ phic += alpha1f*phipp;
}
for (int acorr=0; acorr<nAlphaCorr; acorr++)
@@ -24,7 +21,7 @@
!(++alphaSubCycle).end();
)
{
- surfaceScalarField phiAlpha
+ surfaceScalarField alphaPhic1
(
fvc::flux
(
@@ -44,26 +41,26 @@
(
alpha1,
phi,
- phiAlpha,
+ alphaPhic1,
(g0.value() > 0 ? alphaMax : 1),
0
);
}
if (g0.value() > 0)
{
- ppMagf = rAU1f*fvc::interpolate
- (
- (1.0/(rho1*(alpha1 + scalar(0.0001))))
- *g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax)
- );
+ surfaceScalarField alpha1f(fvc::interpolate(alpha1));
+
+ ppMagf =
+ rAU1f/(alpha1f + scalar(0.0001))
+ *(g0/rho1)*min(exp(preAlphaExp*(alpha1f - alphaMax)), expMax);
fvScalarMatrix alpha1Eqn
(
fvm::ddt(alpha1) - fvc::ddt(alpha1)
- fvm::laplacian
(
- (fvc::interpolate(alpha1) + scalar(0.0001))*ppMagf,
+ alpha1f*ppMagf,
alpha1,
"laplacian(alpha1PpMag,alpha1)"
)
@@ -1,3 +1,5 @@
#include "readTimeControls.H"
+ int nAlphaCorr(readInt(pimple.dict().lookup("nAlphaCorr")));
+ int nAlphaSubCycles(readInt(pimple.dict().lookup("nAlphaSubCycles")));
Switch correctAlpha(pimple.dict().lookup("correctAlpha"));

0 comments on commit b1a8efd

Please sign in to comment.