32 template<
class BaseThermo>
40 scalarField& TuCells = this->Tu_.primitiveFieldRef();
41 scalarField& CpCells = this->Cp_.primitiveFieldRef();
42 scalarField& CvCells = this->Cv_.primitiveFieldRef();
43 scalarField& psiCells = this->psi_.primitiveFieldRef();
44 scalarField& muCells = this->mu_.primitiveFieldRef();
45 scalarField& kappaCells = this->kappa_.primitiveFieldRef();
47 auto Yslicer = this->Yslicer();
51 auto composition = this->cellComposition(Yslicer, celli);
53 const typename BaseThermo::mixtureType::thermoMixtureType&
54 thermoMixture = this->thermoMixture(composition);
56 const typename BaseThermo::mixtureType::transportMixtureType&
58 this->transportMixture(composition, thermoMixture);
60 TCells[celli] = thermoMixture.The
67 CpCells[celli] = thermoMixture.Cp(pCells[celli], TCells[celli]);
68 CvCells[celli] = thermoMixture.Cv(pCells[celli], TCells[celli]);
69 psiCells[celli] = thermoMixture.psi(pCells[celli], TCells[celli]);
71 muCells[celli] = transportMixture.mu(pCells[celli], TCells[celli]);
73 transportMixture.kappa(pCells[celli], TCells[celli]);
75 TuCells[celli] = this->reactants(composition).The
83 volScalarField::Boundary& pBf =
84 this->p_.boundaryFieldRef();
86 volScalarField::Boundary& TBf =
87 this->T_.boundaryFieldRef();
89 volScalarField::Boundary& TuBf =
90 this->Tu_.boundaryFieldRef();
92 volScalarField::Boundary& CpBf =
93 this->Cp_.boundaryFieldRef();
95 volScalarField::Boundary& CvBf =
96 this->Cv_.boundaryFieldRef();
98 volScalarField::Boundary& psiBf =
99 this->psi_.boundaryFieldRef();
101 volScalarField::Boundary& heBf =
102 this->
he().boundaryFieldRef();
104 volScalarField::Boundary& heuBf =
105 this->heu().boundaryFieldRef();
107 volScalarField::Boundary& muBf =
108 this->mu_.boundaryFieldRef();
110 volScalarField::Boundary& kappaBf =
111 this->kappa_.boundaryFieldRef();
131 this->patchFaceComposition(Yslicer,
patchi, facei);
133 const typename BaseThermo::mixtureType::thermoMixtureType&
134 thermoMixture = this->thermoMixture(composition);
136 const typename BaseThermo::mixtureType::transportMixtureType&
138 this->transportMixture(composition, thermoMixture);
140 phe[facei] = thermoMixture.he(pp[facei], pT[facei]);
142 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
143 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
144 ppsi[facei] = thermoMixture.psi(pp[facei], pT[facei]);
145 pmu[facei] = transportMixture.mu(pp[facei], pT[facei]);
146 pkappa[facei] = transportMixture.kappa(pp[facei], pT[facei]);
154 this->patchFaceComposition(Yslicer,
patchi, facei);
156 const typename BaseThermo::mixtureType::thermoMixtureType&
157 thermoMixture = this->thermoMixture(composition);
159 const typename BaseThermo::mixtureType::transportMixtureType&
161 this->transportMixture(composition, thermoMixture);
163 pT[facei] = thermoMixture.The(phe[facei], pp[facei], pT[facei]);
165 pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
166 pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
167 ppsi[facei] = thermoMixture.psi(pp[facei], pT[facei]);
168 pmu[facei] = transportMixture.mu(pp[facei], pT[facei]);
169 pkappa[facei] = transportMixture.kappa(pp[facei], pT[facei]);
172 this->reactants(composition)
173 .The(pheu[facei], pp[facei], pTu[facei]);
182 template<
class BaseThermo>
186 const word& phaseName
189 BaseThermo(mesh, phaseName),
206 BaseThermo::mixtureType::thermoType::heName() +
'u',
212 this->volScalarFieldProperty
214 BaseThermo::mixtureType::thermoType::heName() +
'u',
216 &BaseThermo::mixtureType::reactants,
217 &BaseThermo::mixtureType::thermoMixtureType::
he,
221 this->heuBoundaryTypes()
224 this->heuBoundaryCorrection(this->heu_);
228 this->psi_.oldTime();
234 template<
class BaseThermo>
241 template<
class BaseThermo>
244 if (BaseThermo::debug)
250 this->psi_.oldTime();
254 if (BaseThermo::debug)
261 template<
class BaseThermo>
269 return this->cellSetProperty
271 &BaseThermo::mixtureType::reactants,
280 template<
class BaseThermo>
288 return this->patchFieldProperty
290 &BaseThermo::mixtureType::reactants,
293 this->p_.boundaryField()[
patchi],
299 template<
class BaseThermo>
303 return this->volScalarFieldProperty
307 &BaseThermo::mixtureType::products,
308 &BaseThermo::mixtureType::thermoMixtureType::The,
316 template<
class BaseThermo>
320 return this->volScalarFieldProperty
323 this->psi_.dimensions(),
324 &BaseThermo::mixtureType::reactants,
332 template<
class BaseThermo>
338 return this->volScalarFieldProperty
341 this->psi_.dimensions(),
342 &BaseThermo::mixtureType::products,
350 template<
class BaseThermo>
354 return this->volScalarFieldProperty
358 &BaseThermo::mixtureType::reactants,
366 template<
class BaseThermo>
372 return this->volScalarFieldProperty
376 &BaseThermo::mixtureType::products,
#define forAll(list, i)
Loop across all elements in list.
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Thermo implementation based on compressibility with additional unburnt thermodynamic state.
virtual tmp< volScalarField > mub() const
Dynamic viscosity of burnt gas [kg/m/s].
PsiuMulticomponentThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
virtual void correct()
Update properties.
virtual tmp< volScalarField > muu() const
Dynamic viscosity of unburnt gas [kg/m/s].
virtual const volScalarField & heu() const
Unburnt gas enthalpy [J/kg].
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 ~PsiuMulticomponentThermo()
Destructor.
Mesh data needed to do the Finite Volume discretisation.
A class for managing temporary objects.
A class for handling words, derived from string.
volScalarField scalarField(fieldObject, mesh)
const volScalarField & psi
#define InfoInFunction
Report an information message using Foam::Info.
const dimensionedScalar mu
Atomic mass unit.
label calculate(const fvMesh &mesh, const labelHashSet &patchIDs, const scalar minFaceFraction, GeometricField< scalar, PatchField, GeoMesh > &distance)
Calculate distance data from patches.
const dimensionSet dimDynamicViscosity
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimEnergy
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimTemperature
const dimensionSet dimMass
fvPatchField< scalar > fvPatchScalarField