68 mesh_.objectRegistry::store(ptr);
76 Foam::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." 154 Log <<
" Applying atmPlantCanopyTurbSource to: " <<
fieldNames_[0]
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_);
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
wordList fieldNames_
Field names to apply source to - populated by derived models.
void resize(const label len)
Adjust allocated size of list.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvMesh & mesh_
Reference to the mesh database.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool read(const dictionary &dict)
Read source dictionary.
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
const Time & time() const
Return the top-level database.
DimensionedField< vector, volMesh > Internal
The internal field type from which this GeometricField is derived.
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
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...
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to epsilon or omega equation for incompressible flow computations.
errorManip< error > abort(error &err)
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
bool read(const dictionary &dict)
Update the value of dimensioned<Type>, lookup in dictionary with the name().
bool is_reference() const noexcept
True if this is a reference (not a pointer)
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
Mesh data needed to do the Finite Volume discretisation.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
Automatically write from objectRegistry::writeObject()
Intermediate abstract class for handling cell-set options for the derived fvOptions.
A class for managing temporary objects.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Request registration (bool: true)
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.
static constexpr const zero Zero
Global zero (0)