Time activated explicit source. More...
#include <finiteVolume/TimeActivatedExplicitSource_.H>
Time activated explicit source.
{ active true; // on/off switch timeStart 0.2; // start time duration2.0; // duration selectionMode points;// cellSet/cellZone/all volumeMode absolute; // specific
fieldData // field data - usage for multiple fields ( (H2O 0.005) );
fieldData 0.005; // field data - usage for single field
points // list of points when selectionMode = points ( (2.75 0.5 0) );
cellSet c0;// cellSet name when selectionMode=cellSet cellZonec0;// cellZone name when selectionMode=cellZone }
Definition at line 94 of file TimeActivatedExplicitSource_.H.
Collaboration diagram for TimeActivatedExplicitSource< Type >:Classes | |
| class | iNew |
| Return pointer to new TimeActivatedExplicitSource object created. More... | |
Public Types | |
| enum | selectionModeType { smPoints, smCellSet, smCellZone, smAll } |
| Enumeration for selection mode types. More... | |
| enum | volumeModeType { vmAbsolute, vmSpecific } |
| Enumeration for volume types. More... | |
Public Member Functions | |
| TimeActivatedExplicitSource (const word &name, const dictionary &dict, const fvMesh &mesh, const wordList &fieldNames) | |
| Construct from components. | |
| autoPtr < TimeActivatedExplicitSource > | clone () const |
| Return clone. | |
| const word & | name () const |
| Return const access to the source name. | |
| const fvMesh & | mesh () const |
| Return const access to the mesh database. | |
| bool | active () const |
| Return const access to the source active flag. | |
| scalar | timeStart () const |
| Return const access to the time start. | |
| scalar | duration () const |
| Return const access to the duration. | |
| scalar | timeEnd () const |
| Return const access to the time end. | |
| const volumeModeType & | volumeMode () const |
| Return const access to the volume mode. | |
| const selectionModeType & | selectionMode () const |
| Return const access to the cell selection mode. | |
| const List< point > & | points () const |
| Return const access to the list of points for "points". | |
| const word & | cellSetName () const |
| Return const access to the name of cell set for "cellSet". | |
| scalar | V () const |
| Return const access to the total cell volume. | |
| const labelList & | cells () const |
| Return const access to the cell set. | |
| const List< fieldNameValuePair > & | fieldData () const |
| Return const access to the source field name vs value pairs. | |
| const labelList & | fieldIds () const |
| Return const access to the the map of fields ids from supplied. | |
| word & | name () |
| Return access to the source name. | |
| bool & | active () |
| Return access to the source active flag. | |
| scalar & | timeStart () |
| Return access to the time start. | |
| scalar & | duration () |
| Return access to the duration. | |
| volumeModeType & | volumeMode () |
| Return access to the volume mode. | |
| selectionModeType & | selectionMode () |
| Return access to the cell selection mode. | |
| List< point > & | points () |
| Return access to the list of points for "points" selectionMode. | |
| word & | cellSetName () |
| Return access to the name of cell set for "cellSet". | |
| scalar & | V () |
| Return access to the total cell volume. | |
| labelList & | cells () |
| Return access to the cell set. | |
| List< fieldNameValuePair > & | fieldData () |
| Return access to the source field name vs value pairs. | |
| labelList & | fieldIds () |
| Return access to the the map of fields ids from supplied. | |
| void | addToField (DimensionedField< Type, volMesh > &Su, const label fieldI) |
| Add the source contribution to field Su. | |
| void | writeData (Ostream &) const |
| Write the source properties. | |
Static Public Attributes | |
| static const wordList | selectionModeTypeNames_ |
| Word list of selection mode type names. | |
| static const wordList | volumeModeTypeNames_ |
| Word list of volume mode type names. | |
Protected Types | |
| typedef Tuple2< word, Type > | fieldNameValuePair |
Protected Member Functions | |
| selectionModeType | wordToSelectionModeType (const word &smtName) const |
| Helper function to convert from a word to a selectionModeType. | |
| volumeModeType | wordToVolumeModeType (const word &vtName) const |
| Helper function to convert from a word to a volumeModeType. | |
| word | selectionModeTypeToWord (const selectionModeType &smtType) const |
| Helper function to convert from a selectionModeType to a word. | |
| word | volumeModeTypeToWord (const volumeModeType &vtType) const |
| Helper function to convert from a volumeModeType to a word. | |
| void | setSelection (const dictionary &dict) |
| Set the cellSet or points selection. | |
| void | setFieldData (const dictionary &dict, const wordList &fieldNames) |
| Set the local field data. | |
| void | setCellSet () |
| Set the cell set based on the user input selection mode. | |
Protected Attributes | |
| word | name_ |
| Source name. | |
| const fvMesh & | mesh_ |
| Reference to the mesh database. | |
| bool | active_ |
| Source active flag. | |
| scalar | timeStart_ |
| Time start. | |
| scalar | duration_ |
| Duration. | |
| volumeModeType | volumeMode_ |
| Volume mode. | |
| selectionModeType | selectionMode_ |
| Cell selection mode. | |
| List< point > | points_ |
| List of points for "points" selectionMode. | |
| word | cellSetName_ |
| Name of cell set for "cellSet" and "cellZone" selectionMode. | |
| labelList | cells_ |
| Set of cells to apply source to. | |
| scalar | V_ |
| Sum of cell volumes. | |
| List< fieldNameValuePair > | fieldData_ |
| List of source field name vs value pairs. | |
| labelList | fieldIds_ |
| Map of fields ids from supplied fields to local field source ids. | |
Friends | |
| Ostream & | operator (Ostream &os, const TimeActivatedExplicitSource &source) |
| Ostream operator. | |
|
protected |
Definition at line 127 of file TimeActivatedExplicitSource_.H.
| enum selectionModeType |
Enumeration for selection mode types.
Definition at line 101 of file TimeActivatedExplicitSource_.H.
| enum volumeModeType |
Enumeration for volume types.
Definition at line 113 of file TimeActivatedExplicitSource_.H.
| TimeActivatedExplicitSource | ( | const word & | name, |
| const dictionary & | dict, | ||
| const fvMesh & | mesh, | ||
| const wordList & | fieldNames | ||
| ) |
Construct from components.
Definition at line 320 of file TimeActivatedExplicitSource_.C.
References dictionary::lookup(), and List< T >::size().
Referenced by TimeActivatedExplicitSource< Type >::iNew::operator()().
|
protected |
Helper function to convert from a word to a selectionModeType.
Definition at line 53 of file TimeActivatedExplicitSource_.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, and Foam::nl.
|
protected |
Helper function to convert from a word to a volumeModeType.
Definition at line 83 of file TimeActivatedExplicitSource_.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, and Foam::nl.
|
protected |
Helper function to convert from a selectionModeType to a word.
Definition at line 109 of file TimeActivatedExplicitSource_.C.
|
protected |
Helper function to convert from a volumeModeType to a word.
Definition at line 126 of file TimeActivatedExplicitSource_.C.
|
protected |
Set the cellSet or points selection.
Definition at line 143 of file TimeActivatedExplicitSource_.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, and dictionary::lookup().
|
protected |
Set the local field data.
Definition at line 184 of file TimeActivatedExplicitSource_.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, dictionary::lookup(), and Foam::nl.
|
protected |
Set the cell set based on the user input selection mode.
Definition at line 224 of file TimeActivatedExplicitSource_.C.
References Foam::decrIndent(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, Foam::identity(), Foam::incrIndent(), Foam::indent(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::nl, reduce(), Foam::returnReduce(), HashTable< T, Key, Hash >::toc(), and WarningIn.
|
inline |
Return clone.
Definition at line 207 of file TimeActivatedExplicitSource_.H.
References notImplemented.
|
inline |
Return const access to the source name.
Definition at line 31 of file TimeActivatedExplicitSourceI.H.
Referenced by TimeActivatedExplicitSource< Type >::iNew::operator()().
|
inline |
Return const access to the mesh database.
Definition at line 38 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the source active flag.
Definition at line 45 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the time start.
Definition at line 52 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the duration.
Definition at line 59 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the time end.
Definition at line 66 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the volume mode.
Definition at line 74 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the cell selection mode.
Definition at line 83 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the list of points for "points".
selectionMode
Definition at line 91 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the name of cell set for "cellSet".
selectionMode
Definition at line 99 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the total cell volume.
Definition at line 106 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the cell set.
Definition at line 114 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the source field name vs value pairs.
Definition at line 123 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return const access to the the map of fields ids from supplied.
fields to local field source ids
Definition at line 131 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the source name.
Definition at line 138 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the source active flag.
Definition at line 145 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the time start.
Definition at line 152 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the duration.
Definition at line 159 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the volume mode.
Definition at line 167 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the cell selection mode.
Definition at line 175 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the list of points for "points" selectionMode.
Definition at line 183 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the name of cell set for "cellSet".
selectionMode
Definition at line 190 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the total cell volume.
Definition at line 197 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the cell set.
Definition at line 204 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the source field name vs value pairs.
Definition at line 212 of file TimeActivatedExplicitSourceI.H.
|
inline |
Return access to the the map of fields ids from supplied.
fields to local field source ids
Definition at line 219 of file TimeActivatedExplicitSourceI.H.
| void addToField | ( | DimensionedField< Type, volMesh > & | Su, |
| const label | fieldI | ||
| ) |
Add the source contribution to field Su.
Definition at line 360 of file TimeActivatedExplicitSource_.C.
References forAll.
| void writeData | ( | Ostream & | os | ) | const |
Write the source properties.
Definition at line 31 of file TimeActivatedExplicitSourceIO.C.
References Foam::abort(), Foam::decrIndent(), Foam::endl(), Foam::FatalError, FatalErrorIn, Foam::incrIndent(), Foam::indent(), Foam::nl, and Ostream::writeKeyword().
|
friend |
Ostream operator.
|
static |
Word list of selection mode type names.
Definition at line 110 of file TimeActivatedExplicitSource_.H.
|
static |
Word list of volume mode type names.
Definition at line 120 of file TimeActivatedExplicitSource_.H.
|
protected |
Source name.
Definition at line 130 of file TimeActivatedExplicitSource_.H.
|
protected |
Reference to the mesh database.
Definition at line 133 of file TimeActivatedExplicitSource_.H.
|
protected |
Source active flag.
Definition at line 136 of file TimeActivatedExplicitSource_.H.
|
protected |
Time start.
Definition at line 139 of file TimeActivatedExplicitSource_.H.
|
protected |
Duration.
Definition at line 142 of file TimeActivatedExplicitSource_.H.
|
protected |
Volume mode.
Definition at line 145 of file TimeActivatedExplicitSource_.H.
|
protected |
Cell selection mode.
Definition at line 148 of file TimeActivatedExplicitSource_.H.
List of points for "points" selectionMode.
Definition at line 151 of file TimeActivatedExplicitSource_.H.
|
protected |
Name of cell set for "cellSet" and "cellZone" selectionMode.
Definition at line 154 of file TimeActivatedExplicitSource_.H.
|
protected |
Set of cells to apply source to.
Definition at line 157 of file TimeActivatedExplicitSource_.H.
|
protected |
Sum of cell volumes.
Definition at line 160 of file TimeActivatedExplicitSource_.H.
|
protected |
List of source field name vs value pairs.
Definition at line 163 of file TimeActivatedExplicitSource_.H.
|
protected |
Map of fields ids from supplied fields to local field source ids.
Definition at line 166 of file TimeActivatedExplicitSource_.H.