32 template<
class BasicThermo,
class MixtureType>
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>
64 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
67 volScalarField::Boundary& heBf = he_.boundaryFieldRef();
73 this->p_.boundaryField()[
patchi],
74 this->T_.boundaryField()[
patchi],
79 this->heBoundaryCorrection(he_);
86 template<
class BasicThermo,
class MixtureType>
93 BasicThermo(mesh, phaseName),
94 MixtureType(*
this, mesh, phaseName),
100 BasicThermo::phasePropertyName
102 MixtureType::thermoType::heName()
111 this->heBoundaryTypes(),
112 this->heBoundaryBaseTypes()
119 template<
class BasicThermo,
class MixtureType>
124 const word& phaseName
127 BasicThermo(mesh, dict, phaseName),
128 MixtureType(*
this, mesh, phaseName),
134 BasicThermo::phasePropertyName
136 MixtureType::thermoType::heName()
145 this->heBoundaryTypes(),
146 this->heBoundaryBaseTypes()
155 template<
class BasicThermo,
class MixtureType>
162 template<
class BasicThermo,
class MixtureType>
169 const fvMesh& mesh = this->T_.mesh();
197 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
211 this->patchFaceMixture(patchi, facei).HE(pp[facei], Tp[facei]);
219 template<
class BasicThermo,
class MixtureType>
232 he[celli] = this->cellMixture(cells[celli]).HE(p[celli], T[celli]);
239 template<
class BasicThermo,
class MixtureType>
253 this->patchFaceMixture(patchi, facei).HE(p[facei], T[facei]);
260 template<
class BasicThermo,
class MixtureType>
264 const fvMesh& mesh = this->T_.mesh();
289 hcCells[celli] = this->cellMixture(celli).Hc();
300 hcp[facei] = this->patchFaceMixture(patchi, facei).Hc();
308 template<
class BasicThermo,
class MixtureType>
322 this->patchFaceMixture(patchi, facei).Cp(p[facei], T[facei]);
329 template<
class BasicThermo,
class MixtureType>
333 const fvMesh& mesh = this->T_.mesh();
358 this->cellMixture(celli).Cp(this->p_[celli], this->T_[celli]);
361 volScalarField::Boundary& cpBf = cp.boundaryFieldRef();
372 this->patchFaceMixture(patchi, facei).Cp(pp[facei], pT[facei]);
380 template<
class BasicThermo,
class MixtureType>
395 this->patchFaceMixture(patchi, facei).Cv(p[facei], T[facei]);
402 template<
class BasicThermo,
class MixtureType>
406 const fvMesh& mesh = this->T_.mesh();
431 this->cellMixture(celli).Cv(this->p_[celli], this->T_[celli]);
434 volScalarField::Boundary& cvBf = cv.boundaryFieldRef();
440 this->p_.boundaryField()[
patchi],
441 this->T_.boundaryField()[
patchi],
450 template<
class BasicThermo,
class MixtureType>
464 this->patchFaceMixture(patchi, facei).gamma(p[facei], T[facei]);
471 template<
class BasicThermo,
class MixtureType>
475 const fvMesh& mesh = this->T_.mesh();
500 this->cellMixture(celli).gamma(this->p_[celli], this->T_[celli]);
503 volScalarField::Boundary& gammaBf = gamma.boundaryFieldRef();
513 pgamma[facei] = this->patchFaceMixture(patchi, facei).gamma
525 template<
class BasicThermo,
class MixtureType>
539 this->patchFaceMixture(patchi, facei).Cpv(p[facei], T[facei]);
546 template<
class BasicThermo,
class MixtureType>
550 const fvMesh& mesh = this->T_.mesh();
575 this->cellMixture(celli).Cpv(this->p_[celli], this->T_[celli]);
578 volScalarField::Boundary& CpvBf = Cpv.boundaryFieldRef();
589 this->patchFaceMixture(patchi, facei).Cpv(pp[facei], pT[facei]);
597 template<
class BasicThermo,
class MixtureType>
611 this->patchFaceMixture(patchi, facei).CpByCpv(p[facei], T[facei]);
618 template<
class BasicThermo,
class MixtureType>
622 const fvMesh& mesh = this->T_.mesh();
646 CpByCpv[celli] = this->cellMixture(celli).CpByCpv
653 volScalarField::Boundary& CpByCpvBf =
654 CpByCpv.boundaryFieldRef();
664 pCpByCpv[facei] = this->patchFaceMixture(patchi, facei).CpByCpv
676 template<
class BasicThermo,
class MixtureType>
691 this->cellMixture(cells[celli]).THE(h[celli], p[celli], T0[celli]);
698 template<
class BasicThermo,
class MixtureType>
712 T[facei] = this->patchFaceMixture
716 ).THE(h[facei], p[facei], T0[facei]);
723 template<
class BasicThermo,
class MixtureType>
728 const fvMesh& mesh = this->T_.mesh();
753 WCells[celli] = this->cellMixture(celli).W();
756 volScalarField::Boundary& WBf = W.boundaryFieldRef();
763 Wp[facei] = this->patchFaceMixture(patchi, facei).W();
771 template<
class BasicThermo,
class MixtureType>
781 template<
class BasicThermo,
class MixtureType>
790 this->p_.boundaryField()[
patchi],
791 this->T_.boundaryField()[
patchi],
793 )*this->alpha_.boundaryField()[
patchi];
797 template<
class BasicThermo,
class MixtureType>
807 template<
class BasicThermo,
class MixtureType>
814 this->p_.boundaryField()[
patchi],
815 this->T_.boundaryField()[
patchi],
818 *this->alpha_.boundaryField()[
patchi];
822 template<
class BasicThermo,
class MixtureType>
835 template<
class BasicThermo,
class MixtureType>
846 this->p_.boundaryField()[
patchi],
847 this->T_.boundaryField()[
patchi],
851 this->alpha_.boundaryField()[
patchi]
857 template<
class BasicThermo,
class MixtureType>
870 template<
class BasicThermo,
class MixtureType>
881 this->p_.boundaryField()[
patchi],
882 this->T_.boundaryField()[
patchi],
886 this->alpha_.boundaryField()[
patchi]
892 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.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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 any number of values (e...
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
virtual ~heThermo()
Destructor.
void size(const label)
Override size to be inconsistent with allocated storage.
virtual tmp< volScalarField > Cpv() const
Heat capacity at constant pressure/volume [J/kg/K].
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const Time & time() const
Return the top-level database.
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].
virtual tmp< volScalarField > Cp() const
Heat capacity at constant pressure [J/kg/K].
A class for handling words, derived from string.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
virtual tmp< volScalarField > alphahe() const
Thermal diffusivity for energy of mixture [kg/m/s].
volScalarField scalarField(fieldObject, mesh)
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
virtual tmp< volScalarField > alphaEff(const volScalarField &alphat) const
Effective thermal turbulent diffusivity of mixture [kg/m/s].
const volScalarField & cp
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
virtual void rename(const word &newName)
Rename.
const dimensionSet dimEnergy
Internal & ref()
Return a reference to the dimensioned internal field.
virtual bool read()
Read thermophysical properties dictionary.
virtual tmp< volScalarField > kappaEff(const volScalarField &) const
Effective thermal turbulent diffusivity for temperature.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
virtual tmp< volScalarField > Cv() const
Heat capacity at constant volume [J/kg/K].
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
Enthalpy/Internal energy for a mixture.
const scalarList W(::W(thermo))
Mesh data needed to do the Finite Volume discretisation.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr+alphat)
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void heBoundaryCorrection(volScalarField &he)
Correct the enthalpy/internal energy field boundaries.
virtual tmp< volScalarField > W() const
Molecular weight [kg/kmol].