Sie sind auf Seite 1von 11

Computers & Fluids 47 (2011) 22–32

Contents lists available at ScienceDirect

Computers & Fluids


j o u r n a l h o m e p a g e : w w w . e l s e v i e r . c o m / l o c a t e / c o m p fl u i d

Adjoint RANS with filtered shape derivatives for hydrodynamic optimisation


Arthur Stück ⇑, Thomas Rung
Institute for Fluid Dynamics and Ship Theory, Hamburg University of Technology, Schwarzenbergstraße 95C, D-21073 Hamburg, Germany

a r t i c l e i n f o a b s t r a c t

Article history: The adjoint RANS method has been implemented in the framework of an unstructured general-purpose
Received 25 July 2010 finite volume code following the derive-then-discretise strategy (continuous adjoint approach). An expli-
Received in revised form 27 January 2011 cit filtering technique is applied to the shape derivatives in order to extract noise from the mesh-based
Accepted 31 January 2011
representation of high-resolution. In a CAD-free optimisation strategy the method is applied to a semi-
Available online 4 February 2011
circular profile in incompressible, external flow. It was observed that the filtering is particularly relevant
at high Reynolds-numbers. In the complex scenario of ship hull design, the filtered shape derivative can
Keywords:
directly be applied to the base-line configuration in order to support both manual and automatic shape
Adjoint RANS
Gradient smoothness
optimisation.
Filtered shape derivatives Ó 2011 Elsevier Ltd. All rights reserved.
Design optimization
Unstructured grids

1. Introduction be derived analytically prior to discretisation following the de-


rive-then-discretise or continuous adjoint method. Special care is
In hydrodynamic shape optimisation computational costs needed to provide a certain level of consistency of the discrete
quickly become prohibitive, particularly when the evaluation of objective function value and its derivative or gradient, also known
the objective functional is costly and many parameters are in- as duality or adjoint consistency [21,20,9,8]. This particularly re-
volved. If gradient-based optimisation applies, the adjoint tech- gards the derivation and discretisation of the adjoint boundary
nique is the most efficient way to calculate the shape derivatives conditions. Some RANS closure models have a singularity next to
required to guide the optimisation. The method was pioneered the boundary or include complex source terms, impeding a contin-
by Pironneau [24] and Jameson [12,13]. Giles and Pierce [8] give uous adjoint formulation. There are restrictions on the possible for-
an introduction to the adjoint method in the context of shape opti- mulations of objective functionals that can be addressed through
misation. A discretisation of the adjoint equations can either be ob- the continuous adjoint calculus. On the other hand, the algorithmic
tained in the discretise-then-derive or in the derive-then-discretise flexibility of the continuous adjoint method strongly facilitates the
approach. The former, also known as discrete adjoint method, en- development of an adjoint module for incompressible, segregated
sures consistency on the discretisation level and provides the exact pressure-correction solvers which are widely used in automotive
gradient of the discrete objective function – a premise for an opti- and marine industry. A compact implementation is obtained by
misation procedure to fully converge. However, the memory reusing huge portions of the flow solver in the adjoint code
requirements are higher and, in conjunction with extended com- [22,30]. Realisability and maintainability in combination with
putational molecules, the manual construction of the discrete ad- complex and parallel production codes have been the main reasons
joint becomes tedious [21]. Through automatic differentiation [7] for the use of the continuous adjoint method in this study. An
linearising and adjoining the solver manually can be circumvented. in-depth comparison of the discrete and the continuous adjoint
However, huge software projects such as industrial general- method goes beyond the scope of the exposition. A recent litera-
purpose solvers often use modern code structures and consist of ture review on CFD-based sensitivity analysis is given by Peter
different programming languages. Often external libraries are in- and Dwight [23].
volved, e.g. sophisticated numerical toolkits for preconditioning Both the continuous and the discrete adjoint method obtain the
and solving large systems of equations. In such scenarios, a consid- derivative of the objective functional with respect to the position of
erable amount of manual preparation of the input code can be re- the surface mesh nodes as an intermediate solution. For complex
quired and the applicability of automatic differentiation in reverse industrial shapes the discrete derivative contains a couple of (10)
(adjoint) mode is limited. Alternatively, the adjoint equations can thousand degrees of freedom on the design surface(s), offering a
detailed insight into the design opportunities from the objective
⇑ Corresponding author. point of view. The ‘‘raw’’ shape derivatives can be used to drive
E-mail address: arthur.stueck@tu-harburg.de (A. Stück). the subsequent shape optimisation in different ways:

0045-7930/$ - see front matter Ó 2011 Elsevier Ltd. All rights reserved.
doi:10.1016/j.compfluid.2011.01.041
A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32 23

