48 const word& sourceName,
49 const word& modelType,
54 fv::cellSetOption(sourceName, modelType,
dict,
mesh),
55 artNutName_(
dict.getOrDefault<
word>(
"nut",
"artNut")),
73 <<
"Unable to find artificial turbulent viscosity field." << nl
74 <<
"atmNutSource requires an artificial nut field."
87 <<
"Unable to find a turbulence model."
93 const tmp<volScalarField>& tnut = turbPtr->nut();
95 if (tnut.is_reference())
97 fieldNames_[0] = tnut().name();
102 <<
"Unable to find nut field." << nl
103 <<
"atmNutSource requires nut field."
104 << abort(FatalError);
121 field.correctBoundaryConditions();
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,...
const word & name() const noexcept
Return the object name.
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,...
Mesh data needed to do the Finite Volume discretisation.
Adds/subtracts a given artificial turbulent viscosity field to/from nut for atmospheric boundary laye...
atmNutSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
virtual void correct(volScalarField &field)
Correct the turbulent viscosity.
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.
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
bool headerOk()
Read and check header info. Does not check the headerClassName.
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
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...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.