mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
compressibleTwoPhaseEulerFoam: Complete support for sensible internal energy and update tutorials
This commit is contained in:
@ -19,34 +19,46 @@
|
|||||||
|
|
||||||
fvScalarMatrix he1Eqn
|
fvScalarMatrix he1Eqn
|
||||||
(
|
(
|
||||||
fvm::ddt(alpha1, he1)
|
fvm::ddt(alpha1, he1) + fvm::div(alphaPhi1, he1)
|
||||||
+ fvm::div(alphaPhi1, he1)
|
+ fvc::ddt(alpha1, K1) + fvc::div(alphaPhi1, K1)
|
||||||
|
|
||||||
// Compressibity correction
|
// Compressibity correction
|
||||||
- fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), he1)
|
- 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)
|
- fvm::laplacian(k1, he1)
|
||||||
==
|
==
|
||||||
heatTransferCoeff*(thermo2.T() - thermo1.T())/rho1
|
heatTransferCoeff*(thermo2.T() - thermo1.T())/rho1
|
||||||
+ heatTransferCoeff*he1/Cpv1/rho1
|
+ heatTransferCoeff*he1/Cpv1/rho1
|
||||||
- fvm::Sp(heatTransferCoeff/Cpv1/rho1, he1)
|
- fvm::Sp(heatTransferCoeff/Cpv1/rho1, he1)
|
||||||
+ alpha1*(dpdt/rho1 - (fvc::ddt(K1) + fvc::div(phi1, K1)))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
fvScalarMatrix he2Eqn
|
fvScalarMatrix he2Eqn
|
||||||
(
|
(
|
||||||
fvm::ddt(alpha2, he2)
|
fvm::ddt(alpha2, he2) + fvm::div(alphaPhi2, he2)
|
||||||
+ fvm::div(alphaPhi2, he2)
|
+ fvc::ddt(alpha2, K2) + fvc::div(alphaPhi2, K2)
|
||||||
|
|
||||||
// Compressibity correction
|
// Compressibity correction
|
||||||
- fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), he2)
|
- 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)
|
- fvm::laplacian(k2, he2)
|
||||||
==
|
==
|
||||||
heatTransferCoeff*(thermo1.T() - thermo2.T())/rho2
|
heatTransferCoeff*(thermo1.T() - thermo2.T())/rho2
|
||||||
+ heatTransferCoeff*he2/Cpv2/rho2
|
+ heatTransferCoeff*he2/Cpv2/rho2
|
||||||
- fvm::Sp(heatTransferCoeff/Cpv2/rho2, he2)
|
- fvm::Sp(heatTransferCoeff/Cpv2/rho2, he2)
|
||||||
+ alpha2*(dpdt/rho2 - (fvc::ddt(K2) + fvc::div(phi2, K2)))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
he1Eqn.relax();
|
he1Eqn.relax();
|
||||||
|
|||||||
@ -275,8 +275,8 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating field dpdt\n" << endl;
|
Info<< "Creating field dalpha1pdt\n" << endl;
|
||||||
volScalarField dpdt
|
volScalarField dalpha1pdt
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
@ -285,7 +285,20 @@
|
|||||||
mesh
|
mesh
|
||||||
),
|
),
|
||||||
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;
|
Info<< "Creating field kinetic energy K\n" << endl;
|
||||||
|
|||||||
@ -192,6 +192,11 @@
|
|||||||
|
|
||||||
if (thermo1.dpdt())
|
if (thermo1.dpdt())
|
||||||
{
|
{
|
||||||
dpdt = fvc::ddt(p);
|
dalpha1pdt = fvc::ddt(alpha1, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (thermo2.dpdt())
|
||||||
|
{
|
||||||
|
dalpha2pdt = fvc::ddt(alpha2, p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,12 +31,11 @@ mixture
|
|||||||
specie
|
specie
|
||||||
{
|
{
|
||||||
nMoles 1;
|
nMoles 1;
|
||||||
molWeight 18;
|
molWeight 28.9;
|
||||||
}
|
}
|
||||||
equationOfState
|
equationOfState
|
||||||
{
|
{
|
||||||
rho0 1027;
|
rho0 1027;
|
||||||
R 3000;
|
|
||||||
}
|
}
|
||||||
thermodynamics
|
thermodynamics
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,7 +38,7 @@ divSchemes
|
|||||||
"div\(phid.*,p\)" Gauss upwind;
|
"div\(phid.*,p\)" Gauss upwind;
|
||||||
|
|
||||||
"div\(alphaPhi.*,h.*\)" Gauss limitedLinear 1;
|
"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;
|
"div\(alphaPhi.*,(k|epsilon)\)" Gauss limitedLinear 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ thermoType
|
|||||||
thermo hConst;
|
thermo hConst;
|
||||||
equationOfState rhoConst;
|
equationOfState rhoConst;
|
||||||
specie specie;
|
specie specie;
|
||||||
energy sensibleEnthalpy;
|
energy sensibleInternalEnergy;
|
||||||
}
|
}
|
||||||
|
|
||||||
mixture
|
mixture
|
||||||
|
|||||||
@ -23,7 +23,7 @@ thermoType
|
|||||||
thermo hConst;
|
thermo hConst;
|
||||||
equationOfState perfectGas;
|
equationOfState perfectGas;
|
||||||
specie specie;
|
specie specie;
|
||||||
energy sensibleEnthalpy;
|
energy sensibleInternalEnergy;
|
||||||
}
|
}
|
||||||
|
|
||||||
mixture
|
mixture
|
||||||
|
|||||||
@ -37,8 +37,8 @@ divSchemes
|
|||||||
"div\(\(alpha.*Rc\)\)" Gauss linear;
|
"div\(\(alpha.*Rc\)\)" Gauss linear;
|
||||||
"div\(phid.,p\)" Gauss upwind;
|
"div\(phid.,p\)" Gauss upwind;
|
||||||
|
|
||||||
"div\(alphaPhi.,h.\)" Gauss limitedLinear 1;
|
"div\(alphaPhi.,(h|e).\)" Gauss limitedLinear 1;
|
||||||
"div\(phi.,K.\)" Gauss limitedLinear 1;
|
"div\(alphaPhi.,K.\)" Gauss limitedLinear 1;
|
||||||
|
|
||||||
div(alphaPhi2,k) Gauss limitedLinear 1;
|
div(alphaPhi2,k) Gauss limitedLinear 1;
|
||||||
div(alphaPhi2,epsilon) Gauss limitedLinear 1;
|
div(alphaPhi2,epsilon) Gauss limitedLinear 1;
|
||||||
|
|||||||
@ -47,7 +47,7 @@ solvers
|
|||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
"h.*"
|
"(h|e).*"
|
||||||
{
|
{
|
||||||
solver PBiCG;
|
solver PBiCG;
|
||||||
preconditioner DILU;
|
preconditioner DILU;
|
||||||
|
|||||||
@ -31,12 +31,11 @@ mixture
|
|||||||
specie
|
specie
|
||||||
{
|
{
|
||||||
nMoles 1;
|
nMoles 1;
|
||||||
molWeight 18;
|
molWeight 28.9;
|
||||||
}
|
}
|
||||||
equationOfState
|
equationOfState
|
||||||
{
|
{
|
||||||
rho0 1027;
|
rho0 1027;
|
||||||
R 3000;
|
|
||||||
}
|
}
|
||||||
thermodynamics
|
thermodynamics
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,7 +38,7 @@ divSchemes
|
|||||||
"div\(phid.,p\)" Gauss linear;
|
"div\(phid.,p\)" Gauss linear;
|
||||||
|
|
||||||
"div\(alphaPhi.,h.\)" Gauss limitedLinear 1;
|
"div\(alphaPhi.,h.\)" Gauss limitedLinear 1;
|
||||||
"div\(phi.,K.\)" Gauss linear;
|
"div\(alphaPhi.,K.\)" Gauss limitedLinear 1;
|
||||||
|
|
||||||
"div\(alphaPhi.,(k|epsilon)\)" Gauss limitedLinear 1;
|
"div\(alphaPhi.,(k|epsilon)\)" Gauss limitedLinear 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user