(a) The most obvious strategy is to directly employ the mesh- adjoint RANS method for shape optimisation is complemented by
based derivatives to the design surface [16,26,4,15]. The explicit filtering of the derivatives. The proposed filtering is equally
method is referred to as CAD-free since no external geometry suitable in combination with the discrete adjoint method. The
description beyond the computational mesh is involved. The undesired length scales are eliminated through a cut-off length
approach retains all information that is contained in the scale. The concept is borrowed from scale-space theory popular
shape derivative. As the mesh nodes on the design surface in image processing [18,3,5], which requires similar properties.
are (independent) degrees of freedom, some regularisation CFD-related filtering applications are mainly found in the context
requirements have to be fulfilled to provide sufficiently of Large-Eddy-Simulation, where the sub-grid scale flow-motions
smooth shapes which are feasible and desirable from a tech- are separated from the large, energy containing eddies resolved
nical point of view. numerically.
(b) Global shape functions, such as a number of Hicks–Henne The remainder of the article is organised as follows: Section 2
basis functions [10] or analytic descriptions of foil-sections treats the RANS-constrained optimisation problem, followed by
(e.g. NACA), are associated with a predefined set of parame- the corresponding system of adjoint equations presented in Sec-
ters. Noisy shapes are prevented by limiting the design tion 3. The explicit filtering technique is introduced to shape deriv-
space. The global support is problematic in the context of atives in Section 4 and some remarks on the numerical
complex three-dimensional geometries. Soto et al. [28,29] implementation are given in Section 5. A two-dimensional optimi-
presented a pseudo-shell approach based on local shape sation of a semi-circle is considered an illustrative test case, Sec-
functions (finite element method) that couples the perturba- tion 6, before the focus turns to the design of a ship hull in
tion of an arbitrary mesh point to the other points on the Section 7. The exposition is closed with the conclusions drawn in
design surface. The coupling of points is inherently smooth, Section 8.
works in an implicit manner and suppresses undesirable Throughout the paper, Einstein’s notation applies to the lower-
modes in the shape. case Latin subscripts of Cartesian tensor coordinates, unless de-
(c) If a CAD-model is involved and the connectivity between the clared otherwise. A comma followed by an index denotes the
CAD-parameters and the surface mesh is available, the derivative with respect to the corresponding Cartesian tensor coor-
mesh-based derivatives can be linked to the CAD parametri- dinate. In symbolic tensor notation, the number of underlines cor-
sation using the chain rule of differentiation [19,25]. An responds to the order of the tensor.
appropriate parameter choice ensures suitable shapes –
however, a rigid low-dimensional CAD parametrisation 2. Hydrodynamic design evaluation
limits the shapes that can be generated and different CAD
models may lead to different optimal shapes. The CAD- With the state U (flow, described in terms of velocity, pressure,
systems predominantly used in industry are proprietary, so turbulence variables, etc.) and the control b (shape), the Navier–
that the underlying shape definitions are not available Stokes constrained optimisation problem reads
explicitly. This requires the numerical differentiation of the
black box CAD-method, which can be a cumbersome task, minimise JðU; bÞ; subject to NðU; bÞ ¼ 0 in X; ð1Þ
e.g. as regards the differentiability of the description or the wherein N = 0 represents the Navier–Stokes equations governing
influence of perturbation size. the flow in the fluid domain X. Following the derive-then-discretise
strategy, state and control variables are treated in a continuous,
The suitability of shapes is linked to the performance of the infinite-dimensional space first. We search for a shape b of the de-
optimisation process in terms of robustness and speed. In local sign surface CD that minimises the integral objective functional J. A
shape optimisation, the convergence rate of gradient iterations reduced or unconstrained formulation of (1) reads
strongly depends on the (local) condition of the Hessian of the
JðUðbÞ; bÞ; ð2Þ
objective functional. Through preconditioning operations, the
independent variables can be rescaled so that the condition num- where flow and shape are linked through the Navier–Stokes equa-
ber of the Hessian and thus the convergence rate of the optimisa- tions, i.e. U(b). The design is evaluated through integral objective
tion algorithm increases. The gradient of the objective functional is functionals which are declared in the objective volume XO or on
the Riesz representative of the shape derivative and assumes the objective boundaries CO, viz.
smooth distributions for appropriate choices of inner products. Z Z
Accordingly, different gradients are associated with different trans- J¼ jX dX þ jC dC: ð3Þ
XO CO
formations applied to the derivative. Several preconditioning tech-
niques have been proposed to increase the level of regularity or In RANS-based optimisation, the integrand of the objective func-
smoothness of the shape derivatives. Jameson and Vassberg [15] tional is usually depending on the flow – i.e. jC/X (U,b), with U rep-
apply an implicit, continuous smoothing operator to the shape resenting the mean velocity components Ui, the modified mean
derivative, based on elliptic second-order damping derived from pressure p (augmented by 2/3qk), turbulence quantities such as
an extended definition of the inner product (frequently called the turbulent kinetic energy k and the [specific] dissipation rate e
‘‘Sobolev-gradient’’). Jaworski and Müller [16] compare several [x], etc. The flow in turn is governed by the RANS equations, N(U,
strategies including implicit, explicit Laplacian smoothing and b) = 0, representing the equations of continuity and momentum,
multi-grid techniques in the context of adjoint-based CAD-free complemented by the equations for the turbulence variables which
shape optimisation. Different smoothing operations based on are omitted for the sake of brevity; the steady state formulations
shape Hessian preconditioners are investigated in conjunction read
with potential flow by Eppler et al. [4] and Euler flow by Schmidt Q ¼ U i;i ¼ 0 ð4Þ
et al. [26].
The present study aims to convey the merits of a precondition- and
ing strategy for shape derivatives in the context of CAD-free opti- Ri ¼ qU j U i;j  ½2leff Sij þ dij p;j  fi ¼ 0 in X: ð5Þ
misation. Emphasis is given to an explicit approach that is
industrially feasible, supports unstructured meshes and does not Sij = 0.5(Ui,j + Uj,i), fi and dij denote the strain rate tensor, specific
a priori constrain the design space. Accordingly, the continuous body forces acting on the fluid and the Kronecker symbol. According
24 A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32

