53 <<
"Invalid wall function specification" <<
nl
54 <<
" Patch type for patch " << patch().name()
55 <<
" must be wall" <<
nl
56 <<
" Current patch type is " << patch().type() <<
nl <<
endl
67 os.writeEntryIfDifferent<scalar>(
"Cmu", 0.09,
Cmu_);
68 os.writeEntryIfDifferent<scalar>(
"kappa", 0.41,
kappa_);
91 const DimensionedField<scalar, volMesh>& iF
94 fixedValueFvPatchScalarField(
p, iF),
114 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
117 Pr_(ptf.Pr_.clone()),
133 fixedValueFvPatchScalarField(
p, iF,
dict),
136 dict.getCheckOrDefault<scalar>
145 dict.getCheckOrDefault<scalar>
166 fixedValueFvPatchScalarField(wfpsf),
168 kappa_(wfpsf.kappa_),
169 Pr_(wfpsf.Pr_.clone()),
184 fixedValueFvPatchScalarField(wfpsf, iF),
186 kappa_(wfpsf.kappa_),
187 Pr_(wfpsf.Pr_.clone()),
188 Prt_(wfpsf.Prt_.clone(this->patch().patch())),
189 z0_(wfpsf.z0_.clone(this->patch().patch()))
204 const label patchi = patch().index();
207 const auto& turbModel = db().lookupObject<turbulenceModel>
212 internalField().group()
218 const tmp<scalarField> tnuw = turbModel.nu(patchi);
221 const tmp<volScalarField> tk = turbModel.k();
226 const scalar t = db().time().timeOutputValue();
227 const scalar
Pr =
Pr_->value(t);
233 <<
"Pr cannot be negative or zero. "
234 <<
"Please check input Pr = " <<
Pr
245 if (
Prt[i] < VSMALL || z0[i] < VSMALL)
248 <<
"Elements of input surface fields can only be positive. "
249 <<
"Please check input fields z0 and Prt."
261 const label celli = faceCells[facei];
264 const scalar Edash = (
y[facei] + z0[facei])/(z0[facei] + 1
e-4);
274 alphatw =
max(alphatw, scalar(0.01));
285 fixedValueFvPatchScalarField::autoMap(m);
304 fixedValueFvPatchScalarField::rmap(ptf, addr);
306 const auto& nrwfpsf =
311 Prt_->rmap(nrwfpsf.Prt_(), addr);
315 z0_->rmap(nrwfpsf.z0_(), addr);
333 atmAlphatkWallFunctionFvPatchScalarField
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
This boundary condition provides a wall constraint on the kinematic turbulent thermal conductivity (i...
atmAlphatkWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
autoPtr< PatchFunction1< scalar > > z0_
Surface roughness length [m].
virtual void write(Ostream &) const
Write.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
void writeLocalEntries(Ostream &) const
Write local wall function variables.
static scalar tolerance_
Solution parameters.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
autoPtr< Function1< scalar > > Pr_
Molecular Prandtl number.
const scalar kappa_
von Kármán constant
const scalar Cmu_
Empirical model constant.
autoPtr< PatchFunction1< scalar > > Prt_
Turbulent Prandtl number field.
virtual void checkType()
Check the type of the patch.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
const std::string patch
OpenFOAM patch number as a std::string.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
MinMax< scalar > scalarMinMax
A scalar min/max range.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar log(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
fvPatchField< scalar > fvPatchScalarField
dimensionedScalar pow025(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a).
dimensionedScalar Prt("Prt", dimless, laminarTransport)
dimensionedScalar Pr("Pr", dimless, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.