31 thermo_(const_cast<fluidThermo&>(
32 mesh_.thisDb().lookupObject<fluidThermo>(
"thermophysicalProperties"))),
34 rho_(const_cast<volScalarField&>(
35 mesh_.thisDb().lookupObject<volScalarField>(
"rho"))),
36 alphat_(const_cast<volScalarField&>(
37 mesh_.thisDb().lookupObject<volScalarField>(
"alphat"))),
38 psi_(const_cast<volScalarField&>(
39 mesh_.thisDb().lookupObject<volScalarField>(
"thermo:psi"))),
42 simple_(const_cast<fvMesh&>(
mesh)),
43 pressureControl_(p_, rho_, simple_.dict())
47 const IOdictionary& thermoDict =
mesh.thisDb().lookupObject<IOdictionary>(
"thermophysicalProperties");
48 dictionary mixSubDict = thermoDict.subDict(
"mixture");
49 dictionary specieSubDict = mixSubDict.subDict(
"specie");
50 molWeight_ = specieSubDict.getScalar(
"molWeight");
51 dictionary thermodynamicsSubDict = mixSubDict.subDict(
"thermodynamics");
52 Cp_ = thermodynamicsSubDict.getScalar(
"Cp");
57 Info <<
"Cp " <<
Cp_ << endl;
95 label isPC = options.getLabel(
"isPC");
97 word divUScheme =
"div(phi,U)";
98 word divHEScheme =
"div(phi,e)";
99 word divPhidPScheme =
"div(phid,p)";
101 if (
he_.name() ==
"h")
103 divHEScheme =
"div(phi,h)";
108 divUScheme =
"div(pc)";
109 divHEScheme =
"div(pc)";
110 divPhidPScheme =
"div(pc)";
116 tmp<fvVectorMatrix>
tUEqn(
117 fvm::div(
phi_,
U_, divUScheme)
131 fvm::div(
phi_,
he_, divHEScheme)
133 ? fvc::div(
phi_, volScalarField(
"Ekp", 0.5 * magSqr(
U_) +
p_ /
rho_))
134 : fvc::div(
phi_, volScalarField(
"K", 0.5 * magSqr(
U_))))
144 volScalarField
rAU(1.0 /
UEqn.A());
145 volScalarField
rAtU(1.0 / (1.0 /
rAU -
UEqn.H1()));
150 autoPtr<volVectorField>
HbyAPtr =
nullptr;
158 HbyAPtr.reset(
new volVectorField(
"HbyA",
U_));
165 surfaceScalarField
phiHbyA(
"phiHbyA", fvc::interpolate(
rho_) * fvc::flux(
HbyA));
171 surfaceScalarField
phid(
183 + fvm::div(
phid,
p_, divPhidPScheme)
189 pEqn -= fvm::div(
phid,
p_, divPhidPScheme);
225 scalar RR = Foam::constant::thermodynamic::RR;
231 dimensionSet(0, 2, -2, -1, 0, 0, 0),
252 dimensionedScalar Cp(
254 dimensionSet(0, 2, -2, -1, 0, 0, 0),
267 if (
he_.name() ==
"e")
275 he_.correctBoundaryConditions();
287 U_.correctBoundaryConditions();
288 p_.correctBoundaryConditions();
289 T_.correctBoundaryConditions();