57void Foam::fv::buoyancyTurbSource::buoyancyTurbSourceEpsilon
67 const dictionary& turbDict = turbPtr->coeffDict();
77 const vector gHat(g_.value()/
mag(g_.value()));
91void Foam::fv::buoyancyTurbSource::buoyancyTurbSourceOmega
106 word(turbPtr->type() +
":gamma")
114void Foam::fv::buoyancyTurbSource::buoyancyTurbSourceK
116 fvMatrix<scalar>& eqn
131 const word& sourceName,
132 const word& modelType,
139 rhoName_(coeffs_.getOrDefault<
word>(
"rho",
"rho")),
140 alphatName_(coeffs_.getOrDefault<
word>(
"alphat",
"alphat")),
141 Tname_(coeffs_.getOrDefault<
word>(
"T",
"T")),
147 coeffs_.getCheckOrDefault<scalar>
151 [=](const scalar
x){
return x > SMALL; }
161 if (
mag(g_.value()) < SMALL)
164 <<
"Gravitational field cannot be equal to or less than zero"
168 const auto* turbPtr =
177 <<
"Unable to find a turbulence model."
181 fieldNames_.resize(2);
183 tmp<volScalarField> tepsilon = turbPtr->epsilon();
184 tmp<volScalarField> tomega = turbPtr->omega();
186 if (!tepsilon.isTmp())
189 fieldNames_[0] = tepsilon().name();
191 else if (!tomega.isTmp())
194 fieldNames_[0] = tomega().name();
199 <<
"Unable to find an omega or epsilon field." <<
nl
200 <<
"buoyancyTurbSource needs an omega- or epsilon-based model."
204 fieldNames_[1] = turbPtr->k()().
name();
208 Log <<
" Applying buoyancyTurbSource to: "
209 << fieldNames_[0] <<
" and " << fieldNames_[1]
224 buoyancyTurbSourceK(eqn);
230 buoyancyTurbSourceEpsilon(eqn);
234 buoyancyTurbSourceOmega(eqn);
264 buoyancyTurbSourceK(
alpha,
rho, eqn, fieldi);
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
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
The internal field type from which this GeometricField is derived.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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 turbulent kinetic energy (i.e. k) and either turbulent kinetic energy dissipation ...
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).
const fvMesh & mesh_
Reference to the mesh database.
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...
Type & lookupObjectRef(const word &name, const bool recursive=false) const
A class for managing temporary objects.
Abstract base class for turbulence models (RAS, LES and laminar).
static const word propertiesName
Default name of the turbulence properties dictionary.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
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.
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimless
Dimensionless.
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
const dimensionSet dimVelocity
dimensionedScalar tanh(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)