47Foam::fv::atmPlantCanopyTurbSource::calcPlantCanopyTerm
49 const volVectorField::Internal&
U
61 const word& sourceName,
62 const word& modelType,
69 rhoName_(coeffs_.getOrDefault<
word>(
"rho",
"rho")),
107 <<
"Unable to find a turbulence model."
116 if (!tepsilon.
isTmp())
120 const dictionary& turbDict = turbPtr->coeffDict();
121 Cmu_.
read(
"Cmu", turbDict);
122 C1_.
read(
"C1", turbDict);
123 C2_.
read(
"C2", turbDict);
125 else if (!tomega.
isTmp())
130 const dictionary& turbDict = turbPtr->coeffDict();
131 Cmu_.
read(
"betaStar", turbDict);
136 <<
"Unable to find neither epsilon nor omega field." <<
nl
137 <<
"atmPlantCanopyTurbSource needs either epsilon or omega field."
143 Log <<
" Applying atmPlantCanopyTurbSource to: " <<
fieldNames_[0]
158 atmPlantCanopyTurbSourceEpsilon
168 atmPlantCanopyTurbSourceOmega
207 atmPlantCanopyTurbSourceEpsilon(
alpha,
rho, eqn, fieldi);
211 atmPlantCanopyTurbSourceOmega(
alpha,
rho, eqn, fieldi);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void resize(const label len)
Adjust allocated size of list.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool read(const dictionary &dict)
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
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)
Intermediate abstract class for handling cell-set options for the derived fvOptions.
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.
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.
A class for managing temporary objects.
bool isTmp() const noexcept
Identical to is_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.
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)
constexpr char nl
The newline '\n' character (0x0a)