Loading...
Searching...
No Matches
adjointOutletVelocityFluxFvPatchVectorField Class Reference

An outlet boundary condition for patches in which the primal flow exhibits recirculation. Adds the contribution of the objective as an adjoint momentum flux directly to the PDEs, without the need to first compute an adjoint outlet velocity, circumventing thus the division with (almost) zero that manifests in case of primal flow recirculation. More...

#include <adjointOutletVelocityFluxFvPatchVectorField.H>

Inheritance diagram for adjointOutletVelocityFluxFvPatchVectorField:
Collaboration diagram for adjointOutletVelocityFluxFvPatchVectorField:

Public Member Functions

 TypeName ("adjointOutletVelocityFlux")
 Runtime type information.
 adjointOutletVelocityFluxFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &)
 Construct from patch and internal field.
 adjointOutletVelocityFluxFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary.
 adjointOutletVelocityFluxFvPatchVectorField (const adjointOutletVelocityFluxFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given adjointOutletVelocityFluxFvPatchVectorField onto a new patch.
 adjointOutletVelocityFluxFvPatchVectorField (const adjointOutletVelocityFluxFvPatchVectorField &, const DimensionedField< vector, volMesh > &)
 Construct as copy setting internal field reference.
virtual tmp< fvPatchField< vector > > clone () const
 Return a clone.
virtual tmp< fvPatchField< vector > > clone (const DimensionedField< vector, volMesh > &iF) const
 Clone with an internal field reference.
virtual bool assignable () const
 Return true: Allow adjoint solvers to obtain the outlet phia.
virtual void manipulateMatrix (fvMatrix< vector > &matrix)
 add source term in the first cells off the wall due to adjoint WF
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field.
virtual tmp< Field< vector > > valueInternalCoeffs (const tmp< scalarField > &) const
 Return the matrix diagonal coefficients corresponding to the evaluation of the value of this patchField with given weights.
virtual tmp< Field< vector > > valueBoundaryCoeffs (const tmp< scalarField > &) const
 Return the matrix source coefficients corresponding to the evaluation of the value of this patchField with given weights.
virtual tmp< Field< vector > > gradientBoundaryCoeffs () const
 Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchField.
virtual tmp< Field< vector > > gradientInternalCoeffs () const
 Return the matrix diagonal coefficients corresponding to the evaluation of the gradient of this patchField.
virtual void write (Ostream &) const
 Write.
virtual void operator= (const fvPatchField< vector > &pvf)
Public Member Functions inherited from adjointBoundaryCondition< vector >
 TypeName ("adjointBoundaryCondition")
 Run-time type information.
 adjointBoundaryCondition (const fvPatch &p, const DimensionedField< vector, volMesh > &iF, const word &solverName)
 Construct from field and base name.
 adjointBoundaryCondition (const adjointBoundaryCondition< vector > &)
 Construct as copy.
virtual ~adjointBoundaryCondition ()=default
 Destructor.
const wordobjectiveManagerName () const
 Return objectiveManager name.
const wordadjointSolverName () const
 Return adjointSolverName.
const wordsimulationType () const
 Return the simulationType.
void setBoundaryContributionPtr ()
 Set the ptr to the correct boundaryAdjointContribution.
boundaryAdjointContributiongetBoundaryAdjContribution ()
 Get boundaryContribution.
const ATCModelgetATC () const
 ATC type might be useful for a number of BCs. Return here.
virtual tmp< Field< typename Foam::outerProduct< Foam::vector, vector >::type > > dxdbMult () const
 Return contribution to sensitivity derivatives.
virtual void updatePrimalBasedQuantities ()
 Update the primal based quantities related to the adjoint boundary conditions.

Additional Inherited Members

Protected Member Functions inherited from adjointBoundaryCondition< vector >
tmp< Field< typename Foam::outerProduct< Foam::vector, Type2 >::type > > computePatchGrad (word name)
 Get gradient of field on a specific boundary.
bool addATCUaGradUTerm ()
 Whether to add the extra term from the UaGradU formulation.
Protected Attributes inherited from adjointBoundaryCondition< vector >
const fvPatchpatch_
 Reference to patch.
word managerName_
 objectiveManager name corresponding to field
word adjointSolverName_
 adjointSolver name corresponding to field
word simulationType_
 simulationType corresponding to field.
autoPtr< boundaryAdjointContributionboundaryContrPtr_
 Engine to manage contributions of the objective functions to the adjoint boundary conditions.
Switch addATCUaGradUTerm_
 Whether to add the extra term from the UaGradU formulation.

Detailed Description

An outlet boundary condition for patches in which the primal flow exhibits recirculation. Adds the contribution of the objective as an adjoint momentum flux directly to the PDEs, without the need to first compute an adjoint outlet velocity, circumventing thus the division with (almost) zero that manifests in case of primal flow recirculation.

Source files

Definition at line 55 of file adjointOutletVelocityFluxFvPatchVectorField.H.

Constructor & Destructor Documentation

◆ adjointOutletVelocityFluxFvPatchVectorField() [1/4]

adjointOutletVelocityFluxFvPatchVectorField ( const fvPatch & p,
const DimensionedField< vector, volMesh > & iF )

Construct from patch and internal field.

Definition at line 30 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References p.

Referenced by adjointOutletVelocityFluxFvPatchVectorField(), adjointOutletVelocityFluxFvPatchVectorField(), manipulateMatrix(), and TypeName().

Here is the caller graph for this function:

◆ adjointOutletVelocityFluxFvPatchVectorField() [2/4]

adjointOutletVelocityFluxFvPatchVectorField ( const fvPatch & p,
const DimensionedField< vector, volMesh > & iF,
const dictionary & dict )

Construct from patch, internal field and dictionary.

Definition at line 56 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References dict, IOobjectOption::MUST_READ, and p.

◆ adjointOutletVelocityFluxFvPatchVectorField() [3/4]

adjointOutletVelocityFluxFvPatchVectorField ( const adjointOutletVelocityFluxFvPatchVectorField & ptf,
const fvPatch & p,
const DimensionedField< vector, volMesh > & iF,
const fvPatchFieldMapper & mapper )

Construct by mapping given adjointOutletVelocityFluxFvPatchVectorField onto a new patch.

Definition at line 42 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References adjointOutletVelocityFluxFvPatchVectorField(), adjointBoundaryCondition< vector >::adjointSolverName_, and p.

Here is the call graph for this function:

◆ adjointOutletVelocityFluxFvPatchVectorField() [4/4]

adjointOutletVelocityFluxFvPatchVectorField ( const adjointOutletVelocityFluxFvPatchVectorField & pivpvf,
const DimensionedField< vector, volMesh > & iF )

Construct as copy setting internal field reference.

Definition at line 71 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References adjointOutletVelocityFluxFvPatchVectorField().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "adjointOutletVelocityFlux" )

