48 const word& sourceName,
49 const word& modelType,
56 rhoName_(coeffs_.getOrDefault<
word>(
"rho",
"rho")),
62 coeffs_.getCheckOrDefault<scalar>
66 [&](const scalar
k){
return k > -VSMALL; }
87 coeffs_.getOrDefault<scalar>
106 <<
"Unable to find a turbulence model."
110 fieldNames_.resize(2);
115 if (!tepsilon.
isTmp())
117 fieldNames_[0] = tepsilon().name();
119 const dictionary& turbDict = turbPtr->coeffDict();
121 C2_.
read(
"C2", turbDict);
123 else if (!tomega.
isTmp())
126 fieldNames_[0] = tomega().name();
128 const dictionary& turbDict = turbPtr->coeffDict();
130 Cmu_.
read(
"betaStar", turbDict);
131 C2_.read(
"C2", turbDict);
136 <<
"Unable to find neither epsilon nor omega field." <<
nl
137 <<
"atmAmbientTurbSource needs either epsilon or omega field."
141 fieldNames_[1] = turbPtr->k()().
name();
145 Log <<
" Applying atmAmbientTurbSource to: "
146 << fieldNames_[0] <<
" and " << fieldNames_[1]
161 atmAmbientTurbSourceK
173 atmAmbientTurbSourceEpsilon
183 atmAmbientTurbSourceOmega
228 atmAmbientTurbSourceK(
alpha,
rho, eqn, fieldi);
234 atmAmbientTurbSourceEpsilon(
alpha,
rho, eqn, fieldi);
238 atmAmbientTurbSourceOmega(
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.
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.
static dimensioned< Type > getOrDefault(const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
Construct dimensioned from dictionary, with default value.
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 k and either epsilon or omega to prevent them droping below a specified ambient va...
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).
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...
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.
const dimensionSet dimless
Dimensionless.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)