44 boundaryAdjointContribution,
45 boundaryAdjointContributionIncompressible,
52 boundaryAdjointContributionIncompressible::
53 boundaryAdjointContributionIncompressible
55 const word& managerName,
56 const word& adjointSolverName,
57 const word& simulationType,
104 source += adjointRAS().adjointMomentumBCSource()[
patch_.
index()];
127 adjointRAS().adjointMomentumBCSource()[
patch_.
index()];
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";
bool hasBoundarydJdv() const noexcept
const fvsPatchScalarField & phiab() const
tmp< vectorField > velocitySource()
const volScalarField & paInst() const
Return const reference to pressure.
const word adjointSolverName() const
virtual const incompressibleAdjointVars & getAdjointVars() const
Access to the incompressible adjoint variables set.
bool hasBoundarydJdTMVar1() const noexcept
bool hasBoundarydJdGradU() const noexcept
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
const fvPatchVectorField & Ub() const
tmp< scalarField > wallDistance()
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
tmp< vectorField > nf() const
Return face unit normals, like the fvMesh::unitSf() method Same as unitSf().
bool hasBoundarydJdvn() const noexcept
Class for managing objective functions.
objectiveManager & objectiveManager_
tmp< scalarField > pressureSource()
const incompressibleVars & primalVars_
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const word primalSolverName() const
bool hasBoundarydJdp() const noexcept
tmp< scalarField > adjointTMVariable1Source()
tmp< scalarField > TMVariable2()
tmp< scalarField > adjointTMVariable2Source()
bool hasBoundarydJdT() const noexcept
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
Class including all adjoint fields for incompressible flows.
Base class for incompressibleAdjoint solvers.
const boundaryScalarField & boundarydJdTMvar1()
Objective partial deriv wrt turbulence model var 1 for all patches.
tmp< scalarField > laminarDiffusivity()
bool hasBoundarydJdnut() const noexcept
const fvPatchScalarField & pab() const
const surfaceScalarField & phi() const
Return const reference to volume flux.
Base class for solution control classes.
const boundaryVectorField & boundarydJdv()
Objective partial deriv wrt velocity for all patches.
A class for handling words, derived from Foam::string.
const boundaryScalarField & boundarydJdTMvar2()
Objective partial deriv wrt turbulence model var 2 for all patches.
const fvPatchVectorField & Uab() const
const volScalarField & p() const
Return const reference to pressure.
tmp< scalarField > dJdnut()
tmp< scalarField > energySource()
const incompressibleAdjointSolver & adjointSolver_
Note: getting a reference to the adjoint vars in the constructor of boundaryAdjointContributionIncomp...
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
const autoPtr< incompressibleAdjoint::adjointRASModel > & adjointTurbulence() const
Return const reference to the adjointRASModel.
tmp< scalarField > momentumDiffusion()
const word & solverName() const
Return solver name.
const incompressibleVars & primalVars() const
const volVectorField & U() const
Return const reference to velocity.
Abstract base class for computing contributions of the objective functions to the adjoint boundary co...
virtual label size() const
Patch size is the number of faces, but can be overloaded.
tmp< tensorField > dJdGradU()
tmp< scalarField > TMVariable1()
defineTypeNameAndDebug(combustionModel, 0)
const boundaryTensorField & boundarydJdGradU()
Objective partial deriv wrt gradU.
bool hasBoundarydJdTMVar2() const noexcept
tmp< scalarField > thermalDiffusion()
tmp< vectorField > normalVelocitySource()
const boundaryScalarField & boundarydJdnut()
Objective partial deriv wrt nut for all patches.
const autoPtr< incompressible::RASModelVariables > & RASModelVariables() const
Return const reference to the turbulence model variables.
tmp< scalarField > TMVariable1Diffusion()
const volVectorField & UaInst() const
Return const reference to velocity.
const boundaryVectorField & boundarydJdvt()
Objective partial deriv wrt tangent velocity for all patches.
const surfaceScalarField & phiaInst() const
Return const reference to volume flux.
#define WarningInFunction
Report a warning using Foam::Warning.
bool hasBoundarydJdvt() const noexcept
const fvsPatchScalarField & phib() const
const std::string patch
OpenFOAM patch number as a std::string.
const incompressibleAdjointVars & adjointVars() const
const boundaryVectorField & boundarydJdp()
Objective partial deriv wrt pressure (times normal) for all patches.
const autoPtr< incompressible::turbulenceModel > & turbulence() const
Return const reference to the turbulence model.
const fvPatchScalarField & pb() const
const boundaryScalarField & boundarydJdvn()
Objective partial deriv wrt normal velocity for all patches.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
const boundaryScalarField & boundarydJdT()
Objective partial deriv wrt temperature for all patches.
tmp< vectorField > tangentVelocitySource()
A class for managing temporary objects.
tmp< Field< returnType > > sumContributions(PtrList< sourceType > &sourceList, const fvPatchField< returnType > &(castType::*boundaryFunction)(const label), bool(castType::*hasFunction)() const)
label index() const noexcept
The index of this patch in the boundary mesh.
objectiveManager & getObjectiveManager()
tmp< fvPatchScalarField > turbulentDiffusivity() const
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
tmp< scalarField > TMVariable2Diffusion()
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)