07.02.2013 Views

Optimization and Computational Fluid Dynamics - Department of ...

Optimization and Computational Fluid Dynamics - Department of ...

Optimization and Computational Fluid Dynamics - Department of ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

124 Nicolas R. Gauger<br />

The main advantage <strong>of</strong> the AD method over the above two mentioned<br />

methods is that gradients can be computed with the best possible accuracy.<br />

In forward mode the gradient computation speed is dependent on the number<br />

<strong>of</strong> design variables which can be expensive if the evaluation trace for the cost<br />

function is long. In reverse mode the gradient computation is independent on<br />

any input <strong>and</strong> therefore is very efficient when numerous design variables are<br />

needed.<br />

There are mainly two possible implementations <strong>of</strong> AD methods. The first<br />

is the so-called source to source which means that the primal evaluation trace<br />

is transferred into a differentiated evaluation trace. The second is based on<br />

operator overloading which only yields an executable.<br />

However, the problem in reverse mode for both implementation strategies<br />

is that primal computation informations have to be recomputed <strong>and</strong>/or stored<br />

to compute backwards again. A fair amount <strong>of</strong> memory is thus essential for<br />

the chosen approach.<br />

For more information on multiple output <strong>and</strong> input variables including<br />

vector valued functions, please refer to [13].<br />

5.5 Adjoint Flow Solvers<br />

5.5.1 Continuous Adjoint Flow Solvers<br />

Within the MEGAFLOW project [22], an adjoint solver following the continuous<br />

adjoint formulation has been developed <strong>and</strong> widely validated for the<br />

block-structured flow solver FLOWer [7, 8]. The adjoint solver, which was<br />

implemented by h<strong>and</strong>, can deal with the boundary conditions for drag, lift<br />

Table 5.3 Reverse differentiated evaluation trace<br />

1 v−1 = x1 =1.5<br />

2 v0 = x2 =0.5<br />

3 v1 = v−1/v0 =1.5/0.5=3.0<br />

4 v2 =sin(v1)=sin(3.0) = 0.1411<br />

5 v3 = v1 + v2 =3.0+0.1411 = 3.1411<br />

6 y = v3 =3.1411<br />

7 v3 = y =1.0<br />

8 v1 = v3 =1.0<br />

9 v2 = v3 =1.0<br />

10 v1 = v1 + v2 cos(v1)=1.0+1.0cos(3.0) = 0.01<br />

11 v0 = −v1v1/v0 = −0.01 × 3.0/0.5=−0.06<br />

12 v−1 = v1/v0 =0.01/0.5=0.02<br />

13 x2 = v0 = −0.06<br />

14 x1 = v−1 =0.02

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!