75Foam::tmp<Foam::volScalarField::Internal>
76Foam::fv::atmPlantCanopyTurbSource::calcPlantCanopyTerm
93 const word& sourceName,
94 const word& modelType,
109 const auto* turbPtr =
118 <<
"Unable to find a turbulence model."
132 const dictionary& turbDict = turbPtr->coeffDict();
133 Cmu_.
read(
"Cmu", turbDict);
134 C1_.
read(
"C1", turbDict);
135 C2_.
read(
"C2", turbDict);
142 const dictionary& turbDict = turbPtr->coeffDict();
143 Cmu_.
read(
"betaStar", turbDict);
148 <<
"Needs either epsilon or omega field."
169 atmPlantCanopyTurbSourceEpsilon
179 atmPlantCanopyTurbSourceOmega
218 atmPlantCanopyTurbSourceEpsilon(
alpha,
rho, eqn, fieldi);
222 atmPlantCanopyTurbSourceOmega(
alpha,
rho, eqn, fieldi);
234 CdName_ =
dict.getOrDefault<word>(
"Cd",
"Cd");
235 LADname_ =
dict.getOrDefault<word>(
"LAD",
"LAD");
237 (void) getOrReadField(CdName_);
238 (void) getOrReadField(LADname_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
DimensionedField< vector, volMesh > Internal
@ REGISTER
Request registration (bool: true).
@ MUST_READ
Reading required.
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void resize(const label len)
Adjust allocated size of list.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool read(Istream &is)
Read dictionary from Istream (discards the header). Reads entries until EOF or when the first token i...
bool read(const dictionary &dict)
Update the value of dimensioned<Type>, lookup in dictionary with the name().
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
const Time & time() const
Return the top-level database.
Applies sources on either epsilon or omega to incorporate effects of plant canopy for atmospheric bou...
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to epsilon or omega equation for incompressible flow computations.
virtual bool read(const dictionary &dict)
Read source dictionary.
atmPlantCanopyTurbSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
Intermediate abstract class for handling cell-set options for the derived fvOptions.
virtual bool read(const dictionary &dict)
Read source dictionary.
cellSetOption(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Base abstract class for handling finite volume options (i.e. fvOption).
const fvMesh & mesh_
Reference to the mesh database.
wordList fieldNames_
Field names to apply source to - populated by derived models.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
Type * getObjectPtr(const word &name, const bool recursive=false) const
Return non-const pointer to the object of the given Type, using a const-cast to have it behave like a...
bool store()
Register object with its registry and transfer ownership to the registry.
A class for managing temporary objects.
bool is_reference() const noexcept
True if this is a reference (not a pointer).
Abstract base class for turbulence models (RAS, LES and laminar).
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Namespace for finite-volume.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...