35template<
class BasicPsiThermo,
class MixtureType>
36void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::calculate()
43 scalarField& TuCells = this->Tu_.primitiveFieldRef();
44 scalarField& psiCells = this->psi_.primitiveFieldRef();
45 scalarField& muCells = this->mu_.primitiveFieldRef();
46 scalarField& alphaCells = this->alpha_.primitiveFieldRef();
50 const typename MixtureType::thermoType& mixture_ =
51 this->cellMixture(celli);
55 TCells[celli] = mixture_.THE
63 psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]);
65 muCells[celli] = mixture_.mu(pCells[celli], TCells[celli]);
66 alphaCells[celli] = mixture_.alphah(pCells[celli], TCells[celli]);
68 TuCells[celli] = this->cellReactants(celli).THE
76 volScalarField::Boundary& pBf =
77 this->p_.boundaryFieldRef();
79 volScalarField::Boundary& TBf =
80 this->T_.boundaryFieldRef();
82 volScalarField::Boundary& TuBf =
83 this->Tu_.boundaryFieldRef();
85 volScalarField::Boundary& psiBf =
86 this->psi_.boundaryFieldRef();
88 volScalarField::Boundary& heBf =
89 this->
he().boundaryFieldRef();
91 volScalarField::Boundary& heuBf =
92 this->heu().boundaryFieldRef();
94 volScalarField::Boundary& muBf =
95 this->mu_.boundaryFieldRef();
97 volScalarField::Boundary& alphaBf =
98 this->alpha_.boundaryFieldRef();
100 forAll(this->T_.boundaryField(), patchi)
115 const typename MixtureType::thermoType& mixture_ =
116 this->patchFaceMixture(patchi, facei);
118 phe[facei] = mixture_.HE(
pp[facei], pT[facei]);
120 ppsi[facei] = mixture_.psi(
pp[facei], pT[facei]);
121 pmu[facei] = mixture_.mu(
pp[facei], pT[facei]);
122 palpha[facei] = mixture_.alphah(
pp[facei], pT[facei]);
129 const typename MixtureType::thermoType& mixture_ =
130 this->patchFaceMixture(patchi, facei);
134 pT[facei] = mixture_.THE(phe[facei],
pp[facei], pT[facei]);
137 ppsi[facei] = mixture_.psi(
pp[facei], pT[facei]);
138 pmu[facei] = mixture_.mu(
pp[facei], pT[facei]);
139 palpha[facei] = mixture_.alphah(
pp[facei], pT[facei]);
142 this->patchFaceReactants(patchi, facei)
143 .THE(pheu[facei],
pp[facei], pTu[facei]);
240template<
class BasicPsiThermo,
class MixtureType>
241Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heheuPsiThermo
244 const word& phaseName
266 MixtureType::thermoType::heName() +
'u',
274 this->heuBoundaryTypes()
277 scalarField& heuCells = this->heu_.primitiveFieldRef();
283 heuCells[celli] = this->cellReactants(celli).HE
300 pheu[facei] = this->patchFaceReactants(patchi, facei).HE
308 this->heuBoundaryCorrection(this->heu_);
311 this->psi_.oldTime();
315template<
class BasicPsiThermo,
class MixtureType>
316Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heheuPsiThermo
319 const word& phaseName,
342 MixtureType::thermoType::heName() +
'u',
350 this->heuBoundaryTypes()
359 heuCells[celli] = this->cellReactants(celli).HE
376 pheu[facei] = this->patchFaceReactants(patchi, facei).HE
384 this->heuBoundaryCorrection(this->heu_);
387 this->psi_.oldTime();
393template<
class BasicPsiThermo,
class MixtureType>
400template<
class BasicPsiThermo,
class MixtureType>
406 this->psi_.oldTime();
425template<
class BasicPsiThermo,
class MixtureType>
435 auto&
heu = theu.ref();
439 heu[celli] = this->cellReactants(
cells[celli]).HE(
p[celli],
Tu[celli]);
446template<
class BasicPsiThermo,
class MixtureType>
456 auto& heu = theu.ref();
461 this->patchFaceReactants(patchi, facei).HE(
p[facei], Tu[facei]);
468template<
class BasicPsiThermo,
class MixtureType>
478 auto& Tb_ = tTb.ref();
487 TbCells[celli] = this->cellProducts(celli).THE
508 this->patchFaceProducts(patchi, facei)
509 .THE(ph[facei],
pp[facei], pT[facei]);
517template<
class BasicPsiThermo,
class MixtureType>
526 this->psi_.dimensions()
528 auto& psiu = tpsiu.ref();
537 this->cellReactants(celli).psi(pCells[celli], TuCells[celli]);
553 patchFaceReactants(patchi, facei).psi(
pp[facei], pTu[facei]);
561template<
class BasicPsiThermo,
class MixtureType>
570 this->psi_.dimensions()
572 auto& psib = tpsib.ref();
582 this->cellProducts(celli).psi(pCells[celli], TbCells[celli]);
597 this->patchFaceProducts
598 (patchi, facei).psi(
pp[facei], pTb[facei]);
606template<
class BasicPsiThermo,
class MixtureType>
617 auto& muu_ = tmuu.ref();
625 muuCells[celli] = this->cellReactants(celli).mu
642 pMuu[facei] = this->patchFaceReactants(patchi, facei).mu
654template<
class BasicPsiThermo,
class MixtureType>
665 auto& mub_ = tmub.ref();
674 mubCells[celli] = this->cellProducts(celli).mu
691 pMub[facei] = this->patchFaceProducts(patchi, facei).mu
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())
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
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,...
void size(const label n)
Older name for setAddressableSize.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Mesh data needed to do the Finite Volume discretisation.
Enthalpy/Internal energy for a mixture.
virtual tmp< volScalarField > mub() const
Dynamic viscosity of burnt gas [kg/ms].
virtual void correct()
Update properties.
virtual tmp< volScalarField > muu() const
Dynamic viscosity of unburnt gas [kg/ms].
virtual volScalarField & heu()
Update properties based on T.
virtual const volScalarField & Tu() const
Unburnt gas temperature [K].
virtual tmp< volScalarField > Tb() const
Burnt gas temperature [K].
virtual tmp< volScalarField > psib() const
Burnt gas compressibility [s^2/m^2].
virtual tmp< volScalarField > psiu() const
Unburnt gas compressibility [s^2/m^2].
virtual ~heheuPsiThermo()
Destructor.
Foam::psiuReactionThermo.
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 word dictName("faMeshDefinition")
#define DebugInfo
Report an information message using Foam::Info.
#define DebugInFunction
Report an information message using Foam::Info.
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
fvPatchField< scalar > fvPatchScalarField
#define forAll(list, i)
Loop across all elements in list.