59 return (C2_ - C1_)*
pow(L_/Lmax_, n_);
73 tmp<volScalarField::Internal> L_(
sqrt(
k)/(
pow025(Cmu_)*omega));
84 const word& sourceName,
85 const word& modelType,
92 rhoName_(coeffs_.getOrDefault<
word>(
"rho",
"rho")),
98 coeffs_.getCheckOrDefault<scalar>
102 [&](const scalar Lmax){
return Lmax > SMALL; }
111 coeffs_.getCheckOrDefault<scalar>
115 [&](
const scalar
n){ return n > SMALL; }
124 const auto* turbPtr =
133 <<
"Unable to find a turbulence model."
137 fieldNames_.resize(1);
139 tmp<volScalarField> tepsilon = turbPtr->epsilon();
140 tmp<volScalarField> tomega = turbPtr->omega();
142 if (tepsilon.is_reference())
145 fieldNames_[0] = tepsilon().name();
147 const dictionary& turbDict = turbPtr->coeffDict();
148 Cmu_.read(
"Cmu", turbDict);
149 C1_.read(
"C1", turbDict);
150 C2_.read(
"C2", turbDict);
151 C3_.read(
"C3", turbDict);
153 else if (tomega.is_reference())
156 fieldNames_[0] = tomega().name();
158 const dictionary& turbDict = turbPtr->coeffDict();
159 Cmu_.read(
"betaStar", turbDict);
164 <<
"Needs either epsilon or omega field."
185 atmLengthScaleTurbSourceEpsilon
195 atmLengthScaleTurbSourceOmega
234 atmLengthScaleTurbSourceEpsilon(
alpha,
rho, eqn, fieldi);
238 atmLengthScaleTurbSourceOmega(
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.
DimensionedField< scalar, volMesh > Internal
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...
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 correct mixing-length scale estimations for atmospheric...
atmLengthScaleTurbSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to epsilon or omega equation for incompressible flow computations.
Intermediate abstract class for handling cell-set options for the derived fvOptions.
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).
wordList fieldNames_
Field names to apply source to - populated by derived models.
dictionary coeffs_
Dictionary containing source coefficients.
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...
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.
const dimensionSet dimless
Dimensionless.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
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.
dimensionedScalar pow025(const dimensionedScalar &ds)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)