Skip to content
Snippets Groups Projects
Commit 54842e87 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 4ae20068
Branches
Tags
No related merge requests found
EXE_INC = \ EXE_INC = \
-I../interFoam \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
......
{ {
fvScalarMatrix alpha1Eqn word alphaScheme("div(phi,alpha1)");
surfaceScalarField phiAlpha
( (
fvm::ddt(alpha1) fvc::flux
+ fvm::div(phi, alpha1)
- fvm::laplacian
( (
Dab + alphatab*turbulence->nut(), alpha1, phi,
"laplacian(Dab,alpha1)" alpha1,
alphaScheme
) )
); );
alpha1Eqn.solve(); MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
rhoPhi = alpha1Eqn.flux()*(rho1 - rho2) + phi*rho2; rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
rho = alpha1*rho1 + (scalar(1) - alpha1)*rho2;
Info<< "Phase 1 volume fraction = " Info<< "Phase-1 volume fraction = "
<< alpha1.weightedAverage(mesh.V()).value() << alpha1.weightedAverage(mesh.Vsc()).value()
<< " Min(alpha1) = " << min(alpha1).value() << " Min(alpha1) = " << min(alpha1).value()
<< " Max(alpha1) = " << max(alpha1).value() << " Max(alpha1) = " << max(alpha1).value()
<< endl; << endl;
......
...@@ -32,6 +32,8 @@ Description ...@@ -32,6 +32,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "MULES.H"
#include "subCycle.H"
#include "twoPhaseMixture.H" #include "twoPhaseMixture.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "pimpleControl.H" #include "pimpleControl.H"
...@@ -60,19 +62,21 @@ int main(int argc, char *argv[]) ...@@ -60,19 +62,21 @@ int main(int argc, char *argv[])
{ {
#include "readTimeControls.H" #include "readTimeControls.H"
#include "CourantNo.H" #include "CourantNo.H"
#include "alphaCourantNo.H"
#include "setDeltaT.H" #include "setDeltaT.H"
runTime++; runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
twoPhaseProperties.correct();
#include "alphaEqnSubCycle.H"
#include "alphaDiffusionEqn.H"
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop()) while (pimple.loop())
{ {
twoPhaseProperties.correct();
#include "alphaEqn.H"
#include "UEqn.H" #include "UEqn.H"
// --- Pressure corrector loop // --- Pressure corrector loop
......
...@@ -48,6 +48,7 @@ runTimeModifiable yes; ...@@ -48,6 +48,7 @@ runTimeModifiable yes;
adjustTimeStep on; adjustTimeStep on;
maxCo 0.5; maxCo 0.5;
maxAlphaCo 0.5;
maxDeltaT 1; maxDeltaT 1;
// ************************************************************************* // // ************************************************************************* //
...@@ -21,7 +21,7 @@ solvers ...@@ -21,7 +21,7 @@ solvers
{ {
solver smoothSolver; solver smoothSolver;
smoother GaussSeidel; smoother GaussSeidel;
tolerance 1e-7; tolerance 1e-9;
relTol 0; relTol 0;
nSweeps 1; nSweeps 1;
} }
...@@ -66,6 +66,7 @@ PIMPLE ...@@ -66,6 +66,7 @@ PIMPLE
nOuterCorrectors 1; nOuterCorrectors 1;
nCorrectors 2; nCorrectors 2;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nAlphaSubCycles 2;
pRefValue 0; pRefValue 0;
pRefPoint (0.1 0.1 1); pRefPoint (0.1 0.1 1);
} }
......
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