to the eddy-viscosity concept, the effective viscosity leff is the sum Table 1. In accordance with boundary-layer theory, the derivatives
of the molecular viscosity l and the eddy-viscosity lT. Depending of the pressure and the pressure variation in the wall-normal
on the turbulence model applied, the latter is obtained from the tur- direction are assumed to be zero, i.e. 0 = p,n = p,nn = dp,n = dp,nn. For
bulence variables. continuity reasons, Un,n = 0 applies next to the wall boundaries.
Variational calculus leads to the first-order variation of the Via the calculus of Lagrange, the computational effort of the
objective functional dJ under a shape variation db of the design sur- sensitivity analysis can be decoupled from the number of shape
face. Given that the objective volume X0 does not undergo a spatial parameters involved. The Lagrange polynomial L is the objective
perturbation, so that the partial variation of the volume-declared functional J augmented by the hydrodynamic constraints, which
portion of the objective function with respect to the shape b is zero, are weighted by the Lagrange multipliers or adjoint variables. An
a continuous formulation reads analogue expression holds for the variation of the Lagrangian,
Z Z    where the variational equations of momentum and continuity are
@j @C b i and the adjoint
dJ ¼ dbG dC þ db C dC þ jC d : ð6Þ weighted by the adjoint velocity components U
CD CO \CD @b @b ^, viz.
pressure p
The first integral term of Eq. (6), wherein Z
dL ¼ dJ þ b i dRi þ p
dX½ U ^dQ: ð13Þ
XnU  
@ Ub @J
G¼ on CD ; ð7Þ
b¼1
@b @ Ub Integration by parts leads to
I h
represents the partial variation of the objective functional with re- dL ¼ dCj ðqdU i U j þ dpdij  2leff dSij Þ U bi ð14aÞ
spect to a shape-induced variation of the flow. nU denotes the num-  i Z
ber of flow variables. The second integral of Eq. (6) is referred to as þ p ^dij þ 2leff b
S ji dU i þ dðjC dCÞ ð14bÞ
geometric variation corresponding to a shape variation db. The CO
Z h
former can be considered as global (elliptic) flow variation acting b j U j;i  ½2l b
b i;j þ q U
þ dX qU j U ^
eff S ij  pdij ;j dU i ð14cÞ
on the old geometry, whereas the latter accounts for the old flow
acting locally on the geometry variation. i Z
Ub j;j dp þ dðjX dXÞ; ð14dÞ
Discretisation of both shape b and flow U leads to a finite- XO
dimensional description. In the current study the shape represen-
tation is CAD-free, based on the mesh used for both flow and ad- with b b i;j þ U
S ij ¼ 0:5ð U b j;i Þ. The strategy is to eliminate the flow vari-
joint computations. The mesh-based boundary description ations (dUi, dp) from Eq. (14) that correspond to (any possible) shape
contains Oð102...5 Þ degrees of freedom. normal variation dn. This is achieved by choosing the adjoint vari-
b i; p
ables ( U ^) such that they satisfy the adjoint RANS equations. In or-
der to eliminate (14c) and (14d), the adjoint equations inside XO are
3. Adjoint equations

b i;j ¼ 2l b
 qU j U ^ b j U j;i  ðj Þ ;
 qU
eff S ij  pdij X ;U i
The adjoint RANS problem is derived about a steady-state solu- ;j

tion of Eqs. (4) and (5), assuming that the field distribution of the b i;i ¼ ðj Þ ;
U ð15Þ
X ;p
effective viscosity leff(x) is ‘‘frozen’’ or independent of the shape.
The first-order variations of the hydrodynamic constraints read whereas in the remaining domain, XnXO, the adjoints are governed
by
dRi ¼ qðdU j U i;j þ U j dU i;j Þ  ð2leff dSij  dpdij Þ;j ¼ 0; ð8Þ
b i;j ¼ ð2l b
 qU j U b
eff S ij  pdij Þ;j  q U j U j;i ;
^
and
b i;i ¼ 0:
U ð16Þ
dQ ¼ dU i;i ¼ 0 in X: ð9Þ
An alternative adjoint formulation is obtained when the second
The variational boundary conditions are obtained from the bound-
term of (14c) is integrated by parts so that the right-hand side con-
ary conditions of the flow problem. On the ‘‘passive’’ boundaries b j U j;i , becomes
tribution to the adjoint momentum equations, q U
which are not subject to shape perturbations, CnCD, the flow b j;i [22]. Additional boundary contributions arising from inte-
þqU j U
boundary condition also holds for the flow variation. On the con-
gration by parts have to be considered in (14a)/(14b).
trolled or ‘‘active’’ boundaries CD, the variational boundary condi-
The adjoint boundary conditions are derived form the boundary
tion is obtained from a Taylor series expansion about the
terms in (14a) and (14b). On CnCD the variational boundary
reference shape. A shape variation db is applied to the old shape
conditions correspond to the boundary conditions imposed on
through a boundary-normal perturbation dn. We assume that the
the non-linear flow problem. This leads to the adjoint boundary
boundary condition used for the old flow Ui at the old location (in-
conditions presented in Table 2. After solving the adjoint RANS
dex 0) also holds for the new flow U0i at a slightly modified location
equations the distribution of the shape derivative G on CD, cf. Eq.
(index 1) defined by the position vector
(6), is obtained from the remaining boundary terms in (14b) in
½x1 ¼ ½x0 þ dn½n0 : ð10Þ conjunction with (12):
For a Dirichlet boundary condition with a prescribed value D it leads
to
 
D ¼ ½U i 0 ¼ U 0i 1 ¼ ½U i þ dU i þ dnU i;n 0 ; ð11Þ Table 1
Variational boundary conditions for the RANS equations.
and immediately yields the variational boundary condition at the
old position Boundary dUt dUn dp

dU i ¼ dnU i;n : ð12Þ No-slip RCD (pas.) dUt = 0 dUn = 0 dp,n = 0


No-slip 2CD (act.) dUt = dnUt,n dUn = 0 dp,n = 0
Accordingly, the variational form of Neumann- or Cauchy-type Symmetry dUt,n = 0 dUn = 0 dp,n = 0
Inlet dUt = 0 dUn = 0 dp,n = 0
boundary conditions can be derived. The variational boundary
Outflow (prescr. pr.) dUt,n = 0 dUn,n = 0 dp = 0
conditions applied to the linearised RANS problem are specified in
A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32 25

