30 template<
class CloudType>
39 template<
class CloudType>
48 thermo_(owner.thermo()),
59 template<
class CloudType>
67 phaseProps_(cm.phaseProps_)
73 template<
class CloudType>
80 template<
class CloudType>
87 template<
class CloudType>
95 template<
class CloudType>
103 template<
class CloudType>
111 template<
class CloudType>
119 template<
class CloudType>
122 return phaseProps_.
size();
126 template<
class CloudType>
130 if (phaseProps_.
size() == 1)
132 return phaseProps_[0].names();
141 template<
class CloudType>
148 template<
class CloudType>
152 return phaseProps_[
phasei].names();
156 template<
class CloudType>
159 const word& cmptName,
160 const bool allowNotFound
165 if (
id < 0 && !allowNotFound)
168 <<
"Unable to determine global id for requested component " 169 << cmptName <<
". Available components are " <<
nl 178 template<
class CloudType>
182 const word& cmptName,
183 const bool allowNotFound
188 if (
id < 0 && !allowNotFound)
191 <<
"Unable to determine local id for component " << cmptName
199 template<
class CloudType>
204 const bool allowNotFound
209 if (cid < 0 && !allowNotFound)
212 <<
"Unable to determine global carrier id for phase " 213 << phasei <<
" with local id " <<
id 221 template<
class CloudType>
227 return phaseProps_[
phasei].Y();
231 template<
class CloudType>
241 switch (props.
phase())
265 <<
"Only possible to convert gas and liquid mass fractions" 276 template<
class CloudType>
286 scalar HMixture = 0.0;
287 switch (props.
phase())
294 HMixture += Y[i]*thermo_.
carrier().
Ha(cid, p, T);
330 template<
class CloudType>
340 scalar HsMixture = 0.0;
341 switch (props.
phase())
348 HsMixture += Y[i]*thermo_.
carrier().
Hs(cid, p, T);
376 <<
"Unknown phase enumeration" 385 template<
class CloudType>
395 scalar HcMixture = 0.0;
396 switch (props.
phase())
403 HcMixture += Y[i]*thermo_.
carrier().
Hc(cid);
427 <<
"Unknown phase enumeration" 436 template<
class CloudType>
446 scalar CpMixture = 0.0;
447 switch (props.
phase())
454 CpMixture += Y[i]*thermo_.
carrier().
Cp(cid, p, T);
477 <<
"Unknown phase enumeration" 486 template<
class CloudType>
496 scalar LMixture = 0.0;
497 switch (props.
phase())
504 <<
"No support for gaseous components" <<
endl;
521 <<
"No support for solid components" <<
endl;
528 <<
"Unknown phase enumeration" label localId(const label phaseI, const word &cmptName, const bool allowNotFound=false) const
Return local id of component cmptName in phase phaseI.
const PtrList< liquidProperties > & properties() const
Return the liquid properties.
#define forAll(list, i)
Loop across all elements in list.
const wordList & stateLabels() const
Return the list of state labels.
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 dictionary & dict() const
Return const access to the cloud dictionary.
const List< word > & components() const
Return the liquid names.
CompositionModel(CloudType &owner)
Construct null from owner.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Helper class to manage multi-specie phase properties.
label localToCarrierId(const label phaseI, const label id, const bool allowNotFound=false) const
Return carrier id of component given local id.
label nPhase() const
Return the number of phases.
void size(const label)
Override size to be inconsistent with allocated storage.
virtual scalar Ha(const label speciei, const scalar p, const scalar T) const =0
Absolute enthalpy [J/kg].
Ostream & endl(Ostream &os)
Add newline and flush stream.
const solidMixtureProperties & solids() const
Return the global (additional) solids.
const scalarField & Y0(const label phaseI) const
Return the list of phase phaseI mass fractions.
Base class for cloud sub-models.
const wordList & phaseTypes() const
Return the list of word representation of phase types.
virtual scalar Cp(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return specific heat caoacity for the phase phaseI.
virtual scalar H(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return total enthalpy for the phase phaseI.
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
const basicSpecieMixture & carrier() const
Return the carrier components (wrapper function)
virtual scalar Hs(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return sensible enthalpy for the phase phaseI.
const labelList & carrierIds() const
Return const access to the map to the carrier ids.
const SLGThermo & thermo() const
Return the thermo database.
virtual scalar Cp(const label speciei, const scalar p, const scalar T) const =0
Heat capacity at constant pressure [J/(kg K)].
label carrierId(const word &cmptName, const bool allowNotFound=false) const
Return global id of component cmptName in carrier thermo.
A class for handling words, derived from string.
virtual scalar Hc(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return chemical enthalpy for the phase phaseI.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package, and provides:
label size() const
Return the size (number of phases)
const solidMixtureProperties & solids() const
Return reference to the global (additional) solids.
virtual scalar Hc(const label speciei) const =0
Chemical enthalpy [J/kg].
const liquidMixtureProperties & liquids() const
Return reference to the global (additional) liquids.
errorManip< error > abort(error &err)
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
const wordList & phaseTypes() const
Return the list of phase type names.
const PtrList< solidProperties > & properties() const
Return the solidProperties properties.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const List< word > & components() const
Return the solidProperties names.
const phasePropertiesList & phaseProps() const
Return the list of phase properties.
Simple container for a list of phase properties.
const wordList & stateLabels() const
Return the list of state labels (s), (l), (g) etc.
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
const liquidMixtureProperties & liquids() const
Return the global (additional) liquids.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const =0
Sensible enthalpy [J/kg].
const wordList & componentNames(const label phaseI) const
Return the list of component names for phaseI.
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
virtual ~CompositionModel()
Destructor.
virtual scalar L(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return latent heat for the phase phaseI.
const speciesTable & species() const
Return the table of species.
const CloudType & owner() const
Return const access to the owner cloud.
scalarField X(const label phaseI, const scalarField &Y) const
Return the list of phase phaseI volume fractions fractions.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
Templated reacting parcel composition model class Consists of carrier species (via thermo package)...
virtual scalar W(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
Templated base class for dsmc cloud.
phaseType phase() const
Return const access to the phase type.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.