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 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< 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 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< fvModel > | New (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... | |
Finite volume model abstract base class.
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.
|
protected |
|
protected |
|
protected |
Return source for equation with specified name and dimensions.
TypeName | ( | "fvModel" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
fvModel | , | ||
dictionary | , | ||
(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict) | , | ||
(name, modelType, mesh, dict) | |||
) |
|
inlinestatic |
Return the dimensions of the matrix of a source term.
Referenced by fvModels::source(), and fvModel::sourceDims().
|
inlinestatic |
Return the dimensions of the matrix of a source term (base.
condition for the above)
|
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()().
|
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().
|
inline |
Return const access to the mesh database.
Definition at line 34 of file fvModelI.H.
Referenced by interfaceTurbulenceDamping::interfaceTurbulenceDamping(), interRegionExplicitPorositySource::interRegionExplicitPorositySource(), phaseTurbulenceStabilisation::phaseTurbulenceStabilisation(), VoFTurbulenceDamping::VoFTurbulenceDamping(), zeroDimensionalFixedPressureModel::zeroDimensionalFixedPressureModel(), and zeroDimensionalMassSourceBase::zeroDimensionalMassSourceBase().
|
inline |
Return dictionary.
Definition at line 40 of file fvModelI.H.
Referenced by interRegionExplicitPorositySource::interRegionExplicitPorositySource(), and forcing::readCoeffs().
|
virtual |
Return the list of fields for which the fvModel adds source term.
to the transport equation
Reimplemented in waveForcing, verticalDamping, isotropicDamping, radiation, clouds, interRegionHeatTransfer, interRegionExplicitPorositySource, semiImplicitSource, codedFvModel, volumeFractionSource, solidificationMeltingSource, solidEquilibriumEnergySource, sixDoFAccelerationSource, rotorDiskSource, phaseLimitStabilisation, massSourceBase, heatTransfer, heatSource, explicitPorositySource, effectivenessHeatExchangerSource, buoyancyForce, buoyancyEnergy, actuationDiskSource, accelerationSource, phaseTurbulenceStabilisation, interfaceTurbulenceDamping, VoFFilmTransfer, filmVoFTransfer, filmCloudTransfer, VoFTurbulenceDamping, VoFCavitation, VoFTurbulenceDamping, VoFSolidificationMeltingSource, VoFClouds, and VoFCavitation.
Definition at line 160 of file fvModel.C.
References List< word >::null().
|
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().
|
virtual |
FOR_ALL_FIELD_TYPES | ( | DEFINE_FV_MODEL_ADD_SUP | ) |
Add a source term to an equation.
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.
Return source for an equation with a specified name.
tmp<fvMatrix<Type> > source | ( | const volScalarField & | rho, |
const VolField< Type > & | field | ||
) | const |
Return source for a compressible equation.
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.
tmp<fvMatrix<Type> > source | ( | const volScalarField & | alpha, |
const volScalarField & | rho, | ||
const VolField< Type > & | field | ||
) | const |
Return source for a phase equation.
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.
tmp<fvMatrix<Type> > source | ( | const volScalarField & | alpha, |
const geometricOneField & | rho, | ||
const VolField< Type > & | field | ||
) | const |
Return source for a phase equation.
tmp<fvMatrix<Type> > source | ( | const geometricOneField & | alpha, |
const volScalarField & | rho, | ||
const VolField< Type > & | field | ||
) | const |
Return source for a phase equation.
tmp<fvMatrix<Type> > source | ( | const geometricOneField & | alpha, |
const geometricOneField & | rho, | ||
const VolField< Type > & | field | ||
) | const |
Return source for a phase equation.
Return source for an equation with a second time derivative.
Return source for an equation with a second time derivative.
|
virtual |
|
pure virtual |
Update for mesh motion.
Implemented in waveForcing, verticalDamping, isotropicDamping, radiation, clouds, interRegionHeatTransfer, interRegionExplicitPorositySource, semiImplicitSource, codedFvModel, volumeFractionSource, solidificationMeltingSource, solidEquilibriumEnergySource, sixDoFAccelerationSource, rotorDiskSource, phaseLimitStabilisation, massSourceBase, heatTransfer, heatSource, explicitPorositySource, effectivenessHeatExchangerSource, buoyancyForce, buoyancyEnergy, actuationDiskSource, accelerationSource, zeroDimensionalFixedPressureModel, phaseTurbulenceStabilisation, interfaceTurbulenceDamping, VoFFilmTransfer, filmVoFTransfer, filmCloudTransfer, VoFTurbulenceDamping, VoFCavitation, VoFTurbulenceDamping, VoFSolidificationMeltingSource, VoFClouds, and VoFCavitation.
|
pure virtual |
Update topology using the given map.
Implemented in waveForcing, verticalDamping, isotropicDamping, radiation, clouds, interRegionHeatTransfer, interRegionExplicitPorositySource, semiImplicitSource, codedFvModel, volumeFractionSource, solidificationMeltingSource, solidEquilibriumEnergySource, sixDoFAccelerationSource, rotorDiskSource, phaseLimitStabilisation, massSourceBase, heatTransfer, heatSource, explicitPorositySource, effectivenessHeatExchangerSource, buoyancyForce, buoyancyEnergy, actuationDiskSource, accelerationSource, zeroDimensionalFixedPressureModel, phaseTurbulenceStabilisation, interfaceTurbulenceDamping, VoFFilmTransfer, filmVoFTransfer, filmCloudTransfer, VoFTurbulenceDamping, VoFCavitation, VoFTurbulenceDamping, VoFSolidificationMeltingSource, VoFClouds, and VoFCavitation.
|
pure virtual |
Update from another mesh using the given map.
Implemented in waveForcing, verticalDamping, isotropicDamping, radiation, clouds, interRegionHeatTransfer, interRegionExplicitPorositySource, semiImplicitSource, codedFvModel, volumeFractionSource, solidificationMeltingSource, solidEquilibriumEnergySource, sixDoFAccelerationSource, rotorDiskSource, phaseLimitStabilisation, massSourceBase, heatTransfer, heatSource, explicitPorositySource, effectivenessHeatExchangerSource, buoyancyForce, buoyancyEnergy, actuationDiskSource, accelerationSource, zeroDimensionalFixedPressureModel, phaseTurbulenceStabilisation, interfaceTurbulenceDamping, VoFFilmTransfer, filmVoFTransfer, filmCloudTransfer, VoFTurbulenceDamping, VoFCavitation, VoFTurbulenceDamping, VoFSolidificationMeltingSource, VoFClouds, and VoFCavitation.
|
pure virtual |
Redistribute or update using the given distribution map.
Implemented in waveForcing, verticalDamping, isotropicDamping, radiation, clouds, interRegionHeatTransfer, interRegionExplicitPorositySource, semiImplicitSource, codedFvModel, volumeFractionSource, solidificationMeltingSource, solidEquilibriumEnergySource, sixDoFAccelerationSource, rotorDiskSource, phaseLimitStabilisation, massSourceBase, heatTransfer, heatSource, explicitPorositySource, effectivenessHeatExchangerSource, buoyancyForce, buoyancyEnergy, actuationDiskSource, accelerationSource, zeroDimensionalFixedPressureModel, phaseTurbulenceStabilisation, interfaceTurbulenceDamping, VoFFilmTransfer, filmVoFTransfer, filmCloudTransfer, VoFTurbulenceDamping, VoFCavitation, VoFTurbulenceDamping, VoFSolidificationMeltingSource, VoFClouds, and VoFCavitation.
|
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.
|
virtual |
Read source dictionary.
Reimplemented in isotropicDamping, forcing, interRegionModel, interRegionHeatTransfer, interRegionExplicitPorositySource, semiImplicitSource, codedFvModel, zeroDimensionalMassSource, volumeFractionSource, solidificationMeltingSource, solidEquilibriumEnergySource, sixDoFAccelerationSource, rotorDiskSource, radialActuationDiskSource, phaseLimitStabilisation, massSource, massSourceBase, heatTransfer, heatSource, explicitPorositySource, effectivenessHeatExchangerSource, buoyancyForce, buoyancyEnergy, actuationDiskSource, accelerationSource, and VoFSolidificationMeltingSource.
Definition at line 187 of file fvModel.C.
References dict, and dictionary::optionalSubDict().
Referenced by fvModels::read(), VoFSolidificationMeltingSource::read(), accelerationSource::read(), actuationDiskSource::read(), buoyancyEnergy::read(), buoyancyForce::read(), effectivenessHeatExchangerSource::read(), explicitPorositySource::read(), heatSource::read(), heatTransfer::read(), massSourceBase::read(), phaseLimitStabilisation::read(), rotorDiskSource::read(), sixDoFAccelerationSource::read(), solidEquilibriumEnergySource::read(), solidificationMeltingSource::read(), volumeFractionSource::read(), codedFvModel::read(), semiImplicitSource::read(), interRegionModel::read(), and forcing::read().
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().
Foam::dimensionSet sourceDims | ( | const VolField< Type > & | field, |
const dimensionSet & | ds | ||
) |
Definition at line 42 of file fvModelTemplates.C.
References DimensionedField< Type, GeoMesh >::dimensions().
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().
Foam::tmp<Foam::fvMatrix<Type> > source | ( | const VolField< Type > & | field | ) | const |
Definition at line 85 of file fvModelTemplates.C.
References IOobject::name().
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.
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.
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.
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.
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.
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().
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.
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.
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().
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().