32 template<
class BasicThermo,
class MixtureType>
36 class PatchFaceMixture,
45 CellMixture cellMixture,
46 PatchFaceMixture patchFaceMixture,
55 IOobject::groupName(psiName, this->
group()),
65 psi[celli] = ((this->*cellMixture)(celli).*psiMethod)(args[celli] ...);
77 ((this->*patchFaceMixture)(patchi, facei).*psiMethod)
79 args.boundaryField()[
patchi][facei] ...
88 template<
class BasicThermo,
class MixtureType>
89 template<
class CellMixture,
class Method,
class ... Args>
93 CellMixture cellMixture,
108 ((this->*cellMixture)(cells[celli]).*psiMethod)(args[celli] ...);
115 template<
class BasicThermo,
class MixtureType>
116 template<
class PatchFaceMixture,
class Method,
class ... Args>
120 PatchFaceMixture patchFaceMixture,
135 ((this->*patchFaceMixture)(patchi, facei).*psiMethod)
145 template<
class BasicThermo,
class MixtureType>
157 template<
class BasicThermo,
class MixtureType>
169 template<
class BasicThermo,
class MixtureType>
177 if (isA<gradientEnergyFvPatchScalarField>(hBf[patchi]))
179 refCast<gradientEnergyFvPatchScalarField>(hBf[
patchi]).gradient()
180 = hBf[
patchi].fvPatchField::snGrad();
182 else if (isA<mixedEnergyFvPatchScalarField>(hBf[patchi]))
184 refCast<mixedEnergyFvPatchScalarField>(hBf[
patchi]).refGrad()
185 = hBf[
patchi].fvPatchField::snGrad();
193 template<
class BasicThermo,
class MixtureType>
197 const word& phaseName
200 BasicThermo(mesh, phaseName),
201 MixtureType(*
this, mesh, phaseName),
207 BasicThermo::phasePropertyName
209 MixtureType::thermoType::heName(),
217 volScalarFieldProperty
221 &MixtureType::cellThermoMixture,
222 &MixtureType::patchFaceThermoMixture,
223 &MixtureType::thermoMixtureType::HE,
227 this->heBoundaryTypes(),
228 this->heBoundaryBaseTypes()
235 BasicThermo::phasePropertyName(
"Cp", phaseName),
247 BasicThermo::phasePropertyName(
"Cv", phaseName),
255 heBoundaryCorrection(he_);
259 template<
class BasicThermo,
class MixtureType>
264 const word& phaseName
267 BasicThermo(mesh, dict, phaseName),
268 MixtureType(*
this, mesh, phaseName),
274 BasicThermo::phasePropertyName
276 MixtureType::thermoType::heName(),
284 volScalarFieldProperty
288 &MixtureType::cellThermoMixture,
289 &MixtureType::patchFaceThermoMixture,
290 &MixtureType::thermoMixtureType::HE,
294 this->heBoundaryTypes(),
295 this->heBoundaryBaseTypes()
302 BasicThermo::phasePropertyName(
"Cp", phaseName),
314 BasicThermo::phasePropertyName(
"Cv", phaseName),
322 heBoundaryCorrection(he_);
328 template<
class BasicThermo,
class MixtureType>
335 template<
class BasicThermo,
class MixtureType>
342 return volScalarFieldProperty
346 &MixtureType::cellThermoMixture,
347 &MixtureType::patchFaceThermoMixture,
348 &MixtureType::thermoMixtureType::HE,
355 template<
class BasicThermo,
class MixtureType>
362 return cellSetProperty
364 &MixtureType::cellThermoMixture,
365 &MixtureType::thermoMixtureType::HE,
367 cellSetScalarList(this->p_, cells),
373 template<
class BasicThermo,
class MixtureType>
380 return patchFieldProperty
382 &MixtureType::patchFaceThermoMixture,
383 &MixtureType::thermoMixtureType::HE,
385 this->p_.boundaryField()[
patchi],
391 template<
class BasicThermo,
class MixtureType>
395 return volScalarFieldProperty
399 &MixtureType::cellThermoMixture,
400 &MixtureType::patchFaceThermoMixture,
408 template<
class BasicThermo,
class MixtureType>
415 return volScalarFieldProperty
419 &MixtureType::cellThermoMixture,
420 &MixtureType::patchFaceThermoMixture,
428 template<
class BasicThermo,
class MixtureType>
435 return cellSetProperty
437 &MixtureType::cellThermoMixture,
440 cellSetScalarList(this->p_, cells),
446 template<
class BasicThermo,
class MixtureType>
453 return patchFieldProperty
455 &MixtureType::patchFaceThermoMixture,
458 this->p_.boundaryField()[
patchi],
464 template<
class BasicThermo,
class MixtureType>
468 return volScalarFieldProperty
472 &MixtureType::cellThermoMixture,
473 &MixtureType::patchFaceThermoMixture,
481 template<
class BasicThermo,
class MixtureType>
488 return volScalarFieldProperty
492 &MixtureType::cellThermoMixture,
493 &MixtureType::patchFaceThermoMixture,
501 template<
class BasicThermo,
class MixtureType>
508 return cellSetProperty
510 &MixtureType::cellThermoMixture,
513 cellSetScalarList(this->p_, cells),
519 template<
class BasicThermo,
class MixtureType>
526 return patchFieldProperty
528 &MixtureType::patchFaceThermoMixture,
531 this->p_.boundaryField()[
patchi],
537 template<
class BasicThermo,
class MixtureType>
541 return volScalarFieldProperty
545 &MixtureType::cellThermoMixture,
546 &MixtureType::patchFaceThermoMixture,
547 &MixtureType::thermoMixtureType::Hf
552 template<
class BasicThermo,
class MixtureType>
559 return patchFieldProperty
561 &MixtureType::patchFaceThermoMixture,
564 this->p_.boundaryField()[
patchi],
570 template<
class BasicThermo,
class MixtureType>
578 return patchFieldProperty
580 &MixtureType::patchFaceThermoMixture,
583 this->p_.boundaryField()[
patchi],
589 template<
class BasicThermo,
class MixtureType>
596 return patchFieldProperty
598 &MixtureType::patchFaceThermoMixture,
599 &MixtureType::thermoMixtureType::gamma,
601 this->p_.boundaryField()[
patchi],
607 template<
class BasicThermo,
class MixtureType>
615 template<
class BasicThermo,
class MixtureType>
622 if (MixtureType::thermoType::enthalpy())
624 return Cp(T, patchi);
628 return Cv(T, patchi);
633 template<
class BasicThermo,
class MixtureType>
637 if (MixtureType::thermoType::enthalpy())
648 template<
class BasicThermo,
class MixtureType>
656 return volScalarFieldProperty
660 &MixtureType::cellThermoMixture,
661 &MixtureType::patchFaceThermoMixture,
662 &MixtureType::thermoMixtureType::THE,
670 template<
class BasicThermo,
class MixtureType>
678 return cellSetProperty
680 &MixtureType::cellThermoMixture,
681 &MixtureType::thermoMixtureType::THE,
684 cellSetScalarList(this->p_, cells),
690 template<
class BasicThermo,
class MixtureType>
698 return patchFieldProperty
700 &MixtureType::patchFaceThermoMixture,
701 &MixtureType::thermoMixtureType::THE,
704 this->p_.boundaryField()[
patchi],
710 template<
class BasicThermo,
class MixtureType>
714 return volScalarFieldProperty
718 &MixtureType::cellThermoMixture,
719 &MixtureType::patchFaceThermoMixture,
725 template<
class BasicThermo,
class MixtureType>
731 return patchFieldProperty
733 &MixtureType::patchFaceThermoMixture,
740 template<
class BasicThermo,
class MixtureType>
748 template<
class BasicThermo,
class MixtureType>
757 this->T_.boundaryField()[
patchi],
759 )*this->alpha_.boundaryField()[
patchi];
763 template<
class BasicThermo,
class MixtureType>
767 if (MixtureType::thermoType::enthalpy())
776 this->gamma()*this->alpha_
782 template<
class BasicThermo,
class MixtureType>
786 if (MixtureType::thermoType::enthalpy())
788 return this->alpha_.boundaryField()[
patchi];
795 this->T_.boundaryField()[
patchi],
797 )*this->alpha_.boundaryField()[
patchi];
802 template<
class BasicThermo,
class MixtureType>
813 template<
class BasicThermo,
class MixtureType>
824 this->T_.boundaryField()[
patchi],
827 *(this->alpha_.boundaryField()[
patchi] + alphat);
831 template<
class BasicThermo,
class MixtureType>
838 if (MixtureType::thermoType::enthalpy())
847 this->gamma()*(this->alpha_ + alphat)
853 template<
class BasicThermo,
class MixtureType>
861 if (MixtureType::thermoType::enthalpy())
863 return (this->alpha_.boundaryField()[
patchi] + alphat);
870 this->T_.boundaryField()[
patchi],
872 )*(this->alpha_.boundaryField()[
patchi] + alphat);
877 template<
class BasicThermo,
class MixtureType>
virtual tmp< volScalarField > kappa() const
Thermal diffusivity for temperature of mixture [W/m/K].
const char *const group
Group name for atomic constants.
scalar Cv(const scalar p, const scalar T) const
virtual tmp< volScalarField > Cp() const
Heat capacity at constant pressure [J/kg/K].
#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 [].
scalar Hs(const scalar p, const scalar T) const
A list of keyword definitions, which are a keyword followed by any number of values (e...
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].
virtual tmp< volScalarField > hc() const
Enthalpy of formation [J/kg].
tmp< scalarField > patchFieldProperty(PatchFaceMixture patchFaceMixture, Method psiMethod, const label patchi, const Args &... args) const
Return a scalarField of the given property on a patch.
Dimension set for the base types.
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
A class for handling words, derived from string.
static UIndirectList< scalar > cellSetScalarList(const volScalarField &psi, const labelList &cells)
Return an indirect list of a field for the given set of cells.
virtual tmp< volScalarField > Cv() const
Heat capacity at constant volume [J/kg/K].
virtual tmp< volScalarField > THE(const volScalarField &h, const volScalarField &p, const volScalarField &T0) const
Temperature from enthalpy/internal energy.
virtual tmp< volScalarField > alphahe() const
Thermal diffusivity for energy of mixture [kg/m/s].
virtual tmp< volScalarField > hs() const
Sensible enthalpy [J/kg/K].
virtual tmp< volScalarField > ha() const
Absolute enthalpy [J/kg/K].
volScalarField scalarField(fieldObject, mesh)
virtual tmp< volScalarField > alphaEff(const volScalarField &alphat) const
Effective thermal turbulent diffusivity of mixture [kg/m/s].
tmp< scalarField > cellSetProperty(CellMixture cellMixture, Method psiMethod, const labelList &cells, const Args &... args) const
Return a scalarField of the given property on a cell set.
const dimensionSet dimEnergy
const dimensionSet dimMass
heThermo(const fvMesh &, const word &phaseName)
Construct from mesh.
virtual bool read()
Read thermophysical properties dictionary.
virtual tmp< volScalarField > kappaEff(const volScalarField &) const
Effective thermal turbulent diffusivity for temperature.
const dimensionSet dimMoles
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const scalarList W(::W(thermo))
Mesh data needed to do the Finite Volume discretisation.
A List with indirect addressing.
scalar Cp(const scalar p, const scalar T) const
scalar Ha(const scalar p, const scalar T) const
const volScalarField & psi
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.
tmp< volScalarField > volScalarFieldProperty(const word &psiName, const dimensionSet &psiDim, CellMixture cellMixture, PatchFaceMixture patchFaceMixture, Method psiMethod, const Args &... args) const
Return a volScalarField of the given property.
const dimensionSet dimTemperature
virtual tmp< volScalarField > W() const
Molecular weight [kg/kmol].