Boundary Functional

Euler Boundary Functional

This page consists of all the functions necessary for computing a boundary functional along the geometric edges of a mesh for Euler equations. A boundary functional should ALWAYS be evaluated by calling evalFunctional which is the highest level function.

EulerEquationMod.eval_dJdaoa

Compute the complete derivative of a functional w.r.t angle of attack

Inputs

  • mesh : Abstract mesh object

  • sbp : Summation-By-Parts operator

  • eqn : Euler equation object

  • opts : Options dictionary

  • functionalData : Object of type AbstractFunctional. This is type is associated with the functional being computed and holds all the relevant data.

  • functionalName : Name of the functional being evaluated

  • adjoint_vec : Local portion of the adjoint vector owned by an MPI rank

Output

  • dJdaoa : Complete derivative of the functional w.r.t angle of attack This is a scalar value that is the same across all MPI ranks

source

EulerEquationMod.calcBndryFunctional

This function calculates a functional on a geometric boundary of a the computational space. This is a mid level function that should not be called from outside the module. Depending on the functional being computed, it may be necessary to define another method for this function based on a different boundary functional type or parameters.

Inputs

  • mesh : Abstract mesh object

  • sbp : Summation-By-Parts operator

  • eqn : Euler equation object

  • opts : Options dictionary

  • functionalData : Object which is a subtype of Abstract OptimizationData. This is type is associated with the functional being computed and holds all the relevant data.

source

EulerEquationMod.calcBoundaryFunctionalIntegrand

Computes the integrand for boundary functional at a surface SBP node. Every functional of a different type may need a corresponding method to compute the integrand. The type of the functional object, which is a subtype of AbstractFunctional.

Arguments

  • params : eqn.params object

  • q : Nodal solution

  • aux_vars : Auxiliary variables

  • nrm : Face normal vector in the physical space

  • node_info : Information about the SBP node

  • objective : Functional data type

  • val : Function output value

source

EulerEquationMod. calcBoundaryFunctionalIntegrand_revm

Reverse mode for boundary functional integrand w.r.t. nrm. Takes in input val_bar and return nrm_bar for further reverse propagation.

Arguments

  • params : eqn.params object

  • q : Nodal solution

  • aux_vars : Auxiliary variables

  • nrm : Face normal vector in the physical space

  • node_info : Information about the SBP node

  • objective : Functional data type

  • nrm_bar : Resulting vector

  • val_bar : Nodal portion of the seeding vector

source

EulerEquationMod.evalFunctional_revm

Reverse mode of EulerEquationMod.evalFunctional, It takes in functional value and return mesh.nrm_bndry_bar. Different functionals will need to be added to the if statement to further extend this function.

Arguments

  • mesh : Abstract mesh object

  • sbp : Summation-By-Parts operator

  • eqn : Euler equation object

  • opts : Options dictionary

  • functionalData : Object of type AbstractFunctional. This is type is associated with the functional being computed and holds all the relevant data.

  • functionalName : Name of the functional being evaluated.

source

EulerEquationMod.evalFunctional

High level function that evaluates all the functionals specified over various edges. This function is agnostic to the type of the functional being computed and calls a mid level functional-type specific function for the actual evaluation.

Arguments

  • mesh : Abstract mesh object

  • sbp : Summation-By-Parts operator

  • eqn : Euler equation object

  • opts : Options dictionary

  • functionalData : Object of type AbstractFunctional. This is type is associated with the functional being computed and holds all the relevant data.

Outputs

  • val: functional value

source