Explicit source. More...
#include <finiteVolume/explicitSource.H>
Explicit source.
explicitSourceCoeffs { points// list of points when selectionMode = points ( (-0.088 0.007 -0.02) (-0.028 0.007 -0.02) ); volumeMode specific; //absolute fieldData// field data - usage for multiple fields { k 30.7; epsilon 1.5; } }
Definition at line 69 of file explicitSource.H.
Classes | |
class | fieldList |
Public Types | |
enum | volumeModeType { vmAbsolute, vmSpecific } |
Enumeration for volume types. More... | |
![]() | |
enum | selectionModeType { smPoints, smCellSet, smCellZone, smAll } |
Enumeration for selection mode types. More... |
Public Member Functions | |
TypeName ("explicitSource") | |
Runtime type information. | |
explicitSource (const word &name, const dictionary &dict, const fvMesh &mesh) | |
Construct from components. | |
autoPtr< explicitSource > | clone () const |
Return clone. | |
const volumeModeType & | volumeMode () const |
Return const access to the volume mode. | |
volumeModeType & | volumeMode () |
Return access to the volume mode. | |
const List< point > & | points () const |
Return points. | |
virtual void | addSu (fvMatrix< vector > &UEqn) |
Source term to fvMatrix<vector> | |
virtual void | addSu (fvMatrix< scalar > &UEqn) |
Source term to fvMatrix<scalar> | |
virtual void | addExplicitSources () |
Add all explicit source. | |
virtual void | addSu (DimensionedField< vector, volMesh > &field) |
Add source to scalar field. | |
virtual void | addSu (DimensionedField< scalar, volMesh > &field) |
Add source to vector field. | |
virtual void | writeData (Ostream &) const |
Write the source properties. | |
virtual bool | read (const dictionary &dict) |
Read fieldData in sub-dictionary. | |
![]() | |
TypeName ("basicSource") | |
Runtime type information. | |
declareRunTimeSelectionTable (autoPtr, basicSource, dictionary,(const word &name, const dictionary &dict, const fvMesh &mesh),(name, dict, mesh)) | |
basicSource (const word &name, const dictionary &dict, const fvMesh &mesh) | |
Construct from components. | |
virtual | ~basicSource () |
Destructor. | |
const word & | name () const |
Return const access to the source name. | |
const fvMesh & | mesh () const |
Return const access to the mesh database. | |
const dictionary & | dictCoeffs () const |
Return dictionay. | |
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 selectionModeType & | selectionMode () const |
Return const access to the cell selection mode. | |
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. | |
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. | |
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. | |
bool | isActive () |
Is the source active? |
Static Public Attributes | |
static const wordList | volumeModeTypeNames_ |
Word list of volume mode type names. | |
![]() | |
static const wordList | selectionModeTypeNames_ |
Word list of selection mode type names. |
Protected Member Functions | |
volumeModeType | wordToVolumeModeType (const word &vtName) const |
Helper function to convert from a word to a volumeModeType. | |
word | volumeModeTypeToWord (const volumeModeType &vtType) const |
Helper function to convert from a volumeModeType to a word. | |
void | setFieldData (const dictionary &dict) |
Set the local field data. | |
void | setSelectedCellsFromPoints () |
Set selected cells when smPoint is used. | |
![]() | |
selectionModeType | wordToSelectionModeType (const word &smtName) const |
Helper function to convert from a word to a selectionModeType. | |
word | selectionModeTypeToWord (const selectionModeType &smtType) const |
Helper function to convert from a selectionModeType to a word. | |
void | setSelection (const dictionary &dict) |
Set the cellSet or points selection. | |
void | setCellSet () |
Set the cell set based on the user input selection mode. |
Protected Attributes | |
const dictionary & | dict_ |
Sub dictionary for time activated explicit sources. | |
volumeModeType | volumeMode_ |
Volume mode. | |
List< point > | points_ |
List of points for "points" selectionMode. | |
scalarList | volSource_ |
Volume of the explicit source. | |
![]() | |
word | name_ |
Source name. | |
const fvMesh & | mesh_ |
Reference to the mesh database. | |
bool | active_ |
Source active flag. | |
scalar | timeStart_ |
Time start. | |
scalar | duration_ |
Duration. | |
selectionModeType | selectionMode_ |
Cell selection mode. | |
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. |
Friends | |
Ostream & | operator<< (Ostream &os, const explicitSource &source) |
Ostream operator. |
Additional Inherited Members | |
![]() | |
static autoPtr< basicSource > | New (const word &name, const dictionary &dict, const fvMesh &mesh) |
Return a reference to the selected basicSource model. |
enum volumeModeType |
Enumeration for volume types.
Definition at line 154 of file explicitSource.H.
explicitSource | ( | const word & | name, |
const dictionary & | dict, | ||
const fvMesh & | mesh | ||
) |
Construct from components.
Definition at line 166 of file explicitSource.C.
References cells, Foam::endl(), forAll, Foam::Info, Foam::reduce(), Foam::returnReduce(), List< T >::size(), and fvMesh::V().
|
protected |
Helper function to convert from a word to a volumeModeType.
Definition at line 83 of file explicitSource.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, and Foam::nl.
|
protected |
Helper function to convert from a volumeModeType to a word.
Definition at line 108 of file explicitSource.C.
Referenced by explicitSource::writeData().
|
protected |
Set the local field data.
Definition at line 123 of file explicitSource.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, fieldNames, forAll, IOobject::headerClassName(), IOobject::headerOk(), mesh, IOobject::name(), IOobject::NO_READ, IOobject::NO_WRITE, List< T >::size(), timeName, and dictionary::toc().
|
protected |
Set selected cells when smPoint is used.
Definition at line 53 of file explicitSource.C.
References basicSource::cells(), Foam::endl(), primitiveMesh::findCell(), forAll, HashSet< Key, Hash >::insert(), basicSource::mesh(), explicitSource::points_, Foam::returnReduce(), HashTable< T, Key, Hash >::toc(), and WarningIn.
TypeName | ( | "explicitSource" | ) |
Runtime type information.
|
inline |
Return clone.
Reimplemented from basicSource.
Definition at line 213 of file explicitSource.H.
References notImplemented.
|
inline |
Return const access to the volume mode.
Definition at line 31 of file explicitSourceI.H.
References explicitSource::volumeMode_.
|
inline |
Return access to the volume mode.
Definition at line 38 of file explicitSourceI.H.
|
inline |
Return points.
Definition at line 45 of file explicitSourceI.H.
Source term to fvMatrix<vector>
Implements basicSource.
Definition at line 224 of file explicitSource.C.
References IOobject::name(), fvMatrix< Type >::psi(), and fvMatrix< Type >::source().
|
virtual |
Source term to fvMatrix<scalar>
Implements basicSource.
Definition at line 216 of file explicitSource.C.
References IOobject::name(), fvMatrix< Type >::psi(), and fvMatrix< Type >::source().
|
virtual |
|
virtual |
Add source to scalar field.
Implements basicSource.
Definition at line 239 of file explicitSource.C.
References IOobject::name().
|
virtual |
Add source to vector field.
Implements basicSource.
Definition at line 232 of file explicitSource.C.
References IOobject::name().
|
virtual |
Write the source properties.
Implements basicSource.
Definition at line 30 of file explicitSourceIO.C.
References token::BEGIN_BLOCK, Foam::decrIndent(), token::END_BLOCK, token::END_STATEMENT, Foam::endl(), Foam::incrIndent(), Foam::indent(), basicSource::name_, Foam::nl, explicitSource::volumeMode_, explicitSource::volumeModeTypeToWord(), and Ostream::writeKeyword().
|
virtual |
Read fieldData in sub-dictionary.
Implements basicSource.
Definition at line 54 of file explicitSourceIO.C.
References Foam::name(), basicSource::read(), and dictionary::subDict().
|
friend |
Ostream operator.
|
static |
Word list of volume mode type names.
Definition at line 161 of file explicitSource.H.
|
protected |
Sub dictionary for time activated explicit sources.
Reimplemented from basicSource.
Definition at line 169 of file explicitSource.H.
|
protected |
Volume mode.
Definition at line 172 of file explicitSource.H.
Referenced by explicitSource::volumeMode(), and explicitSource::writeData().
List of points for "points" selectionMode.
Definition at line 175 of file explicitSource.H.
Referenced by explicitSource::setSelectedCellsFromPoints().
|
protected |
Volume of the explicit source.
Definition at line 178 of file explicitSource.H.