Skip to content
Snippets Groups Projects
Commit 314c9475 authored by Henry's avatar Henry
Browse files

twoLiquidMixingFoam: Converted to using MULES and sub-cycling for alpha1

Operator-splitting is used for the diffusion
parent 6138cf6d
Branches
Tags
No related merge requests found
{
fvScalarMatrix alpha1Eqn
(
fvm::ddt(alpha1)
- fvc::ddt(alpha1)
- fvm::laplacian
(
volScalarField("Dab", Dab + alphatab*turbulence->nut()),
alpha1
)
);
alpha1Eqn.solve();
rhoPhi += alpha1Eqn.flux()*(rho1 - rho2);
}
rho = alpha1*rho1 + (scalar(1) - alpha1)*rho2;
label nAlphaCorr(readLabel(pimple.dict().lookup("nAlphaCorr")));
label nAlphaSubCycles(readLabel(pimple.dict().lookup("nAlphaSubCycles")));
if (nAlphaSubCycles > 1)
{
dimensionedScalar totalDeltaT = runTime.deltaT();
surfaceScalarField rhoPhiSum(0.0*rhoPhi);
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
!(++alphaSubCycle).end();
)
{
#include "alphaEqn.H"
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
}
rhoPhi = rhoPhiSum;
}
else
{
#include "alphaEqn.H"
}
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment