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...
Public Member Functions | |
TypeName ("adjointOutletVelocityFlux") | |
Runtime type information. More... | |
adjointOutletVelocityFluxFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &) | |
Construct from patch and internal field. More... | |
adjointOutletVelocityFluxFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
adjointOutletVelocityFluxFvPatchVectorField (const adjointOutletVelocityFluxFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &) | |
Construct by mapping given adjointOutletVelocityFluxFvPatchVectorField onto a new patch. More... | |
adjointOutletVelocityFluxFvPatchVectorField (const adjointOutletVelocityFluxFvPatchVectorField &, const DimensionedField< vector, volMesh > &) | |
Construct as copy setting internal field reference. More... | |
virtual tmp< fvPatchField< vector > > | clone () const |
Return a clone. More... | |
virtual tmp< fvPatchField< vector > > | clone (const DimensionedField< vector, volMesh > &iF) const |
Clone with an internal field reference. More... | |
virtual bool | assignable () const |
Return true: Allow adjoint solvers to obtain the outlet phia. More... | |
virtual void | manipulateMatrix (fvMatrix< vector > &matrix) |
add source term in the first cells off the wall due to adjoint WF More... | |
virtual void | updateCoeffs () |
Update the coefficients associated with the patch field. More... | |
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. More... | |
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. More... | |
virtual tmp< Field< vector > > | gradientBoundaryCoeffs () const |
Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchField. More... | |
virtual tmp< Field< vector > > | gradientInternalCoeffs () const |
Return the matrix diagonal coefficients corresponding to the evaluation of the gradient of this patchField. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
virtual void | operator= (const fvPatchField< vector > &pvf) |
Public Member Functions inherited from adjointBoundaryCondition< Type > | |
TypeName ("adjointBoundaryCondition") | |
Run-time type information. More... | |
adjointBoundaryCondition (const fvPatch &p, const DimensionedField< Type, volMesh > &iF, const word &solverName) | |
Construct from field and base name. More... | |
adjointBoundaryCondition (const adjointBoundaryCondition< Type > &) | |
Construct as copy. More... | |
virtual | ~adjointBoundaryCondition ()=default |
Destructor. More... | |
const word & | objectiveManagerName () const |
Return objectiveManager name. More... | |
const word & | adjointSolverName () const |
Return adjointSolverName. More... | |
const word & | simulationType () const |
Return the simulationType. More... | |
void | setBoundaryContributionPtr () |
Set the ptr to the correct boundaryAdjointContribution. More... | |
boundaryAdjointContribution & | getBoundaryAdjContribution () |
Get boundaryContribution. More... | |
const ATCModel & | getATC () const |
ATC type might be useful for a number of BCs. Return here. More... | |
virtual tmp< Field< typename Foam::outerProduct< Foam::vector, Type >::type > > | dxdbMult () const |
Return contribution to sensitivity derivatives. More... | |
virtual void | updatePrimalBasedQuantities () |
Update the primal based quantities related to the adjoint boundary conditions. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from adjointBoundaryCondition< Type > | |
template<class Type2 > | |
tmp< Field< typename Foam::outerProduct< Foam::vector, Type2 >::type > > | computePatchGrad (word name) |
Get gradient of field on a specific boundary. More... | |
bool | addATCUaGradUTerm () |
Whether to add the extra term from the UaGradU formulation. More... | |
Protected Attributes inherited from adjointBoundaryCondition< Type > | |
const fvPatch & | patch_ |
Reference to patch. More... | |
word | managerName_ |
objectiveManager name corresponding to field More... | |
word | adjointSolverName_ |
adjointSolver name corresponding to field More... | |
word | simulationType_ |
simulationType corresponding to field. More... | |
autoPtr< boundaryAdjointContribution > | boundaryContrPtr_ |
Engine to manage contributions of the objective functions to the adjoint boundary conditions. More... | |
Switch | addATCUaGradUTerm_ |
Whether to add the extra term from the UaGradU formulation. More... | |
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.
Definition at line 55 of file adjointOutletVelocityFluxFvPatchVectorField.H.
adjointOutletVelocityFluxFvPatchVectorField | ( | const fvPatch & | p, |
const DimensionedField< vector, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 32 of file adjointOutletVelocityFluxFvPatchVectorField.C.
adjointOutletVelocityFluxFvPatchVectorField | ( | const fvPatch & | p, |
const DimensionedField< vector, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 58 of file adjointOutletVelocityFluxFvPatchVectorField.C.
References dict.
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 44 of file adjointOutletVelocityFluxFvPatchVectorField.C.
adjointOutletVelocityFluxFvPatchVectorField | ( | const adjointOutletVelocityFluxFvPatchVectorField & | pivpvf, |
const DimensionedField< vector, volMesh > & | iF | ||
) |
Construct as copy setting internal field reference.
Definition at line 73 of file adjointOutletVelocityFluxFvPatchVectorField.C.
TypeName | ( | "adjointOutletVelocityFlux" | ) |
Runtime type information.
|
inlinevirtual |
Return a clone.
Definition at line 115 of file adjointOutletVelocityFluxFvPatchVectorField.H.
References fvPatchField< Type >::Clone().
|
inlinevirtual |
Clone with an internal field reference.
Definition at line 124 of file adjointOutletVelocityFluxFvPatchVectorField.H.
References fvPatchField< Type >::Clone().
|
inlinevirtual |
Return true: Allow adjoint solvers to obtain the outlet phia.
value through HbyA
Definition at line 139 of file adjointOutletVelocityFluxFvPatchVectorField.H.
add source term in the first cells off the wall due to adjoint WF
Definition at line 86 of file adjointOutletVelocityFluxFvPatchVectorField.C.
References addProfiling, forAll, Foam::oneThirdI, Foam::foamVersion::patch, fvMatrix< Type >::source(), and Foam::tr().
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 139 of file adjointOutletVelocityFluxFvPatchVectorField.C.
References adjointBoundaryCondition< Type >::boundaryContrPtr_, Foam::operator==(), and Foam::foamVersion::patch.
|
virtual |
Return the matrix diagonal coefficients corresponding to the evaluation of the value of this patchField with given weights.
Definition at line 161 of file adjointOutletVelocityFluxFvPatchVectorField.C.
References Foam::New(), and Foam::Zero.
|
virtual |
Return the matrix source coefficients corresponding to the evaluation of the value of this patchField with given weights.
Definition at line 171 of file adjointOutletVelocityFluxFvPatchVectorField.C.
References Foam::New(), and Foam::Zero.
|
virtual |
Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchField.
Definition at line 181 of file adjointOutletVelocityFluxFvPatchVectorField.C.
References Foam::New(), and Foam::Zero.
|
virtual |
Return the matrix diagonal coefficients corresponding to the evaluation of the gradient of this patchField.
Definition at line 189 of file adjointOutletVelocityFluxFvPatchVectorField.C.
References Foam::New(), and Foam::Zero.
|
virtual |
Write.
Definition at line 196 of file adjointOutletVelocityFluxFvPatchVectorField.C.
References os(), fvPatchField< Type >::write(), Ostream::writeEntry(), and fvPatchField< Type >::writeValueEntry().
|
virtual |
Definition at line 209 of file adjointOutletVelocityFluxFvPatchVectorField.C.
References fvPatchField< Type >::operator=(), and Foam::foamVersion::patch.