Table 2 finer scales. Among others, Gaussian kernels have the subsequent
Boundary conditions for the adjoint RANS equations. scale-space properties likewise apt in the context of shape optimi-
Boundary bt
U bn
U ^
p sation: linearity, shift invariance, non-enhancement of local extre-
ma, invariance of scale and rotation. The Gaussian filter is local in
No-slip RCO bt ¼ 0
U bn ¼ 0
U ^;n ¼ 0
p
both physical and wave-number space. It is interesting to note that
No-slip 2CO (force obj.) b i ¼ ci
U ^;n ¼ 0
p
Gaussian kernels are a Green-function or fundamental solution to
Symmetry b t;n ¼ 0
U bn ¼ 0
U ^;n ¼ 0
p
the unsteady diffusion-equation
Inlet bt ¼ 0
U bn ¼ 0
U ^;n ¼ 0
p
Outflow (prescr. pressure) bt þ l U
qU n U b
eff t;n ¼ 0
bn þ l U
^ ¼ qU n U
p b
eff n;n
@G c @ 2 G
¼ on CD ; ð21Þ
@t 2 @n2
with c/2 being the diffusion coefficient. The corresponding Gaussian
bt
@U t @ U
G ¼ leff t  ^t over CD ð17Þ kernel is
@n @n  
r2
Subscript t marks the component associated with the local direction KðtÞ ¼ ð2pctÞD=2 exp  ; 8n 2 C D ; ð22Þ
2ct
of the wall shear stress (t), or the adjoint rate of strain (^t), respec-
tively. Eq. (17), referred to as adjoint gradient equation, is sur- wherein ct[m2] is the variance of the filter and D denotes the
face-based and does not require mesh adaption to the dimensionality of the boundary that is subject to the filter (D = 1
infinitesimal shape perturbations applied, e.g. [22,14]. for lines; D = 2 for surfaces). Details present in the ‘‘raw’’ distribu-
tion of the shape derivative, which are significantly smaller than
pffiffiffiffiffi
the standard deviation or length scale of the filter kernel, ct , are
4. Filtering of shape derivatives
eliminated by the filter. For t = 0 the original distribution is
retained.
Small-scale oscillations (noise) are usually undesired in
An implicit first-order approximation to Eq. (21)
practical shape design for several reasons; among these are hydro-
dynamic, structural, manufacturing, operational or economic ct @ 2 G
considerations. In a CAD-free approach the same mesh is used to GðtÞ  ðtÞ ¼ Gð0Þ þ OðtÞ over CD ð23Þ
2 @n2
discretise both flow and shape. This strongly reduces the number
of tools and data-interfaces involved in the optimisation. The reso- allows for a direct comparison against the implicit smoothing tech-
lution of the computational mesh is usually chosen in accordance nique based on a ‘‘Sobolev-gradient’’, which is well-established in
with the RANS requirements. Thus, in some areas the grid resolu- adjoint shape optimisation [15,16,26]. There, a steady-state Pois-
tion can be very high in order to capture the important flow son-type equation is solved over the design surface in order to ob-
features (e.g. boundary layers, stagnation or separation and tain a smoothed shape derivative, or gradient G, from the raw
re-attachment zones). The resolution requirements of the shape- derivatives G, viz.
description can be different, mainly driven by the local curvature !
@ @G
of the boundary so that the characteristic length scales of the G e ¼ G over CD : ð24Þ
description of geometry and flow can be different. Very fine mesh @n @n
resolutions are prone to non-smooth shape derivatives, dominated
A step in the negative direction of G with the stride a guarantees a
by fine-scale structures. Such structures usually slow down the
negative (desired) variation of the objective functional for arbitrary
local optimisation or lead to undesired shapes.
choices of a uniform value e [15]:
This motivates the use of filters which eliminate fine-scale 2
Z Z !2 3
structures from the distribution of the shape derivative. Linear h i @G 5
convolution filters with a uniform filter kernel K(r) are applied in dJ ¼  aGG dC ¼ a 4G þ e
2
dC ð25Þ
CD CD @n
this study. The filtered distribution of the shape derivative is given
by the convolution
The equivalence above is obtained using (24) and integration by
Z
parts in conjunction with zero values of G along the bounding lines
GðnÞ ¼ HGðnÞ ¼ KðrÞGðn  rÞdr; 8n 2 C D ; ð18Þ
CD of CD. It is interesting to note that Eqs. (23) and (24) are first-order
equivalent. A direct comparison reveals
with r, H and n representing the local filter radius, the filtering oper-
ator and the curved boundary coordinate, respectively. Mind that ct
e¼ ; ð26Þ
the description is one-dimensional. The extension to two- 2
dimensional surfaces with a local system of orthogonal surface so that the smoothing intensity e involved in Eq. (24) can be inter-
coordinates (ni, i = 1, 2) is straight-forward. The filter is assumed preted as half the variance ct of the Gaussian filter kernel. The opti-
to be a bounded operator, to have a normalised filter function mal choice of e is case dependent. Gherman and Schulz [6] and
Z Schmidt et al. [26] suggested to identify an appropriate (optimal)
KðrÞdr ¼ 1; 8n 2 C D ð19Þ value for e by analysis of the corresponding Hessian, Kim et al.
[17] used automatic procedures.
and to be conservative, so that it does not alter the integral of the As outlined by Schmidt et al. [26] and Eppler et al. [4], the pre-
shape derivatives over the design surface CD (global conservation) conditioned steepest-descent can be considered as an approximate
Z Z Z Newton method. The close relation to the Sobolev-smoothing puts
GðnÞdn ¼ HGðnÞdn ¼ GðnÞdn: ð20Þ the suggested filtering technique on a firm rational basis. In con-
trast to the implicit smoothing technique, Eq. (24), the filtering
Many formulations for low-pass filters are available in literature, operation is fully explicit. It can easily be applied in the context
such as box-filters, Gaussian, spectral or Pao filters. Motivated by of unstructured grids where the grid connectivity is often not avail-
scale-space theory [18,3,5], Gaussian filters are used in this study. able for the surface patches.
These do not introduce new spurious structures at coarse scales that This study is confined to uniform Gaussian filter kernels, which
do not correspond to simplifications of corresponding structures at are globally conservative, cf. Eq. (20). In practice, a part of the
26 A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32

