compressibleInterFoam: Updated to use the thermo:rho

This commit is contained in:
Henry Weller
2020-10-01 10:44:36 +01:00
parent 4889e8bbc4
commit 8fa6bfcded
11 changed files with 19 additions and 38 deletions

View File

@ -54,7 +54,7 @@ else
#include "alphaEqn.H"
}
rho == alpha1*rho1 + alpha2*rho2;
// rho == alpha1*rho1 + alpha2*rho2;
const surfaceScalarField& alphaPhi1 = talphaPhi1();
surfaceScalarField alphaPhi2("alphaPhi2", phi - alphaPhi1);

View File

@ -61,13 +61,9 @@ int main(int argc, char *argv[])
#include "createControl.H"
#include "createTimeControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createSurfaceFilmModel.H"
volScalarField& p = mixture.p();
volScalarField& T = mixture.T();
const volScalarField& psi1 = mixture.thermo1().psi();
const volScalarField& psi2 = mixture.thermo2().psi();
regionModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();
if (!LTS)

View File

@ -133,8 +133,7 @@
// Update densities from change in p_rgh
mixture.thermo1().correctRho(psi1*(p_rgh - p_rgh_0));
mixture.thermo2().correctRho(psi2*(p_rgh - p_rgh_0));
rho = alpha1*rho1 + alpha2*rho2;
mixture.correct();
// Correct p_rgh for consistency with p and the updated densities
p_rgh = p - rho*gh;

View File

@ -65,15 +65,11 @@ int main(int argc, char *argv[])
#include "initContinuityErrs.H"
#include "createDyMControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
#include "createUfIfPresent.H"
volScalarField& p = mixture.p();
volScalarField& T = mixture.T();
const volScalarField& psi1 = mixture.thermo1().psi();
const volScalarField& psi2 = mixture.thermo2().psi();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -0,0 +1,9 @@
volScalarField& alpha2(mixture.alpha2());
const volScalarField& rho1 = mixture.thermo1().rho();
const volScalarField& rho2 = mixture.thermo2().rho();
volScalarField& p = mixture.p();
volScalarField& T = mixture.T();
const volScalarField& psi1 = mixture.thermo1().psi();
const volScalarField& psi2 = mixture.thermo2().psi();

View File

@ -34,26 +34,7 @@ Info<< "Constructing twoPhaseMixtureThermo\n" << endl;
twoPhaseMixtureThermo mixture(U, phi);
volScalarField& alpha1(mixture.alpha1());
volScalarField& alpha2(mixture.alpha2());
Info<< "Reading thermophysical properties\n" << endl;
const volScalarField& rho1 = mixture.thermo1().rho();
const volScalarField& rho2 = mixture.thermo2().rho();
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
alpha1*rho1 + alpha2*rho2
);
const volScalarField& rho = mixture.rho();
dimensionedScalar pMin
(

View File

@ -150,8 +150,7 @@
// Update densities from change in p_rgh
mixture.thermo1().correctRho(psi1*(p_rgh - p_rgh_0));
mixture.thermo2().correctRho(psi2*(p_rgh - p_rgh_0));
rho = alpha1*rho1 + alpha2*rho2;
mixture.correct();
// Correct p_rgh for consistency with p and the updated densities
p_rgh = p - rho*gh;

View File

@ -30,6 +30,7 @@ boundaryField
{
type totalPressure;
p0 $internalField;
rho thermo:rho;
}
#includeEtc "caseDicts/setConstraintTypes"

View File

@ -35,7 +35,7 @@ divSchemes
div(phi,p) Gauss upwind;
div(phi,k) Gauss upwind;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(((thermo:rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -35,7 +35,7 @@ divSchemes
div(phi,p) Gauss upwind;
div(phi,k) Gauss upwind;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(((thermo:rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -34,7 +34,7 @@ divSchemes
div(rhoPhi,K) Gauss linear;
div((phi+meshPhi),p) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(((thermo:rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes