61 const this_bctype& ptf,
74 const this_bctype& tkqrwfpf,
92 if (isA<nutkWallFunctionFvPatchScalarField>(nutWall))
94 const label patchi(
patch().index());
107 const auto& nutWF = refCast<nutWallFunctionFvPatchScalarField>(nutWall);
109 const scalar Cmu = wallCoeffs.
Cmu();
110 const scalar
kappa = wallCoeffs.kappa();
111 const scalar E = wallCoeffs.E();
112 const scalar yPlusLam = wallCoeffs.yPlusLam();
114 const scalar Cmu25 =
pow025(Cmu);
129 const scalar sqrtkCell(
sqrt(
k[celli]));
130 const scalar
yPlus = Cmu25*
y[facei]*sqrtkCell/nuw[facei];
131 if (yPlusLam <
yPlus)
133 const scalar logEyPlus =
log(E*
yPlus);
134 const scalar dnut_dyPlus =
135 nuw[facei]*
kappa*(logEyPlus - 1)/
sqr(logEyPlus);
136 const scalar dyPlus_dk =
137 Cmu25*
y[facei]/(2*nuw[facei]*sqrtkCell);
138 const scalar dnut_dk = dnut_dyPlus*dyPlus_dk;
139 source[celli] -= dJdnut[facei]*dnut_dk*magSf[facei];
149 os.writeEntry(
"solverName", adjointSolverName_);
160 kaqRWallFunctionFvPatchScalarField
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
dimensionedScalar log(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const objectRegistry & db() const
The associated objectRegistry.
const scalarField & magSf() const
Return face area magnitudes, like the fvMesh::magSf() method.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const fvPatch & patch() const noexcept
Return the patch.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pow025(const dimensionedScalar &ds)
label k
Boltzmann constant.
Smooth ATC in cells next to a set of patches supplied by type.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
#define forAll(list, i)
Loop across all elements in list.
constexpr const char *const group
Group name for atomic constants.
virtual void write(Ostream &) const
Write.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
autoPtr< boundaryAdjointContribution > boundaryContrPtr_
Engine to manage contributions of the objective functions to the adjoint boundary conditions...
kaqRWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
fvPatchField< scalar > fvPatchScalarField
static const word propertiesName
Default name of the turbulence properties dictionary.
constexpr T & get(FixedList< T, N > &list) noexcept
A class for handling words, derived from Foam::string.
virtual const labelUList & faceCells() const
Return faceCells.
A FieldMapper for finite-volume patch fields.
const nearWallDist & y() const
Return the near wall distances.
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.
scalar Cmu() const noexcept
Return the object: Cmu.
Field< Type > & source() noexcept
virtual void manipulateMatrix(fvMatrix< scalar > &matrix)
Add source terms to the rhs of the first cell centre.
Base class for solution control classes.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const DimensionedField< scalar, volMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
A class for managing temporary objects.
Class to host the wall-function coefficients being used in the wall function boundary conditions...
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.