fvModel Class Reference

Finite volume model abstract base class. More...

Inheritance diagram for fvModel:

Classes

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

Public Member Functions

 TypeName ("fvModel")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, fvModel, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh),(name, modelType, dict, mesh))
 
 fvModel (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 Construct from components. More...
 
autoPtr< fvModelclone () const
 Return clone. More...
 
virtual ~fvModel ()
 Destructor. More...
 
const wordname () const
 Return const access to the source name. More...
 
const fvMeshmesh () const
 Return const access to the mesh database. More...
 
const dictionarycoeffs () const
 Return dictionary. More...
 
virtual wordList addSupFields () const
 Return the list of fields for which the fvModel adds source term. More...
 
virtual bool addsSupToField (const word &fieldName) const
 Return true if the fvModel adds a source term to the given. More...
 
 FOR_ALL_FIELD_TYPES (DEFINE_FV_MODEL_ADD_SUP)
 Add a source term to an equation. More...
 
 FOR_ALL_FIELD_TYPES (DEFINE_FV_MODEL_ADD_RHO_SUP)
 Add a source term to a compressible equation. More...
 
 FOR_ALL_FIELD_TYPES (DEFINE_FV_MODEL_ADD_ALPHA_RHO_SUP)
 Add a source term to a phase equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const GeometricField< Type, fvPatchField, volMesh > &field) const
 Return source for an equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const
 Return source for an equation with a specified name. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field) const
 Return source for a compressible equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const
 Return source for a compressible equation with a specified name. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const volScalarField &alpha, const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field) const
 Return source for a phase equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const volScalarField &alpha, const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const
 Return source for a phase equation with a specified name. More...
 
virtual void preUpdateMesh ()
 Prepare for mesh update. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for mesh changes. More...
 
virtual bool movePoints ()
 Update for mesh motion. More...
 
virtual void correct ()
 Correct the fvModel. More...
 
virtual bool read (const dictionary &dict)
 Read source dictionary. More...
 
template<class Type , class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
Foam::dimensionSet sourceDims (const GeometricField< Type, fvPatchField, volMesh > &field, const dimensionSet &ds, const AlphaRhoFieldType &alphaRho, const AlphaRhoFieldTypes &... alphaRhos)
 
template<class Type >
Foam::dimensionSet sourceDims (const GeometricField< Type, fvPatchField, volMesh > &field, const dimensionSet &ds)
 
template<class Type , class ... AlphaRhoFieldTypes>
Foam::tmp< Foam::fvMatrix< Type > > source (const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName, const dimensionSet &ds, const AlphaRhoFieldTypes &... alphaRhos) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const GeometricField< Type, fvPatchField, volMesh > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const volScalarField &alpha, const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const volScalarField &alpha, const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const
 

Static Public Member Functions

template<class Type , class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
static dimensionSet sourceDims (const GeometricField< Type, fvPatchField, volMesh > &field, const dimensionSet &ds, const AlphaRhoFieldType &alphaRho, const AlphaRhoFieldTypes &... alphaRhos)
 Return the dimensions of the matrix of a source term. More...
 
