boundaryAdjointContributionIncompressible Class Reference

Contributions of objective function differentiation to adjoint boundary conditions for incompressible flows. More...

Inheritance diagram for boundaryAdjointContributionIncompressible:
[legend]
Collaboration diagram for boundaryAdjointContributionIncompressible:
[legend]

Public Member Functions

 TypeName ("incompressible")
 Runtime type information. More...
 
 boundaryAdjointContributionIncompressible (const word &managerName, const word &adjointSolverName, const word &simulationType, const fvPatch &patch)
 Construct from components. More...
 
virtual ~boundaryAdjointContributionIncompressible ()=default
 Destructor. More...
 
tmp< scalarField > pressureSource ()
 
tmp< vectorField > velocitySource ()
 
tmp< vectorField > tangentVelocitySource ()
 
tmp< vectorField > normalVelocitySource ()
 
tmp< scalarField > energySource ()
 
tmp< scalarField > adjointTMVariable1Source ()
 
tmp< scalarField > adjointTMVariable2Source ()
 
tmp< scalarField > momentumDiffusion ()
 
tmp< scalarField > laminarDiffusivity ()
 
tmp< scalarField > thermalDiffusion ()
 
tmp< scalarField > wallDistance ()
 
tmp< scalarField > TMVariable1Diffusion ()
 
tmp< scalarField > TMVariable2Diffusion ()
 
tmp< scalarField > TMVariable1 ()
 
tmp< scalarField > TMVariable2 ()
 
const fvPatchVectorField & Ub () const
 
const fvPatchScalarField & pb () const
 
const fvsPatchScalarField & phib () const
 
const fvPatchScalarField & turbulentDiffusivity () const
 
const fvPatchVectorField & Uab () const
 
const fvPatchScalarField & pab () const
 
const fvsPatchScalarField & phiab () const
 
const word primalSolverName () const
 
const word adjointSolverName () const
 
const incompressibleVars & primalVars () const
 
const incompressibleAdjointVars & adjointVars () const
 
objectiveManager & getObjectiveManager ()
 
template<class returnType , class sourceType , class castType >
Foam::tmp< Foam::Field< returnType > > sumContributions (PtrList< sourceType > &sourceList, const fvPatchField< returnType > &(castType::*boundaryFunction)(const label))
 
- Public Member Functions inherited from boundaryAdjointContribution
 TypeName ("boundaryAdjointContribution")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, boundaryAdjointContribution, dictionary,(const word &managerName, const word &adjointSolverName, const word &simulationType, const fvPatch &patch),(managerName, adjointSolverName, simulationType, patch))
 
 boundaryAdjointContribution (const word &managerName, const word &adjointSolverName, const word &simulationType, const fvPatch &patch)
 Construct from components. More...
 
virtual ~boundaryAdjointContribution ()=default
 Destructor. More...
 

Protected Member Functions

template<class returnType , class sourceType , class castType >
tmp< Field< returnType > > sumContributions (PtrList< sourceType > &sourceList, const fvPatchField< returnType > &(castType::*boundaryFunction)(const label))
 

Protected Attributes

objectiveManager & objectiveManager_
 
const incompressibleVars & primalVars_
 
const incompressibleAdjointSolver & adjointSolver_
 
- Protected Attributes inherited from boundaryAdjointContribution
const fvPatch & patch_
 

Additional Inherited Members

- Static Public Member Functions inherited from boundaryAdjointContribution
static autoPtr< boundaryAdjointContribution > New (const word &managerName, const word &adjointSolverName, const word &simulationType, const fvPatch &patch)
 Return a reference to the selected turbulence model. More...
 

Detailed Description

Contributions of objective function differentiation to adjoint boundary conditions for incompressible flows.

Source files

Definition at line 61 of file boundaryAdjointContributionIncompressible.H.

Constructor & Destructor Documentation

◆ boundaryAdjointContributionIncompressible()

boundaryAdjointContributionIncompressible ( const word &  managerName,
const word &  adjointSolverName,
const word &  simulationType,
const fvPatch &  patch 
)

Construct from components.

Definition at line 54 of file boundaryAdjointContributionIncompressible.C.

◆ ~boundaryAdjointContributionIncompressible()

virtual ~boundaryAdjointContributionIncompressible ( )
virtualdefault

Destructor.

Member Function Documentation

◆ sumContributions() [1/2]

tmp<Field<returnType> > sumContributions ( PtrList< sourceType > &  sourceList,
const fvPatchField< returnType > &(castType::*)(const label)  boundaryFunction 
)
protected

◆ TypeName()

TypeName ( "incompressible"  )

Runtime type information.

◆ pressureSource()

◆ velocitySource()

◆ tangentVelocitySource()

◆ normalVelocitySource()

tmp< vectorField > normalVelocitySource ( )
virtual

Implements boundaryAdjointContribution.

Definition at line 168 of file boundaryAdjointContributionIncompressible.C.

