50 const volScalarField::Internal&
k,
51 const volScalarField::Internal&
epsilon 55 tmp<volScalarField::Internal> L_(
pow(Cmu_, 0.75)*
pow(
k, 1.5)/
epsilon);
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." 170 Log <<
" Applying atmLengthScaleTurbSource to: " << fieldNames_[0]
185 atmLengthScaleTurbSourceEpsilon
195 atmLengthScaleTurbSourceOmega
234 atmLengthScaleTurbSourceEpsilon(
alpha,
rho, eqn, fieldi);
238 atmLengthScaleTurbSourceOmega(
alpha,
rho, eqn, fieldi);
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to epsilon or omega equation for incompressible flow computations.
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.
atmLengthScaleTurbSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pow025(const dimensionedScalar &ds)
label k
Boltzmann constant.
const dimensionSet dimless
Dimensionless.
DimensionedField< scalar, volMesh > Internal
The internal field type from which this GeometricField is derived.
Macros for easy insertion into run-time selection tables.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
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.
errorManip< error > abort(error &err)
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Mesh data needed to do the Finite Volume discretisation.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
Intermediate abstract class for handling cell-set options for the derived fvOptions.
A class for managing temporary objects.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
static constexpr const zero Zero
Global zero (0)