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&>(
daModel.getThermo())),
38 rho_(const_cast<volScalarField&>(
39 mesh_.thisDb().lookupObject<volScalarField>(
"rho"))),
40 alphat_(const_cast<volScalarField&>(
41 mesh_.thisDb().lookupObject<volScalarField>(
"alphat"))),
42 psi_(const_cast<volScalarField&>(
43 mesh_.thisDb().lookupObject<volScalarField>(
"thermo:psi"))),
46 simple_(const_cast<fvMesh&>(
mesh)),
47 pressureControl_(p_, rho_, simple_.dict()),
54 if (
allOptions.subDict(
"fvSource").toc().size() != 0)
60 const IOdictionary& thermoDict =
mesh.thisDb().lookupObject<IOdictionary>(
"thermophysicalProperties");
61 dictionary mixSubDict = thermoDict.subDict(
"mixture");
62 dictionary specieSubDict = mixSubDict.subDict(
"specie");
63 molWeight_ = specieSubDict.getScalar(
"molWeight");
64 dictionary thermodynamicsSubDict = mixSubDict.subDict(
"thermodynamics");
65 Cp_ = thermodynamicsSubDict.getScalar(
"Cp");
70 Info <<
"Cp " <<
Cp_ << endl;
113 label isPC = options.getLabel(
"isPC");
115 word divUScheme =
"div(phi,U)";
116 word divHEScheme =
"div(phi,e)";
118 if (
he_.name() ==
"h")
120 divHEScheme =
"div(phi,h)";
125 divUScheme =
"div(pc)";
126 divHEScheme =
"div(pc)";
139 tmp<fvVectorMatrix>
tUEqn(
140 fvm::div(
phi_,
U_, divUScheme)
161 fvm::div(
phi_,
he_, divHEScheme)
163 ? fvc::div(
phi_, volScalarField(
"Ekp", 0.5 * magSqr(
U_) +
p_ /
rho_))
164 : fvc::div(
phi_, volScalarField(
"K", 0.5 * magSqr(
U_))))
178 volScalarField
rAU(1.0 /
UEqn.A());
179 surfaceScalarField
rhorAUf(
"rhorAUf", fvc::interpolate(
rho_ *
rAU));
186 volVectorField
HbyA(
"HbyA",
U_);
190 surfaceScalarField
phiHbyA(
"phiHbyA", fvc::interpolate(
rho_) * fvc::flux(
HbyA));
236 scalar RR = Foam::constant::thermodynamic::RR;
242 dimensionSet(0, 2, -2, -1, 0, 0, 0),
263 dimensionedScalar Cp(
265 dimensionSet(0, 2, -2, -1, 0, 0, 0),
278 if (
he_.name() ==
"e")
286 he_.correctBoundaryConditions();
301 U_.correctBoundaryConditions();
302 p_.correctBoundaryConditions();
303 T_.correctBoundaryConditions();