twoPhaseEulerFoam: updated alphaEqn to use MULES
This commit is contained in:
parent
3324e7bbff
commit
0b240922e9
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
word scheme("div(phi,alpha1)");
|
label nAlphaCorr(readLabel(pimple.dict().lookup("nAlphaCorr")));
|
||||||
word schemer("div(phir,alpha1)");
|
label nAlphaSubCycles(readLabel(pimple.dict().lookup("nAlphaSubCycles")));
|
||||||
|
|
||||||
|
word alphaScheme("div(phi,alpha1)");
|
||||||
|
word alpharScheme("div(phir,alpha1)");
|
||||||
|
|
||||||
surfaceScalarField phic("phic", phi);
|
surfaceScalarField phic("phic", phi);
|
||||||
surfaceScalarField phir("phir", phi1 - phi2);
|
surfaceScalarField phir("phir", phi1 - phi2);
|
||||||
@ -15,14 +18,39 @@
|
|||||||
|
|
||||||
for (int acorr=0; acorr<nAlphaCorr; acorr++)
|
for (int acorr=0; acorr<nAlphaCorr; acorr++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix alpha1Eqn
|
for
|
||||||
(
|
(
|
||||||
fvm::ddt(alpha1)
|
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
||||||
+ fvm::div(phic, alpha1, scheme)
|
!(++alphaSubCycle).end();
|
||||||
+ fvm::div(-fvc::flux(-phir, alpha2, schemer), alpha1, schemer)
|
)
|
||||||
);
|
{
|
||||||
|
surfaceScalarField phiAlpha
|
||||||
|
(
|
||||||
|
fvc::flux
|
||||||
|
(
|
||||||
|
phic,
|
||||||
|
alpha1,
|
||||||
|
alphaScheme
|
||||||
|
)
|
||||||
|
+ fvc::flux
|
||||||
|
(
|
||||||
|
-fvc::flux(-phir, alpha2, alpharScheme),
|
||||||
|
alpha1,
|
||||||
|
alpharScheme
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (g0.value() > 0.0)
|
MULES::explicitSolve
|
||||||
|
(
|
||||||
|
alpha1,
|
||||||
|
phi,
|
||||||
|
phiAlpha,
|
||||||
|
(g0.value() > 0 ? alphaMax : 1),
|
||||||
|
0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g0.value() > 0)
|
||||||
{
|
{
|
||||||
ppMagf = rAU1f*fvc::interpolate
|
ppMagf = rAU1f*fvc::interpolate
|
||||||
(
|
(
|
||||||
@ -30,19 +58,23 @@
|
|||||||
*g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax)
|
*g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax)
|
||||||
);
|
);
|
||||||
|
|
||||||
alpha1Eqn -= fvm::laplacian
|
fvScalarMatrix alpha1Eqn
|
||||||
(
|
(
|
||||||
(fvc::interpolate(alpha1) + scalar(0.0001))*ppMagf,
|
fvm::ddt(alpha1) - fvc::ddt(alpha1)
|
||||||
alpha1,
|
- fvm::laplacian
|
||||||
"laplacian(alpha1PpMag,alpha1)"
|
(
|
||||||
|
(fvc::interpolate(alpha1) + scalar(0.0001))*ppMagf,
|
||||||
|
alpha1,
|
||||||
|
"laplacian(alpha1PpMag,alpha1)"
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
alpha1Eqn.relax();
|
||||||
|
alpha1Eqn.solve();
|
||||||
|
|
||||||
|
#include "packingLimiter.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
alpha1Eqn.relax();
|
|
||||||
alpha1Eqn.solve();
|
|
||||||
|
|
||||||
#include "packingLimiter.H"
|
|
||||||
|
|
||||||
alpha2 = scalar(1) - alpha1;
|
alpha2 = scalar(1) - alpha1;
|
||||||
|
|
||||||
Info<< "Dispersed phase volume fraction = "
|
Info<< "Dispersed phase volume fraction = "
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
int nAlphaCorr(readInt(pimple.dict().lookup("nAlphaCorr")));
|
|
||||||
|
|
||||||
Switch correctAlpha(pimple.dict().lookup("correctAlpha"));
|
Switch correctAlpha(pimple.dict().lookup("correctAlpha"));
|
||||||
|
@ -31,6 +31,8 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
|
#include "MULES.H"
|
||||||
|
#include "subCycle.H"
|
||||||
#include "nearWallDist.H"
|
#include "nearWallDist.H"
|
||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
|
Loading…
Reference in New Issue
Block a user