kernel is cut off close to the bounding lines of CD, since it has an isation scheme of the primal is directly applied to the correspond-
unbounded
pffiffiffiffiffiffiffiffiffi support. However, the filter operation acts locally as ing adjoint operator. The adjoint right-hand side terms (15)/(16)
for r= ðctÞ ¼ 2, approximately 95 per cent of the kernel integral and boundary conditions depend on the definition of the objective
is included. The kernel is renormalised numerically according to functional. Hence, the adjoint equations need to be solved once per
Shepard [27]: objective functional considered. The gradient Eq. (17) is evaluated
after solving the adjoint equations in the adjoint post-processing.
KðnÞ The gradient equation is boundary-based so that a mesh adapta-
K N ðnÞ ¼ R ; 8n 2 C D ð27Þ
KðrÞdr
CD tion to the infinitesimal perturbations is not required. This is par-
ticularly important for unstructured-grid implementations.
The filter operation becomes particularly simple when the influence However, the approximation of the gradient Eq. (17) is only first-
of the local curvature of the design surface is ignored within the order accurate as the included boundary-normal derivatives are.
kernel width. The approach isffi defensible due to the dense support
pffiffiffiffiffiffiffiffi The suggested filtering of the shape derivatives is performed in
of the kernel as long as ðctÞ is kept small compared to the local a fully explicit manner. The procedure is parallelised based on the
radius of curvature. The latter is usually satisfied and an undesired MPI-standard using the distributed memory concept. In many
filtering across edges can be suppressed by screening the changes of cases, the domain decomposition which is optimised to solve the
the face normals. flow turns out to be suboptimal for surface operations. To avoid
an extra decomposition, the boundary patches for every separate
5. Numerical implementation surface area to be filtered are gathered on a single processor to
avoid MPI communication overheads. The resulting memory con-
The incompressible RANS equations are solved using a collo- sumption of less than 105 variables per processor is considered tol-
cated cell-centred finite volume discretisation on fully unstruc- erable. The required number of operations per separate surface is
tured grids. The employed algorithm, FreSCo+, supports hanging of the order of the number of surface patches on CD times the aver-
grid nodes and is parallelised using the MPI protocol. Pressure– age number of patches falling into the local filter kernel,
velocity coupling is enforced by the SIMPLE pressure-correction Oðnsurf  nkern ). Boundary conditions are not considered explicitly,
scheme [1]. The same approach is used for the adjoint code, i.e. instead the part of the filter that exceeds the considered surface
Eqs. (15) and (16) are solved using an adapted SIMPLE scheme. is simply cut off. Accordingly, the filtering can be considered as a
The adjoint code is written closest possible to the primal RANS sol- weighted local average over the kernel radius. On unstructured
ver. Coding effort can significantly be reduced by reusing huge por- grids the filtering approach has several advantages over the stan-
tions of the original solver, approximately 90 per cent in FreSCo+. dard smoothing algorithm based on ‘‘Sobolev-gradients’’. Often
Consistency of both primal and adjoint discretisation (duality) the data-structures required to solve the governing PDE in the do-
minimises potential mismatches between the values of the objec- main are not available on the boundaries. Beyond the necessary
tive functional calculated by the primal solver and its variations connectivity table for the boundary faces, a management of bound-
obtained with the adjoint code. First order derivatives, such as ary conditions is needed. The boundary conditions for the surface
divergence or gradient operators, are ‘‘directed’’ in space and time. PDE have to be declared over the confining surface lines. When
Due to the negative sign of the adjoint convection (15),(16) arising computed on a single processor per surface to be smoothed, it
from integration by parts, the direction of the convective transport can become a bottleneck in the process chain. Depending on the
is opposite to the original PDE. Here, the issue of duality is directly solution algorithm, an implicit solution of the surface-based sys-
linked to numerical stability. When an upwind-based scheme is tem of equations is expected to require Oðn2surf Þ or more operations,
used for the primal problem, the corresponding downwind scheme which clearly exceeds the requirements of the filtering.
is used for the adjoint problem. Standard convection schemes,
namely first- or higher-order schemes (UDS, QUICK, LUDS, CUI, 6. Optimisation test case
etc.) and their monotonicity-preserving variants have been
adapted to the adjoint problem accordingly. Second derivatives A two-dimensional semi-circle in free-stream conditions, de-
such as the diffusion operator are self-adjoint, so that the discret- picted in Fig. 1, was investigated for different Reynolds-numbers

SYMMETRY

WALL/DSG−SURF

VELOCITY

PRESSURE

SYMMETRY

Fig. 1. Computational grid and boundary conditions for a two-dimensional semi-circle in free stream.
A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32 27

in the range of 100  ReD  5  105. The simple geometry is contin-


uous over the design surface and has a constant curvature. The
blunt body features a distinct flow separation for all Reynolds-
numbers considered. Due to the symmetry boundary condition
imposed along the centre-line, vortex streets are suppressed and
steady-state solutions can be obtained.
At the inlet, 12 diameters upstream, the velocity was pre-
scribed. A prescribed pressure value was imposed at the outlet,
20 diameters downstream of the circle. On the semi-circle a wall
boundary condition was applied, resolving the boundary layer
numerically (y+ < 1). A symmetry boundary condition was set on
the far side 16 diameters aside. The mesh contained approximately
5200 cells and was used for all cases presented in this section. The
Wilcox k-x turbulence model [31] was used for the turbulent flow
cases. The coefficent CD of the drag force acting on the semi-circle
was considered as objective functional, viz.
Z
J¼ jC dC with jC ¼ ci ð2leff Sij  pdij Þnj : ð28Þ
CO

With ci ¼ 4di1 =ðqU 20 Dcyl Þ, a non-dimensional drag coefficient compa-


rable to the full cylinder is obtained. This leads to the adjoint
boundary condition U ^ i ¼ ci on the cylinder walls.
This leads to the adjoint boundary condition U b i ¼ di ¼ d1i on
the cylinder walls. The adjoint boundary conditions at in- and out-
let are listed in Table 2. In a brief verification study, the adjoint-
based distribution of the shape derivative was compared against
the direct-differentiation method for fully turbulent flow at
ReD = 5  105. In the latter approach, the derivatives were obtained
from several solutions of the linearised RANS Eqs. (8) and (9)
applying patch-wise perturbations to the boundary conditions. Fig. 2. Verification adjoint vs. direct-differentiation method. Comparison
 of the
Subsequently, the shape derivatives were obtained from the varia- shape derivatives of the negative drag force coefficient, C D ¼ 4F x = qU 20 Dcyl , for a
5
tion of the objective functional semi-circle in turbulent flow conditions at ReD = 5  10 .

