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 noexcept |
Return const access to the source name. More... | |
const fvMesh & | mesh () const noexcept |
Return const access to the mesh database. More... | |
const dictionary & | coeffs () const noexcept |
Return dictionary. More... | |
bool | active () const noexcept |
True if source is active. More... | |
void | setApplied (const label fieldi) |
Set the applied flag to true for field index fieldi. More... | |
bool | active (const bool on) noexcept |
Change source active flag, return previous value. 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 Member Functions | |
void | resetApplied () |
Resize/reset applied flag list for all fieldNames_ entries. 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... | |
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... | |
bool | active_ |
Source active flag. 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 57 of file fvOption.C.
References Foam::decrIndent(), Foam::endl(), Foam::incrIndent(), Foam::indent(), Log, and option::name_.
|
virtualdefault |
Destructor.
|
protected |
Resize/reset applied flag list for all fieldNames_ entries.
Definition at line 48 of file fvOption.C.
References option::applied_, option::fieldNames_, List< T >::resize_nocopy(), and UList< T >::size().
Referenced by atmNutSource::atmNutSource(), atmPlantCanopyTSource::atmPlantCanopyTSource(), atmPlantCanopyTurbSource::atmPlantCanopyTurbSource(), atmPlantCanopyUSource::atmPlantCanopyUSource(), buoyancyEnergy::buoyancyEnergy(), buoyancyForce::buoyancyForce(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), effectivenessHeatExchangerSource::effectivenessHeatExchangerSource(), fixedTemperatureConstraint::fixedTemperatureConstraint(), interRegionExplicitPorositySource::interRegionExplicitPorositySource(), interRegionHeatTransferModel::interRegionHeatTransferModel(), jouleHeatingSource::jouleHeatingSource(), limitTemperature::limitTemperature(), limitVelocity::limitVelocity(), meanVelocityForce::meanVelocityForce(), multiphaseStabilizedTurbulence::multiphaseStabilizedTurbulence(), patchCellsSource::patchCellsSource(), PhaseLimitStabilization< Type >::PhaseLimitStabilization(), radiation::radiation(), velocityDampingConstraint::read(), FixedValueConstraint< Type >::read(), acousticDampingSource::read(), explicitPorositySource::read(), rotorDiskSource::read(), CodedSource< Type >::read(), multiphaseMangrovesSource::read(), multiphaseMangrovesTurbulenceModel::read(), solidificationMeltingSource::solidificationMeltingSource(), tabulatedAccelerationSource::tabulatedAccelerationSource(), and viscousDissipation::viscousDissipation().
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 81 of file fvOption.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), Foam::indent(), Foam::Info, mesh, and Foam::name().
|
inlinenoexcept |
Return const access to the source name.
Definition at line 31 of file fvOptionI.H.
References option::name_.
Referenced by optionList::constrain(), optionList::correct(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), optionList::operator()(), optionList::postProcessSens(), optionList::readOptions(), and interRegionHeatTransferModel::setNbrModel().
|
inlinenoexcept |
Return const access to the mesh database.
Definition at line 37 of file fvOptionI.H.
Referenced by targetCoeffTrim::calcCoeffs(), and tabulatedAccelerationSource::tabulatedAccelerationSource().
|
inlinenoexcept |
Return dictionary.
Definition at line 43 of file fvOptionI.H.
|
inlinenoexcept |
True if source is active.
Definition at line 49 of file fvOptionI.H.
Referenced by constantHeatTransfer::constantHeatTransfer(), interRegionHeatTransferModel::interRegionHeatTransferModel(), and interRegionOption::interRegionOption().
|
inline |
Set the applied flag to true for field index fieldi.
Definition at line 63 of file fvOptionI.H.
Referenced by optionList::constrain(), optionList::correct(), and optionList::operator()().
Change source active flag, return previous value.
Definition at line 55 of file fvOptionI.H.
|
virtual |
Is the source active?
Reimplemented in cellSetOption.
Definition at line 119 of file fvOption.C.
Referenced by optionList::constrain(), optionList::correct(), cellSetOption::isActive(), optionList::operator()(), and optionList::postProcessSens().
|
virtual |
Return index of field name if found in fieldNames list.
Definition at line 125 of file fvOption.C.
Referenced by optionList::appliesToField(), optionList::constrain(), optionList::correct(), optionList::operator()(), and optionList::postProcessSens().
|
virtual |
Check that the source has been applied.
Definition at line 131 of file fvOption.C.
References Foam::endl(), forAll, and WarningInFunction.
Referenced by optionList::checkApplied().
|
virtual |
Reimplemented in VoFSolidificationMeltingSource, atmAmbientTurbSource, atmBuoyancyTurbSource, atmLengthScaleTurbSource, atmPlantCanopyTSource, atmPlantCanopyTurbSource, buoyancyTurbSource, effectivenessHeatExchangerSource, multiphaseStabilizedTurbulence, solidificationMeltingSource, interRegionHeatTransferModel, and multiphaseMangrovesTurbulenceModel.
Definition at line 145 of file fvOption.C.
Referenced by optionList::operator()().
Reimplemented in VoFSolidificationMeltingSource, atmCoriolisUSource, atmPlantCanopyUSource, acousticDampingSource, actuationDiskSource, buoyancyForce, directionalPressureGradientExplicitSource, explicitPorositySource, meanVelocityForce, radialActuationDiskSource, rotorDiskSource, solidificationMeltingSource, tabulatedAccelerationSource, interRegionExplicitPorositySource, and multiphaseMangrovesSource.
Definition at line 153 of file fvOption.C.
|
virtual |
Definition at line 169 of file fvOption.C.
|
virtual |
Definition at line 161 of file fvOption.C.
Definition at line 177 of file fvOption.C.
|
virtual |
Reimplemented in VoFSolidificationMeltingSource, atmAmbientTurbSource, atmBuoyancyTurbSource, atmLengthScaleTurbSource, atmPlantCanopyTSource, atmPlantCanopyTurbSource, buoyancyEnergy, buoyancyTurbSource, effectivenessHeatExchangerSource, jouleHeatingSource, multiphaseStabilizedTurbulence, patchCellsSource, solidificationMeltingSource, viscousDissipation, interRegionHeatTransferModel, radiation, and multiphaseMangrovesTurbulenceModel.
Definition at line 185 of file fvOption.C.
|
virtual |
Reimplemented in VoFSolidificationMeltingSource, atmCoriolisUSource, atmPlantCanopyUSource, acousticDampingSource, actuationDiskSource, buoyancyForce, directionalPressureGradientExplicitSource, explicitPorositySource, meanVelocityForce, radialActuationDiskSource, rotorDiskSource, solidificationMeltingSource, tabulatedAccelerationSource, interRegionExplicitPorositySource, and multiphaseMangrovesSource.
Definition at line 194 of file fvOption.C.
|
virtual |
Definition at line 212 of file fvOption.C.
|
virtual |
Definition at line 203 of file fvOption.C.
|
virtual |
Definition at line 221 of file fvOption.C.
|
virtual |
Reimplemented in atmAmbientTurbSource, atmBuoyancyTurbSource, atmLengthScaleTurbSource, atmPlantCanopyTSource, atmPlantCanopyTurbSource, and buoyancyTurbSource.
Definition at line 230 of file fvOption.C.
|
virtual |
Reimplemented in atmCoriolisUSource, atmPlantCanopyUSource, acousticDampingSource, actuationDiskSource, and explicitPorositySource.
Definition at line 242 of file fvOption.C.
|
virtual |
Definition at line 266 of file fvOption.C.
|
virtual |
Definition at line 254 of file fvOption.C.
|
virtual |
Definition at line 278 of file fvOption.C.
|
virtual |
Reimplemented in fixedTemperatureConstraint.
Definition at line 290 of file fvOption.C.
Referenced by optionList::constrain().
Reimplemented in velocityDampingConstraint, directionalPressureGradientExplicitSource, and meanVelocityForce.
Definition at line 294 of file fvOption.C.
|
virtual |
Definition at line 298 of file fvOption.C.
|
virtual |
Definition at line 306 of file fvOption.C.
Definition at line 314 of file fvOption.C.
|
virtual |
Reimplemented in atmNutSource, multiphaseStabilizedTurbulence, and limitTemperature.
Definition at line 318 of file fvOption.C.
Referenced by optionList::correct().
|
virtual |
Reimplemented in limitVelocity, directionalPressureGradientExplicitSource, and meanVelocityForce.
Definition at line 322 of file fvOption.C.
|
virtual |
Definition at line 326 of file fvOption.C.
|
virtual |
Definition at line 330 of file fvOption.C.
|
virtual |
Definition at line 334 of file fvOption.C.
|
virtual |
Definition at line 338 of file fvOption.C.
Referenced by optionList::postProcessSens().
|
virtual |
Definition at line 347 of file fvOption.C.
|
virtual |
Definition at line 356 of file fvOption.C.
|
virtual |
Write the source header information.
Definition at line 33 of file fvOptionIO.C.
References Ostream::beginBlock(), option::name_, os(), and option::writeHeader().
Referenced by optionList::writeData(), and option::writeHeader().
|
virtual |
Write the source footer information.
Definition at line 39 of file fvOptionIO.C.
References os().
Referenced by optionList::writeData().
|
virtual |
Write the source properties.
Reimplemented in velocityDampingConstraint, and directionalPressureGradientExplicitSource.
Definition at line 45 of file fvOptionIO.C.
References Foam::nl, os(), Foam::type(), and option::writeData().
Referenced by option::writeData(), and optionList::writeData().
|
virtual |
Read source dictionary.
Reimplemented in VoFSolidificationMeltingSource, atmAmbientTurbSource, atmBuoyancyTurbSource, atmCoriolisUSource, atmLengthScaleTurbSource, atmNutSource, atmPlantCanopyTSource, atmPlantCanopyTurbSource, atmPlantCanopyUSource, cellSetOption, fixedTemperatureConstraint, velocityDampingConstraint, FixedValueConstraint< Type >, limitTemperature, limitVelocity, interRegionOption, acousticDampingSource, actuationDiskSource, buoyancyEnergy, buoyancyForce, buoyancyTurbSource, directionalPressureGradientExplicitSource, effectivenessHeatExchangerSource, explicitPorositySource, jouleHeatingSource, meanVelocityForce, multiphaseStabilizedTurbulence, patchCellsSource, PhaseLimitStabilization< Type >, radialActuationDiskSource, rotorDiskSource, solidificationMeltingSource, tabulatedAccelerationSource, viscousDissipation, CodedSource< Type >, SemiImplicitSource< Type >, interRegionExplicitPorositySource, constantHeatTransfer, interRegionHeatTransferModel, tabulatedHeatTransfer, tabulatedNTUHeatTransfer, variableHeatTransfer, radiation, multiphaseMangrovesSource, and multiphaseMangrovesTurbulenceModel.
Definition at line 55 of file fvOptionIO.C.
References dict, and Foam::log().
Referenced by optionList::readOptions().
|
protected |
Source name.
Definition at line 133 of file fvOption.H.
Referenced by velocityDampingConstraint::addDamping(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), explicitPorositySource::explicitPorositySource(), interRegionExplicitPorositySource::initialise(), meanVelocityForce::meanVelocityForce(), option::name(), option::option(), radialActuationDiskSource::radialActuationDiskSource(), option::writeHeader(), and meanVelocityForce::writeProps().
|
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(), atmNutSource::atmNutSource(), atmPlantCanopyTurbSource::atmPlantCanopyTurbSource(), rotorDiskSource::calculate(), constantHeatTransfer::constantHeatTransfer(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), multiphaseMangrovesSource::dragCoeff(), effectivenessHeatExchangerSource::effectivenessHeatExchangerSource(), explicitPorositySource::explicitPorositySource(), fixedTemperatureConstraint::fixedTemperatureConstraint(), interRegionExplicitPorositySource::initialise(), jouleHeatingSource::jouleHeatingSource(), multiphaseMangrovesTurbulenceModel::kCoeff(), limitTemperature::limitTemperature(), meanVelocityForce::meanVelocityForce(), multiphaseStabilizedTurbulence::multiphaseStabilizedTurbulence(), radiation::radiation(), acousticDampingSource::setBlendingFactor(), interRegionOption::setMapper(), interRegionHeatTransferModel::setNbrModel(), solidificationMeltingSource::solidificationMeltingSource(), variableHeatTransfer::variableHeatTransfer(), viscousDissipation::viscousDissipation(), and meanVelocityForce::writeProps().
|
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 buoyancyEnergy::buoyancyEnergy(), buoyancyForce::buoyancyForce(), cellSetOption::cellSetOption(), rotorDiskSource::checkData(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), effectivenessHeatExchangerSource::effectivenessHeatExchangerSource(), explicitPorositySource::explicitPorositySource(), fixedTemperatureConstraint::fixedTemperatureConstraint(), interRegionExplicitPorositySource::initialise(), interRegionHeatTransferModel::interRegionHeatTransferModel(), meanVelocityForce::meanVelocityForce(), patchCellsSource::patchCellsSource(), interRegionOption::setMapper(), variableHeatTransfer::variableHeatTransfer(), and viscousDissipation::viscousDissipation().
|
protected |
Field names to apply source to - populated by derived models.
Definition at line 148 of file fvOption.H.
Referenced by atmNutSource::atmNutSource(), atmPlantCanopyTSource::atmPlantCanopyTSource(), atmPlantCanopyTurbSource::atmPlantCanopyTurbSource(), atmPlantCanopyUSource::atmPlantCanopyUSource(), buoyancyEnergy::buoyancyEnergy(), buoyancyForce::buoyancyForce(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), effectivenessHeatExchangerSource::effectivenessHeatExchangerSource(), fixedTemperatureConstraint::fixedTemperatureConstraint(), interRegionExplicitPorositySource::interRegionExplicitPorositySource(), interRegionHeatTransferModel::interRegionHeatTransferModel(), jouleHeatingSource::jouleHeatingSource(), limitTemperature::limitTemperature(), limitVelocity::limitVelocity(), meanVelocityForce::meanVelocityForce(), multiphaseStabilizedTurbulence::multiphaseStabilizedTurbulence(), patchCellsSource::patchCellsSource(), PhaseLimitStabilization< Type >::PhaseLimitStabilization(), radiation::radiation(), option::resetApplied(), solidificationMeltingSource::solidificationMeltingSource(), tabulatedAccelerationSource::tabulatedAccelerationSource(), and viscousDissipation::viscousDissipation().
Applied flag list - corresponds to each fieldNames_ entry.
Definition at line 151 of file fvOption.H.
Referenced by option::resetApplied().
|
protected |
Source active flag.
Definition at line 154 of file fvOption.H.
Referenced by interRegionExplicitPorositySource::interRegionExplicitPorositySource().
bool log |
Switch write log to Info.
Definition at line 166 of file fvOption.H.