45 boundaryAdjointContributionIncompressible,
52boundaryAdjointContributionIncompressible::
53boundaryAdjointContributionIncompressible
55 const word& managerName,
57 const word& simulationType,
61 boundaryAdjointContribution
104 source += adjointRAS().adjointMomentumBCSource()[
patch_.index()];
127 adjointRAS().adjointMomentumBCSource()[
patch_.
index()];
129 source += adjointTurbulenceContr &
patch_.nf();
153 adjointRAS().adjointMomentumBCSource()[
patch_.
index()];
158 source += adjointTurbulenceContr - (adjointTurbulenceContr & nf)*nf;
255 auto&
nu = tnu.ref();
276 <<
"no abstract thermalDiffusion is implemented. Returning zero field";
309 boundaryField()[
patch_.index()];
317 boundaryField()[
patch_.index()];
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Contributions of objective function differentiation to adjoint boundary conditions for incompressible...
tmp< scalarField > TMVariable2Diffusion()
tmp< scalarField > adjointTMVariable1Source()
const fvPatchVectorField & Uab() const
const fvPatchScalarField & pab() const
tmp< scalarField > pressureSource()
tmp< tensorField > dJdGradU()
const fvsPatchScalarField & phiab() const
tmp< scalarField > adjointTMVariable2Source()
const word primalSolverName() const
tmp< scalarField > momentumDiffusion()
tmp< scalarField > thermalDiffusion()
tmp< scalarField > TMVariable2()
tmp< scalarField > wallDistance()
objectiveManager & getObjectiveManager()
const fvPatchVectorField & Ub() const
const fvPatchScalarField & pb() const
tmp< scalarField > TMVariable1Diffusion()
const incompressibleAdjointSolver & adjointSolver_
Note: getting a reference to the adjoint vars in the constructor of boundaryAdjointContributionIncomp...
tmp< scalarField > dJdnut()
tmp< scalarField > TMVariable1()
const fvsPatchScalarField & phib() const
const word adjointSolverName() const
objectiveManager & objectiveManager_
const incompressibleVars & primalVars_
tmp< scalarField > energySource()
tmp< vectorField > normalVelocitySource()
tmp< fvPatchScalarField > turbulentDiffusivity() const
tmp< vectorField > velocitySource()
const incompressibleVars & primalVars() const
const incompressibleAdjointVars & adjointVars() const
tmp< scalarField > laminarDiffusivity()
tmp< vectorField > tangentVelocitySource()
Abstract base class for computing contributions of the objective functions to the adjoint boundary co...
tmp< Field< returnType > > sumContributions(PtrList< sourceType > &sourceList, const fvPatchField< returnType > &(castType::*boundaryFunction)(const label), bool(castType::*hasFunction)() const)
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,...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual label size() const
Patch size is the number of faces, but can be overloaded.
label index() const noexcept
The index of this patch in the boundary mesh.
tmp< vectorField > nf() const
Return face unit normals, like the fvMesh::unitSf() method Same as unitSf().
const volVectorField & UaInst() const
Return const reference to velocity.
const surfaceScalarField & phiaInst() const
Return const reference to volume flux.
const volScalarField & paInst() const
Return const reference to pressure.
Base class for incompressibleAdjoint solvers.
Class including all adjoint fields for incompressible flows.
const autoPtr< incompressibleAdjoint::adjointRASModel > & adjointTurbulence() const
Return const reference to the adjointRASModel.
Base class for solution control classes.
const autoPtr< incompressible::turbulenceModel > & turbulence() const
Return const reference to the turbulence model.
bool hasBoundarydJdv() const noexcept
const fvPatchScalarField & boundarydJdnut(const label)
Objective partial deriv wrt nut for a specific patch.
const fvPatchTensorField & boundarydJdGradU(const label)
Objective partial deriv wrt stress tensor.
bool hasBoundarydJdvn() const noexcept
const fvPatchVectorField & boundarydJdvt(const label)
Objective partial deriv wrt tangent velocity for a specific patch.
const fvPatchVectorField & boundarydJdv(const label)
Objective partial deriv wrt velocity for a specific patch.
bool hasBoundarydJdT() const noexcept
const fvPatchScalarField & boundarydJdTMvar2(const label)
Objective partial deriv wrt turbulence model var 2 for a specific patch.
const fvPatchScalarField & boundarydJdvn(const label)
Objective partial deriv wrt normal velocity for a specific patch.
const fvPatchScalarField & boundarydJdTMvar1(const label)
Objective partial deriv wrt turbulence model var 1 for a specific patch.
const fvPatchScalarField & boundarydJdT(const label)
Objective partial deriv wrt temperature for a specific patch.
bool hasBoundarydJdTMVar2() const noexcept
bool hasBoundarydJdTMVar1() const noexcept
bool hasBoundarydJdGradU() const noexcept
bool hasBoundarydJdnut() const noexcept
const fvPatchVectorField & boundarydJdp(const label)
Objective partial deriv wrt pressure (times normal) for a specific patch.
bool hasBoundarydJdp() const noexcept
bool hasBoundarydJdvt() const noexcept
Class for managing objective functions.
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
Abstract base class for turbulence models (RAS, LES and laminar).
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
const word & solverName() const
Return solver name.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define WarningInFunction
Report a warning using Foam::Warning.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0).
fvPatchField< vector > fvPatchVectorField
fvsPatchField< scalar > fvsPatchScalarField
fvPatchField< scalar > fvPatchScalarField