48 const word& sourceName,
49 const word& modelType,
54 fv::cellSetOption(sourceName, modelType,
dict,
mesh),
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);
112 tmp<volScalarField> tepsilon = turbPtr->epsilon();
113 tmp<volScalarField> tomega = turbPtr->omega();
115 if (tepsilon.is_reference())
118 fieldNames_[0] = tepsilon().name();
120 const dictionary& turbDict = turbPtr->coeffDict();
122 C2_.read(
"C2", turbDict);
124 else if (tomega.is_reference())
127 fieldNames_[0] = tomega().name();
129 const dictionary& turbDict = turbPtr->coeffDict();
131 Cmu_.read(
"betaStar", turbDict);
132 C2_.read(
"C2", turbDict);
137 <<
"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
209 atmAmbientTurbSourceEpsilon(geometricOneField(),
rho, eqn, fieldi);
228 atmAmbientTurbSourceK(
alpha,
rho, eqn, fieldi);
234 atmAmbientTurbSourceEpsilon(
alpha,
rho, eqn, fieldi);
238 atmAmbientTurbSourceOmega(
alpha,
rho, eqn, fieldi);
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.
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
Ostream & endl(Ostream &os)
Add newline and flush stream.
label k
Boltzmann constant.
const dimensionSet dimless
Dimensionless.
Macros for easy insertion into run-time selection tables.
Applies sources on k and either epsilon or omega to prevent them droping below a specified ambient va...
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
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.
atmAmbientTurbSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
errorManip< error > abort(error &err)
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to epsilon or omega equation for incompressible flow computations.
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Base abstract class for handling finite volume options (i.e. fvOption).
static constexpr const zero Zero
Global zero (0)