Z
dJ ¼ djC dC with djC ¼ ci ð2leff dSij  dpdij Þnj : ð29Þ R
C GdC
CO G ¼ G  R D ð30Þ
CD dC
A consistent finite volume method was used to solve the linearised
RANS problem. The geometric variations of the objective functional In combination with a conservative filter kernel, Eq. (20), the order
(‘‘local shape derivatives’’), cf. second integral in Eq. (6), were ne- of volume projection (30) and filtering can be permuted. The
glected for both adjoint and direct-differentiation method, as the filtered, volume-conservative gradient was applied in boundary-
shape derivatives are dominated by the flow-dependent variation normal direction to the current configuration using a constant,
(‘‘global shape derivatives’’), cf. leading integral in Eq. (6). As indi- user-defined step size:
cated by Fig. 2, the shape derivatives obtained from the direct-dif-
ferentiation method and the adjoint method are in fair agreement. dn ¼ aG ð31Þ
The consistency was verified on a finer mesh level.
Subsequently, the mesh was adapted to the modified shape and a
For demonstration purposes, the distributions of the shape
new flow solution was calculated. The components of the mesh
derivatives for the drag force coefficient were calculated for differ-
deformation di were obtained by solving a Laplace field equation
ent Reynolds-numbers and plotted over the cylinder contour by
black vectors in Fig. 3. The corresponding plots over the perimeter ðc
~di;j Þj ¼ 0 in X; ð32Þ
are provided in Fig. 4. The velocity stream-lines (red lines) illus-
trate how the surface derivatives are correlated to the flow separa- with the displacements di = nidn imposed as boundary conditions
tion. The laminar cases, Fig. 3a–c, show that the distribution of the over the design surface(s) CD. The implementation generally allows
shape derivative is smooth at ReD = 100, becoming rougher at to decrease the diffusion coefficient c
~ with the wall distance in or-
increasing Reynolds-numbers. Particularly for the higher Rey- der to preserve the grid quality in the boundary layer. However,
nolds-numbers, Fig. 3(c) to (e), the correlation of shape derivatives c~ ¼ 1 was used in this study.
and flow separation becomes very local. At the separation point, Three optimisation cycles featuring different kernel and step
the shape derivatives are null as the shear stress vanishes, cf. Eq. sizes were investigated in conjunction with the preconditioned
(17). method of descent (see Table 3). The violation of the volume con-
For the turbulent flow case at ReD = 5  105, different optimisa- straint was of the order of 105 times the cylinder volume Vcyl.
tion cycles were performed using different filtering widths. The Obviously the optimisation has not been driven towards conver-
shape modifications followed the filtered shape derivatives G, gence (Fig. 5), as the grid adaption algorithm would require a re-
imposing a constraint on the displacement of the semi-circle. As normalisation of the RANS mesh after some steps. The successive
proposed by Huan and Modi [11] a descent direction that does mesh adaptation accumulates mesh deficiencies, so that the
not violate the constrained displacement was obtained by the approximation error differs after a number of design iterations.
projection: Accordingly, a stepwise comparison is expected to predict the cor-
28 A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32

Fig. 3. Influence of the Reynolds-number on the shape derivatives of the negative drag force coefficient, C D ¼ 4F x =ðqU 20 Dcyl Þ, on a semi-circle.

Table 3
Optimisation of a semi-circle at ReD = 5  105 in turbulent flow. Summary of
investigated kernel widths, step sizes and optimisation cycles.
pffiffiffiffiffiffiffiffiffi
Kernel ðctÞ=Dcyl a=D3cyl Colour (Fig. 5) No. of cycles
5
Wide 0.144 1.25  10 Red 5
Medium 0.072 6.25  106 Green 13
Gx D cyl

Narrow 0.018 6.25  106 Blue 17


2

row kernels assume a similar shape. For the narrow kernel


(Fig. 7) the shape evolution follows a rather ‘‘local path’’ moving
the separation spoiler step by step in the aft direction. Other the
wide filter (Fig. 8), which follows the wider modes and preserves
a smooth shape during the evolution. It is well known, e.g. [15],
that larger steps a are possible, when the smoothing intensity or
the width of the filter kernel increases. Accordingly, the wide filter
kernel allows for twice the step size used in the other cases. Mind
that the amplitude of local extrema in the derivative is reduced by
Fig. 4. Quantitative comparison of the shape derivatives of the negative drag force
coefficient, C D ¼ 4F x =ðqU 20 Dcyl Þ, shown in Fig. 3a–e. The Reynolds-number is given
filtering or smoothing operations.
in the legend, where the curves for Re = 105 and 5  105 were scaled by 0.02. When attention is directed to the trajectory of the narrow ker-
nel, Fig. 5, an increase of the objective functional value is observed
after the first cycle. Here, the imposed shape modification is per-
rect change in the objective functional, whereas one has to be care- haps most drastic, turning the smooth initial shape into a spoilered
ful when comparing the final objective functional values of differ- arc. Hence, the induced changes of the turbulent flow field inhere
ent optimisation runs. However, a comparison of the final shapes significant non-linearities which restrict the appropriate step size
displayed in Fig. 6 indicates that, at larger filter widths, the final of a gradient-based optimisation at that point. Henceforth, the
design is dominated by the larger length scales of the gradient. spoiler is gradually shifted in the downstream direction and the
Note that the contour lines associated with the medium and nar- location of the separation is geometrically defined. The flow
A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32 29

0.37 0.5

0.36 0.4

0.35 0.3 0.45


Drag Coefficient C_D

0.34 0.2
0.4

0.33 0.1
0.15 0.2 0.25 0.3 0.35
0
0.32 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5

0.31 Fig. 7. Semi-circle at ReD = 5  105. Shape evolution using the narrow kernel: Step
0 = solid, step 1 = dashed, step 5 = dot-dashed, step 10 = dot-dashed 2nd, step
17 = dotted. (For interpretation of the references to colour in this figure legend, the
0.3
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 reader is referred to the web version of this article.)
Optimisation Cycle

Fig. 5. Optimisation of a semi-circle at ReD = 5  105. Objective functional, drag 0.5


force coefficient C D ¼ 4F x =ðqU 20 Dcyl Þ, over iteration steps for a descent in the
direction of the filtered shape derivatives: Wide kernel = dashed; medium ker-
nel = dot-dashed; narrow kernel = dotted. (For interpretation of the references to 0.4
color in this figure legend, the reader is referred to the web version of this article.)
0.3 0.45

0.5 0.2
0.4