Runtime type information.

References adjointOutletVelocityFluxFvPatchVectorField().

Here is the call graph for this function:

◆ clone() [1/2]

virtual tmp< fvPatchField< vector > > clone ( ) const
inlinevirtual

Return a clone.

Definition at line 115 of file adjointOutletVelocityFluxFvPatchVectorField.H.

References fvPatchField< Type >::Clone().

Here is the call graph for this function:

◆ clone() [2/2]

virtual tmp< fvPatchField< vector > > clone ( const DimensionedField< vector, volMesh > & iF) const
inlinevirtual

Clone with an internal field reference.

Definition at line 123 of file adjointOutletVelocityFluxFvPatchVectorField.H.

References fvPatchField< Type >::Clone().

Here is the call graph for this function:

◆ assignable()

virtual bool assignable ( ) const
inlinevirtual

Return true: Allow adjoint solvers to obtain the outlet phia.

value through HbyA

Definition at line 139 of file adjointOutletVelocityFluxFvPatchVectorField.H.

◆ manipulateMatrix()

void manipulateMatrix ( fvMatrix< vector > & matrix)
virtual

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 139 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References adjointBoundaryCondition< vector >::boundaryContrPtr_, and Foam::operator==().

Here is the call graph for this function:

◆ valueInternalCoeffs()

Foam::tmp< Foam::Field< Foam::vector > > valueInternalCoeffs ( const tmp< scalarField > & ) const
virtual

Return the matrix diagonal coefficients corresponding to the evaluation of the value of this patchField with given weights.

Definition at line 160 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References Foam::New(), and Foam::Zero.

Here is the call graph for this function:

◆ valueBoundaryCoeffs()

Foam::tmp< Foam::Field< Foam::vector > > valueBoundaryCoeffs ( const tmp< scalarField > & ) const
virtual

Return the matrix source coefficients corresponding to the evaluation of the value of this patchField with given weights.

Definition at line 170 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References Foam::New(), and Foam::Zero.

Here is the call graph for this function:

◆ gradientBoundaryCoeffs()

Foam::tmp< Foam::Field< Foam::vector > > gradientBoundaryCoeffs ( ) const
virtual

Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchField.

Definition at line 180 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References Foam::New(), and Foam::Zero.

Here is the call graph for this function:

◆ gradientInternalCoeffs()

Foam::tmp< Foam::Field< Foam::vector > > gradientInternalCoeffs ( ) const
virtual

Return the matrix diagonal coefficients corresponding to the evaluation of the gradient of this patchField.

Definition at line 188 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References Foam::New(), and Foam::Zero.

Here is the call graph for this function:

◆ write()

void write ( Ostream & os) const
virtual

◆ operator=()

void operator= ( const fvPatchField< vector > & pvf)
virtual

Definition at line 208 of file adjointOutletVelocityFluxFvPatchVectorField.C.

References fvPatchField< Type >::operator=().

Here is the call graph for this function:

The documentation for this class was generated from the following files: