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;
92Foam::tmp<Foam::volScalarField::Internal>
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);
209 fieldNames_[0] = tepsilon().name();
211 const dictionary& turbDict = turbPtr->coeffDict();
213 Cmu_.
read(
"Cmu", turbDict);
214 C1_.read(
"C1", turbDict);
215 C2_.read(
"C2", turbDict);
220 fieldNames_[0] = tomega().name();
222 const dictionary& turbDict = turbPtr->coeffDict();
224 Cmu_.
read(
"betaStar", turbDict);
229 <<
"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
309 atmBuoyancyTurbSourceOmega(geometricOneField(),
rho, eqn, fieldi);
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
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
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). Reads entries until EOF or when the first token i...
const dimensionSet & dimensions() const noexcept
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)
Add explicit contribution to epsilon or omega equation for incompressible flow computations.
atmBuoyancyTurbSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
cellSetOption(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Base abstract class for handling finite volume options (i.e. fvOption).
const fvMesh & mesh_
Reference to the mesh database.
dictionary coeffs_
Dictionary containing source coefficients.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
static const gravity & New(const word &name, const Time &runTime)
Return named gravity field cached or construct on Time.
Type & lookupObjectRef(const word &name, const bool recursive=false) const
Lookup and return non-const reference to the object of the given Type. Fatal if not found or the wron...
A class for managing temporary objects.
bool is_reference() const noexcept
True if this is a reference (not a 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 dimensionedScalar G
Newtonian constant of gravitation.
Namespace for finite-volume.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
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).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensionedScalar neg0(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedScalar pow025(const dimensionedScalar &ds)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)