fvModel Class Referenceabstract

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 fvMesh &mesh, const dictionary &dict),(name, modelType, mesh, dict))
 
 fvModel (const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
 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...
 
virtual scalar maxDeltaT () const
 Return the maximum time-step for stable operation. 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 VolField< Type > &field) const
 Return source for an equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const VolField< Type > &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 VolField< Type > &field) const
 Return source for a compressible equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const volScalarField &rho, const VolField< Type > &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 VolField< Type > &field) const
 Return source for a phase equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const volScalarField &alpha, const volScalarField &rho, const VolField< Type > &field, const word &fieldName) const
 Return source for a phase equation with a specified name. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const volScalarField &alpha, const geometricOneField &rho, const VolField< Type > &field) const
 Return source for a phase equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const geometricOneField &alpha, const volScalarField &rho, const VolField< Type > &field) const
 Return source for a phase equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (const geometricOneField &alpha, const geometricOneField &rho, const VolField< Type > &field) const
 Return source for a phase equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > d2dt2 (const VolField< Type > &field) const
 Return source for an equation with a second time derivative. More...
 
template<class Type >
tmp< fvMatrix< Type > > d2dt2 (const VolField< Type > &field, const word &fieldName) const
 Return source for an equation with a second time derivative. More...
 
virtual void preUpdateMesh ()
 Prepare for mesh update. More...
 
virtual bool movePoints ()=0
 Update for mesh motion. More...
 
virtual void topoChange (const polyTopoChangeMap &)=0
 Update topology using the given map. More...
 
virtual void mapMesh (const polyMeshMap &)=0
 Update from another mesh using the given map. More...
 
virtual void distribute (const polyDistributionMap &)=0
 Redistribute or update using the given distribution map. 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 VolField< Type > &field, const dimensionSet &ds, const AlphaRhoFieldType &alphaRho, const AlphaRhoFieldTypes &... alphaRhos)
 
template<class Type >
Foam::dimensionSet sourceDims (const VolField< Type > &field, const dimensionSet &ds)
 
