35template<
class BasicThermo,
class MixtureType>
46 = hBf[patchi].fvPatchField::snGrad();
51 = hBf[patchi].fvPatchField::snGrad();
57template<
class BasicThermo,
class MixtureType>
58void Foam::heThermo<BasicThermo, MixtureType>::init
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);
94 init(
p.oldTime(),
T.oldTime(),
he.oldTime());
101template<
class BasicThermo,
class MixtureType>
102Foam::heThermo<BasicThermo, MixtureType>::heThermo
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>
135Foam::heThermo<BasicThermo, MixtureType>::heThermo
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>
169Foam::heThermo<BasicThermo, MixtureType>::heThermo
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>
228 auto&
he = the.ref();
237 this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
251 this->patchFaceMixture(patchi, facei).HE(
pp[facei], Tp[facei]);
259template<
class BasicThermo,
class MixtureType>
268 auto&
he = the.ref();
272 he[celli] = this->cellMixture(
cells[celli]).HE(
p[celli],
T[celli]);
279template<
class BasicThermo,
class MixtureType>
288 auto&
he = the.ref();
293 this->patchFaceMixture(patchi, facei).HE(
p[facei],
T[facei]);
300template<
class BasicThermo,
class MixtureType>
313 auto& hcf = thc.ref();
319 hcCells[celli] = this->cellMixture(celli).Hc();
330 hcp[facei] = this->patchFaceMixture(patchi, facei).Hc();
338template<
class BasicThermo,
class MixtureType>
352 this->patchFaceMixture(patchi, facei).Cp(
p[facei],
T[facei]);
359template<
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]);
381template<
class BasicThermo,
class MixtureType>
394 auto&
cp =
tCp.ref();
399 this->cellMixture(celli).Cp(this->p_[celli], this->T_[celli]);
413 this->patchFaceMixture(patchi, facei).Cp(
pp[facei], pT[facei]);
421template<
class BasicThermo,
class MixtureType>
436 this->patchFaceMixture(patchi, facei).Cv(
p[facei],
T[facei]);
443template<
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]);
465template<
class BasicThermo,
class MixtureType>
478 auto& cv =
tCv.ref();
483 this->cellMixture(celli).Cv(this->p_[celli], this->T_[celli]);
492 this->p_.boundaryField()[patchi],
493 this->T_.boundaryField()[patchi],
502template<
class BasicThermo,
class MixtureType>
511 auto&
gamma = tgamma.ref();
516 this->patchFaceMixture(patchi, facei).gamma(
p[facei],
T[facei]);
523template<
class BasicThermo,
class MixtureType>
536 auto&
gamma = tgamma.ref();
541 this->cellMixture(celli).gamma(this->p_[celli], this->T_[celli]);
554 pgamma[facei] = this->patchFaceMixture(patchi, facei).gamma
566template<
class BasicThermo,
class MixtureType>
575 auto& Cpv = tCpv.ref();
580 this->patchFaceMixture(patchi, facei).Cpv(
p[facei],
T[facei]);
587template<
class BasicThermo,
class MixtureType>
600 auto& Cpv = tCpv.ref();
605 this->cellMixture(celli).Cpv(this->p_[celli], this->T_[celli]);
619 this->patchFaceMixture(patchi, facei).Cpv(
pp[facei], pT[facei]);
627template<
class BasicThermo,
class MixtureType>
636 auto& CpByCpv = tCpByCpv.ref();
641 this->patchFaceMixture(patchi, facei).CpByCpv(
p[facei],
T[facei]);
648template<
class BasicThermo,
class MixtureType>
661 auto& CpByCpv = tCpByCpv.ref();
665 CpByCpv[celli] = this->cellMixture(celli).CpByCpv
673 CpByCpv.boundaryFieldRef();
683 pCpByCpv[facei] = this->patchFaceMixture(patchi, facei).CpByCpv
695template<
class BasicThermo,
class MixtureType>
710 this->cellMixture(
cells[celli]).THE(
h[celli],
p[celli],
T0[celli]);
717template<
class BasicThermo,
class MixtureType>
732 T[facei] = this->patchFaceMixture
736 ).THE(
h[facei],
p[facei],
T0[facei]);
743template<
class BasicThermo,
class MixtureType>
748 const fvMesh&
mesh = this->T_.mesh();
763 WCells[celli] = this->cellMixture(celli).W();
766 auto& WBf = W.boundaryFieldRef();
773 Wp[facei] = this->patchFaceMixture(patchi, facei).W();
781template<
class BasicThermo,
class MixtureType>
786 kappa.ref().rename(
"kappa");
791template<
class BasicThermo,
class MixtureType>
800 this->p_.boundaryField()[patchi],
801 this->T_.boundaryField()[patchi],
807template<
class BasicThermo,
class MixtureType>
817template<
class BasicThermo,
class MixtureType>
824 this->p_.boundaryField()[patchi],
825 this->T_.boundaryField()[patchi],
828 *this->alpha_.boundaryField()[patchi];
832template<
class BasicThermo,
class MixtureType>
845template<
class BasicThermo,
class MixtureType>
856 this->p_.boundaryField()[patchi],
857 this->T_.boundaryField()[patchi],
861 this->alpha_.boundaryField()[patchi]
867template<
class BasicThermo,
class MixtureType>
880template<
class BasicThermo,
class MixtureType>
891 this->p_.boundaryField()[patchi],
892 this->T_.boundaryField()[patchi],
896 this->alpha_.boundaryField()[patchi]
902template<
class BasicThermo,
class MixtureType>
905 if (BasicThermo::read())
907 MixtureType::read(*
this);
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
@ NO_REGISTER
Do not request registration (bool: false).
Defines the attributes of an object for which implicit objectRegistry management is supported,...
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.
virtual tmp< scalarField > Cpv(const scalarField &p, const scalarField &T, const label patchi) const
Heat capacity at constant pressure/volume for patch [J/kg/K].
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 > kappaEff(const volScalarField &) const
Effective thermal diffusivity for temperature.
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].
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< scalarField > Cp(const scalarField &p, const scalarField &T, const label patchi) const
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].
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
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)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
const dimensionSet dimless
Dimensionless.
List< label > labelList
A List of labels.
const dimensionSet dimEnergy
GeometricField< scalar, fvPatchField, volMesh > volScalarField
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 Type * isA(const U &obj)
Attempt dynamic_cast to Type.
bool cp(const fileName &src, const fileName &dst, const bool followLink=true)
Copy the source to the destination (recursively if necessary).
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
fvPatchField< scalar > fvPatchScalarField
#define forAll(list, i)
Loop across all elements in list.