31 fvSource_(const_cast<volVectorField&>(
32 mesh_.thisDb().lookupObject<volVectorField>(
"fvSource"))),
33 fvSourceEnergy_(const_cast<volScalarField&>(
34 mesh_.thisDb().lookupObject<volScalarField>(
"fvSourceEnergy"))),
35 fvOptions_(fv::options::New(
mesh)),
36 thermo_(const_cast<fluidThermo&>(
37 mesh_.thisDb().lookupObject<fluidThermo>(
"thermophysicalProperties"))),
39 rho_(const_cast<volScalarField&>(
40 mesh_.thisDb().lookupObject<volScalarField>(
"rho"))),
41 alphat_(const_cast<volScalarField&>(
42 mesh_.thisDb().lookupObject<volScalarField>(
"alphat"))),
43 psi_(const_cast<volScalarField&>(
44 mesh_.thisDb().lookupObject<volScalarField>(
"thermo:psi"))),
47 simple_(const_cast<fvMesh&>(
mesh)),
48 pressureControl_(p_, rho_, simple_.dict()),
55 if (
allOptions.subDict(
"fvSource").toc().size() != 0)
61 const IOdictionary& thermoDict =
mesh.thisDb().lookupObject<IOdictionary>(
"thermophysicalProperties");
62 dictionary mixSubDict = thermoDict.subDict(
"mixture");
63 dictionary specieSubDict = mixSubDict.subDict(
"specie");
64 molWeight_ = specieSubDict.getScalar(
"molWeight");
65 dictionary thermodynamicsSubDict = mixSubDict.subDict(
"thermodynamics");
66 Cp_ = thermodynamicsSubDict.getScalar(
"Cp");
71 Info <<
"Cp " <<
Cp_ << endl;
114 label isPC = options.getLabel(
"isPC");
116 word divUScheme =
"div(phi,U)";
117 word divHEScheme =
"div(phi,e)";
119 if (
he_.name() ==
"h")
121 divHEScheme =
"div(phi,h)";
126 divUScheme =
"div(pc)";
127 divHEScheme =
"div(pc)";
140 tmp<fvVectorMatrix>
tUEqn(
141 fvm::div(
phi_,
U_, divUScheme)
162 fvm::div(
phi_,
he_, divHEScheme)
164 ? fvc::div(
phi_, volScalarField(
"Ekp", 0.5 * magSqr(
U_) +
p_ /
rho_))
165 : fvc::div(
phi_, volScalarField(
"K", 0.5 * magSqr(
U_))))
179 volScalarField
rAU(1.0 /
UEqn.A());
180 surfaceScalarField
rhorAUf(
"rhorAUf", fvc::interpolate(
rho_ *
rAU));
185 autoPtr<volVectorField>
HbyAPtr =
nullptr;
193 HbyAPtr.reset(
new volVectorField(
"HbyA",
U_));
200 surfaceScalarField
phiHbyA(
"phiHbyA", fvc::interpolate(
rho_) * fvc::flux(
HbyA));
246 scalar RR = Foam::constant::thermodynamic::RR;
252 dimensionSet(0, 2, -2, -1, 0, 0, 0),
273 dimensionedScalar Cp(
275 dimensionSet(0, 2, -2, -1, 0, 0, 0),
288 if (
he_.name() ==
"e")
296 he_.correctBoundaryConditions();
311 U_.correctBoundaryConditions();
312 p_.correctBoundaryConditions();
313 T_.correctBoundaryConditions();