template<class Type , class ... AlphaRhoFieldTypes>
Foam::tmp< Foam::fvMatrix< Type > > source (const VolField< Type > &field, const word &fieldName, const dimensionSet &ds, const AlphaRhoFieldTypes &... alphaRhos) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const VolField< Type > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const VolField< Type > &field, const word &fieldName) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const volScalarField &rho, const VolField< Type > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const volScalarField &rho, const VolField< Type > &field, const word &fieldName) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const volScalarField &alpha, const volScalarField &rho, const VolField< Type > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const volScalarField &alpha, const volScalarField &rho, const VolField< Type > &field, const word &fieldName) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const geometricOneField &alpha, const geometricOneField &rho, const VolField< Type > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const volScalarField &alpha, const geometricOneField &rho, const VolField< Type > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (const geometricOneField &alpha, const volScalarField &rho, const VolField< Type > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > d2dt2 (const VolField< Type > &field) const
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > d2dt2 (const VolField< Type > &field, const word &fieldName) const
 

Static Public Member Functions

template<class Type , class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
static dimensionSet sourceDims (const VolField< Type > &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 VolField< Type > &field, const dimensionSet &ds)
 Return the dimensions of the matrix of a source term (base. More...
 
static autoPtr< fvModelNew (const word &name, const fvMesh &mesh, const dictionary &dict)
 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 VolField< Type > &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 58 of file fvModel.H.

Constructor & Destructor Documentation

◆ fvModel()

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

Construct from components.

Definition at line 72 of file fvModel.C.

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

Here is the call graph for this function:

◆ ~fvModel()

~fvModel ( )
virtual

Destructor.

Definition at line 154 of file fvModel.C.

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 41 of file fvModel.C.

◆ 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 50 of file fvModel.C.

◆ 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 60 of file fvModel.C.

◆ source() [1/20]

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

Return source for equation with specified name and dimensions.

◆ TypeName()

TypeName ( "fvModel"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

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

◆ sourceDims() [1/4]

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

Return the dimensions of the matrix of a source term.

Referenced by fvModels::source(), and fvModel::sourceDims().

Here is the caller graph for this function:

◆ sourceDims() [2/4]

static dimensionSet sourceDims ( const VolField< Type > &  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 183 of file fvModel.H.

References NotImplemented.

◆ New()

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

Return a reference to the selected fvModel.

Definition at line 93 of file fvModel.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::FatalIOError, FatalIOErrorInFunction, Foam::indent(), Foam::Info, Foam::libs, dictionary::lookup(), Foam::name(), Foam::nl, dlLibraryTable::open(), and string::remove().

Referenced by 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 interRegionExplicitPorositySource::interRegionExplicitPorositySource(), fvModels::read(), and fvModels::source().

Here is the caller graph for this function:

◆ mesh()

◆ coeffs()

const Foam::dictionary & coeffs ( ) const
inline

Return dictionary.

Definition at line 40 of file fvModelI.H.

Referenced by interRegionExplicitPorositySource::interRegionExplicitPorositySource(), and forcing::readCoeffs().

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, massSourceBase, and zeroDimensionalFixedPressureModel.

Definition at line 166 of file fvModel.C.

References Foam::findIndex().

Referenced by fvModels::source().

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

◆ maxDeltaT()

Foam::scalar maxDeltaT ( ) const
virtual

Return the maximum time-step for stable operation.

Definition at line 172 of file fvModel.C.

◆ FOR_ALL_FIELD_TYPES() [1/3]

FOR_ALL_FIELD_TYPES ( DEFINE_FV_MODEL_ADD_SUP  )

Add a source term to an equation.

◆ 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/20]

tmp<fvMatrix<Type> > source ( const VolField< Type > &  field) const

Return source for an equation.

◆ source() [3/20]

tmp<fvMatrix<Type> > source ( const VolField< Type > &  field,
const word fieldName 
) const

Return source for an equation with a specified name.

◆ source() [4/20]

tmp<fvMatrix<Type> > source ( const volScalarField rho,
const VolField< Type > &  field 
) const

Return source for a compressible equation.

◆ source() [5/20]

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

Return source for a compressible equation with a specified name.

◆ source() [6/20]

tmp<fvMatrix<Type> > source ( const volScalarField alpha,
const volScalarField rho,
const VolField< Type > &  field 
) const

Return source for a phase equation.

◆ source() [7/20]

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

Return source for a phase equation with a specified name.

◆ source() [8/20]

tmp<fvMatrix<Type> > source ( const volScalarField alpha,
const geometricOneField rho,
const VolField< Type > &  field 
) const

Return source for a phase equation.

◆ source() [9/20]

tmp<fvMatrix<Type> > source ( const geometricOneField alpha,
const volScalarField rho,
const VolField< Type > &  field 
) const

Return source for a phase equation.

◆ source() [10/20]

tmp<fvMatrix<Type> > source ( const geometricOneField alpha,
const geometricOneField rho,
const VolField< Type > &  field 
) const

Return source for a phase equation.

◆ d2dt2() [1/4]

tmp<fvMatrix<Type> > d2dt2 ( const VolField< Type > &  field) const

Return source for an equation with a second time derivative.

◆ d2dt2() [2/4]

tmp<fvMatrix<Type> > d2dt2 ( const VolField< Type > &  field,
const word fieldName 
) const

Return source for an equation with a second time derivative.

◆ preUpdateMesh()

void preUpdateMesh ( )
virtual

Prepare for mesh update.

Reimplemented in clouds, and VoFClouds.

Definition at line 195 of file fvModel.C.

◆ movePoints()

◆ topoChange()

◆ mapMesh()

◆ distribute()

◆ correct()

void correct ( )
virtual

Correct the fvModel.

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

Reimplemented in waveForcing, clouds, interRegionHeatTransfer, zeroDimensionalMassSourceBase, heatTransfer, VoFFilmTransfer, filmVoFTransfer, filmCloudTransfer, VoFCavitation, VoFSolidificationMeltingSource, VoFClouds, and VoFCavitation.

Definition at line 199 of file fvModel.C.

◆ read()

◆ sourceDims() [3/4]

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

Definition at line 29 of file fvModelTemplates.C.

References fvModel::sourceDims().

Here is the call graph for this function:

◆ sourceDims() [4/4]

Foam::dimensionSet sourceDims ( const VolField< Type > &  field,
const dimensionSet ds 
)

Definition at line 42 of file fvModelTemplates.C.

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

Here is the call graph for this function:

◆ source() [11/20]

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

Definition at line 55 of file fvModelTemplates.C.

References tmp< T >::ref().

Here is the call graph for this function:

◆ source() [12/20]

Foam::tmp<Foam::fvMatrix<Type> > source ( const VolField< Type > &  field) const

Definition at line 85 of file fvModelTemplates.C.

References IOobject::name().

Here is the call graph for this function:

◆ source() [13/20]

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

Definition at line 95 of file fvModelTemplates.C.

References Foam::dimTime, and Foam::dimVolume.

◆ source() [14/20]

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

Definition at line 106 of file fvModelTemplates.C.

References IOobject::name(), and rho.

Here is the call graph for this function:

◆ source() [15/20]

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

Definition at line 117 of file fvModelTemplates.C.

References Foam::dimTime, Foam::dimVolume, and rho.

◆ source() [16/20]

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

Definition at line 129 of file fvModelTemplates.C.

References alpha(), IOobject::name(), and rho.

Here is the call graph for this function:

◆ source() [17/20]

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

Definition at line 141 of file fvModelTemplates.C.

References alpha(), Foam::dimTime, Foam::dimVolume, and rho.

Here is the call graph for this function:

◆ source() [18/20]

Foam::tmp<Foam::fvMatrix<Type> > source ( const geometricOneField alpha,
const geometricOneField rho,
const VolField< Type > &  field 
) const

Definition at line 154 of file fvModelTemplates.C.

References IOobject::name().

Here is the call graph for this function:

◆ source() [19/20]

Foam::tmp<Foam::fvMatrix<Type> > source ( const volScalarField alpha,
const geometricOneField rho,
const VolField< Type > &  field 
) const

Definition at line 166 of file fvModelTemplates.C.

References alpha(), Foam::dimless, IOobject::name(), IOobject::NO_READ, and IOobject::NO_WRITE.

Here is the call graph for this function:

◆ source() [20/20]

Foam::tmp<Foam::fvMatrix<Type> > source ( const geometricOneField alpha,
const volScalarField rho,
const VolField< Type > &  field 
) const

Definition at line 193 of file fvModelTemplates.C.

References IOobject::name(), and rho.

Here is the call graph for this function:

◆ d2dt2() [3/4]

Foam::tmp<Foam::fvMatrix<Type> > d2dt2 ( const VolField< Type > &  field) const

Definition at line 207 of file fvModelTemplates.C.

References Foam::fvc::d2dt2(), and IOobject::name().

Here is the call graph for this function:

◆ d2dt2() [4/4]

Foam::tmp<Foam::fvMatrix<Type> > d2dt2 ( const VolField< Type > &  field,
const word fieldName 
) const

Definition at line 217 of file fvModelTemplates.C.

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

Here is the call graph for this function:

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