References objectiveIncompressible::boundarydJdp(), objectiveManager::getObjectiveFunctions(), boundaryAdjointContributionIncompressible::objectiveManager_, and boundaryAdjointContributionIncompressible::sumContributions().

Here is the call graph for this function:

◆ energySource()

tmp< scalarField > energySource ( )
virtual

Implements boundaryAdjointContribution.

Definition at line 182 of file boundaryAdjointContributionIncompressible.C.

References objectiveIncompressible::boundarydJdT(), objectiveManager::getObjectiveFunctions(), boundaryAdjointContributionIncompressible::objectiveManager_, and boundaryAdjointContributionIncompressible::sumContributions().

Here is the call graph for this function:

◆ adjointTMVariable1Source()

tmp< scalarField > adjointTMVariable1Source ( )
virtual

Reimplemented from boundaryAdjointContribution.

Definition at line 197 of file boundaryAdjointContributionIncompressible.C.

References objectiveIncompressible::boundarydJdTMvar1(), objectiveManager::getObjectiveFunctions(), boundaryAdjointContributionIncompressible::objectiveManager_, and boundaryAdjointContributionIncompressible::sumContributions().

Here is the call graph for this function:

◆ adjointTMVariable2Source()

tmp< scalarField > adjointTMVariable2Source ( )
virtual

Reimplemented from boundaryAdjointContribution.

Definition at line 212 of file boundaryAdjointContributionIncompressible.C.

References objectiveIncompressible::boundarydJdTMvar2(), objectiveManager::getObjectiveFunctions(), boundaryAdjointContributionIncompressible::objectiveManager_, and boundaryAdjointContributionIncompressible::sumContributions().

Here is the call graph for this function:

◆ momentumDiffusion()

tmp< scalarField > momentumDiffusion ( )
virtual

Implements boundaryAdjointContribution.

Definition at line 226 of file boundaryAdjointContributionIncompressible.C.

References incompressibleAdjointVars::adjointTurbulence(), boundaryAdjointContributionIncompressible::adjointVars(), fvPatch::index(), boundaryAdjointContribution::patch_, tmp< T >::ref(), fvPatch::size(), and Foam::Zero.

Here is the call graph for this function:

◆ laminarDiffusivity()

tmp< scalarField > laminarDiffusivity ( )
virtual

Implements boundaryAdjointContribution.

Definition at line 240 of file boundaryAdjointContributionIncompressible.C.

References fvPatch::index(), nu, boundaryAdjointContribution::patch_, boundaryAdjointContributionIncompressible::primalVars_, tmp< T >::ref(), fvPatch::size(), incompressibleVars::turbulence(), and Foam::Zero.

Here is the call graph for this function:

◆ thermalDiffusion()

tmp< scalarField > thermalDiffusion ( )
virtual

Implements boundaryAdjointContribution.

Definition at line 254 of file boundaryAdjointContributionIncompressible.C.

References boundaryAdjointContribution::patch_, fvPatch::size(), WarningInFunction, and Foam::Zero.

Here is the call graph for this function:

◆ wallDistance()

tmp< scalarField > wallDistance ( )
virtual

Implements boundaryAdjointContribution.

Definition at line 273 of file boundaryAdjointContributionIncompressible.C.

References fvPatch::index(), boundaryAdjointContribution::patch_, boundaryAdjointContributionIncompressible::primalVars_, tmp< T >::ref(), fvPatch::size(), incompressibleVars::turbulence(), and Foam::Zero.

Here is the call graph for this function:

◆ TMVariable1Diffusion()

tmp< scalarField > TMVariable1Diffusion ( )
virtual

Reimplemented from boundaryAdjointContribution.

Definition at line 285 of file boundaryAdjointContributionIncompressible.C.

References incompressibleAdjointVars::adjointTurbulence(), boundaryAdjointContributionIncompressible::adjointVars(), fvPatch::index(), and boundaryAdjointContribution::patch_.

Here is the call graph for this function:

◆ TMVariable2Diffusion()

tmp< scalarField > TMVariable2Diffusion ( )
virtual

Reimplemented from boundaryAdjointContribution.

Definition at line 298 of file boundaryAdjointContributionIncompressible.C.

References incompressibleAdjointVars::adjointTurbulence(), boundaryAdjointContributionIncompressible::adjointVars(), fvPatch::index(), and boundaryAdjointContribution::patch_.

Here is the call graph for this function:

◆ TMVariable1()

tmp< scalarField > TMVariable1 ( )
virtual

Reimplemented from boundaryAdjointContribution.

Definition at line 310 of file boundaryAdjointContributionIncompressible.C.

References fvPatch::index(), boundaryAdjointContribution::patch_, boundaryAdjointContributionIncompressible::primalVars_, incompressibleVars::RASModelVariables(), tmp< T >::ref(), fvPatch::size(), and Foam::Zero.

Here is the call graph for this function:

◆ TMVariable2()

tmp< scalarField > TMVariable2 ( )
virtual

Reimplemented from boundaryAdjointContribution.

Definition at line 323 of file boundaryAdjointContributionIncompressible.C.

References fvPatch::index(), boundaryAdjointContribution::patch_, boundaryAdjointContributionIncompressible::primalVars_, incompressibleVars::RASModelVariables(), tmp< T >::ref(), fvPatch::size(), and Foam::Zero.

Here is the call graph for this function:

◆ Ub()

const fvPatchVectorField & Ub ( ) const
virtual

Implements boundaryAdjointContribution.

Definition at line 336 of file boundaryAdjointContributionIncompressible.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvPatch::index(), boundaryAdjointContribution::patch_, boundaryAdjointContributionIncompressible::primalVars_, and incompressibleVars::U().

Here is the call graph for this function:

◆ pb()

const fvPatchScalarField & pb ( ) const
virtual

Implements boundaryAdjointContribution.

Definition at line 342 of file boundaryAdjointContributionIncompressible.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvPatch::index(), incompressibleVars::p(), boundaryAdjointContribution::patch_, and boundaryAdjointContributionIncompressible::primalVars_.

Here is the call graph for this function:

◆ phib()

const fvsPatchScalarField & phib ( ) const
virtual

Implements boundaryAdjointContribution.

Definition at line 349 of file boundaryAdjointContributionIncompressible.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvPatch::index(), boundaryAdjointContribution::patch_, incompressibleVars::phi(), and boundaryAdjointContributionIncompressible::primalVars_.

Here is the call graph for this function:

◆ turbulentDiffusivity()

const fvPatchScalarField & turbulentDiffusivity ( ) const
virtual

Implements boundaryAdjointContribution.

Definition at line 356 of file boundaryAdjointContributionIncompressible.C.

References fvPatch::index(), boundaryAdjointContribution::patch_, boundaryAdjointContributionIncompressible::primalVars_, and incompressibleVars::RASModelVariables().

Here is the call graph for this function:

◆ Uab()

const fvPatchVectorField & Uab ( ) const
virtual

Implements boundaryAdjointContribution.

Definition at line 366 of file boundaryAdjointContributionIncompressible.C.

References boundaryAdjointContributionIncompressible::adjointVars(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvPatch::index(), boundaryAdjointContribution::patch_, and incompressibleAdjointMeanFlowVars::UaInst().

Here is the call graph for this function:

◆ pab()

const fvPatchScalarField & pab ( ) const
virtual

Implements boundaryAdjointContribution.

Definition at line 372 of file boundaryAdjointContributionIncompressible.C.

References boundaryAdjointContributionIncompressible::adjointVars(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvPatch::index(), incompressibleAdjointMeanFlowVars::paInst(), and boundaryAdjointContribution::patch_.

Here is the call graph for this function:

◆ phiab()

const fvsPatchScalarField & phiab ( ) const
virtual

Implements boundaryAdjointContribution.

Definition at line 379 of file boundaryAdjointContributionIncompressible.C.

References boundaryAdjointContributionIncompressible::adjointVars(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), fvPatch::index(), boundaryAdjointContribution::patch_, and incompressibleAdjointMeanFlowVars::phiaInst().

Here is the call graph for this function:

◆ primalSolverName()

const word primalSolverName ( ) const
virtual

Implements boundaryAdjointContribution.

Definition at line 385 of file boundaryAdjointContributionIncompressible.C.

References boundaryAdjointContributionIncompressible::primalVars_, and variablesSet::solverName().

Here is the call graph for this function:

◆ adjointSolverName()

const word adjointSolverName ( ) const
virtual

Implements boundaryAdjointContribution.

Definition at line 391 of file boundaryAdjointContributionIncompressible.C.

References boundaryAdjointContributionIncompressible::adjointVars(), and variablesSet::solverName().

Here is the call graph for this function:

◆ primalVars()

◆ adjointVars()

◆ getObjectiveManager()

◆ sumContributions() [2/2]

Foam::tmp<Foam::Field<returnType> > sumContributions ( PtrList< sourceType > &  sourceList,
const fvPatchField< returnType > &(castType::*)(const label)  boundaryFunction 
)

Definition at line 35 of file boundaryAdjointContributionIncompressibleTemplates.C.

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

Here is the call graph for this function:

Member Data Documentation

◆ objectiveManager_

◆ primalVars_

◆ adjointSolver_

const incompressibleAdjointSolver& adjointSolver_
protected

Note: getting a reference to the adjoint vars in the constructor of boundaryAdjointContributionIncompressible is dangerous since the autoPtr that holds them has not been completed yet. Instead, get a reference to the solver and grab the adjoint vars from there, when necessary

Definition at line 95 of file boundaryAdjointContributionIncompressible.H.

Referenced by boundaryAdjointContributionIncompressible::adjointVars().


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