Adjoint equation

From HandWiki
Revision as of 22:00, 6 February 2024 by JTerm (talk | contribs) (link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

An adjoint equation is a linear differential equation, usually derived from its primal equation using integration by parts. Gradient values with respect to a particular quantity of interest can be efficiently calculated by solving the adjoint equation. Methods based on solution of adjoint equations are used in wing shape optimization, fluid flow control and uncertainty quantification.

Example: Advection-Diffusion PDE

Consider the following linear, scalar advection-diffusion equation for the primal solution [math]\displaystyle{ u(\vec{x}) }[/math], in the domain [math]\displaystyle{ \Omega }[/math] with Dirichlet boundary conditions:

[math]\displaystyle{ \begin{align} \nabla \cdot \left(\vec{c} u - \mu \nabla u \right) &= f, \qquad \vec{x} \in \Omega, \\ u &= b, \qquad \vec{x} \in \partial \Omega. \end{align} }[/math]

Let the output of interest be the following linear functional:

[math]\displaystyle{ J(u) = \int_\Omega g u \ dV. }[/math]

Derive the weak form by multiplying the primal equation with a weighting function [math]\displaystyle{ w(\vec{x}) }[/math] and performing integration by parts:

[math]\displaystyle{ \begin{align} B(u, w) &= L(w), \end{align} }[/math]

where,

[math]\displaystyle{ \begin{align} B(u, w) &= \int_\Omega w \nabla \cdot \left(\vec{c} u - \mu \nabla u \right) dV \\ &= \int_{\partial \Omega} w \left(\vec{c} u - \mu \nabla u \right) \cdot \vec{n} dA - \int_\Omega \nabla w \cdot \left(\vec{c} u - \mu \nabla u \right) dV, \qquad \text{(Integration by parts)} \\ L(w) &= \int_\Omega w f \ dV. \end{align} }[/math]

Then, consider an infinitesimal perturbation to [math]\displaystyle{ L(w) }[/math] which produces an infinitesimal change in [math]\displaystyle{ u }[/math] as follows:

[math]\displaystyle{ \begin{align} B(u + u', w) &= L(w) + L'(w) \\ B(u', w) &= L'(w). \end{align} }[/math]

Note that the solution perturbation [math]\displaystyle{ u' }[/math] must vanish at the boundary, since the Dirichlet boundary condition does not admit variations on [math]\displaystyle{ \partial \Omega }[/math].

Using the weak form above and the definition of the adjoint [math]\displaystyle{ \psi(\vec{x}) }[/math] given below:

[math]\displaystyle{ \begin{align} L'(\psi) &= J(u') \\ B(u', \psi) &= J(u'), \end{align} }[/math]

we obtain:

[math]\displaystyle{ \begin{align} \int_{\partial \Omega} \psi \left(\vec{c} u' - \mu \nabla u' \right) \cdot \vec{n} dA - \int_\Omega \nabla \psi \cdot \left(\vec{c} u' - \mu \nabla u' \right) dV &= \int_\Omega g u' \ dV. \end{align} }[/math]


Next, use integration by parts to transfer derivatives of [math]\displaystyle{ u' }[/math] into derivatives of [math]\displaystyle{ \psi }[/math]:

[math]\displaystyle{ \begin{align} \int_{\partial \Omega} \psi \left(\vec{c} u' - \mu \nabla u' \right) \cdot \vec{n} dA - \int_\Omega \nabla \psi \cdot \left(\vec{c} u' - \mu \nabla u' \right) dV - \int_\Omega g u' \ dV &= 0 \\ \int_{\partial \Omega} \psi \left(\vec{c} u' - \mu \nabla u' \right) \cdot \vec{n} dA + \int_\Omega u' \left(-\vec{c} \cdot \nabla \psi \right) dV + \int_\Omega \nabla u' \cdot \left( \mu \nabla \psi \right) dV - \int_\Omega g u' \ dV &= 0 \\ \int_{\partial \Omega} \psi \left(\vec{c} u' - \mu \nabla u' \right) \cdot \vec{n} dA + \int_\Omega u' \left( - \vec{c} \cdot \nabla \psi \right) dV + \int_{\partial \Omega} u' \left( \mu \nabla \psi \right) \cdot \vec{n} dA - \int_\Omega u' \nabla \cdot \left( \mu \nabla \psi \right) dV - \int_\Omega g u' \ dV &= 0 \qquad \text{(Repeating integration by parts on diffusion volume term)} \\ \int_\Omega u' \left[ -\vec{c} \cdot \nabla \psi - \nabla \cdot \left( \mu \nabla \psi \right) - g \right] dV + \int_{\partial \Omega} \psi \left(\vec{c} u' - \mu \nabla u' \right) \cdot \vec{n} dA + \int_{\partial \Omega} u' \left( \mu \nabla \psi \right) \cdot \vec{n} dA &= 0. \end{align} }[/math]

The adjoint PDE and its boundary conditions can be deduced from the last equation above. Since [math]\displaystyle{ u' }[/math] is generally non-zero within the domain [math]\displaystyle{ \Omega }[/math], it is required that [math]\displaystyle{ \left[ -\vec{c} \cdot \nabla \psi - \nabla \cdot \left(\mu \nabla \psi \right) - g \right] }[/math] be zero in [math]\displaystyle{ \Omega }[/math], in order for the volume term to vanish. Similarly, since the primal flux [math]\displaystyle{ \left(\vec{c} u' - \mu \nabla u' \right) \cdot \vec{n} }[/math] is generally non-zero at the boundary, we require [math]\displaystyle{ \psi }[/math] to be zero there in order for the first boundary term to vanish. The second boundary term vanishes trivially since the primal boundary condition requires [math]\displaystyle{ u' = 0 }[/math] at the boundary.

Therefore, the adjoint problem is given by:

[math]\displaystyle{ \begin{align} -\vec{c} \cdot \nabla \psi - \nabla \cdot \left( \mu \nabla \psi \right) &= g, \qquad \vec{x} \in \Omega, \\ \psi &= 0, \qquad \vec{x} \in \partial \Omega. \end{align} }[/math]

Note that the advection term reverses the sign of the convective velocity [math]\displaystyle{ \vec{c} }[/math] in the adjoint equation, whereas the diffusion term remains self-adjoint.

See also

References

  • Jameson, Antony (1988). "Aerodynamic Design via Control Theory". Journal of Scientific Computing 3 (3): 233–260. doi:10.1007/BF01061285.