38 #ifndef CompositionModel_H 39 #define CompositionModel_H 56 template<
class CloudType>
57 class CompositionModel
59 public CloudSubModelBase<CloudType>
64 const fluidThermo& carrierThermo_;
67 const basicSpecieMixture* carrierMixture_;
70 const parcelThermo& thermo_;
73 phasePropertiesList phaseProps_;
88 const dictionary&
dict,
103 const dictionary& dict,
112 virtual autoPtr<CompositionModel<CloudType>>
clone()
const = 0;
120 static autoPtr<CompositionModel<CloudType>>
New 122 const dictionary& dict,
132 const parcelThermo&
thermo()
const;
138 const basicSpecieMixture&
carrier()
const;
141 const liquidMixtureProperties&
liquids()
const;
144 const solidMixtureProperties&
solids()
const;
147 const phasePropertiesList&
phaseProps()
const;
168 const word& cmptName,
169 const bool allowNotFound =
false 176 const word& cmptName,
177 const bool allowNotFound =
false 185 const bool allowNotFound =
false 270 #define makeCompositionModel(CloudType) \ 272 typedef Foam::CloudType::thermoCloudType thermoCloudType; \ 273 defineNamedTemplateTypeNameAndDebug \ 275 Foam::CompositionModel<thermoCloudType>, \ 280 defineTemplateRunTimeSelectionTable \ 282 CompositionModel<thermoCloudType>, \ 288 #define makeCompositionModelType(SS, CloudType) \ 290 typedef Foam::CloudType::thermoCloudType thermoCloudType; \ 291 defineNamedTemplateTypeNameAndDebug(Foam::SS<thermoCloudType>, 0); \ 293 Foam::CompositionModel<thermoCloudType>:: \ 294 adddictionaryConstructorToTable<Foam::SS<thermoCloudType>> \ 295 add##SS##CloudType##thermoCloudType##ConstructorToTable_; declareRunTimeSelectionTable(autoPtr, CompositionModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
virtual scalar L(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return latent heat for the phase phaseI.
virtual const scalarField & YMixture0() const =0
Return the list of mixture mass fractions.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
DSMCCloud< dsmcParcel > CloudType
const phasePropertiesList & phaseProps() const
Return the list of phase properties.
CompositionModel(CloudType &owner)
Construct null from owner.
virtual label idSolid() const =0
Solid id.
const scalarField & Y0(const label phaseI) const
Return the list of phase phaseI mass fractions.
scalarField X(const label phaseI, const scalarField &Y) const
Return the list of phase phaseI volume fractions fractions.
virtual scalar Hs(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return sensible enthalpy for the phase phaseI.
const parcelThermo & thermo() const
Return the thermo database.
label localToCarrierId(const label phaseI, const label id, const bool allowNotFound=false) const
Return carrier id of component given local id.
virtual scalar H(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return total enthalpy for the phase phaseI.
TypeName("compositionModel")
Runtime type information.
virtual scalar Cp(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return specific heat capacity for the phase phaseI.
const dictionary & dict() const
Return const access to the cloud dictionary.
const CloudType & owner() const
Return const access to the owner cloud.
const wordList & phaseTypes() const
Return the list of phase type names.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual label idLiquid() const =0
Liquid id.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
List< word > wordList
A List of words.
label nPhase() const
Return the number of phases.
static autoPtr< CompositionModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
PtrList< volScalarField > & Y
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
virtual ~CompositionModel()
Destructor.
Macros to ease declaration of run-time selection tables.
label localId(const label phaseI, const word &cmptName, const bool allowNotFound=false) const
Return local id of component cmptName in phase phaseI.
virtual label idGas() const =0
Gas id.
const wordList & stateLabels() const
Return the list of state labels (s), (l), (g) etc.
virtual scalar Hc(const label phaseI, const scalarField &Y, const scalar p, const scalar T) const
Return chemical enthalpy for the phase phaseI.
const basicSpecieMixture & carrier() const
Return the carrier components (wrapper function)
virtual autoPtr< CompositionModel< CloudType > > clone() const =0
Construct and return a clone.
const wordList & componentNames(const label phaseI) const
Return the list of component names for phaseI.
label carrierId(const word &cmptName, const bool allowNotFound=false) const
Return global id of component cmptName in carrier thermo.
const liquidMixtureProperties & liquids() const
Return the global (additional) liquids.
const solidMixtureProperties & solids() const
Return the global (additional) solids.