35 template<
class BasicThermo,
class MixtureType>
39 volScalarField::Boundary& hBf =
h.boundaryFieldRef();
43 if (isA<gradientEnergyFvPatchScalarField>(hBf[patchi]))
45 refCast<gradientEnergyFvPatchScalarField>(hBf[patchi]).gradient()
46 = hBf[patchi].fvPatchField::snGrad();
48 else if (isA<mixedEnergyFvPatchScalarField>(hBf[patchi]))
50 refCast<mixedEnergyFvPatchScalarField>(hBf[patchi]).refGrad()
51 = hBf[patchi].fvPatchField::snGrad();
57 template<
class BasicThermo,
class MixtureType>
72 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
75 volScalarField::Boundary& heBf =
he.boundaryFieldRef();
79 heBf[patchi] == this->
he
82 T.boundaryField()[patchi],
86 heBf[patchi].useImplicit(
T.boundaryField()[patchi].useImplicit());
89 this->heBoundaryCorrection(
he);
92 if (
p.nOldTimes() > 0)
94 init(
p.oldTime(),
T.oldTime(),
he.oldTime());
101 template<
class BasicThermo,
class MixtureType>
105 const word& phaseName
108 BasicThermo(
mesh, phaseName),
109 MixtureType(*
this,
mesh, phaseName),
115 BasicThermo::phasePropertyName
117 MixtureType::thermoType::heName()
119 mesh.time().timeName(),
126 this->heBoundaryTypes(),
127 this->heBoundaryBaseTypes()
130 init(this->p_, this->T_, he_);
134 template<
class BasicThermo,
class MixtureType>
139 const word& phaseName
143 MixtureType(*
this,
mesh, phaseName),
149 BasicThermo::phasePropertyName
151 MixtureType::thermoType::heName()
153 mesh.time().timeName(),
160 this->heBoundaryTypes(),
161 this->heBoundaryBaseTypes()
164 init(this->p_, this->T_, he_);
168 template<
class BasicThermo,
class MixtureType>
172 const word& phaseName,
173 const word& dictionaryName
176 BasicThermo(
mesh, phaseName, dictionaryName),
177 MixtureType(*
this,
mesh, phaseName),
183 BasicThermo::phasePropertyName
185 MixtureType::thermoType::heName()
187 mesh.time().timeName(),
194 this->heBoundaryTypes(),
195 this->heBoundaryBaseTypes()
198 init(this->p_, this->T_, he_);
205 template<
class BasicThermo,
class MixtureType>
212 template<
class BasicThermo,
class MixtureType>
228 mesh.time().timeName(),
247 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
250 volScalarField::Boundary& heBf =
he.boundaryFieldRef();
261 this->patchFaceMixture(patchi, facei).HE(pp[facei], Tp[facei]);
269 template<
class BasicThermo,
class MixtureType>
282 he[celli] = this->cellMixture(
cells[celli]).HE(
p[celli],
T[celli]);
289 template<
class BasicThermo,
class MixtureType>
303 this->patchFaceMixture(patchi, facei).HE(
p[facei],
T[facei]);
310 template<
class BasicThermo,
class MixtureType>
323 mesh.time().timeName(),
339 hcCells[celli] = this->cellMixture(celli).Hc();
350 hcp[facei] = this->patchFaceMixture(patchi, facei).Hc();
358 template<
class BasicThermo,
class MixtureType>
372 this->patchFaceMixture(patchi, facei).Cp(
p[facei],
T[facei]);
379 template<
class BasicThermo,
class MixtureType>
389 auto&
Cp =
tCp.ref();
393 const label celli =
cells[i];
394 Cp[i] = this->cellMixture(celli).Cp(
p[i],
T[i]);
401 template<
class BasicThermo,
class MixtureType>
414 mesh.time().timeName(),
430 this->cellMixture(celli).Cp(this->p_[celli], this->T_[celli]);
433 volScalarField::Boundary& cpBf =
cp.boundaryFieldRef();
444 this->patchFaceMixture(patchi, facei).Cp(pp[facei], pT[facei]);
452 template<
class BasicThermo,
class MixtureType>
467 this->patchFaceMixture(patchi, facei).Cv(
p[facei],
T[facei]);
474 template<
class BasicThermo,
class MixtureType>
484 auto&
rho = tRho.ref();
488 const label celli =
cells[i];
489 rho[i] = this->cellMixture(celli).rho(
p[i],
T[i]);
496 template<
class BasicThermo,
class MixtureType>
509 mesh.time().timeName(),
525 this->cellMixture(celli).Cv(this->p_[celli], this->T_[celli]);
528 volScalarField::Boundary& cvBf = cv.boundaryFieldRef();
534 this->p_.boundaryField()[patchi],
535 this->T_.boundaryField()[patchi],
544 template<
class BasicThermo,
class MixtureType>
558 this->patchFaceMixture(patchi, facei).gamma(
p[facei],
T[facei]);
565 template<
class BasicThermo,
class MixtureType>
578 mesh.time().timeName(),
594 this->cellMixture(celli).gamma(this->p_[celli], this->T_[celli]);
597 volScalarField::Boundary& gammaBf =
gamma.boundaryFieldRef();
607 pgamma[facei] = this->patchFaceMixture(patchi, facei).gamma
619 template<
class BasicThermo,
class MixtureType>
633 this->patchFaceMixture(patchi, facei).Cpv(
p[facei],
T[facei]);
640 template<
class BasicThermo,
class MixtureType>
653 mesh.time().timeName(),
669 this->cellMixture(celli).Cpv(this->p_[celli], this->T_[celli]);
672 volScalarField::Boundary& CpvBf = Cpv.boundaryFieldRef();
683 this->patchFaceMixture(patchi, facei).Cpv(pp[facei], pT[facei]);
691 template<
class BasicThermo,
class MixtureType>
705 this->patchFaceMixture(patchi, facei).CpByCpv(
p[facei],
T[facei]);
712 template<
class BasicThermo,
class MixtureType>
725 mesh.time().timeName(),
740 CpByCpv[celli] = this->cellMixture(celli).CpByCpv
747 volScalarField::Boundary& CpByCpvBf =
748 CpByCpv.boundaryFieldRef();
758 pCpByCpv[facei] = this->patchFaceMixture(patchi, facei).CpByCpv
770 template<
class BasicThermo,
class MixtureType>
785 this->cellMixture(
cells[celli]).THE(
h[celli],
p[celli],
T0[celli]);
792 template<
class BasicThermo,
class MixtureType>
806 T[facei] = this->patchFaceMixture
810 ).THE(
h[facei],
p[facei],
T0[facei]);
817 template<
class BasicThermo,
class MixtureType>
831 mesh.time().timeName(),
847 WCells[celli] = this->cellMixture(celli).W();
850 volScalarField::Boundary& WBf = W.boundaryFieldRef();
857 Wp[facei] = this->patchFaceMixture(patchi, facei).W();
865 template<
class BasicThermo,
class MixtureType>
870 kappa.ref().rename(
"kappa");
875 template<
class BasicThermo,
class MixtureType>
884 this->p_.boundaryField()[patchi],
885 this->T_.boundaryField()[patchi],
887 )*this->alpha_.boundaryField()[patchi];
891 template<
class BasicThermo,
class MixtureType>
901 template<
class BasicThermo,
class MixtureType>
908 this->p_.boundaryField()[patchi],
909 this->T_.boundaryField()[patchi],
912 *this->alpha_.boundaryField()[patchi];
916 template<
class BasicThermo,
class MixtureType>
929 template<
class BasicThermo,
class MixtureType>
940 this->p_.boundaryField()[patchi],
941 this->T_.boundaryField()[patchi],
945 this->alpha_.boundaryField()[patchi]
951 template<
class BasicThermo,
class MixtureType>
964 template<
class BasicThermo,
class MixtureType>
975 this->p_.boundaryField()[patchi],
976 this->T_.boundaryField()[patchi],
980 this->alpha_.boundaryField()[patchi]
986 template<
class BasicThermo,
class MixtureType>