31 thermo_(const_cast<fluidThermo&>(
daModel.getThermo())),
33 rho_(const_cast<volScalarField&>(
34 mesh_.thisDb().lookupObject<volScalarField>(
"rho"))),
35 alphat_(const_cast<volScalarField&>(
36 mesh_.thisDb().lookupObject<volScalarField>(
"alphat"))),
37 psi_(const_cast<volScalarField&>(
38 mesh_.thisDb().lookupObject<volScalarField>(
"thermo:psi"))),
41 simple_(const_cast<fvMesh&>(
mesh)),
42 pressureControl_(p_, rho_, simple_.dict())
46 const IOdictionary& thermoDict =
mesh.thisDb().lookupObject<IOdictionary>(
"thermophysicalProperties");
47 dictionary mixSubDict = thermoDict.subDict(
"mixture");
48 dictionary specieSubDict = mixSubDict.subDict(
"specie");
49 molWeight_ = specieSubDict.getScalar(
"molWeight");
50 dictionary thermodynamicsSubDict = mixSubDict.subDict(
"thermodynamics");
51 Cp_ = thermodynamicsSubDict.getScalar(
"Cp");
56 Info <<
"Cp " <<
Cp_ << endl;
94 label isPC = options.getLabel(
"isPC");
96 word divUScheme =
"div(phi,U)";
97 word divHEScheme =
"div(phi,e)";
98 word divPhidPScheme =
"div(phid,p)";
100 if (
he_.name() ==
"h")
102 divHEScheme =
"div(phi,h)";
107 divUScheme =
"div(pc)";
108 divHEScheme =
"div(pc)";
109 divPhidPScheme =
"div(pc)";
115 tmp<fvVectorMatrix>
tUEqn(
116 fvm::div(
phi_,
U_, divUScheme)
130 fvm::div(
phi_,
he_, divHEScheme)
132 ? fvc::div(
phi_, volScalarField(
"Ekp", 0.5 * magSqr(
U_) +
p_ /
rho_))
133 : fvc::div(
phi_, volScalarField(
"K", 0.5 * magSqr(
U_))))
143 volScalarField
rAU(1.0 /
UEqn.A());
144 volScalarField
rAtU(1.0 / (1.0 /
rAU -
UEqn.H1()));
151 volVectorField
HbyA(
"HbyA",
U_);
155 surfaceScalarField
phiHbyA(
"phiHbyA", fvc::interpolate(
rho_) * fvc::flux(
HbyA));
161 surfaceScalarField
phid(
173 + fvm::div(
phid,
p_, divPhidPScheme)
179 pEqn -= fvm::div(
phid,
p_, divPhidPScheme);
216 scalar RR = Foam::constant::thermodynamic::RR;
222 dimensionSet(0, 2, -2, -1, 0, 0, 0),
243 dimensionedScalar Cp(
245 dimensionSet(0, 2, -2, -1, 0, 0, 0),
258 if (
he_.name() ==
"e")
266 he_.correctBoundaryConditions();
278 U_.correctBoundaryConditions();
279 p_.correctBoundaryConditions();
280 T_.correctBoundaryConditions();