Base class for generic sub-models requiring to be read from dictionary. Provides a mechanism to read and write properties from a dictionary to enable clean re-starts. Used by, e.g. clou dsub-models. More...
Public Member Functions | |
subModelBase (dictionary &properties) | |
Construct null. More... | |
subModelBase (dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType, const word &dictExt="Coeffs") | |
Construct from components without name. More... | |
subModelBase (const word &modelName, dictionary &properties, const dictionary &dict, const word &baseName, const word &modelType) | |
Construct from components with name. More... | |
subModelBase (const subModelBase &smb) | |
Construct as copy. More... | |
virtual | ~subModelBase ()=default |
Destructor. More... | |
const word & | modelName () const |
Return const access to the name of the sub-model. More... | |
const dictionary & | dict () const |
Return const access to the cloud dictionary. More... | |
const word & | baseName () const |
Return const access to the base name of the sub-model. More... | |
const word & | modelType () const |
Return const access to the sub-model type. More... | |
const dictionary & | coeffDict () const |
Return const access to the coefficients dictionary. More... | |
const dictionary & | properties () const |
Return const access to the properties dictionary. More... | |
virtual bool | defaultCoeffs (const bool printMsg) const |
Returns true if defaultCoeffs is true and outputs on printMsg. More... | |
virtual bool | active () const |
Return the model 'active' status - default active = true. More... | |
virtual void | cacheFields (const bool store) |
Cache dependent sub-model fields. More... | |
virtual bool | writeTime () const |
Flag to indicate when to write a property. More... | |
virtual fileName | localPath () const |
Output directory. More... | |
template<class Type > | |
Type | getBaseProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const |
Retrieve generic property from the base model. More... | |
template<class Type > | |
void | getBaseProperty (const word &entryName, Type &value) const |
Retrieve generic property from the base model. More... | |
template<class Type > | |
void | setBaseProperty (const word &entryName, const Type &value) |
Add generic property to the base model. More... | |
bool | getModelDict (const word &entryName, dictionary &dict) const |
Retrieve dictionary, return true if set. More... | |
template<class Type > | |
bool | getModelProperty (const word &entryName, Type &value) const |
Retrieve generic property from the sub-model. More... | |
template<class Type > | |
Type | getModelProperty (const word &entryName, const Type &defaultValue=Type(Zero)) const |
Retrieve generic property from the sub-model. More... | |
template<class Type > | |
void | setModelProperty (const word &entryName, const Type &value) |
Add generic property to the sub-model. More... | |
virtual void | write (Ostream &os) const |
Write. More... | |
Public Attributes | |
bool | log |
Flag to write log into Info. More... | |
Protected Member Functions | |
bool | inLine () const |
Flag to indicate whether data is/was read in-line. More... | |
Protected Attributes | |
const word | modelName_ |
Name of the sub-model. More... | |
dictionary & | properties_ |
Reference to properties dictionary e.g. for restart. More... | |
const dictionary | dict_ |
Copy of dictionary used during construction. More... | |
const word | baseName_ |
Name of the sub-model base class. More... | |
const word | modelType_ |
Type of the sub-model. More... | |
const dictionary | coeffDict_ |
Coefficients dictionary. More... | |
Base class for generic sub-models requiring to be read from dictionary. Provides a mechanism to read and write properties from a dictionary to enable clean re-starts. Used by, e.g. clou dsub-models.
Definition at line 50 of file subModelBase.H.
subModelBase | ( | dictionary & | properties | ) |
Construct null.
Definition at line 34 of file subModelBase.C.
subModelBase | ( | dictionary & | properties, |
const dictionary & | dict, | ||
const word & | baseName, | ||
const word & | modelType, | ||
const word & | dictExt = "Coeffs" |
||
) |
Construct from components without name.
Definition at line 47 of file subModelBase.C.
subModelBase | ( | const word & | modelName, |
dictionary & | properties, | ||
const dictionary & | dict, | ||
const word & | baseName, | ||
const word & | modelType | ||
) |
Construct from components with name.
Definition at line 66 of file subModelBase.C.
subModelBase | ( | const subModelBase & | smb | ) |
Construct as copy.
Definition at line 84 of file subModelBase.C.
|
virtualdefault |
Destructor.
|
protected |
Flag to indicate whether data is/was read in-line.
const Foam::word & modelName | ( | ) | const |
Return const access to the name of the sub-model.
Definition at line 98 of file subModelBase.C.
const Foam::dictionary & dict | ( | ) | const |
Return const access to the cloud dictionary.
Definition at line 104 of file subModelBase.C.
Referenced by liquidFilmThermo::initLiquid().
const Foam::word & baseName | ( | ) | const |
Return const access to the base name of the sub-model.
Definition at line 110 of file subModelBase.C.
const Foam::word & modelType | ( | ) | const |
Return const access to the sub-model type.
Definition at line 116 of file subModelBase.C.
Referenced by filmSubModelBase::filmType().
const Foam::dictionary & coeffDict | ( | ) | const |
Return const access to the coefficients dictionary.
Definition at line 122 of file subModelBase.C.
const Foam::dictionary & properties | ( | ) | const |
Return const access to the properties dictionary.
Definition at line 128 of file subModelBase.C.
Referenced by LiquidEvapFuchsKnudsen< CloudType >::calculate(), LiquidEvaporation< CloudType >::dh(), LiquidEvaporationBoil< CloudType >::dh(), and LiquidEvapFuchsKnudsen< CloudType >::dh().
|
virtual |
Returns true if defaultCoeffs is true and outputs on printMsg.
Definition at line 134 of file subModelBase.C.
References Foam::decrIndent(), Foam::endl(), Foam::incrIndent(), Foam::indent(), and Foam::Info.
|
virtual |
Return the model 'active' status - default active = true.
Reimplemented in MultiInteraction< CloudType >, NoHeatTransfer< CloudType >, NoSurfaceFilm< CloudType >, NoDamping< CloudType >, NoPacking< CloudType >, NoCollision< CloudType >, NoStochasticCollision< CloudType >, NoIsotropy< CloudType >, NoInjection< CloudType >, noPhaseChange, NoheterogeneousReacting< CloudType >, NoDispersion< CloudType >, NoInteraction< CloudType >, NoPhaseChange< CloudType >, NoDevolatilisation< CloudType >, NoSurfaceReaction< CloudType >, NoAtomization< CloudType >, and NoBreakup< CloudType >.
Definition at line 149 of file subModelBase.C.
Referenced by InjectionModel< CloudType >::InjectionModel(), and filmSubModelBase::writeTime().
|
virtual |
Cache dependent sub-model fields.
Reimplemented in Implicit< CloudType >, Explicit< CloudType >, DispersionRASModel< CloudType >, Relaxation< CloudType >, and GradientDispersionRAS< CloudType >.
Definition at line 155 of file subModelBase.C.
|
virtual |
Flag to indicate when to write a property.
Reimplemented in CloudSubModelBase< CloudType >, CloudSubModelBase< Foam::DSMCCloud >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< CloudType > >, CloudSubModelBase< Foam::SprayCloud< CloudType > >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::CollidingCloud< KinematicCloud< Cloud< basicKinematicCollidingParcel > > > >, CloudSubModelBase< Foam::MPPICCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ReactingCloud< CloudType > >, CloudSubModelBase< Foam::ReactingHeterogeneousCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ThermoCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::KinematicCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::CollidingCloud< CloudType > >, CloudSubModelBase< Foam::KinematicCloud< CloudType > >, CloudSubModelBase< Foam::ReactingHeterogeneousCloud< CloudType > >, CloudSubModelBase< Foam::MPPICCloud< CloudType > >, CloudSubModelBase< Foam::CollidingCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::SprayCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ThermoCloud< CloudType > >, CloudSubModelBase< Foam::ReactingCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > >, filmSubModelBase, and filmSubModelBase.
Definition at line 159 of file subModelBase.C.
|
virtual |
Output directory.
Reimplemented in CloudSubModelBase< CloudType >, CloudSubModelBase< Foam::DSMCCloud >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< CloudType > >, CloudSubModelBase< Foam::SprayCloud< CloudType > >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::CollidingCloud< KinematicCloud< Cloud< basicKinematicCollidingParcel > > > >, CloudSubModelBase< Foam::MPPICCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ReactingCloud< CloudType > >, CloudSubModelBase< Foam::ReactingHeterogeneousCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ThermoCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::KinematicCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::CollidingCloud< CloudType > >, CloudSubModelBase< Foam::KinematicCloud< CloudType > >, CloudSubModelBase< Foam::ReactingHeterogeneousCloud< CloudType > >, CloudSubModelBase< Foam::MPPICCloud< CloudType > >, CloudSubModelBase< Foam::CollidingCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::SprayCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ThermoCloud< CloudType > >, CloudSubModelBase< Foam::ReactingCloud< Foam::DSMCCloud > >, and CloudSubModelBase< Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > >.
Definition at line 165 of file subModelBase.C.
Retrieve generic property from the base model.
Definition at line 25 of file subModelBaseTemplates.C.
References dictionary::readIfPresent(), and dictionary::subDict().
Referenced by transferModelList::info(), and injectionModelList::info().
void getBaseProperty | ( | const word & | entryName, |
Type & | value | ||
) | const |
Retrieve generic property from the base model.
Definition at line 44 of file subModelBaseTemplates.C.
References dictionary::readIfPresent(), and dictionary::subDict().
void setBaseProperty | ( | const word & | entryName, |
const Type & | value | ||
) |
Add generic property to the base model.
Definition at line 59 of file subModelBaseTemplates.C.
References dictionary::add(), and dictionary::subDict().
Referenced by transferModelList::info(), and injectionModelList::info().
bool getModelDict | ( | const word & | entryName, |
dictionary & | dict | ||
) | const |
Retrieve dictionary, return true if set.
Definition at line 177 of file subModelBase.C.
References dict, dictionary::found(), dictionary::subDict(), and dictionary::subOrEmptyDict().
bool getModelProperty | ( | const word & | entryName, |
Type & | value | ||
) | const |
Retrieve generic property from the sub-model.
Return true if found
Definition at line 79 of file subModelBaseTemplates.C.
References dictionary::found(), dictionary::readIfPresent(), and dictionary::subDict().
Retrieve generic property from the sub-model.
Definition at line 104 of file subModelBaseTemplates.C.
void setModelProperty | ( | const word & | entryName, |
const Type & | value | ||
) |
Add generic property to the sub-model.
Definition at line 117 of file subModelBaseTemplates.C.
References dictionary::add(), dictionary::found(), and dictionary::subDict().
|
virtual |
Write.
Reimplemented in CloudSubModelBase< CloudType >, CloudSubModelBase< Foam::DSMCCloud >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< CloudType > >, CloudSubModelBase< Foam::SprayCloud< CloudType > >, CloudSubModelBase< Foam::ReactingMultiphaseCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::CollidingCloud< KinematicCloud< Cloud< basicKinematicCollidingParcel > > > >, CloudSubModelBase< Foam::MPPICCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ReactingCloud< CloudType > >, CloudSubModelBase< Foam::ReactingHeterogeneousCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ThermoCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::KinematicCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::CollidingCloud< CloudType > >, CloudSubModelBase< Foam::KinematicCloud< CloudType > >, CloudSubModelBase< Foam::ReactingHeterogeneousCloud< CloudType > >, CloudSubModelBase< Foam::MPPICCloud< CloudType > >, CloudSubModelBase< Foam::CollidingCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::SprayCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::ThermoCloud< CloudType > >, CloudSubModelBase< Foam::ReactingCloud< Foam::DSMCCloud > >, CloudSubModelBase< Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > >, and DispersionRASModel< CloudType >.
Definition at line 204 of file subModelBase.C.
References os().
|
protected |
Name of the sub-model.
Definition at line 67 of file subModelBase.H.
|
protected |
Reference to properties dictionary e.g. for restart.
Definition at line 72 of file subModelBase.H.
|
protected |
Copy of dictionary used during construction.
Definition at line 77 of file subModelBase.H.
|
protected |
Name of the sub-model base class.
Definition at line 82 of file subModelBase.H.
|
protected |
Type of the sub-model.
Definition at line 87 of file subModelBase.H.
|
protected |
Coefficients dictionary.
Definition at line 92 of file subModelBase.H.
Referenced by constantFilmThermo::Tb(), and constantFilmThermo::W().
bool log |
Flag to write log into Info.
Definition at line 110 of file subModelBase.H.