46void Foam::fv::atmBuoyancyTurbSource::calcB()
61Foam::fv::atmBuoyancyTurbSource::calcC3
84 neg0(Rig)*(1.0 - (1.0 + (C2_ - 1.0)/(C2_ - C1_))*LbyLmax)
85 +
pos(Rig)*(1.0 - LbyLmax);
88 return (C1_ - C2_)*alphaB + 1.0;
93Foam::fv::atmBuoyancyTurbSource::calcC3
119 +
pos(Rig)*(1.0 - LbyLmax);
130 const word& sourceName,
131 const word& modelType,
138 rhoName_(coeffs_.getOrDefault<
word>(
"rho",
"rho")),
144 coeffs_.getCheckOrDefault<scalar>
148 [&](const scalar Lmax){
return Lmax > SMALL; }
157 coeffs_.getCheckOrDefault<scalar>
161 [&](
const scalar
x){
return x > SMALL; }
179 mesh.time().timeName(),
188 const auto* turbPtr =
197 <<
"Unable to find a turbulence model."
201 fieldNames_.resize(2);
203 tmp<volScalarField> tepsilon = turbPtr->epsilon();
204 tmp<volScalarField> tomega = turbPtr->omega();
206 if (!tepsilon.isTmp())
208 fieldNames_[0] = tepsilon().name();
210 const dictionary& turbDict = turbPtr->coeffDict();
212 Cmu_.read(
"Cmu", turbDict);
213 C1_.read(
"C1", turbDict);
214 C2_.read(
"C2", turbDict);
216 else if (!tomega.isTmp())
219 fieldNames_[0] = tomega().name();
221 const dictionary& turbDict = turbPtr->coeffDict();
223 Cmu_.read(
"betaStar", turbDict);
228 <<
"Unable to find neither epsilon nor omega field." <<
nl
229 <<
"atmBuoyancyTurbSource needs either epsilon or omega field."
233 fieldNames_[1] = turbPtr->k()().
name();
237 Log <<
" Applying atmBuoyancyTurbSource to: "
238 << fieldNames_[0] <<
" and " << fieldNames_[1]
253 atmBuoyancyTurbSourceK
267 atmBuoyancyTurbSourceEpsilon
277 atmBuoyancyTurbSourceOmega
324 atmBuoyancyTurbSourceK(
alpha,
rho, eqn, fieldi);
332 atmBuoyancyTurbSourceEpsilon(
alpha,
rho, eqn, fieldi);
336 atmBuoyancyTurbSourceOmega(
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
The internal field type from which this GeometricField is derived.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
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,...
const dimensionSet & dimensions() const
Return const reference to dimensions.
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 incorporate effects of buoyancy for atmospheric b...
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 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 dimensionedScalar G
Newtonian constant of gravitation.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensionedScalar pos(const dimensionedScalar &ds)
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)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
dimensionedScalar sqrt(const dimensionedScalar &ds)
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
dimensionedScalar neg0(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensionedScalar pow025(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)