35template<
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();
57template<
class BasicThermo,
class MixtureType>
72 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
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());
101template<
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_);
134template<
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_);
168template<
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_);
205template<
class BasicThermo,
class MixtureType>
212template<
class BasicThermo,
class MixtureType>
247 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
261 this->patchFaceMixture(patchi, facei).HE(pp[facei], Tp[facei]);
269template<
class BasicThermo,
class MixtureType>
282 he[celli] = this->cellMixture(
cells[celli]).HE(
p[celli],
T[celli]);
289template<
class BasicThermo,
class MixtureType>
303 this->patchFaceMixture(patchi, facei).HE(
p[facei],
T[facei]);
310template<
class BasicThermo,
class MixtureType>
339 hcCells[celli] = this->cellMixture(celli).Hc();
350 hcp[facei] = this->patchFaceMixture(patchi, facei).Hc();
358template<
class BasicThermo,
class MixtureType>
372 this->patchFaceMixture(patchi, facei).Cp(
p[facei],
T[facei]);
379template<
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]);
401template<
class BasicThermo,
class MixtureType>
430 this->cellMixture(celli).Cp(this->p_[celli], this->T_[celli]);
444 this->patchFaceMixture(patchi, facei).Cp(pp[facei], pT[facei]);
452template<
class BasicThermo,
class MixtureType>
467 this->patchFaceMixture(patchi, facei).Cv(
p[facei],
T[facei]);
474template<
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]);
496template<
class BasicThermo,
class MixtureType>
525 this->cellMixture(celli).Cv(this->p_[celli], this->T_[celli]);
534 this->p_.boundaryField()[patchi],
535 this->T_.boundaryField()[patchi],
544template<
class BasicThermo,
class MixtureType>
558 this->patchFaceMixture(patchi, facei).gamma(
p[facei],
T[facei]);
565template<
class BasicThermo,
class MixtureType>
594 this->cellMixture(celli).gamma(this->p_[celli], this->T_[celli]);
607 pgamma[facei] = this->patchFaceMixture(patchi, facei).gamma
619template<
class BasicThermo,
class MixtureType>
633 this->patchFaceMixture(patchi, facei).Cpv(
p[facei],
T[facei]);
640template<
class BasicThermo,
class MixtureType>
669 this->cellMixture(celli).Cpv(this->p_[celli], this->T_[celli]);
683 this->patchFaceMixture(patchi, facei).Cpv(pp[facei], pT[facei]);
691template<
class BasicThermo,
class MixtureType>
705 this->patchFaceMixture(patchi, facei).CpByCpv(
p[facei],
T[facei]);
712template<
class BasicThermo,
class MixtureType>
740 CpByCpv[celli] = this->cellMixture(celli).CpByCpv
758 pCpByCpv[facei] = this->patchFaceMixture(patchi, facei).CpByCpv
770template<
class BasicThermo,
class MixtureType>
785 this->cellMixture(
cells[celli]).THE(
h[celli],
p[celli],
T0[celli]);
792template<
class BasicThermo,
class MixtureType>
806 T[facei] = this->patchFaceMixture
810 ).THE(
h[facei],
p[facei],
T0[facei]);
817template<
class BasicThermo,
class MixtureType>
847 WCells[celli] = this->cellMixture(celli).W();
857 Wp[facei] = this->patchFaceMixture(patchi, facei).W();
865template<
class BasicThermo,
class MixtureType>
870 kappa.ref().rename(
"kappa");
875template<
class BasicThermo,
class MixtureType>
884 this->p_.boundaryField()[patchi],
885 this->T_.boundaryField()[patchi],
891template<
class BasicThermo,
class MixtureType>
901template<
class BasicThermo,
class MixtureType>
908 this->p_.boundaryField()[patchi],
909 this->T_.boundaryField()[patchi],
912 *this->alpha_.boundaryField()[patchi];
916template<
class BasicThermo,
class MixtureType>
929template<
class BasicThermo,
class MixtureType>
940 this->p_.boundaryField()[patchi],
941 this->T_.boundaryField()[patchi],
945 this->alpha_.boundaryField()[patchi]
951template<
class BasicThermo,
class MixtureType>
964template<
class BasicThermo,
class MixtureType>
975 this->p_.boundaryField()[patchi],
976 this->T_.boundaryField()[patchi],
980 this->alpha_.boundaryField()[patchi]
986template<
class BasicThermo,
class MixtureType>
989 if (BasicThermo::read())
991 MixtureType::read(*
this);
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
Internal & ref(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Enthalpy/Internal energy for a mixture.
virtual tmp< volScalarField > W() const
Molecular weight [kg/kmol].
virtual tmp< volScalarField > Cp() const
Heat capacity at constant pressure [J/kg/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 > alphahe() const
Thermal diffusivity for energy of mixture [kg/m/s].
volScalarField he_
Energy field.
virtual tmp< volScalarField > CpByCpv() const
Heat capacity ratio [].
virtual ~heThermo()
Destructor.
virtual tmp< volScalarField > hc() const
Chemical enthalpy [J/kg].
void heBoundaryCorrection(volScalarField &he)
Correct the enthalpy/internal energy field boundaries.
virtual tmp< volScalarField > gamma() const
Gamma = Cp/Cv [].
virtual volScalarField & he()
Enthalpy/Internal energy [J/kg].
virtual tmp< volScalarField > kappa() const
Thermal diffusivity for temperature of mixture [J/m/s/K].
virtual tmp< scalarField > rhoEoS(const scalarField &p, const scalarField &T, const labelList &cells) const
Density from pressure and temperature.
virtual tmp< volScalarField > Cv() const
Heat capacity at constant volume [J/kg/K].
virtual bool read()
Read thermophysical properties dictionary.
virtual tmp< volScalarField > Cpv() const
Heat capacity at constant pressure/volume [J/kg/K].
tmp< volScalarField > alphaEff() const
Effective thermal turbulent diffusivity of mixture [kg/m/s].
virtual void rename(const word &newName)
Rename.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
const tmp< volScalarField > & tCv
const volScalarField & Cv
const tmp< volScalarField > & tCp
const volScalarField & Cp
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr+alphat)
const dimensionSet dimless
Dimensionless.
const dimensionSet dimEnergy
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
const volScalarField & cp
#define forAll(list, i)
Loop across all elements in list.