Adjoint of Solution Analysis
The computation of the sensitivity of the report objective with respect to its dependent variables, , provides the input to the adjoint of the governing physics solver.
Primal
The last step in the primal analysis becomes the first step in the adjoint analysis. Once a solution of the system of equations is obtained, the engineering quantities of interest—such as lift and drag forces on vehicles, pressure drop along ducts—are computed. The quantity that you want to reduce or increase is commonly termed as the cost function or objective in the context of optimization.
Suppose the objective, , is a surface integral report of the tangential speed field, , at the outlet boundary of a duct:
where
and is the unit face normal.
The tangential speed would be supplied as a user defined field function with the definition
mag($$Velocity-dot($$Velocity, unit($$Area))*unit($$Area))
Writing the objective in the form , where is a component of and treating as being synonymous with , its evaluation would be performed in two steps:
- Calculating the user defined field
- Evaluating the surface integral of that field over all the specified parts.
Thus the objective is of the form
Adjoint
Applying the chain rule to Eqn. (5070) gives:
The existence of both of these sensitivities is due to the choice of report selected (in this example the surface integral) and the field function supplied to the report. Simpler report objectives may not have a direct dependency on the mesh (second term in Eqn. (5072)), such as a Sum report. Also, a simpler field function may not have a direct dependency on the solution of the transport equations, such as a geometric constraint.
Taking the transpose of Equation Eqn. (5071) and Eqn. (5072), the derivatives required by the first step of the adjoint algorithm are
Both terms are computed once at the beginning of the adjoint algorithm and contribute to the right-hand side of the coupled adjoint linear system, and to the final metrics sensitivity, respectively.