40#ifndef objectiveIncompressible_H
41#define objectiveIncompressible_H
134 const word& adjointSolverName,
135 const word& primalSolverName
137 (
mesh,
dict, adjointSolverName, primalSolverName)
148 const word& adjointSolverName,
149 const word& primalSolverName
160 const word& adjointSolverName,
161 const word& primalSolverName
172 virtual scalar
J() = 0;
333 virtual bool write(
const bool valid =
true)
const;
Generic GeometricBoundaryField class.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
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.
Base class for solution control classes.
Abstract base class for objective functions in incompressible flows.
const boundaryVectorField & boundarydJdp()
Objective partial deriv wrt pressure (times normal) for all patches.
bool hasBoundarydJdvn() const
autoPtr< volScalarField > dJdTMvar2Ptr_
Second turbulence model variable.
virtual void update_dxdbMultiplier()
Update d (x) / db multiplier. Surface-based sensitivity term.
virtual void update_boundarydJdTMvar2()
virtual void update_gradDxDbMultiplier()
Update grad( dx/db multiplier). Volume-based sensitivity term.
const volScalarField & dJdTMvar1()
Contribution to field adjoint turbulence model variable 1.
bool hasBoundarydJdp() const
const boundaryScalarField & boundarydJdTMvar1()
Objective partial deriv wrt turbulence model var 1 for all patches.
static autoPtr< objectiveIncompressible > New(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
Return a reference to the selected turbulence model.
virtual void update_dxdbDirectMultiplier()
const boundaryScalarField & boundarydJdT()
Objective partial deriv wrt temperature for all patches.
virtual void update_dJdTMvar1()
autoPtr< boundaryTensorField > bdJdGradUPtr_
Term multiplying gradU variations.
TypeName("incompressible")
Runtime type information.
autoPtr< boundaryScalarField > bdJdTMvar2Ptr_
Adjoint outlet turbulence model var 2.
virtual void update_boundarydJdvt()
autoPtr< volScalarField > dJdpPtr_
bool hasBoundarydJdT() const
const boundaryTensorField & boundarydJdGradU()
Objective partial deriv wrt gradU.
bool hasBoundarydJdvt() const
const volScalarField & dJdT()
Contribution to field adjoint energy eq.
virtual void update_divDxDbMultiplier()
Update div( dx/db multiplier). Volume-based sensitivity term.
virtual void update_boundarydJdb()
Update objective function derivative term.
const boundaryScalarField & boundarydJdnut()
Objective partial deriv wrt nut for all patches.
virtual void update_dJdTMvar2()
virtual void update_dJdv()
Update vol and boundary fields and derivatives.
virtual void nullify()
Update objective function derivatives.
const boundaryVectorField & boundarydJdv()
Objective partial deriv wrt velocity for all patches.
virtual ~objectiveIncompressible()=default
Destructor.
virtual void update_boundarydJdp()
declareRunTimeSelectionTable(autoPtr, objectiveIncompressible, dictionary,(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName),(mesh, dict, adjointSolverName, primalSolverName))
virtual void update_meanValues()
autoPtr< volScalarField > dJdTMvar1Ptr_
First turbulence model variable.
autoPtr< boundaryScalarField > bdJdTMvar1Ptr_
Adjoint outlet turbulence model var 1.
bool hasBoundarydJdnut() const
const boundaryScalarField & boundarydJdvn()
Objective partial deriv wrt normal velocity for all patches.
virtual scalar J()=0
Return the objective function value.
virtual void update_dSdbMultiplier()
Update d (normal dS) / db multiplier. Surface-based sensitivity term.
virtual void update_boundarydJdTMvar1()
virtual void update_dndbMultiplier()
Update d (normal) / db multiplier. Surface-based sensitivity term.
autoPtr< boundaryScalarField > bdJdnutPtr_
Jacobian wrt to nut.
autoPtr< boundaryScalarField > bdJdTPtr_
Adjoint outlet temperature.
bool hasBoundarydJdv() const
autoPtr< boundaryScalarField > bdJdvnPtr_
Adjoint outlet pressure.
virtual void update_boundarydJdGradU()
autoPtr< volScalarField > dJdTPtr_
const boundaryVectorField & boundarydJdvt()
Objective partial deriv wrt tangent velocity for all patches.
const volScalarField & dJdp()
Contribution to field adjoint continuity eq.
const volScalarField & dJdTMvar2()
Contribution to field adjoint turbulence model variable 2.
autoPtr< boundaryVectorField > bdJdpPtr_
Adjoint (intlet,wall) velocity.
virtual void doNormalization()
Normalize all fields allocated by the objective.
virtual void update_boundarydJdnut()
virtual void update()
Update objective function derivatives.
bool hasBoundarydJdTMVar1() const
bool hasdJdv() const
Inline functions for checking whether pointers are set or not.
bool hasBoundarydJdGradU() const
virtual void update_boundarydJdv()
const volVectorField & dJdv()
Contribution to field adjoint momentum eqs.
virtual void update_dJdT()
autoPtr< boundaryVectorField > bdJdvtPtr_
Adjoint outlet velocity.
const incompressibleVars & vars_
const boundaryScalarField & boundarydJdTMvar2()
Objective partial deriv wrt turbulence model var 2 for all patches.
virtual void update_dJdb()
bool hasdJdTMVar1() const
virtual void update_boundarydJdvn()
autoPtr< boundaryVectorField > bdJdvPtr_
bool hasBoundarydJdTMVar2() const
bool hasdJdTMVar2() const
virtual void update_boundarydJdT()
virtual void update_dJdp()
autoPtr< volVectorField > dJdvPtr_
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
const dictionary & dict() const
Return objective dictionary.
A class for handling words, derived from Foam::string.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.