35 template<
class BasicThermo,
class MixtureType>
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);
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()
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()
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()
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>
224 IOobject::NO_REGISTER,
228 auto&
he = the.ref();
237 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
240 volScalarField::Boundary& heBf =
he.boundaryFieldRef();
251 this->patchFaceMixture(patchi, facei).HE(
pp[facei], Tp[facei]);
259 template<
class BasicThermo,
class MixtureType>
268 auto&
he = the.ref();
272 he[celli] = this->cellMixture(
cells[celli]).HE(
p[celli],
T[celli]);
279 template<
class BasicThermo,
class MixtureType>
288 auto&
he = the.ref();
293 this->patchFaceMixture(patchi, facei).HE(
p[facei],
T[facei]);
300 template<
class BasicThermo,
class MixtureType>
309 IOobject::NO_REGISTER,
313 auto& hcf = thc.ref();
319 hcCells[celli] = this->cellMixture(celli).Hc();
322 volScalarField::Boundary& hcfBf = hcf.boundaryFieldRef();
330 hcp[facei] = this->patchFaceMixture(patchi, facei).Hc();
338 template<
class BasicThermo,
class MixtureType>
347 auto&
cp =
tCp.ref();
352 this->patchFaceMixture(patchi, facei).Cp(
p[facei],
T[facei]);
359 template<
class BasicThermo,
class MixtureType>
369 auto&
Cp =
tCp.ref();
373 const label celli =
cells[i];
374 Cp[i] = this->cellMixture(celli).Cp(
p[i],
T[i]);
381 template<
class BasicThermo,
class MixtureType>
390 IOobject::NO_REGISTER,
394 auto&
cp =
tCp.ref();
399 this->cellMixture(celli).Cp(this->p_[celli], this->T_[celli]);
402 volScalarField::Boundary& cpBf =
cp.boundaryFieldRef();
413 this->patchFaceMixture(patchi, facei).Cp(
pp[facei], pT[facei]);
421 template<
class BasicThermo,
class MixtureType>
431 auto& cv =
tCv.ref();
436 this->patchFaceMixture(patchi, facei).Cv(
p[facei],
T[facei]);
443 template<
class BasicThermo,
class MixtureType>
453 auto&
rho = tRho.ref();
457 const label celli =
cells[i];
458 rho[i] = this->cellMixture(celli).rho(
p[i],
T[i]);
465 template<
class BasicThermo,
class MixtureType>
474 IOobject::NO_REGISTER,
478 auto& cv =
tCv.ref();
483 this->cellMixture(celli).Cv(this->p_[celli], this->T_[celli]);
486 volScalarField::Boundary& cvBf = cv.boundaryFieldRef();
492 this->p_.boundaryField()[patchi],
493 this->T_.boundaryField()[patchi],
502 template<
class BasicThermo,
class MixtureType>
511 auto&
gamma = tgamma.ref();
516 this->patchFaceMixture(patchi, facei).gamma(
p[facei],
T[facei]);
523 template<
class BasicThermo,
class MixtureType>
532 IOobject::NO_REGISTER,
536 auto&
gamma = tgamma.ref();
541 this->cellMixture(celli).gamma(this->p_[celli], this->T_[celli]);
544 volScalarField::Boundary& gammaBf =
gamma.boundaryFieldRef();
554 pgamma[facei] = this->patchFaceMixture(patchi, facei).gamma
566 template<
class BasicThermo,
class MixtureType>
575 auto& Cpv = tCpv.ref();
580 this->patchFaceMixture(patchi, facei).Cpv(
p[facei],
T[facei]);
587 template<
class BasicThermo,
class MixtureType>
596 IOobject::NO_REGISTER,
600 auto& Cpv = tCpv.ref();
605 this->cellMixture(celli).Cpv(this->p_[celli], this->T_[celli]);
608 volScalarField::Boundary& CpvBf = Cpv.boundaryFieldRef();
619 this->patchFaceMixture(patchi, facei).Cpv(
pp[facei], pT[facei]);
627 template<
class BasicThermo,
class MixtureType>
636 auto& CpByCpv = tCpByCpv.ref();
641 this->patchFaceMixture(patchi, facei).CpByCpv(
p[facei],
T[facei]);
648 template<
class BasicThermo,
class MixtureType>
657 IOobject::NO_REGISTER,
661 auto& CpByCpv = tCpByCpv.ref();
665 CpByCpv[celli] = this->cellMixture(celli).CpByCpv
672 volScalarField::Boundary& CpByCpvBf =
673 CpByCpv.boundaryFieldRef();
683 pCpByCpv[facei] = this->patchFaceMixture(patchi, facei).CpByCpv
695 template<
class BasicThermo,
class MixtureType>
710 this->cellMixture(
cells[celli]).THE(
h[celli],
p[celli],
T0[celli]);
717 template<
class BasicThermo,
class MixtureType>
732 T[facei] = this->patchFaceMixture
736 ).THE(
h[facei],
p[facei],
T0[facei]);
743 template<
class BasicThermo,
class MixtureType>
753 IOobject::NO_REGISTER,
763 WCells[celli] = this->cellMixture(celli).W();
766 auto& WBf = W.boundaryFieldRef();
773 Wp[facei] = this->patchFaceMixture(patchi, facei).W();
781 template<
class BasicThermo,
class MixtureType>
791 template<
class BasicThermo,
class MixtureType>
800 this->p_.boundaryField()[patchi],
801 this->T_.boundaryField()[patchi],
803 )*this->alpha_.boundaryField()[patchi];
807 template<
class BasicThermo,
class MixtureType>
817 template<
class BasicThermo,
class MixtureType>
824 this->p_.boundaryField()[patchi],
825 this->T_.boundaryField()[patchi],
828 *this->alpha_.boundaryField()[patchi];
832 template<
class BasicThermo,
class MixtureType>
845 template<
class BasicThermo,
class MixtureType>
856 this->p_.boundaryField()[patchi],
857 this->T_.boundaryField()[patchi],
861 this->alpha_.boundaryField()[patchi]
867 template<
class BasicThermo,
class MixtureType>
880 template<
class BasicThermo,
class MixtureType>
891 this->p_.boundaryField()[patchi],
892 this->T_.boundaryField()[patchi],
896 this->alpha_.boundaryField()[patchi]
902 template<
class BasicThermo,
class MixtureType>
virtual tmp< volScalarField > kappa() const
Thermal diffusivity for temperature of mixture [J/m/s/K].
virtual tmp< scalarField > THE(const scalarField &he, const scalarField &p, const scalarField &T0, const labelList &cells) const
Temperature from enthalpy/internal energy for cell-set.
virtual tmp< volScalarField > gamma() const
Gamma = Cp/Cv [].
virtual tmp< volScalarField > CpByCpv() const
Heat capacity ratio [].
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const tmp< volScalarField > & tCp
virtual ~heThermo()
Destructor.
virtual tmp< volScalarField > Cpv() const
Heat capacity at constant pressure/volume [J/kg/K].
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const volScalarField & Cv
const dimensionSet dimless
Dimensionless.
virtual volScalarField & he()
Enthalpy/Internal energy [J/kg].
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
virtual tmp< volScalarField > hc() const
Chemical enthalpy [J/kg].
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< volScalarField > Cp() const
Heat capacity at constant pressure [J/kg/K].
virtual tmp< scalarField > rhoEoS(const scalarField &p, const scalarField &T, const labelList &cells) const
Density from pressure and temperature.
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
virtual tmp< volScalarField > alphahe() const
Thermal diffusivity for energy of mixture [kg/m/s].
virtual tmp< volScalarField > alphaEff(const volScalarField &alphat) const
Effective thermal diffusivity of mixture [kg/m/s].
const volScalarField & cp
const volScalarField & Cp
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
const dimensionSet dimEnergy
const dimensionedScalar h
Planck constant.
virtual bool read()
Read thermophysical properties dictionary.
virtual tmp< volScalarField > kappaEff(const volScalarField &) const
Effective thermal diffusivity for temperature.
virtual tmp< volScalarField > Cv() const
Heat capacity at constant volume [J/kg/K].
Enthalpy/Internal energy for a mixture.
Mesh data needed to do the Finite Volume discretisation.
const tmp< volScalarField > & tCv
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr+alphat)
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
void heBoundaryCorrection(volScalarField &he)
Correct the enthalpy/internal energy field boundaries.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
virtual tmp< volScalarField > W() const
Molecular weight [kg/kmol].