Go to the documentation of this file.
44 #ifndef CompositionModel_H
45 #define CompositionModel_H
66 template<
class CloudType>
67 class CompositionModel
69 public CloudSubModelBase<CloudType>
74 const SLGThermo& thermo_;
77 phasePropertiesList phaseProps_;
92 const dictionary&
dict,
107 const dictionary&
dict,
116 virtual autoPtr<CompositionModel<CloudType>>
clone()
const = 0;
124 static autoPtr<CompositionModel<CloudType>>
New
126 const dictionary&
dict,
136 const SLGThermo&
thermo()
const;
142 const basicSpecieMixture&
carrier()
const;
145 const liquidMixtureProperties&
liquids()
const;
148 const solidMixtureProperties&
solids()
const;
151 const phasePropertiesList&
phaseProps()
const;
172 const word& cmptName,
173 const bool allowNotFound =
false
180 const word& cmptName,
181 const bool allowNotFound =
false
189 const bool allowNotFound =
false
214 virtual label
idGas()
const = 0;
220 virtual label
idSolid()
const = 0;
288 #define makeCompositionModel(CloudType) \
290 typedef Foam::CloudType::reactingCloudType reactingCloudType; \
291 defineNamedTemplateTypeNameAndDebug \
293 Foam::CompositionModel<reactingCloudType>, \
298 defineTemplateRunTimeSelectionTable \
300 CompositionModel<reactingCloudType>, \
306 #define makeCompositionModelType(SS, CloudType) \
308 typedef Foam::CloudType::reactingCloudType reactingCloudType; \
309 defineNamedTemplateTypeNameAndDebug(Foam::SS<reactingCloudType>, 0); \
311 Foam::CompositionModel<reactingCloudType>:: \
312 adddictionaryConstructorToTable<Foam::SS<reactingCloudType>> \
313 add##SS##CloudType##reactingCloudType##ConstructorToTable_;
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual const scalarField & YMixture0() const =0
Return the list of mixture mass fractions.
virtual scalar Cp(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return specific heat capacity 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.
virtual scalar rho(const scalarField &Ygas, const scalarField &Yliq, const scalarField &Ysol, const scalar T, const scalar p) const
Return rho of the full composition.
label localId(const label phaseI, const word &cmptName, const bool allowNotFound=false) const
Return local id of component cmptName in phase phaseI.
label localToCarrierId(const label phaseI, const label id, const bool allowNotFound=false) const
Return carrier id of component given local id.
virtual scalar Hs(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return sensible enthalpy for the phase phaseI.
virtual scalar Hc(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return chemical enthalpy for the phase phaseI.
List< word > wordList
A List of words.
virtual label idGas() const =0
Gas id.
const phasePropertiesList & phaseProps() const
Return the list of phase properties.
const scalarField & Y0(const label phaseI) const
Return the list of phase phaseI mass fractions.
tmp< scalarField > X(const label phaseI, const scalarField &Y) const
Return the list of phase phaseI volume fractions fractions.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual label idSolid() const =0
Solid id.
DSMCCloud< dsmcParcel > CloudType
const liquidMixtureProperties & liquids() const
Return the global (additional) liquids.
virtual label idLiquid() const =0
Liquid id.
const basicSpecieMixture & carrier() const
Return the carrier components (wrapper function)
CompositionModel(CloudType &owner)
Construct null from owner.
declareRunTimeSelectionTable(autoPtr, CompositionModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
PtrList< volScalarField > & Y
const wordList & componentNames(const label phaseI) const
Return the list of component names for phaseI.
const solidMixtureProperties & solids() const
Return the global (additional) solids.
TypeName("compositionModel")
Runtime type information.
label nPhase() const
Return the number of phases.
virtual autoPtr< CompositionModel< CloudType > > clone() const =0
Construct and return a clone.
Macros to ease declaration of run-time selection tables.
const SLGThermo & thermo() const
Return the thermo database.
virtual ~CompositionModel()
Destructor.
static autoPtr< CompositionModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
const wordList & phaseTypes() const
Return the list of phase type names.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
label carrierId(const word &cmptName, const bool allowNotFound=false) const
Return global id of component cmptName in carrier thermo.
virtual scalar L(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return latent heat for the phase phaseI.
const wordList & stateLabels() const
Return the list of state labels (s), (l), (g) etc.