46 void Foam::fv::atmBuoyancyTurbSource::calcB()
61 Foam::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;
93 Foam::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.is_reference())
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);
217 else if (tomega.is_reference())
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
324 atmBuoyancyTurbSourceK(
alpha,
rho, eqn, fieldi);
332 atmBuoyancyTurbSourceEpsilon(
alpha,
rho, eqn, fieldi);
336 atmBuoyancyTurbSourceOmega(
alpha,
rho, eqn, fieldi);
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
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...
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.
const fvMesh & mesh_
Reference to the mesh database.
atmBuoyancyTurbSource(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
const dimensionedScalar G
Newtonian constant of gravitation.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to epsilon or omega equation for incompressible flow computations.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pow025(const dimensionedScalar &ds)
label k
Boltzmann constant.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
DimensionedField< scalar, volMesh > Internal
The internal field type from which this GeometricField is derived.
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pos(const dimensionedScalar &ds)
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 expressions::valueTypeCode::INVALID.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
dimensionedScalar neg0(const dimensionedScalar &ds)
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.
const dimensionSet & dimensions() const noexcept
Return const reference to dimensions.
errorManip< error > abort(error &err)
addToRunTimeSelectionTable(option, atmAmbientTurbSource, dictionary)
static const gravity & New(const word &name, const Time &runTime)
Return named gravity field cached or construct on Time.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
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)
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: [].
Defines the attributes of an object for which implicit objectRegistry management is supported...
static constexpr const zero Zero
Global zero (0)