38 #ifndef CompositionModel_H
39 #define CompositionModel_H
56 template<
class CloudType>
168 const word& cmptName,
169 const bool allowNotFound =
false
176 const word& cmptName,
177 const bool allowNotFound =
false
185 const bool allowNotFound =
false
261 #define makeCompositionModel(CloudType) \
263 typedef Foam::CloudType::thermoCloudType thermoCloudType; \
264 defineNamedTemplateTypeNameAndDebug \
266 Foam::CompositionModel<thermoCloudType>, \
271 defineTemplateRunTimeSelectionTable \
273 CompositionModel<thermoCloudType>, \
279 #define makeCompositionModelType(SS, CloudType) \
281 typedef Foam::CloudType::thermoCloudType thermoCloudType; \
282 defineNamedTemplateTypeNameAndDebug(Foam::SS<thermoCloudType>, 0); \
284 Foam::CompositionModel<thermoCloudType>:: \
285 adddictionaryConstructorToTable<Foam::SS<thermoCloudType>> \
286 add##SS##CloudType##thermoCloudType##ConstructorToTable_;
Base class for cloud sub-models.
const CloudType & owner() const
Return const access to the owner cloud.
Templated reacting parcel composition model class Consists of carrier species (via thermo package),...
const liquidMixtureProperties & liquids() const
Return the global (additional) liquids.
virtual label idLiquid() const =0
Liquid id.
scalarField X(const label phaseI, const scalarField &Y) const
Return the list of phase phaseI volume fractions fractions.
TypeName("compositionModel")
Runtime type information.
const parcelThermo & thermo() const
Return the thermo database.
const wordList & stateLabels() const
Return the list of state labels (s), (l), (g) etc.
CompositionModel(CloudType &owner)
Construct null from owner.
virtual scalar ha(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return total enthalpy for the phase phaseI.
const phasePropertiesList & phaseProps() const
Return the list of phase properties.
virtual scalar L(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return latent heat for the phase phaseI.
virtual ~CompositionModel()
Destructor.
const fluidMulticomponentThermo & carrier() const
Return the carrier components (wrapper function)
const wordList & componentNames(const label phaseI) const
Return the list of component names for phaseI.
label nPhase() const
Return the number of phases.
declareRunTimeSelectionTable(autoPtr, CompositionModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
label localToCarrierId(const label phaseI, const label id, const bool allowNotFound=false) const
Return carrier id of component given local id.
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 const scalarField & YMixture0() const =0
Return the list of mixture mass fractions.
virtual label idSolid() const =0
Solid id.
virtual label idGas() const =0
Gas id.
static autoPtr< CompositionModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
const solidMixtureProperties & solids() const
Return the global (additional) solids.
label localId(const label phaseI, const word &cmptName, const bool allowNotFound=false) const
Return local id of component cmptName in phase phaseI.
virtual scalar hs(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return sensible enthalpy for the phase phaseI.
virtual autoPtr< CompositionModel< CloudType > > clone() const =0
Construct and return a clone.
label carrierId(const word &cmptName, const bool allowNotFound=false) const
Return global id of component cmptName in carrier thermo.
const scalarField & Y0(const label phaseI) const
Return the list of phase phaseI mass fractions.
const wordList & phaseTypes() const
Return the list of phase type names.
Templated base class for dsmc cloud.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Base-class for multi-component fluid thermodynamic properties.
Base-class for fluid thermodynamic properties.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Simple container for a list of phase properties.
const dictionary & dict() const
Return const access to the cloud dictionary.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Macros to ease declaration of run-time selection tables.
PtrList< volScalarField > & Y