Base abstract class for handling finite volume options (i.e. fvOption
).
More...
Classes | |
class | iNew |
Return pointer to new fvOption object created. More... | |
Public Member Functions | |
TypeName ("option") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh),(name, modelType, dict, mesh)) | |
option (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh) | |
Construct from components. More... | |
autoPtr< option > | clone () const |
Return clone. More... | |
virtual | ~option ()=default |
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... | |
bool | active () const |
Return const access to the source active flag. More... | |
void | setApplied (const label fieldi) |
Set the applied flag to true for field index fieldi. More... | |
Switch & | active () |
Return access to the source active flag. More... | |
virtual bool | isActive () |
Is the source active? More... | |
virtual label | applyToField (const word &fieldName) const |
Return index of field name if found in fieldNames list. More... | |
virtual void | checkApplied () const |
Check that the source has been applied. More... | |
virtual void | addSup (fvMatrix< scalar > &eqn, const label fieldi) |
virtual void | addSup (fvMatrix< vector > &eqn, const label fieldi) |
virtual void | addSup (fvMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | addSup (fvMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | addSup (fvMatrix< tensor > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldi) |
virtual void | constrain (fvMatrix< scalar > &eqn, const label fieldi) |
virtual void | constrain (fvMatrix< vector > &eqn, const label fieldi) |
virtual void | constrain (fvMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | constrain (fvMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | constrain (fvMatrix< tensor > &eqn, const label fieldi) |
virtual void | correct (volScalarField &field) |
virtual void | correct (volVectorField &field) |
virtual void | correct (volSphericalTensorField &field) |
virtual void | correct (volSymmTensorField &field) |
virtual void | correct (volTensorField &field) |
virtual void | postProcessSens (scalarField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null) |
virtual void | postProcessSens (vectorField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null) |
virtual void | postProcessSens (tensorField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null) |
virtual void | writeHeader (Ostream &) const |
Write the source header information. More... | |
virtual void | writeFooter (Ostream &) const |
Write the source footer information. More... | |
virtual void | writeData (Ostream &) const |
Write the source properties. More... | |
virtual bool | read (const dictionary &dict) |
Read source dictionary. More... | |
Static Public Member Functions | |
static autoPtr< option > | New (const word &name, const dictionary &dict, const fvMesh &mesh) |
Return a reference to the selected fvOption model. More... | |
Public Attributes | |
bool | log |
Switch write log to Info. More... | |
Protected Attributes | |
const word | name_ |
Source name. More... | |
const word | modelType_ |
Model type. More... | |
const fvMesh & | mesh_ |
Reference to the mesh database. More... | |
dictionary | dict_ |
Top level source dictionary. More... | |
dictionary | coeffs_ |
Dictionary containing source coefficients. More... | |
Switch | active_ |
Source active flag. More... | |
wordList | fieldNames_ |
Field names to apply source to - populated by derived models. More... | |
List< bool > | applied_ |
Applied flag list - corresponds to each fieldNames_ entry. More... | |
Base abstract class for handling finite volume options (i.e. fvOption
).
constant/fvOptions
: <userDefinedName1> { // Mandatory entries (unmodifiable) type <fvOptionName>; // Optional entries (unmodifiable/runtime modifiable) <fvOption>Coeffs { // subdictionary entries } // Optional entries (runtime modifiable) active true; log true; }
where the entries mean:
Property | Description | Type | Reqd | Dflt |
---|---|---|---|---|
type | Name of operand fvOption | word | yes | - |
<fvOption>Coeffs | Dictionary containing settings of the selected fvOption settings | dictionary | no | - |
active | Flag to (de)activate fvOption | bool | no | true |
log | Flag to log fvOption-related info | bool | no | true |
Definition at line 126 of file fvOption.H.
option | ( | const word & | name, |
const word & | modelType, | ||
const dictionary & | dict, | ||
const fvMesh & | mesh | ||
) |
Construct from components.
Definition at line 49 of file fvOption.C.
References Foam::decrIndent(), Foam::endl(), Foam::incrIndent(), Foam::indent(), and Log.
|
virtualdefault |
Destructor.
TypeName | ( | "option" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
option | , | ||
dictionary | , | ||
(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh) | , | ||
(name, modelType, dict, mesh) | |||
) |
|
static |
Return a reference to the selected fvOption model.
Definition at line 73 of file fvOption.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), Foam::indent(), Foam::Info, mesh, and Foam::name().
Referenced by option::iNew::operator()(), and optionList::reset().
|
inline |
Return const access to the source name.
Definition at line 30 of file fvOptionI.H.
References option::name_.
Referenced by atmNutSource::correct(), optionList::correct(), multiphaseStabilizedTurbulence::correct(), optionList::postProcessSens(), optionList::readOptions(), and interRegionHeatTransferModel::setNbrModel().
|
inline |
Return const access to the mesh database.
Definition at line 36 of file fvOptionI.H.
|
inline |
Return dictionary.
Definition at line 42 of file fvOptionI.H.
|
inline |
Return const access to the source active flag.
Definition at line 48 of file fvOptionI.H.
|
inline |
Set the applied flag to true for field index fieldi.
Definition at line 54 of file fvOptionI.H.
Referenced by optionList::correct().
|
inline |
Return access to the source active flag.
Definition at line 60 of file fvOptionI.H.
|
virtual |
Is the source active?
Reimplemented in cellSetOption.
Definition at line 110 of file fvOption.C.
References option::active_.
Referenced by optionList::correct(), cellSetOption::isActive(), and optionList::postProcessSens().
|
virtual |
Return index of field name if found in fieldNames list.
Definition at line 116 of file fvOption.C.
Referenced by optionList::appliesToField(), optionList::correct(), and optionList::postProcessSens().
|
virtual |
Check that the source has been applied.
Definition at line 122 of file fvOption.C.
References Foam::endl(), forAll, and WarningInFunction.
Referenced by optionList::checkApplied().
|
virtual |
Reimplemented in effectivenessHeatExchangerSource, solidificationMeltingSource, buoyancyTurbSource, atmBuoyancyTurbSource, interRegionHeatTransferModel, atmLengthScaleTurbSource, atmAmbientTurbSource, multiphaseStabilizedTurbulence, atmPlantCanopyTurbSource, VoFSolidificationMeltingSource, atmPlantCanopyTSource, and multiphaseMangrovesTurbulenceModel.
Definition at line 137 of file fvOption.C.
Reimplemented in actuationDiskSource, rotorDiskSource, solidificationMeltingSource, directionalPressureGradientExplicitSource, acousticDampingSource, atmCoriolisUSource, meanVelocityForce, interRegionExplicitPorositySource, explicitPorositySource, radialActuationDiskSource, VoFSolidificationMeltingSource, buoyancyForce, atmPlantCanopyUSource, tabulatedAccelerationSource, and multiphaseMangrovesSource.
Definition at line 145 of file fvOption.C.
|
virtual |
Definition at line 161 of file fvOption.C.
|
virtual |
Definition at line 153 of file fvOption.C.
Definition at line 169 of file fvOption.C.
|
virtual |
Reimplemented in effectivenessHeatExchangerSource, solidificationMeltingSource, buoyancyTurbSource, jouleHeatingSource, atmBuoyancyTurbSource, interRegionHeatTransferModel, atmLengthScaleTurbSource, atmAmbientTurbSource, multiphaseStabilizedTurbulence, atmPlantCanopyTurbSource, VoFSolidificationMeltingSource, viscousDissipation, buoyancyEnergy, atmPlantCanopyTSource, multiphaseMangrovesTurbulenceModel, and radiation.
Definition at line 177 of file fvOption.C.
|
virtual |
Reimplemented in actuationDiskSource, rotorDiskSource, solidificationMeltingSource, directionalPressureGradientExplicitSource, acousticDampingSource, atmCoriolisUSource, meanVelocityForce, interRegionExplicitPorositySource, VoFSolidificationMeltingSource, explicitPorositySource, radialActuationDiskSource, buoyancyForce, atmPlantCanopyUSource, tabulatedAccelerationSource, and multiphaseMangrovesSource.
Definition at line 186 of file fvOption.C.
|
virtual |
Definition at line 204 of file fvOption.C.
|
virtual |
Definition at line 195 of file fvOption.C.
|
virtual |
Definition at line 213 of file fvOption.C.
|
virtual |
Reimplemented in buoyancyTurbSource, atmBuoyancyTurbSource, atmLengthScaleTurbSource, atmAmbientTurbSource, atmPlantCanopyTurbSource, and atmPlantCanopyTSource.
Definition at line 222 of file fvOption.C.
References Foam::constant::atomic::alpha, and rho.
|
virtual |
Reimplemented in actuationDiskSource, acousticDampingSource, atmCoriolisUSource, explicitPorositySource, and atmPlantCanopyUSource.
Definition at line 234 of file fvOption.C.
References Foam::constant::atomic::alpha, and rho.
|
virtual |
Definition at line 258 of file fvOption.C.
References Foam::constant::atomic::alpha, and rho.
|
virtual |
Definition at line 246 of file fvOption.C.
References Foam::constant::atomic::alpha, and rho.
|
virtual |
Definition at line 270 of file fvOption.C.
References Foam::constant::atomic::alpha, and rho.
|
virtual |
Reimplemented in fixedTemperatureConstraint.
Definition at line 281 of file fvOption.C.
Reimplemented in directionalPressureGradientExplicitSource, meanVelocityForce, and velocityDampingConstraint.
Definition at line 285 of file fvOption.C.
|
virtual |
Definition at line 290 of file fvOption.C.
|
virtual |
Definition at line 298 of file fvOption.C.
Definition at line 305 of file fvOption.C.
|
virtual |
Reimplemented in limitTemperature, multiphaseStabilizedTurbulence, and atmNutSource.
Definition at line 309 of file fvOption.C.
Referenced by optionList::correct().
|
virtual |
Reimplemented in directionalPressureGradientExplicitSource, meanVelocityForce, and limitVelocity.
Definition at line 313 of file fvOption.C.
|
virtual |
Definition at line 317 of file fvOption.C.
|
virtual |
Definition at line 321 of file fvOption.C.
|
virtual |
Definition at line 325 of file fvOption.C.
|
virtual |
Definition at line 330 of file fvOption.C.
Referenced by optionList::postProcessSens().
|
virtual |
Definition at line 339 of file fvOption.C.
|
virtual |
Definition at line 348 of file fvOption.C.
|
virtual |
Write the source header information.
Definition at line 33 of file fvOptionIO.C.
References Ostream::beginBlock(), and option::name_.
|
virtual |
Write the source footer information.
Definition at line 39 of file fvOptionIO.C.
References Ostream::endBlock().
|
virtual |
Write the source properties.
Reimplemented in directionalPressureGradientExplicitSource, and velocityDampingConstraint.
Definition at line 45 of file fvOptionIO.C.
References Foam::nl, Foam::type(), and Ostream::writeEntry().
|
virtual |
Read source dictionary.
Reimplemented in actuationDiskSource, rotorDiskSource, effectivenessHeatExchangerSource, solidificationMeltingSource, tabulatedNTUHeatTransfer, directionalPressureGradientExplicitSource, buoyancyTurbSource, atmBuoyancyTurbSource, jouleHeatingSource, cellSetOption, interRegionHeatTransferModel, atmLengthScaleTurbSource, atmAmbientTurbSource, acousticDampingSource, variableHeatTransfer, atmCoriolisUSource, multiphaseStabilizedTurbulence, meanVelocityForce, atmPlantCanopyTurbSource, explicitPorositySource, interRegionExplicitPorositySource, VoFSolidificationMeltingSource, radialActuationDiskSource, CodedSource< Type >, fixedTemperatureConstraint, viscousDissipation, velocityDampingConstraint, buoyancyEnergy, atmPlantCanopyTSource, atmPlantCanopyUSource, PhaseLimitStabilization< Type >, tabulatedHeatTransfer, buoyancyForce, tabulatedAccelerationSource, limitTemperature, FixedValueConstraint< Type >, interRegionOption, limitVelocity, multiphaseMangrovesTurbulenceModel, atmNutSource, multiphaseMangrovesSource, constantHeatTransfer, and radiation.
Definition at line 55 of file fvOptionIO.C.
References dict, and Foam::log().
Referenced by radiation::read(), multiphaseMangrovesSource::read(), multiphaseMangrovesTurbulenceModel::read(), interRegionOption::read(), tabulatedAccelerationSource::read(), buoyancyEnergy::read(), cellSetOption::read(), jouleHeatingSource::read(), tabulatedNTUHeatTransfer::read(), and optionList::readOptions().
|
protected |
Source name.
Definition at line 133 of file fvOption.H.
Referenced by velocityDampingConstraint::addDamping(), interRegionExplicitPorositySource::initialise(), option::name(), and option::writeHeader().
|
protected |
Model type.
Definition at line 136 of file fvOption.H.
|
protected |
Reference to the mesh database.
Definition at line 139 of file fvOption.H.
Referenced by velocityDampingConstraint::addDamping(), variableHeatTransfer::calculateHtc(), meanVelocityForce::correct(), multiphaseStabilizedTurbulence::correct(), multiphaseMangrovesSource::dragCoeff(), interRegionExplicitPorositySource::initialise(), multiphaseMangrovesTurbulenceModel::read(), acousticDampingSource::setBlendingFactor(), interRegionOption::setMapper(), and interRegionHeatTransferModel::setNbrModel().
|
protected |
Top level source dictionary.
Definition at line 142 of file fvOption.H.
|
protected |
Dictionary containing source coefficients.
Definition at line 145 of file fvOption.H.
Referenced by interRegionExplicitPorositySource::initialise(), multiphaseMangrovesTurbulenceModel::read(), limitVelocity::read(), limitTemperature::read(), tabulatedAccelerationSource::read(), buoyancyEnergy::read(), fixedTemperatureConstraint::read(), radialActuationDiskSource::read(), explicitPorositySource::read(), and interRegionOption::setMapper().
|
protected |
|
protected |
Field names to apply source to - populated by derived models.
Definition at line 151 of file fvOption.H.
Referenced by multiphaseStabilizedTurbulence::correct(), multiphaseMangrovesTurbulenceModel::read(), and explicitPorositySource::read().
Applied flag list - corresponds to each fieldNames_ entry.
Definition at line 154 of file fvOption.H.
Referenced by multiphaseMangrovesTurbulenceModel::read(), and explicitPorositySource::read().
bool log |
Switch write log to Info.
Definition at line 163 of file fvOption.H.