Commit 2bacd813 authored by Henry's avatar Henry
Browse files

interPhaseChangeFoam: corrected handling of alpha1 for transport and updated...

interPhaseChangeFoam: corrected handling of alpha1 for transport and updated for consistency with interFoam
parent afe060fe
......@@ -5,7 +5,10 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-IphaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude\
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
-ltwoPhaseMixture \
......@@ -15,4 +18,7 @@ EXE_LIBS = \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume
-lfiniteVolume \
-lmeshTools \
-lfvOptions \
-lsampling
......@@ -16,7 +16,7 @@
)
+ fvc::flux
(
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
-fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
......@@ -76,6 +76,7 @@
0
);
alpha2 = 1.0 - alpha1;
rhoPhi +=
(runTime.deltaT()/totalDeltaT)
*(phiAlpha*(rho1 - rho2) + phi*rho2);
......
......@@ -40,5 +40,5 @@ surfaceScalarField rhoPhi
#include "alphaEqn.H"
}
rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
rho == alpha1*rho1 + alpha2*rho2;
}
......@@ -12,20 +12,6 @@
mesh
);
Info<< "Reading field alpha1\n" << endl;
volScalarField alpha1
(
IOobject
(
"alpha1",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
......@@ -42,14 +28,19 @@
#include "createPhi.H"
Info<< "Creating phaseChangeTwoPhaseMixture\n" << endl;
autoPtr<phaseChangeTwoPhaseMixture> twoPhaseProperties =
phaseChangeTwoPhaseMixture::New(U, phi);
volScalarField& alpha1(twoPhaseProperties->alpha1());
volScalarField& alpha2(twoPhaseProperties->alpha2());
const dimensionedScalar& rho1 = twoPhaseProperties->rho1();
const dimensionedScalar& rho2 = twoPhaseProperties->rho2();
const dimensionedScalar& pSat = twoPhaseProperties->pSat();
// Need to store rho for ddt(rho, U)
volScalarField rho
(
......@@ -60,11 +51,12 @@
mesh,
IOobject::READ_IF_PRESENT
),
alpha1*rho1 + (scalar(1) - alpha1)*rho2,
alpha1*rho1 + alpha2*rho2,
alpha1.boundaryField().types()
);
rho.oldTime();
// Construct interface from alpha1 distribution
interfaceProperties interface(alpha1, U, twoPhaseProperties());
......@@ -113,3 +105,5 @@
);
p_rgh = p - rho*gh;
}
fv::IOoptionList fvOptions(mesh);
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -47,6 +47,7 @@ Description
#include "phaseChangeTwoPhaseMixture.H"
#include "turbulenceModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -46,6 +46,7 @@
U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions();
fvOptions.correct(U);
}
}
......
......@@ -94,8 +94,8 @@ PIMPLE
{
momentumPredictor no;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
cAlpha 0;
nAlphaCorr 1;
......
Markdown is supported
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