Finite volume model abstract base class. More...
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< fvModel > | clone () const |
Return clone. More... | |
virtual | ~fvModel () |
Destructor. More... | |
const word & | name () const |
Return const access to the source name. More... | |
const fvMesh & | mesh () const |
Return const access to the mesh database. More... | |
const dictionary & | coeffs () 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 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 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 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< fvModel > | New (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... | |
Finite volume model abstract base class.
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().
|
virtual |
Destructor.
Definition at line 131 of file fvModel.C.
Referenced by fvModel::iNew::operator()().
Add a source term to an equation.
Definition at line 42 of file fvModel.C.
Referenced by fvModel::addSupType().
|
protected |
Add a source term to a compressible equation.
Definition at line 51 of file fvModel.C.
References fvModel::addSupType().
|
protected |
Add a source term to a phase equation.
Definition at line 61 of file fvModel.C.
References fvModel::fvModel().
|
protected |
Return source for equation with specified name and dimensions.
Referenced by fvModel::iNew::operator()(), fvModel::source(), and fvModel::sourceDims().
TypeName | ( | "fvModel" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
fvModel | , | ||
dictionary | , | ||
(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh) | , | ||
(name, modelType, dict, mesh) | |||
) |
|
inlinestatic |
Return the dimensions of the matrix of a source term.
Referenced by fvModel::sourceDims().
|
inlinestatic |
Return the dimensions of the matrix of a source term (base.
condition for the above)
Return clone.
Definition at line 182 of file fvModel.H.
References fvModel::iNew::iNew(), and NotImplemented.
|
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()().
|
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().
|
inline |
Return const access to the mesh database.
Definition at line 34 of file fvModelI.H.
Referenced by interRegionModel::nbrMesh(), and fvModel::iNew::operator()().
|
inline |
Return dictionary.
Definition at line 40 of file fvModelI.H.
Referenced by fvModel::iNew::operator()().
|
virtual |
Return the list of fields for which the fvModel adds source term.
to the transport equation
Reimplemented in solidificationMeltingSource, rotorDiskSource, effectivenessHeatExchangerSource, volumeFractionSource, semiImplicitSource, actuationDiskSource, VoFSolidificationMeltingSource, massSource, codedFvModel, clouds, interfaceTurbulenceDamping, interRegionHeatTransfer, VoFTurbulenceDamping, VoFTurbulenceDamping, phaseTurbulenceStabilisation, explicitPorositySource, heatTransfer, solidEquilibriumEnergySource, sixDoFAccelerationSource, interRegionExplicitPorositySource, phaseLimitStabilisation, accelerationSource, damping, VoFClouds, buoyancyForce, heatSource, buoyancyEnergy, surfaceFilm, VoFSurfaceFilm, and radiation.
Definition at line 137 of file fvModel.C.
References List< T >::null().
Referenced by fvModel::iNew::operator()().
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().
Referenced by fvModel::iNew::operator()(), and fvModels::source().
|
virtual |
Return the maximum time-step for stable operation.
Reimplemented in surfaceFilm, and VoFSurfaceFilm.
Definition at line 149 of file fvModel.C.
References Foam::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()().
FOR_ALL_FIELD_TYPES | ( | DEFINE_FV_MODEL_ADD_SUP | ) |
Add a source term to an equation.
Referenced by fvModel::iNew::operator()().
FOR_ALL_FIELD_TYPES | ( | DEFINE_FV_MODEL_ADD_RHO_SUP | ) |
Add a source term to a compressible equation.
FOR_ALL_FIELD_TYPES | ( | DEFINE_FV_MODEL_ADD_ALPHA_RHO_SUP | ) |
Add a source term to a phase equation.
tmp<fvMatrix<Type> > source | ( | const GeometricField< Type, fvPatchField, volMesh > & | field | ) | const |
Return source for an equation.
tmp<fvMatrix<Type> > source | ( | const GeometricField< Type, fvPatchField, volMesh > & | field, |
const word & | fieldName | ||
) | const |
Return source for an equation with a specified name.
tmp<fvMatrix<Type> > source | ( | const volScalarField & | rho, |
const GeometricField< Type, fvPatchField, volMesh > & | field | ||
) | const |
Return source for a compressible equation.
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.
tmp<fvMatrix<Type> > source | ( | const volScalarField & | alpha, |
const volScalarField & | rho, | ||
const GeometricField< Type, fvPatchField, volMesh > & | field | ||
) | const |
Return source for a phase equation.
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.
|
virtual |
Prepare for mesh update.
Reimplemented in clouds, and VoFClouds.
Definition at line 172 of file fvModel.C.
Referenced by fvModel::iNew::operator()().
|
pure virtual |
Update for mesh motion.
Implemented in solidificationMeltingSource, rotorDiskSource, effectivenessHeatExchangerSource, volumeFractionSource, clouds, semiImplicitSource, VoFSolidificationMeltingSource, actuationDiskSource, massSource, interfaceTurbulenceDamping, codedFvModel, interRegionHeatTransfer, VoFTurbulenceDamping, VoFTurbulenceDamping, explicitPorositySource, heatTransfer, phaseTurbulenceStabilisation, verticalDamping, solidEquilibriumEnergySource, isotropicDamping, accelerationSource, sixDoFAccelerationSource, VoFClouds, surfaceFilm, interRegionExplicitPorositySource, phaseLimitStabilisation, VoFSurfaceFilm, buoyancyForce, buoyancyEnergy, heatSource, and radiation.
Referenced by fvModel::iNew::operator()().
|
pure virtual |
Update topology using the given map.
Implemented in solidificationMeltingSource, rotorDiskSource, effectivenessHeatExchangerSource, volumeFractionSource, semiImplicitSource, actuationDiskSource, clouds, VoFSolidificationMeltingSource, massSource, codedFvModel, interfaceTurbulenceDamping, interRegionHeatTransfer, explicitPorositySource, heatTransfer, verticalDamping, VoFTurbulenceDamping, VoFTurbulenceDamping, solidEquilibriumEnergySource, isotropicDamping, accelerationSource, phaseTurbulenceStabilisation, sixDoFAccelerationSource, interRegionExplicitPorositySource, phaseLimitStabilisation, VoFClouds, buoyancyForce, surfaceFilm, buoyancyEnergy, heatSource, VoFSurfaceFilm, and radiation.
Referenced by fvModel::iNew::operator()().
|
pure virtual |
Update from another mesh using the given map.
Implemented in solidificationMeltingSource, rotorDiskSource, effectivenessHeatExchangerSource, volumeFractionSource, semiImplicitSource, actuationDiskSource, clouds, VoFSolidificationMeltingSource, massSource, codedFvModel, interfaceTurbulenceDamping, interRegionHeatTransfer, explicitPorositySource, heatTransfer, verticalDamping, VoFTurbulenceDamping, VoFTurbulenceDamping, solidEquilibriumEnergySource, isotropicDamping, accelerationSource, phaseTurbulenceStabilisation, sixDoFAccelerationSource, interRegionExplicitPorositySource, phaseLimitStabilisation, VoFClouds, buoyancyForce, surfaceFilm, buoyancyEnergy, heatSource, VoFSurfaceFilm, and radiation.
Referenced by fvModel::iNew::operator()().
|
pure virtual |
Redistribute or update using the given distribution map.
Implemented in solidificationMeltingSource, rotorDiskSource, effectivenessHeatExchangerSource, volumeFractionSource, semiImplicitSource, actuationDiskSource, clouds, VoFSolidificationMeltingSource, massSource, codedFvModel, interfaceTurbulenceDamping, interRegionHeatTransfer, explicitPorositySource, heatTransfer, verticalDamping, VoFTurbulenceDamping, VoFTurbulenceDamping, solidEquilibriumEnergySource, isotropicDamping, accelerationSource, phaseTurbulenceStabilisation, sixDoFAccelerationSource, interRegionExplicitPorositySource, phaseLimitStabilisation, VoFClouds, buoyancyForce, surfaceFilm, buoyancyEnergy, heatSource, VoFSurfaceFilm, and radiation.
Referenced by fvModel::iNew::operator()().
|
virtual |
Correct the fvModel.
e.g. solve equations, update model, for film, Lagrangian etc.
Reimplemented in VoFSolidificationMeltingSource, clouds, interRegionHeatTransfer, heatTransfer, VoFClouds, surfaceFilm, and VoFSurfaceFilm.
Definition at line 176 of file fvModel.C.
Referenced by fvModel::iNew::operator()().
|
virtual |
Read source dictionary.
Reimplemented in solidificationMeltingSource, rotorDiskSource, effectivenessHeatExchangerSource, volumeFractionSource, semiImplicitSource, actuationDiskSource, VoFSolidificationMeltingSource, massSource, codedFvModel, interRegionHeatTransfer, explicitPorositySource, heatTransfer, radialActuationDiskSource, solidEquilibriumEnergySource, isotropicDamping, accelerationSource, sixDoFAccelerationSource, interRegionExplicitPorositySource, interRegionModel, phaseLimitStabilisation, buoyancyForce, buoyancyEnergy, heatSource, and damping.
Definition at line 164 of file fvModel.C.
References dictionary::optionalSubDict().
Referenced by fvModel::iNew::operator()(), damping::read(), buoyancyEnergy::read(), heatSource::read(), buoyancyForce::read(), phaseLimitStabilisation::read(), interRegionModel::read(), sixDoFAccelerationSource::read(), accelerationSource::read(), solidEquilibriumEnergySource::read(), heatTransfer::read(), explicitPorositySource::read(), codedFvModel::read(), massSource::read(), actuationDiskSource::read(), semiImplicitSource::read(), fvModels::read(), volumeFractionSource::read(), effectivenessHeatExchangerSource::read(), rotorDiskSource::read(), and solidificationMeltingSource::read().
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().
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().
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().
Foam::tmp<Foam::fvMatrix<Type> > source | ( | const GeometricField< Type, fvPatchField, volMesh > & | field | ) | const |
Definition at line 86 of file fvModelTemplates.C.
References IOobject::name(), and fvModel::source().
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, and fvModel::source().
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(), and fvModel::source().
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, and fvModel::source().
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(), and fvModel::source().
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, and Foam::dimVolume.