FreeFOAM The Cross-Platform CFD Toolkit
explicitSource Class Reference

Explicit source. More...

#include <finiteVolume/explicitSource.H>


Detailed Description

Explicit source.

Sources described by:

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; } }

Source files

Definition at line 69 of file explicitSource.H.

+ Inheritance diagram for explicitSource:
+ Collaboration diagram for explicitSource:

List of all members.

Classes

class  fieldList

Public Types

enum  volumeModeType { vmAbsolute, vmSpecific }
 Enumeration for volume types. More...
- Public Types inherited from basicSource
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< explicitSourceclone () const
 Return clone.
const volumeModeTypevolumeMode () const
 Return const access to the volume mode.
volumeModeTypevolumeMode ()
 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.
- Public Member Functions inherited from basicSource
 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 wordname () const
 Return const access to the source name.
const fvMeshmesh () const
 Return const access to the mesh database.
const dictionarydictCoeffs () 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 selectionModeTypeselectionMode () const
 Return const access to the cell selection mode.
const wordcellSetName () const
 Return const access to the name of cell set for "cellSet".
scalar V () const
 Return const access to the total cell volume.
const labelListcells () const
 Return const access to the cell set.
wordname ()
 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.
selectionModeTypeselectionMode ()
 Return access to the cell selection mode.
List< point > & points ()
 Return access to the list of points for "points" selectionMode.
wordcellSetName ()
 Return access to the name of cell set for "cellSet".
scalar & V ()
 Return access to the total cell volume.
labelListcells ()
 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 Public Attributes inherited from basicSource
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.
- Protected Member Functions inherited from basicSource
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 dictionarydict_
 Sub dictionary for time activated explicit sources.
volumeModeType volumeMode_
 Volume mode.
List< pointpoints_
 List of points for "points" selectionMode.
scalarList volSource_
 Volume of the explicit source.
- Protected Attributes inherited from basicSource
word name_
 Source name.
const fvMeshmesh_
 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

Ostreamoperator<< (Ostream &os, const explicitSource &source)
 Ostream operator.

Additional Inherited Members

- Static Public Member Functions inherited from basicSource
static autoPtr< basicSourceNew (const word &name, const dictionary &dict, const fvMesh &mesh)
 Return a reference to the selected basicSource model.

Member Enumeration Documentation

Enumeration for volume types.

Enumerator:
vmAbsolute 
vmSpecific 

Definition at line 154 of file explicitSource.H.


Constructor & Destructor Documentation

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().


Member Function Documentation

Foam::explicitSource::volumeModeType wordToVolumeModeType ( const word vtName) const
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.

Foam::word volumeModeTypeToWord ( const volumeModeType vtType) const
protected

Helper function to convert from a volumeModeType to a word.

Definition at line 108 of file explicitSource.C.

Referenced by explicitSource::writeData().

void setSelectedCellsFromPoints ( )
protected
TypeName ( "explicitSource"  )

Runtime type information.

autoPtr<explicitSource> clone ( ) const
inline

Return clone.

Reimplemented from basicSource.

Definition at line 213 of file explicitSource.H.

References notImplemented.

const Foam::explicitSource::volumeModeType & volumeMode ( ) const
inline

Return const access to the volume mode.

Definition at line 31 of file explicitSourceI.H.

References explicitSource::volumeMode_.

Foam::explicitSource::volumeModeType & volumeMode ( )
inline

Return access to the volume mode.

Definition at line 38 of file explicitSourceI.H.

const Foam::List< Foam::point > & points ( ) const
inline

Return points.

Definition at line 45 of file explicitSourceI.H.

void addSu ( fvMatrix< vector > &  UEqn)
virtual

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().

void addSu ( fvMatrix< scalar > &  UEqn)
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().

void addExplicitSources ( )
virtual

Add all explicit source.

Implements basicSource.

Definition at line 246 of file explicitSource.C.

void addSu ( DimensionedField< vector, volMesh > &  field)
virtual

Add source to scalar field.

Implements basicSource.

Definition at line 239 of file explicitSource.C.

References IOobject::name().

void addSu ( DimensionedField< scalar, volMesh > &  field)
virtual

Add source to vector field.

Implements basicSource.

Definition at line 232 of file explicitSource.C.

References IOobject::name().

bool read ( const dictionary dict)
virtual

Read fieldData in sub-dictionary.

Implements basicSource.

Definition at line 54 of file explicitSourceIO.C.

References Foam::name(), basicSource::read(), and dictionary::subDict().


Friends And Related Function Documentation

Ostream& operator<< ( Ostream os,
const explicitSource source 
)
friend

Ostream operator.


Member Data Documentation

const Foam::wordList volumeModeTypeNames_
static

Word list of volume mode type names.

Definition at line 161 of file explicitSource.H.

const dictionary& dict_
protected

Sub dictionary for time activated explicit sources.

Reimplemented from basicSource.

Definition at line 169 of file explicitSource.H.

volumeModeType volumeMode_
protected

Volume mode.

Definition at line 172 of file explicitSource.H.

Referenced by explicitSource::volumeMode(), and explicitSource::writeData().

List<point> points_
protected

List of points for "points" selectionMode.

Definition at line 175 of file explicitSource.H.

Referenced by explicitSource::setSelectedCellsFromPoints().

scalarList volSource_
protected

Volume of the explicit source.

Definition at line 178 of file explicitSource.H.


The documentation for this class was generated from the following files: