# Optimize Rotating Wind Energy Rotor Blades Using the Adjoint Approach
## 2 Optimization Method
### Gradient Estimation by the Adjoint Approach  
The adjoint approach allows for computing the gradient of a cost function with respect to the design parameters independently from the amount of design parameters. The main idea is to build a Lagrangian function, which includes both the cost function to be optimized and the constraint and thus can be used for constrained optimization problems. For optimization based on CFD, the flow equations have to be satisfied in each optimization point. Thus, the constraining functions are the Navier-Stokes equations (NSE)  
\[\mathbf{R_{u}} = \left(\mathbf{u}\cdot\
abla\right)\mathbf{u}+\
abla p-\
abla \cdot\left(2\
u D\left(\mathbf{u}\right)\right), \tag{1}\] \[\mathbf{R_{p}} = -\
abla\cdot\mathbf{u}, \tag{2}\]  
with \(\mathbf{u}\) and \(p\) being the flow velocity and pressure, respectively. The rate of strain tensor for any given vector \(\mathbf{x}\) is defined as \(D\left(\mathbf{x}\right)=\frac{1}{2}\left(\
abla\mathbf{x}+\left(\
abla \mathbf{x}\right)^{T}\right)\). This notation is used for the velocity \(\mathbf{u}\) and adjoint velocity \(\mathbf{u_{a}}\) in the flow and adjoint field, respectively. The viscosity \(\
u\) is a sum of the molecular and turbulent viscosity.  
The Lagrangian function  
\[L:=I+\int_{\Omega}\left(\mathbf{u_{a}},p_{a}\right)\cdot\mathbf{R}\;d\Omega \tag{3}\]  
combines the cost function \(I\) with the NSE \(\mathbf{R}\) in the flow domain \(\Omega\). The Lagrangian multipliers, which allow the combination of the cost function with the NSE, are the adjoint velocity \(\mathbf{u_{a}}\) and adjoint pressure \(p_{a}\).  
The adjoint field equations  
\[-2D\left(\mathbf{u_{a}}\right)\mathbf{u} = -\
abla p_{a}+\
abla\cdot\left(2\
u D\left(\mathbf{u_{a}}\right) \right)-\frac{\partial I_{\Omega}}{\partial\mathbf{u}}, \tag{4}\] \[\
abla\cdot\mathbf{u} = \frac{\partial I_{\Omega}}{\partial\mathbf{p}}, \tag{5}\]result from the variation of the Lagrangian function with respect to the flow and design variables. A step-by-step derivation of the adjoint field is shown in the work of [PERSON] [18].  
In this work, the flow equations are solved following the SIMPLE algorithm [19]. The continuous adjoint equations are similar to the ones from the flow field, such that similar numerical solving strategies can be applied. The frozen turbulence approach is applied, meaning that the viscosity from the flow field is also applied for the adjoint field, without additional adjoint turbulence equations [7; 20].  
In the following, flow gradients refer to changes in the flow field over distance, whereas gradients are the gradients of the cost function w.r.t. the design variables.  
The two discussed fields have to be solved once, respectively, to derive all gradients at each numerical grid node on the blade geometry surface. Thus, the additional cost for the gradient information at any amount of design parameters equals the cost of solving a second set of partial differential equations that are derived from the flow field equations. One consequence from this is that the adjoint field is driven by the flow field on which it is based. This can also be seen in Equations (4) and (5) and leads to a transfer of the error made in the flow field computations to the adjoint field. Thus, the adjoint field is less stable. The large advantage of the adjoint method compared to other gradient estimation methods is that the amount of necessary solutions of the flow field doesn't scale with the amount of design parameters. This is especially desirable when working with gradient based optimization based on fully resolved simulations.