44 fixedValueFvPatchVectorField(
p, iF),
60 fixedValueFvPatchVectorField(ptf,
p, iF, mapper),
75 fixedValueFvPatchVectorField(
p, iF),
77 kappa_(
dict.getOrDefault<scalar>(
"kappa", 0.41)),
78 E_(
dict.getOrDefault<scalar>(
"E", 9.8))
80 this->readValueEntry(
dict, IOobjectOption::MUST_READ);
91 fixedValueFvPatchVectorField(pivpvf, iF),
93 kappa_(pivpvf.kappa_),
108 "adjointWallVelocityFvPatchVectorField::manipulateMatrix" 115 SAwallFunctionPatchField;
120 isA<SAwallFunctionPatchField>(nutPatch())
121 &&
patch().size() != 0
150 const scalarField auxA((kappa_/E_)*(
exp(kUu)-1 - kUu - 0.5*kUu*kUu));
160 label cellI =
patch().faceCells()[faceI];
162 2*auxB[faceI]*vtau[faceI]*((rt[faceI] + Uap_t[faceI]))
163 *(Uc[faceI]/
mag(Uc[faceI]))*magSf[faceI];
176 const fvPatchField<vector>& Up = boundaryContrPtr_->Ub();
179 tmp<vectorField> tnf =
patch().nf();
194 tmp<vectorField> tsource = boundaryContrPtr_->normalVelocitySource();
201 SAwallFunctionPatchField;
203 tmp<fvPatchScalarField> nutb(boundaryContrPtr_->turbulentDiffusivity());
204 if (isA<SAwallFunctionPatchField>(nutb()))
206 Uap_t1 = (Uac & tf1)*tf1;
212 Uap_t1 = - (tsource() & tf1)*tf1;
220 fixedValueFvPatchVectorField::updateCoeffs();
241 adjointWallVelocityFvPatchVectorField
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
Adjoint wall velocity boundary condition. If nutUSpaldingWallFunction is employed in the flow solutio...
fvPatchField< vector > fvPatchVectorField
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void write(Ostream &) const
Write.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
#define addProfiling(Name,...)
Define profiling trigger with specified name and description string. The description is generated by ...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
#define forAll(list, i)
Loop across all elements in list.
This boundary condition provides a wall function for the turbulent viscosity (i.e. nut) based on velocity (i.e. U). Using Spalding's law gives a continuous nut profile to the wall.
dimensionedScalar exp(const dimensionedScalar &ds)
autoPtr< boundaryAdjointContribution > boundaryContrPtr_
Engine to manage contributions of the objective functions to the adjoint boundary conditions...
virtual void manipulateMatrix(fvMatrix< vector > &matrix)
In case of High-Re runs based on the nutUSpaldingWallFunction add source terms in the first cell cent...
A class for handling words, derived from Foam::string.
A FieldMapper for finite-volume patch fields.
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.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
OBJstream os(runTime.globalPath()/outputName)
Field< Type > & source() noexcept
adjointWallVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
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 std::string patch
OpenFOAM patch number as a std::string.
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
static constexpr const zero Zero
Global zero (0)