template<class Type >
static dimensionSet sourceDims (const GeometricField< Type, fvPatchField, volMesh > &field, const dimensionSet &ds)
 Return the dimensions of the matrix of a source term (base. More...
 
static autoPtr< fvModelNew (const word &name, const dictionary &dict, const fvMesh &mesh)
 Return a reference to the selected fvModel. More...
 

Protected Member Functions

template<class Type >
void addSupType (fvMatrix< Type > &eqn, const word &fieldName) const
 Add a source term to an equation. More...
 
template<class Type >
void addSupType (const volScalarField &rho, fvMatrix< Type > &eqn, const word &fieldName) const
 Add a source term to a compressible equation. More...
 
template<class Type >
void addSupType (const volScalarField &alpha, const volScalarField &rho, fvMatrix< Type > &eqn, const word &fieldName) const
 Add a source term to a phase equation. More...
 
template<class Type , class ... AlphaRhoFieldTypes>
tmp< fvMatrix< Type > > source (const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName, const dimensionSet &ds, const AlphaRhoFieldTypes &... alphaRhos) const
 Return source for equation with specified name and dimensions. More...
 

Detailed Description

Finite volume model abstract base class.

Source files

Definition at line 55 of file fvModel.H.

Constructor & Destructor Documentation

◆ fvModel()

fvModel ( const word name,
const word modelType,
const dictionary dict,
const fvMesh mesh 
)

Construct from components.

Definition at line 73 of file fvModel.C.

References Foam::decrIndent(), Foam::endl(), Foam::incrIndent(), Foam::indent(), Foam::Info, and fvModel::New().

Referenced by fvModel::addSupType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~fvModel()

~fvModel ( )
virtual

Destructor.

Definition at line 131 of file fvModel.C.

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

Here is the caller graph for this function:

Member Function Documentation

◆ addSupType() [1/3]

void addSupType ( fvMatrix< Type > &  eqn,
const word fieldName 
) const
protected

Add a source term to an equation.

Definition at line 42 of file fvModel.C.

Referenced by fvModel::addSupType().

Here is the caller graph for this function:

◆ addSupType() [2/3]

void addSupType ( const volScalarField rho,
fvMatrix< Type > &  eqn,
const word fieldName 
) const
protected

Add a source term to a compressible equation.

Definition at line 51 of file fvModel.C.

References fvModel::addSupType().

Here is the call graph for this function:

◆ addSupType() [3/3]

void addSupType ( const volScalarField alpha,
const volScalarField rho,
fvMatrix< Type > &  eqn,
const word fieldName 
) const
protected

Add a source term to a phase equation.

Definition at line 61 of file fvModel.C.

References fvModel::fvModel().

Here is the call graph for this function:

◆ source() [1/14]

tmp<fvMatrix<Type> > source ( const GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName,
const dimensionSet ds,
const AlphaRhoFieldTypes &...  alphaRhos 
) const
protected

Return source for equation with specified name and dimensions.

Referenced by fvModel::iNew::operator()(), fvModel::source(), and fvModel::sourceDims().

Here is the caller graph for this function:

◆ TypeName()

TypeName ( "fvModel"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
fvModel  ,
dictionary  ,
(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh ,
(name, modelType, dict, mesh  
)

◆ sourceDims() [1/4]

static dimensionSet sourceDims ( const GeometricField< Type, fvPatchField, volMesh > &  field,
const dimensionSet ds,
const AlphaRhoFieldType &  alphaRho,
const AlphaRhoFieldTypes &...  alphaRhos 
)
inlinestatic

Return the dimensions of the matrix of a source term.

Referenced by fvModel::sourceDims().

Here is the caller graph for this function:

◆ sourceDims() [2/4]

static dimensionSet sourceDims ( const GeometricField< Type, fvPatchField, volMesh > &  field,
const dimensionSet ds 
)
inlinestatic

Return the dimensions of the matrix of a source term (base.

condition for the above)

◆ clone()

autoPtr<fvModel> clone ( ) const
inline

Return clone.

Definition at line 180 of file fvModel.H.

References fvModel::iNew::iNew(), and NotImplemented.

Here is the call graph for this function:

◆ New()

Foam::autoPtr< Foam::fvModel > New ( const word name,
const dictionary dict,
const fvMesh mesh 
)
static

Return a reference to the selected fvModel.

Definition at line 94 of file fvModel.C.

References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::indent(), Foam::Info, Foam::libs, dictionary::lookup(), mesh, Foam::name(), Foam::nl, and dlLibraryTable::open().

Referenced by fvModel::fvModel(), fvModels::fvModels(), and fvModel::iNew::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

const Foam::word & name ( ) const
inline

Return const access to the source name.

Definition at line 28 of file fvModelI.H.

Referenced by fvModel::iNew::operator()(), fvModels::read(), and fvModels::source().

Here is the caller graph for this function:

◆ mesh()

const Foam::fvMesh & mesh ( ) const
inline

Return const access to the mesh database.

Definition at line 34 of file fvModelI.H.

Referenced by interRegionModel::nbrMesh(), and fvModel::iNew::operator()().

Here is the caller graph for this function:

◆ coeffs()

const Foam::dictionary & coeffs ( ) const
inline

Return dictionary.

Definition at line 40 of file fvModelI.H.

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

Here is the caller graph for this function:

◆ addSupFields()

◆ addsSupToField()

bool addsSupToField ( const word fieldName) const
virtual

Return true if the fvModel adds a source term to the given.

field's transport equation

Reimplemented in volumeFractionSource, and massSource.

Definition at line 143 of file fvModel.C.

References Foam::findIndex(), FOR_ALL_FIELD_TYPES(), IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_SUP, IMPLEMENT_FV_MODEL_ADD_RHO_SUP, and IMPLEMENT_FV_MODEL_ADD_SUP.

Referenced by fvModel::iNew::operator()(), and fvModels::source().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FOR_ALL_FIELD_TYPES() [1/3]

FOR_ALL_FIELD_TYPES ( DEFINE_FV_MODEL_ADD_SUP  )

Add a source term to an equation.

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

Here is the caller graph for this function:

◆ FOR_ALL_FIELD_TYPES() [2/3]

FOR_ALL_FIELD_TYPES ( DEFINE_FV_MODEL_ADD_RHO_SUP  )

Add a source term to a compressible equation.

◆ FOR_ALL_FIELD_TYPES() [3/3]

FOR_ALL_FIELD_TYPES ( DEFINE_FV_MODEL_ADD_ALPHA_RHO_SUP  )

Add a source term to a phase equation.

◆ source() [2/14]

tmp<fvMatrix<Type> > source ( const GeometricField< Type, fvPatchField, volMesh > &  field) const

Return source for an equation.

◆ source() [3/14]

tmp<fvMatrix<Type> > source ( const GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
) const

Return source for an equation with a specified name.

◆ source() [4/14]

tmp<fvMatrix<Type> > source ( const volScalarField rho,
const GeometricField< Type, fvPatchField, volMesh > &  field 
) const

Return source for a compressible equation.

◆ source() [5/14]

tmp<fvMatrix<Type> > source ( const volScalarField rho,
const GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
) const

Return source for a compressible equation with a specified name.

◆ source() [6/14]

tmp<fvMatrix<Type> > source ( const volScalarField alpha,
const volScalarField rho,
const GeometricField< Type, fvPatchField, volMesh > &  field 
) const

Return source for a phase equation.

◆ source() [7/14]

tmp<fvMatrix<Type> > source ( const volScalarField alpha,
const volScalarField rho,
const GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
) const

Return source for a phase equation with a specified name.

◆ preUpdateMesh()

void preUpdateMesh ( )
virtual

Prepare for mesh update.

Reimplemented in clouds.

Definition at line 166 of file fvModel.C.

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

Here is the caller graph for this function:

◆ updateMesh()

void updateMesh ( const mapPolyMesh mpm)
virtual

◆ movePoints()

bool movePoints ( )
virtual

Update for mesh motion.

Definition at line 174 of file fvModel.C.

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

Here is the caller graph for this function:

◆ correct()

void correct ( )
virtual

Correct the fvModel.

e.g. solve equations, update model, for film, Lagrangian etc.

Reimplemented in interRegionHeatTransfer, heatTransfer, VoFClouds, VoFSurfaceFilm, clouds, and surfaceFilm.

Definition at line 180 of file fvModel.C.

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

Here is the caller graph for this function:

◆ read()

◆ sourceDims() [3/4]

Foam::dimensionSet sourceDims ( const GeometricField< Type, fvPatchField, volMesh > &  field,
const dimensionSet ds,
const AlphaRhoFieldType &  alphaRho,
const AlphaRhoFieldTypes &...  alphaRhos 
)

Definition at line 30 of file fvModelTemplates.C.

References fvModel::sourceDims().

Here is the call graph for this function:

◆ sourceDims() [4/4]

Foam::dimensionSet sourceDims ( const GeometricField< Type, fvPatchField, volMesh > &  field,
const dimensionSet ds 
)

Definition at line 43 of file fvModelTemplates.C.

References DimensionedField< Type, GeoMesh >::dimensions(), and fvModel::source().

Here is the call graph for this function:

◆ source() [8/14]

Foam::tmp<Foam::fvMatrix<Type> > source ( const GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName,
const dimensionSet ds,
const AlphaRhoFieldTypes &...  alphaRhos 
) const

Definition at line 56 of file fvModelTemplates.C.

References tmp< T >::ref(), and fvModel::source().

Here is the call graph for this function:

◆ source() [9/14]

Foam::tmp<Foam::fvMatrix<Type> > source ( const GeometricField< Type, fvPatchField, volMesh > &  field) const

Definition at line 86 of file fvModelTemplates.C.

References IOobject::name(), source(), and fvModel::source().

Here is the call graph for this function:

◆ source() [10/14]

Foam::tmp<Foam::fvMatrix<Type> > source ( const GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
) const

Definition at line 96 of file fvModelTemplates.C.

References Foam::dimTime, Foam::dimVolume, source(), and fvModel::source().

Here is the call graph for this function:

◆ source() [11/14]

Foam::tmp<Foam::fvMatrix<Type> > source ( const volScalarField rho,
const GeometricField< Type, fvPatchField, volMesh > &  field 
) const

Definition at line 107 of file fvModelTemplates.C.

References IOobject::name(), source(), and fvModel::source().

Here is the call graph for this function:

◆ source() [12/14]

Foam::tmp<Foam::fvMatrix<Type> > source ( const volScalarField rho,
const GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
) const

Definition at line 118 of file fvModelTemplates.C.

References Foam::dimTime, Foam::dimVolume, source(), and fvModel::source().

Here is the call graph for this function:

◆ source() [13/14]

Foam::tmp<Foam::fvMatrix<Type> > source ( const volScalarField alpha,
const volScalarField rho,
const GeometricField< Type, fvPatchField, volMesh > &  field 
) const

Definition at line 130 of file fvModelTemplates.C.

References IOobject::name(), source(), and fvModel::source().

Here is the call graph for this function:

◆ source() [14/14]

Foam::tmp<Foam::fvMatrix<Type> > source ( const volScalarField alpha,
const volScalarField rho,
const GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
) const

Definition at line 142 of file fvModelTemplates.C.

References Foam::dimTime, Foam::dimVolume, and source().

Here is the call graph for this function:

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