58 const word& adjointSolverName,
59 const word& primalSolverName
70 forceDirection_(
dict.get<
vector>(
"direction")),
71 Aref_(
dict.get<scalar>(
"Aref")),
72 rhoInf_(
dict.get<scalar>(
"rhoInf")),
73 UInf_(
dict.get<scalar>(
"UInf"))
79 <<
"No valid patch name on which to minimize " <<
type() <<
endl
84 Info<<
"Minimizing " <<
type() <<
" in patches:" <<
endl;
122 cumulativeForce = pressureForce + viscousForce;
131 <<
"Force|Coeff " << force <<
"|" << Cforce <<
endl;
200 if (isA<wallFvPatch>(patch))
203 gradUbf[patchI] = tnf*
U.boundaryField()[patchI].snGrad();
226 for (label idir = 0; idir < pTraits<vector>::nComponents; ++idir)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
bool empty() const noexcept
True if the hash table is empty.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
T & ref()
Return reference to the managed object without nullptr checking.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const surfaceVectorField & Sf() const
Return cell face area vectors.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const volVectorField & U() const
Return const reference to velocity.
const volScalarField & p() const
Return const reference to pressure.
const autoPtr< incompressible::turbulenceModel > & turbulence() const
Return const reference to the turbulence model.
const singlePhaseTransportModel & laminarTransport() const
Return const reference to transport model.
const volScalarField & pInst() const
Return const reference to pressure.
const autoPtr< incompressible::RASModelVariables > & RASModelVariables() const
Return const reference to the turbulence model variables.
Abstract base class for objective functions in incompressible flows.
autoPtr< boundaryTensorField > bdJdGradUPtr_
Term multiplying gradU variations.
autoPtr< boundaryScalarField > bdJdnutPtr_
Jacobian wrt to nut.
autoPtr< boundaryVectorField > bdJdpPtr_
Adjoint (intlet,wall) velocity.
const incompressibleVars & vars_
autoPtr< boundaryVectorField > bdSdbMultPtr_
Term multiplying delta(n dS)/delta b.
scalar J_
Objective function value and weight.
autoPtr< boundaryVectorField > bdxdbMultPtr_
Term multiplying delta(x)/delta b at the boundary.
labelHashSet forcePatches_
const vector & forceDirection() const
Return force direction.
void update_boundarydJdnut()
Update dJ/dnut multiplier.
virtual scalar denom() const
Return denominator, without density.
void update_boundarydJdGradU()
Update dJ/dGradU multiplier.
scalar J()
Return the objective function value.
void update_dxdbMultiplier()
Update delta(x)/delta b multiplier.
void update_boundarydJdp()
Update values to be added to the adjoint wall velocity.
void update_dSdbMultiplier()
Update delta(n dS)/delta b multiplier.
A simple single-phase transport model based on viscosityModel.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
A class for managing temporary objects.
void clear() const noexcept
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
compressible::turbulenceModel & turbulence
#define DebugInfo
Report an information message using Foam::Info.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
Type gSum(const FieldField< Field, Type > &f)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
const dimensionSet dimVelocity
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
void unzipRow(const FieldField< Field, SymmTensor< Cmpt > > &input, const direction idx, FieldField< Field, Vector< Cmpt > > &result)
Extract a symmTensor field field row (x,y,z) == (0,1,2)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define forAll(list, i)
Loop across all elements in list.