FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

Basic source abtract class. More...

#include <finiteVolume/basicSource.H>


Detailed Description

Basic source abtract class.

Sources described by:

source1 { typeModel actuationDiskSource; // explicitSource active on;// on/off switch timeStart 0.0; // start time duration1000.0;// duration selectionMode cellSet; // cellSet // points //cellZone cellSet c0;// cellSet name

actuationDiskSourceCoeffs { diskDir (-1 0 0); // orientation of the disk Cp 0.53; // Cp Ct 0.58; // Ct diskArea40; // disk area } }

source2 { typeModel explicitSource; active on; timeStart 0.0; duration1000.0; selectionMode points; cellSet c0;

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 { k 30.7; epsilon 1.5; } } }

Source files

Definition at line 102 of file basicSource.H.

Inheritance diagram for basicSource:
Collaboration diagram for basicSource:

List of all members.

Classes

class  iNew
 Return pointer to new basicSource object created. More...

Public Types

enum  selectionModeType { smPoints, smCellSet, smCellZone, smAll }
 

Enumeration for selection mode types.

More...

Public Member Functions

 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.
autoPtr< basicSource >  clone () const
 Return clone.
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?
virtual void  addExplicitSources ()=0
 Add all explicit sources.
virtual void  addSu (DimensionedField< scalar, volMesh > &field)=0
 Add source to scalar field.
virtual void  addSu (DimensionedField< vector, volMesh > &field)=0
 Add source to vector field.
virtual void  addSu (fvMatrix< vector > &Eqn)=0
 Add source term to vector fvMatrix.
virtual void  addSu (fvMatrix< scalar > &Eqn)=0
 Add source term to scalar fvMatrix.
virtual void  writeData (Ostream &) const =0
 Write the source properties.
virtual bool  read (const dictionary &dict)=0
 Read source dictionary.

Static Public Member Functions

static autoPtr< basicSource >  New (const word &name, const dictionary &dict, const fvMesh &mesh)
 Return a reference to the selected basicSource model.

Static Public Attributes

static const wordList  selectionModeTypeNames_
 Word list of selection mode type names.

Protected Member Functions

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

word  name_
 Source name.
const fvMesh &  mesh_
 Reference to the mesh database.
const dictionary &  dict_
 Dictionary containing the data of the source.
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.

Member Enumeration Documentation

Enumeration for selection mode types.

Enumerator:
smPoints 
smCellSet 
smCellZone 
smAll 

Definition at line 109 of file basicSource.H.


Constructor & Destructor Documentation

basicSource ( const word &   name,
const dictionary &   dict,
const fvMesh &   mesh  
)

Construct from components.

Definition at line 203 of file basicSource.C.

virtual ~basicSource (  ) [inline, virtual]

Destructor.

Definition at line 263 of file basicSource.H.


Member Function Documentation

Foam::basicSource::selectionModeType wordToSelectionModeType ( const word &   smtName  ) const [protected]

Helper function to convert from a word to a selectionModeType.

Definition at line 51 of file basicSource.C.

References Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, and Foam::nl.

Foam::word selectionModeTypeToWord ( const selectionModeType &   smtType  ) const [protected]

Helper function to convert from a selectionModeType to a word.

Definition at line 79 of file basicSource.C.

Referenced by basicSource::writeData().

void setCellSet (  ) [protected]
TypeName ( "basicSource"    )

Runtime type information.

declareRunTimeSelectionTable ( autoPtr   ,
basicSource   ,
dictionary   ,
(const word &name, const dictionary &dict, const fvMesh &mesh)   ,
(name, dict, mesh)    
)
autoPtr<basicSource> clone (  ) const [inline]

Return clone.

Reimplemented in explicitSource.

Definition at line 204 of file basicSource.H.

References notImplemented.

Foam::autoPtr< Foam::basicSource > New ( const word &   name,
const dictionary &   dict,
const fvMesh &   mesh  
) [static]

Return a reference to the selected basicSource model.

Definition at line 228 of file basicSource.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::Info, dictionary::lookup(), mesh, Foam::name(), and Foam::nl.

Referenced by basicSource::iNew::operator()().

const Foam::word & name (  ) const [inline]

Return const access to the source name.

Definition at line 30 of file basicSourceI.H.

References basicSource::name_.

const Foam::fvMesh & mesh (  ) const [inline]

Return const access to the mesh database.

Definition at line 36 of file basicSourceI.H.

Referenced by explicitSource::setSelectedCellsFromPoints().

const Foam::dictionary & dictCoeffs (  ) const [inline]

Return dictionay.

Definition at line 41 of file basicSourceI.H.

bool active (  ) const [inline]

Return const access to the source active flag.

Definition at line 46 of file basicSourceI.H.

Foam::scalar timeStart (  ) const [inline]

Return const access to the time start.

Definition at line 52 of file basicSourceI.H.

Foam::scalar duration (  ) const [inline]

Return const access to the duration.

Definition at line 58 of file basicSourceI.H.

Foam::scalar timeEnd (  ) const [inline]

Return const access to the time end.

Definition at line 64 of file basicSourceI.H.

const Foam::basicSource::selectionModeType & selectionMode (  ) const [inline]

Return const access to the cell selection mode.

Definition at line 71 of file basicSourceI.H.

const Foam::word & cellSetName (  ) const [inline]

Return const access to the name of cell set for "cellSet".

selectionMode

Definition at line 77 of file basicSourceI.H.

Foam::scalar V (  ) const [inline]

Return const access to the total cell volume.

Definition at line 83 of file basicSourceI.H.

const Foam::labelList & cells (  ) const [inline]

Return const access to the cell set.

Definition at line 89 of file basicSourceI.H.

Referenced by explicitSource::setSelectedCellsFromPoints().

Foam::word & name (  ) [inline]

Return access to the source name.

Definition at line 95 of file basicSourceI.H.

bool & active (  ) [inline]

Return access to the source active flag.

Definition at line 101 of file basicSourceI.H.

Foam::scalar & timeStart (  ) [inline]

Return access to the time start.

Definition at line 107 of file basicSourceI.H.

Foam::scalar & duration (  ) [inline]

Return access to the duration.

Definition at line 113 of file basicSourceI.H.

Foam::basicSource::selectionModeType & selectionMode (  ) [inline]

Return access to the cell selection mode.

Definition at line 126 of file basicSourceI.H.

List<point>& points (  ) [inline]

Return access to the list of points for "points" selectionMode.

Foam::word & cellSetName (  ) [inline]

Return access to the name of cell set for "cellSet".

selectionMode

Definition at line 119 of file basicSourceI.H.

Foam::scalar & V (  ) [inline]

Return access to the total cell volume.

Definition at line 132 of file basicSourceI.H.

Foam::labelList & cells (  ) [inline]

Return access to the cell set.

Definition at line 138 of file basicSourceI.H.

bool isActive (  )

Is the source active?

Definition at line 260 of file basicSource.C.

virtual void addExplicitSources (  ) [pure virtual]

Add all explicit sources.

Implemented in actuationDiskSource, and explicitSource.

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

Add source to scalar field.

Implemented in actuationDiskSource, and explicitSource.

Referenced by basicSourceList::addSu().

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

Add source to vector field.

Implemented in actuationDiskSource, and explicitSource.

virtual void addSu ( fvMatrix< vector > &   Eqn  ) [pure virtual]

Add source term to vector fvMatrix.

Implemented in actuationDiskSource, and explicitSource.

virtual void addSu ( fvMatrix< scalar > &   Eqn  ) [pure virtual]

Add source term to scalar fvMatrix.

Implemented in actuationDiskSource, and explicitSource.

bool read ( const dictionary &   dict  ) [pure virtual]

Read source dictionary.

Implemented in actuationDiskSource, and explicitSource.

Definition at line 72 of file basicSourceIO.C.

References dictionary::lookup(), Foam::readBool(), Foam::readScalar(), and dictionary::subDict().

Referenced by explicitSource::read(), and actuationDiskSource::read().


Member Data Documentation

Word list of selection mode type names.

Definition at line 118 of file basicSource.H.

Referenced by basicSource::setSelection().

word name_ [protected]

Source name.

Definition at line 126 of file basicSource.H.

Referenced by basicSource::name(), explicitSource::writeData(), and basicSource::writeData().

const fvMesh& mesh_ [protected]

Reference to the mesh database.

Definition at line 129 of file basicSource.H.

const dictionary& dict_ [protected]

Dictionary containing the data of the source.

Reimplemented in explicitSource.

Definition at line 132 of file basicSource.H.

bool active_ [protected]

Source active flag.

Definition at line 135 of file basicSource.H.

Referenced by basicSource::writeData().

scalar timeStart_ [protected]

Time start.

Definition at line 138 of file basicSource.H.

Referenced by basicSource::writeData().

scalar duration_ [protected]

Duration.

Definition at line 141 of file basicSource.H.

Referenced by basicSource::writeData().

Cell selection mode.

Definition at line 144 of file basicSource.H.

Referenced by basicSource::setSelection(), and basicSource::writeData().

word cellSetName_ [protected]

Name of cell set for "cellSet" and "cellZone" selectionMode.

Definition at line 147 of file basicSource.H.

Referenced by basicSource::setSelection(), and basicSource::writeData().

labelList cells_ [protected]

Set of cells to apply source to.

Definition at line 150 of file basicSource.H.

scalar V_ [protected]

Sum of cell volumes.

Definition at line 153 of file basicSource.H.


The documentation for this class was generated from the following files:
  • src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.H
  • src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.C
  • src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceI.H
  • src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceIO.C