0.4 0.1
0.15 0.2 0.25 0.3 0.35
0.3 0.45 0
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5

0.2 Fig. 8. Semi-circle at ReD = 5  105. Shape evolution using the wide kernel: Step
0.4
0 = solid, step 1 = dashed, step 3 = dot-dashed, step 5 = dotted. (For interpretation of
0.1 the references to color in this figure legend, the reader is referred to the web version
of this article.)
0.15 0.2 0.25 0.3 0.35
0
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
7. Application to ship hull design
5
Fig. 6. Optimisation of a semi-circle at ReD = 5  10 . Final shapes obtained for
different filters: Baseline = solid; wide kernel = dashed; medium kernel = dot-
dashed; narrow kernel = dotted. (For interpretation of the references to color in
The hull of a generic PanMax container vessel of 200 m length
this figure legend, the reader is referred to the web version of this article.) was considered at model scale in order to evaluate the filtering
procedure in the context of practical ship design [30]. The Rey-
nolds-number based on the ship length was ReL = 1.5  107. Flow
topology is maintained and the objective functional value monot- domain and boundary conditions are illustrated in Fig. 9. At the
onously descents during the subsequent design steps. The latter still-water level a symmetry boundary condition was imposed.
is quite remarkable, since it indicates the robustness of the ap- For symmetry reasons, only half of the hull was modelled numer-
proach. Mind that the deficiencies of a frozen turbulence approach, ically. The unstructured mesh contained 1.2 million cells, using lo-
addressed by Zymaris et al. [32] in the context of the continuous cal grid refinement. The Wilcox k-x turbulence model was applied
adjoint RANS method, are bounded due to the continuous update and the boundary layers were resolved numerically down to y+  1.
of the primal turbulent flow field. The sensitivity analysis aims to identify hull-shape influences on

SYMMETRY

PRESSURE
WALL/DSG−SURF
VELOCITY

Fig. 9. Computational grid and boundary conditions for a generic PanMax container vessel.
30 A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32

one of the main reasons for propeller-induced noise and vibrations


[2]. The axial velocity in the propeller disk is depicted in Fig. 10
(left). The main deviations of the axial velocity component from
its mean value over the perimeter are observed in the 6 and 12
o’clock positions. As it is common practice in ship design, the anal-
ysis of the wake field was carried out un-propelled, i.e. in the ab-
sence of the propeller. The wake objective functional is based on
a least-square formulation
Z  Z 1
dX dX
J ¼1C ½U 1  U 1 ðrÞ2 with C ¼ U 20 ; ð33Þ
XO 2r XO r
evaluating the deviation from the mean of the axial flow averaged
over the perimeter
Z 2p
1
U 1 ðrÞ ¼ U 1 ðrÞ dh for RI < r < RO : ð34Þ
2p 0

RI and RO denote the inner and outer radii of the propeller disk,
referring to the propeller hub radius and 105% of the propeller ra-
dius. U0 is the free stream velocity. The cells falling into the propel-
Fig. 10. Axial velocity distribution over the propeller disk (left) and corresponding ler disk volume XO are highlighted in Fig. 11. We assume that the
axial adjoint velocity (right).
propeller disk volume XO is not subject to shape variations. Freez-
ing the mean value U1(r), the right-hand side contributions to the
the level of (in)homogeneity that is observed in the velocity wake
adjoint momentum equations are
in the propeller disk volume XO. Such inhomogeneities cause
changes in the propeller blade load over the perimeter and are

Fig. 11. Smoothed shape derivatives G½m3  of the wake objective functional of a generic PanMax container vessel at ReL = 1.5  107 for different kernel widths. A positive
[negative] gradient indicates an increased objective functional value by a local increase in fluid [hull] volume.
A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32 31

pffiffiffiffiffiffiffiffiffi
Fig. 12. Smoothed shape derivatives ðctÞ=L ¼ 1:44  103 of the wake objective functional for a generic PanMax container vessel at ReL = 1.5  107, directly imposed (red)
4
on the initial hull form (black) with a = 20 m .

C inhomogeneities present in the velocity wake (left). The adjoint


ðjX Þ;Ui ¼ di1 ½U 1  U 1 ðrÞ: ð35Þ
r boundary conditions were defined according to Table 2. The hull
The right-hand side terms are specific to the objective functional surface, CD, does not contribute to the objective functional, so that
(33) and drive the adjoint velocity field. The axial adjoint velocity a partial derivative of the objective functional with respect to the
wake induced in the propeller disk, Fig. 10 (right), reflects the major shape does not exist.
32 A. Stück, T. Rung / Computers & Fluids 47 (2011) 22–32

