compressibleTwoPhaseEulerFoam: Complete support for sensible internal energy and update tutorials

This commit is contained in:
Henry 2013-02-12 15:12:21 +00:00
parent d8eb000d14
commit d17b0b583c
11 changed files with 49 additions and 21 deletions

View File

@ -19,34 +19,46 @@
fvScalarMatrix he1Eqn
(
fvm::ddt(alpha1, he1)
+ fvm::div(alphaPhi1, he1)
fvm::ddt(alpha1, he1) + fvm::div(alphaPhi1, he1)
+ fvc::ddt(alpha1, K1) + fvc::div(alphaPhi1, K1)
// Compressibity correction
- fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), he1)
- (fvc::ddt(alpha1) + fvc::div(alphaPhi1))*K1
+ (
he1.name() == "e"
? fvc::div(alphaPhi1, p)
: -dalpha1pdt
)/rho1
- fvm::laplacian(k1, he1)
==
heatTransferCoeff*(thermo2.T() - thermo1.T())/rho1
+ heatTransferCoeff*he1/Cpv1/rho1
- fvm::Sp(heatTransferCoeff/Cpv1/rho1, he1)
+ alpha1*(dpdt/rho1 - (fvc::ddt(K1) + fvc::div(phi1, K1)))
);
fvScalarMatrix he2Eqn
(
fvm::ddt(alpha2, he2)
+ fvm::div(alphaPhi2, he2)
fvm::ddt(alpha2, he2) + fvm::div(alphaPhi2, he2)
+ fvc::ddt(alpha2, K2) + fvc::div(alphaPhi2, K2)
// Compressibity correction
- fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), he2)
- (fvc::ddt(alpha2) + fvc::div(alphaPhi2))*K2
+ (
he2.name() == "e"
? fvc::div(alphaPhi2, p)
: -dalpha2pdt
)/rho2
- fvm::laplacian(k2, he2)
==
heatTransferCoeff*(thermo1.T() - thermo2.T())/rho2
+ heatTransferCoeff*he2/Cpv2/rho2
- fvm::Sp(heatTransferCoeff/Cpv2/rho2, he2)
+ alpha2*(dpdt/rho2 - (fvc::ddt(K2) + fvc::div(phi2, K2)))
);
he1Eqn.relax();

View File

@ -275,8 +275,8 @@
);
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
Info<< "Creating field dalpha1pdt\n" << endl;
volScalarField dalpha1pdt
(
IOobject
(
@ -285,7 +285,20 @@
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar("dalpha1pdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field dalpha2pdt\n" << endl;
volScalarField dalpha2pdt
(
IOobject
(
"dpdt",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("dalpha2pdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field kinetic energy K\n" << endl;

View File

@ -192,6 +192,11 @@
if (thermo1.dpdt())
{
dpdt = fvc::ddt(p);
dalpha1pdt = fvc::ddt(alpha1, p);
}
if (thermo2.dpdt())
{
dalpha2pdt = fvc::ddt(alpha2, p);
}
}

View File

@ -31,12 +31,11 @@ mixture
specie
{
nMoles 1;
molWeight 18;
molWeight 28.9;
}
equationOfState
{
rho0 1027;
R 3000;
}
thermodynamics
{

View File

@ -38,7 +38,7 @@ divSchemes
"div\(phid.*,p\)" Gauss upwind;
"div\(alphaPhi.*,h.*\)" Gauss limitedLinear 1;
"div\(phi.*,K.*\)" Gauss limitedLinear 1;
"div\(alphaPhi.*,K.*\)" Gauss limitedLinear 1;
"div\(alphaPhi.*,(k|epsilon)\)" Gauss limitedLinear 1;
}

View File

@ -23,7 +23,7 @@ thermoType
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
energy sensibleInternalEnergy;
}
mixture

View File

@ -23,7 +23,7 @@ thermoType
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
energy sensibleInternalEnergy;
}
mixture

View File

@ -37,8 +37,8 @@ divSchemes
"div\(\(alpha.*Rc\)\)" Gauss linear;
"div\(phid.,p\)" Gauss upwind;
"div\(alphaPhi.,h.\)" Gauss limitedLinear 1;
"div\(phi.,K.\)" Gauss limitedLinear 1;
"div\(alphaPhi.,(h|e).\)" Gauss limitedLinear 1;
"div\(alphaPhi.,K.\)" Gauss limitedLinear 1;
div(alphaPhi2,k) Gauss limitedLinear 1;
div(alphaPhi2,epsilon) Gauss limitedLinear 1;

View File

@ -47,7 +47,7 @@ solvers
relTol 0;
}
"h.*"
"(h|e).*"
{
solver PBiCG;
preconditioner DILU;

View File

@ -31,12 +31,11 @@ mixture
specie
{
nMoles 1;
molWeight 18;
molWeight 28.9;
}
equationOfState
{
rho0 1027;
R 3000;
}
thermodynamics
{

View File

@ -38,7 +38,7 @@ divSchemes
"div\(phid.,p\)" Gauss linear;
"div\(alphaPhi.,h.\)" Gauss limitedLinear 1;
"div\(phi.,K.\)" Gauss linear;
"div\(alphaPhi.,K.\)" Gauss limitedLinear 1;
"div\(alphaPhi.,(k|epsilon)\)" Gauss limitedLinear 1;
}