53 if (isA<epsilonWallFunctionFvPatchScalarField>(bf[
patchi]))
100 if (isA<epsilonWallFunctionFvPatchScalarField>(bf[
patchi]))
102 epsilonPatches.append(patchi);
107 weights[faceCells[i]]++;
136 refCast<const epsilonWallFunctionFvPatchScalarField>(bf[
patchi]);
207 const scalar Cmu75 =
pow(nutw.
Cmu(), 0.75);
214 const scalar
yPlus = Cmu25*y[facei]*
sqrt(k[celli])/nuw[facei];
216 const scalar w = cornerWeights[facei];
221 w*Cmu75*
pow(k[celli], 1.5)/(nutw.
kappa()*y[facei]);
225 *(nutw[facei] + nuw[facei])
227 *Cmu25*
sqrt(k[celli])
228 /(nutw.
kappa()*y[facei]);
232 epsilon0[celli] += w*2.0*k[celli]*nuw[facei]/
sqr(y[facei]);
359 momentumTransportModel::typeName,
377 const_cast<FieldType&
> 382 const_cast<FieldType&
> 390 scalar& w = weights[facei];
396 const scalar w = weights[facei];
399 G[celli] = (1 - w)*G[celli] + w*G0[celli];
400 epsilon[celli] = (1 - w)*epsilon[celli] + w*epsilon0[celli];
424 scalar& w = weights[facei];
const char *const group
Group name for atomic constants.
bool changing() const
Is mesh changing (topology changing and/or moving)
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
#define forAll(list, i)
Loop across all elements in list.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
label index() const
Return the index of this patch in the fvBoundaryMesh.
A list of keyword definitions, which are a keyword followed by any number of values (e...
bool updated() const
Return true if the boundary condition has already been updated.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
scalarField G_
Local copy of turbulence G field.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pow025(const dimensionedScalar &ds)
virtual void manipulateMatrix(fvMatrix< scalar > &matrix)
Manipulate matrix.
static scalar tolerance_
Tolerance used in weighted calculations.
virtual void calculate(const momentumTransportModel &turbModel, const List< scalar > &cornerWeights, const fvPatch &patch, scalarField &G, scalarField &epsilon)
Calculate the epsilon and G.
virtual void calculateTurbulenceFields(const momentumTransportModel &turbModel, scalarField &G0, scalarField &epsilon0)
Main driver to calculate the turbulence fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
const dimensionSet dimless
label k
Boltzmann constant.
const Time & time() const
Return the top-level database.
bool manipulatedMatrix() const
Return true if the matrix has already been manipulated.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const volScalarField::Boundary & y() const
Return the near wall distance.
scalar Cmu() const
Return Cmu.
Macros for easy insertion into run-time selection tables.
virtual void operator==(const fvPatchField< Type > &)
static const nutWallFunctionFvPatchScalarField & nutw(const momentumTransportModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
label master_
Master patch ID.
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions...
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
virtual label & master()
Return non-const access to the master patch ID.
static word timeName(const scalar, const int precision=curPrecision_)
Return time name of given scalar time.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual const labelUList & faceCells() const
Return faceCells.
static word groupName(Name name, const word &group)
Foam::fvPatchFieldMapper.
scalarField epsilon_
Local copy of turbulence epsilon field.
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.
virtual void manipulateMatrix(fvMatrix< Type > &matrix)
Manipulate matrix.
This boundary condition provides a turbulence dissipation wall constraint for low- and high-Reynolds ...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const fvPatch & patch() const
Return patch.
scalarField & G(bool init=false)
Return non-const access to the master's G field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual epsilonWallFunctionFvPatchScalarField & epsilonPatch(const label patchi)
Helper function to return non-const access to an epsilon patch.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
const Mesh & mesh() const
Return mesh.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
Abstract base class for turbulence models (RAS, LES and laminar).
label size() const
Return the number of elements in the UPtrList.
void setValues(const labelUList &cells, const ListType< Type > &values)
Set solution in given cells to the specified values.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void setSize(const label)
Reset size of List.
const volVectorField & U() const
Access function to velocity field.
List< List< scalar > > cornerWeights_
List of averaging corner weights.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionedScalar G0
Conductance quantum: default SI units: [S].
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Mesh data needed to do the Finite Volume discretisation.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const objectRegistry & db() const
Return local objectRegistry.
dimensioned< scalar > mag(const dimensioned< Type > &)
const dimensionedScalar epsilon0
Electric constant: default SI units: [F/m].
word GName() const
Helper function to return the name of the turbulence G field.
virtual void setMaster()
Set the master patch - master is responsible for updating all.
bool initialised_
Initialised flag.
static scalar yPlusLam(const scalar kappa, const scalar E)
Calculate the Y+ at the edge of the laminar sublayer.
A class for managing temporary objects.
virtual void createAveragingWeights()
Create the averaging weights for cells which are bounded by.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
epsilonWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
label size() const
Return the number of elements in the UList.
scalar kappa() const
Return kappa.
const dimensionedScalar e
Elementary charge.
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.
scalarField & epsilon(bool init=false)
Return non-const access to the master's epsilon field.