31 thermo_(const_cast<fluidThermo&>(
daModel.getThermo())),
32 URel_(const_cast<volVectorField&>(
33 mesh_.thisDb().lookupObject<volVectorField>(
"URel"))),
35 rho_(const_cast<volScalarField&>(
36 mesh_.thisDb().lookupObject<volScalarField>(
"rho"))),
37 alphat_(const_cast<volScalarField&>(
38 mesh_.thisDb().lookupObject<volScalarField>(
"alphat"))),
39 psi_(const_cast<volScalarField&>(
40 mesh_.thisDb().lookupObject<volScalarField>(
"thermo:psi"))),
43 simple_(const_cast<fvMesh&>(
mesh)),
44 pressureControl_(p_, rho_, simple_.dict()),
50 const IOdictionary& thermoDict =
mesh.thisDb().lookupObject<IOdictionary>(
"thermophysicalProperties");
51 dictionary mixSubDict = thermoDict.subDict(
"mixture");
52 dictionary specieSubDict = mixSubDict.subDict(
"specie");
53 molWeight_ = specieSubDict.getScalar(
"molWeight");
54 dictionary thermodynamicsSubDict = mixSubDict.subDict(
"thermodynamics");
55 Cp_ = thermodynamicsSubDict.getScalar(
"Cp");
60 Info <<
"Cp " <<
Cp_ << endl;
98 label isPC = options.getLabel(
"isPC");
100 word divUScheme =
"div(phi,U)";
101 word divHEScheme =
"div(phi,e)";
102 word divPhidPScheme =
"div(phid,p)";
104 if (
he_.name() ==
"h")
106 divHEScheme =
"div(phi,h)";
111 divUScheme =
"div(pc)";
112 divHEScheme =
"div(pc)";
113 divPhidPScheme =
"div(pc)";
119 tmp<fvVectorMatrix>
tUEqn(
120 fvm::div(
phi_,
U_, divUScheme)
139 fvm::div(
phi_,
he_, divHEScheme)
141 ? fvc::div(
phi_, volScalarField(
"Ekp", 0.5 * magSqr(
U_) +
p_ /
rho_))
142 : fvc::div(
phi_, volScalarField(
"K", 0.5 * magSqr(
U_))) - fvc::div(
Teff.T() &
U_) + fvc::div(
p_ * (
U_ -
URel_)))
153 volScalarField
AU(
UEqn.A());
155 volVectorField
HbyA(
"HbyA",
U_);
158 volScalarField
rAU(1.0 /
UEqn.A());
163 surfaceScalarField
phid(
165 fvc::interpolate(
psi_) * (fvc::interpolate(
HbyA) &
mesh_.Sf()));
170 fvm::div(
phid,
p_, divPhidPScheme)
176 pEqn -= fvm::div(
phid,
p_, divPhidPScheme);
251 scalar RR = Foam::constant::thermodynamic::RR;
257 dimensionSet(0, 2, -2, -1, 0, 0, 0),
278 dimensionedScalar Cp(
280 dimensionSet(0, 2, -2, -1, 0, 0, 0),
293 if (
he_.name() ==
"e")
301 he_.correctBoundaryConditions();
315 U_.correctBoundaryConditions();
316 p_.correctBoundaryConditions();
317 T_.correctBoundaryConditions();