32 template<
class BasicThermo,
class MixtureType>
36 volScalarField::GeometricBoundaryField& hbf = h.
boundaryField();
40 if (isA<gradientEnergyFvPatchScalarField>(hbf[patchi]))
42 refCast<gradientEnergyFvPatchScalarField>(hbf[
patchi]).gradient()
43 = hbf[
patchi].fvPatchField::snGrad();
45 else if (isA<mixedEnergyFvPatchScalarField>(hbf[patchi]))
47 refCast<mixedEnergyFvPatchScalarField>(hbf[
patchi]).refGrad()
48 = hbf[
patchi].fvPatchField::snGrad();
54 template<
class BasicThermo,
class MixtureType>
58 const scalarField& pCells = this->p_.internalField();
59 const scalarField& TCells = this->T_.internalField();
64 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
71 this->p_.boundaryField()[
patchi],
72 this->T_.boundaryField()[
patchi],
77 this->heBoundaryCorrection(he_);
84 template<
class BasicThermo,
class MixtureType>
91 BasicThermo(mesh, phaseName),
92 MixtureType(*
this, mesh, phaseName),
98 BasicThermo::phasePropertyName
100 MixtureType::thermoType::heName()
109 this->heBoundaryTypes(),
110 this->heBoundaryBaseTypes()
117 template<
class BasicThermo,
class MixtureType>
122 const word& phaseName
125 BasicThermo(mesh, dict, phaseName),
126 MixtureType(*
this, mesh, phaseName),
132 BasicThermo::phasePropertyName
134 MixtureType::thermoType::heName()
143 this->heBoundaryTypes(),
144 this->heBoundaryBaseTypes()
153 template<
class BasicThermo,
class MixtureType>
160 template<
class BasicThermo,
class MixtureType>
167 const fvMesh& mesh = this->T_.mesh();
195 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
207 this->patchFaceMixture(patchi, facei).HE(pp[facei], Tp[facei]);
215 template<
class BasicThermo,
class MixtureType>
228 he[celli] = this->cellMixture(cells[celli]).HE(p[celli], T[celli]);
235 template<
class BasicThermo,
class MixtureType>
249 this->patchFaceMixture(patchi, facei).HE(p[facei], T[facei]);
256 template<
class BasicThermo,
class MixtureType>
260 const fvMesh& mesh = this->T_.mesh();
285 hcCells[celli] = this->cellMixture(celli).Hc();
294 hcp[facei] = this->patchFaceMixture(patchi, facei).Hc();
302 template<
class BasicThermo,
class MixtureType>
316 this->patchFaceMixture(patchi, facei).Cp(p[facei], T[facei]);
323 template<
class BasicThermo,
class MixtureType>
327 const fvMesh& mesh = this->T_.mesh();
352 this->cellMixture(celli).Cp(this->p_[celli], this->T_[celli]);
364 this->patchFaceMixture(patchi, facei).Cp(pp[facei], pT[facei]);
372 template<
class BasicThermo,
class MixtureType>
387 this->patchFaceMixture(patchi, facei).Cv(p[facei], T[facei]);
394 template<
class BasicThermo,
class MixtureType>
398 const fvMesh& mesh = this->T_.mesh();
423 this->cellMixture(celli).Cv(this->p_[celli], this->T_[celli]);
428 cv.boundaryField()[
patchi] = Cv
430 this->p_.boundaryField()[
patchi],
431 this->T_.boundaryField()[
patchi],
440 template<
class BasicThermo,
class MixtureType>
454 this->patchFaceMixture(patchi, facei).gamma(p[facei], T[facei]);
461 template<
class BasicThermo,
class MixtureType>
465 const fvMesh& mesh = this->T_.mesh();
490 this->cellMixture(celli).gamma(this->p_[celli], this->T_[celli]);
501 pgamma[facei] = this->patchFaceMixture(patchi, facei).gamma
513 template<
class BasicThermo,
class MixtureType>
527 this->patchFaceMixture(patchi, facei).Cpv(p[facei], T[facei]);
534 template<
class BasicThermo,
class MixtureType>
538 const fvMesh& mesh = this->T_.mesh();
563 this->cellMixture(celli).Cpv(this->p_[celli], this->T_[celli]);
575 this->patchFaceMixture(patchi, facei).Cpv(pp[facei], pT[facei]);
583 template<
class BasicThermo,
class MixtureType>
597 this->patchFaceMixture(patchi, facei).cpBycpv(p[facei], T[facei]);
604 template<
class BasicThermo,
class MixtureType>
608 const fvMesh& mesh = this->T_.mesh();
632 cpByCpv[celli] = this->cellMixture(celli).cpBycpv
647 pCpByCpv[facei] = this->patchFaceMixture(patchi, facei).cpBycpv
659 template<
class BasicThermo,
class MixtureType>
674 this->cellMixture(cells[celli]).THE(h[celli], p[celli], T0[celli]);
681 template<
class BasicThermo,
class MixtureType>
695 T[facei] = this->patchFaceMixture
699 ).THE(h[facei], p[facei], T0[facei]);
706 template<
class BasicThermo,
class MixtureType>
711 kappa().rename(
"kappa");
716 template<
class BasicThermo,
class MixtureType>
725 this->p_.boundaryField()[
patchi],
726 this->T_.boundaryField()[
patchi],
728 )*this->alpha_.boundaryField()[
patchi];
732 template<
class BasicThermo,
class MixtureType>
740 kappaEff().rename(
"kappaEff");
745 template<
class BasicThermo,
class MixtureType>
756 this->p_.boundaryField()[
patchi],
757 this->T_.boundaryField()[
patchi],
761 this->alpha_.boundaryField()[
patchi]
767 template<
class BasicThermo,
class MixtureType>
780 template<
class BasicThermo,
class MixtureType>
791 this->p_.boundaryField()[
patchi],
792 this->T_.boundaryField()[
patchi],
796 this->alpha_.boundaryField()[
patchi]
802 template<
class BasicThermo,
class MixtureType>
virtual tmp< volScalarField > Cv() const
Heat capacity at constant volume [J/kg/K].
Mesh data needed to do the Finite Volume discretisation.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
virtual tmp< volScalarField > Cp() const
Heat capacity at constant pressure [J/kg/K].
virtual bool read()
Read thermophysical properties dictionary.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
void size(const label)
Override size to be inconsistent with allocated storage.
InternalField & internalField()
Return internal field.
const dimensionSet dimEnergy
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual tmp< volScalarField > kappa() const
Thermal diffusivity for temperature of mixture [J/m/s/K].
virtual tmp< volScalarField > kappaEff(const volScalarField &) const
Effective thermal diffusivity for temperature.
const Time & time() const
Return the top-level database.
virtual tmp< volScalarField > CpByCpv() const
Heat capacity ratio [].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual tmp< volScalarField > alphaEff(const volScalarField &alphat) const
Effective thermal diffusivity of mixture [kg/m/s].
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 > Cpv() const
Heat capacity at constant pressure/volume [J/kg/K].
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
virtual volScalarField & he()
Enthalpy/Internal energy [J/kg].
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual tmp< volScalarField > hc() const
Chemical enthalpy [J/kg].
virtual tmp< volScalarField > gamma() const
Gamma = Cp/Cv [].
virtual ~heThermo()
Destructor.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
bool read(const char *, int32_t &)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
void heBoundaryCorrection(volScalarField &he)
Correct the enthalpy/internal energy field boundaries.
volScalarField scalarField(fieldObject, mesh)
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
A class for managing temporary objects.
const volScalarField & alphaEff
Enthalpy/Internal energy for a mixture.
const volScalarField & cp