According to Fig. 11, the gradient distribution shows an in- [5] Felsberg M, Sommer G. Scale adaptive filtering derived from the Laplace
equation. In: Pattern recognition. Springer; 2001. p. 124–31.
creased level of smoothness when the kernel width is increased.
[6] Gherman I, Schulz V. Preconditioning of one-shot pseudo-timestepping
At the same time the level of details is continuously reduced
pffiffiffiffiffiffiffiffi
ffi by fil- methods for shape optimization. In: PAMM/GAMM annual meeting, vol. 5
tering out the high-frequency components. For ðctÞ=L ¼ 1:44  (1); 2005. p. 741–2.
103 the gradient is sufficiently smooth to be directly applied to [7] Giering R, Kaminski T. Recipes for adjoint code construction. ACM Trans Math
Softw (TOMS) 1998;24(4):437–74.
the original hull form. The remaining low-frequency modes of [8] Giles MB, Pierce NA. An introduction to the adjoint approach to design. Flow
the shape derivative were imposed on the hull with the step size Turb Combust 2001;65:393–415.
a = 20 m4. The resulting shape is depicted in Fig. 12. The main [9] Hartmann R. Derivation of an adjoint consistent discontinuous galerkin
discretization of the compressible euler equations. In: Int conference on
features of the shape modification proposed by the adjoint method boundary and interior layers (BAIL), Göttingen; 2006.
are an increased heel radius, cf. buttock lines B0 and B1, in combi- [10] Hicks RM, Henne PA. Wing design by numerical optimization. J Aircraft
nation with rounder frames, cf. buttock lines B1–B3 and frames 1978;15(7):407–12.
[11] Huan J, Modi V. Optimum design of minimum drag bodies in incompressible
sections F1–F5. laminar flow using a control theory approach. J Inverse Problems Sci Eng
In practical ship design, a design engineer can mimic the trends 1994;1(1):1–25.
suggested by the shape gradient in a CAD/CAE-system. The desired [12] Jameson A. Aerodynamic design via control theory. J Sci Comput 1988;3(3):
233–60.
level of detail can be controlled through the filter width. Moreover, [13] Jameson A. Optimum aerodynamic design using CFD and control theory. AIAA-
deficiencies of the underlying CAD model or shape parametrisation 1995-1729-CP; 1995.
can be identified by analysing the different scales present in the [14] Jameson A, Kim S. Reduction of the adjoint gradient formula in the continuous
limit. AIAA-2003-0040; 2003.
gradient distribution.
[15] Jameson A, Vassberg JC. Studies of alternative numerical optimization
methods applied to the brachistochrone problem. Comput Fluid Dyn J
8. Conclusions 2000;9(3):281–96.
[16] Jaworski A, Müller J-D. Toward modular multigrid design optimisation.
Advances in automatic differentiation. Lecture notes in computational
The adjoint sensitivity analysis based on the derive-then-discre- science and engineering, vol. 64. Springer-Verlag; 2008. p. 281–91.
tise approach yields a high-resolution distribution of the shape [17] Kim S, Hosseini GK, Leoviriyakit K, Jameson A. Enhancement of adjoint design
methods via optimization of adjoint parameters. AIAA-2005-0448; 2005.
derivatives using each surface element as control patch. The ad- [18] Lindeberg T. Scale-space theory in computer vision. Dordrecht,
joint-based shape derivatives are in fair agreement with the pre- Netherlands: Kluwer Academic Publishers; 1994.
diction of the direct-differentiation method. The method is [19] Löhner R, Soto O, Yang C. An adjoint-based design methodology for CFD
optimization problems. AIAA-2003-0299; 2003.
however prone to noisy derivatives involving high-frequency
[20] Nadarajah S, Jameson A. Studies of the continuous and discrete adjoint
modes, in particular at high Reynolds-numbers. This can deterio- approaches to viscous automatic aerodynamic shape optimization. AIAA-
rate the convergence rate of the optimisation process and yields 2001-2530; 2001.
[21] Nadarajah SK, Jameson A. A comparison of the continuous and discrete adjoint
technically undesirable shapes. To remedy these deficits, it is sug-
approach to automatic aerodynamic optimization. AIAA-2000-0667; 2000.
gested to use a filtering method. The approach is closely related to [22] Othmer C. A continuous adjoint formulation for the computation of topological
the smoothing concept based on ‘‘Sobolev-gradients’’ but acts lo- and surface sensitivities of ducted flows. Int J Numer Methods Fluids
cally in an explicit manner. The scale-space properties of the 2008;58(8):861–77.
[23] Peter JE, Dwight RP. Numerical sensitivity analysis for aerodynamic
Gaussian filter are very suitable in the context of shape optimisa- optimization: a survey of approaches. Comput Fluids 2010;39(3):373–91.
tion and the numerical implementation is straight-forward in an [24] Pironneau O. On optimum design in fluid mechanics. J Fluid Mech 1974;64(1):
unstructured grid environment. The application is intuitive, as 97–110.
[25] Robinson TT, Armstrong CG, Chua HS, Othmer C, Grahs T. Sensitivity-based
shown for a preconditioned descent method for a semi-circle in optimization of parameterised CAD geometries. In: 8th world congress on
free flow and a three-dimensional re-design of a ship hull. Aniso- structural and multidisciplinary optimization, Lisbon, Portugal; June 2009.
tropic grids suggest the use of anisotropic, non-uniform filters [26] Schmidt S, Ilic C, Gauger N, Schulz V. Shape gradients and their smoothness for
practical aerodynamic design optimization; 2008. Preprint-number SPP1253-
which is, next to a rationale for the filter parameters, an interesting 10-03. <http://www.am.uni-erlangen.de/home/spp1253/wiki/index.php/
topic for future studies. Preprints>.
[27] Shepard D. A two-dimensional interpolation function for irregularly-spaced
data. In: ACM ’68: proceedings of the 1968 23rd ACM national conference;
References
1968. p. 517–4.
[28] Soto O, Löhner R, Yang C. A stabilized pseudo-shell approach for surface
[1] Caretto LS, Gosman AD, Patankar SV, Spalding DB. Two calculation procedures parametrization in CFD design problems. In: Communications in numerical
for steady, three-dimensional flows with recirculation. In: Proceedings of the methods in engineering; 2001. p. 251–8.
3rd international conference on numerical methods in fluid dynamics; 1972. p. [29] Soto O, Löhner R, Yang C. An adjoint-based design methodology for CFD
60–8. problems. Int J Numer Methods Heat Fluid Flow 2004;14:734–59.
[2] Carlton JS. Marine propellers and propulsion. Butterworth Heinemann; 1994. [30] Stück A, Kröger J, Rung T. Adjoint RANS for aft-ship design. ECCOMAS-CFD
[3] Cunha A, Teixeira R, Velho L. Discrete scale spaces via heat equation. In: Paper 2010-01384; 2010.
SIBGRAPI ’01: proceedings of the XIV Brazilian symposium on computer [31] Wilcox DC. Turbulence modeling for CFD. 2nd ed. DCW Industries, Inc.;
graphics and image processing. Washington (DC, USA): IEEE Computer Society; 2002.
2001. p. 68–75. [32] Zymaris A, Papadimitriou D, Giannakoglou K, Othmer C. Continuous adjoint
[4] Eppler K, Schmidt S, Schulz V, Ilic C. Preconditioning the pressure tracking in approach to the Spalart–Allmaras turbulence model for incompressible flows.
fluid dynamics by shape Hessian information. J Optimiz Theory Applicat Comput Fluids 2009;38(8):1528–38.
2009;141(3):513–31.

Das könnte Ihnen auch gefallen