91
An introduction to shape optimization, with applications in fluid mechanics Charles Dapogny 1 , Pascal Frey 2 1 Department of Mathematics, Rutgers University, New Brunswick, NJ, USA 2 Laboratoire J.-L. Lions, UPMC, Paris, France June, 2014 1 / 91

An introduction to shape optimization, with applications in fluid

Embed Size (px)

Citation preview

Page 1: An introduction to shape optimization, with applications in fluid

An introduction to shapeoptimization, withapplications in fluid

mechanics

Charles Dapogny1, Pascal Frey2

1 Department of Mathematics, Rutgers University, New Brunswick, NJ, USA2 Laboratoire J.-L. Lions, UPMC, Paris, France

June, 2014

1 / 91

Page 2: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Contents

1 Introduction

2 Examples of applications

3 Shape sensitivity analysis using shape derivativesDefinitions and generalities around shape differentiationShape derivatives using Eulerian and material derivatives: therigorous ‘difficult’ wayA formal, easier way to compute shape derivatives: Céa’s method

4 Numerical treatment of shape optimization

5 To go further: two popular methods

2 / 91

Page 3: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Part IIntroduction

3 / 91

Page 4: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Introduction

• The main target of shape optimization is to provide a common andsystematic framework for optimizing structures described by variouspossible physical or mechanical models.

• Its study has become increasingly popular in academics andindustry, partly owing to the steady increase in the cost of rawmaterials, which has made it necessary to optimize mechanicalparts from the early stages of design.

• Automatic techniques (implemented in industrial softwares) havestarted to replace the traditional trial-and-error methods used byengineers, but still leave room for many forthcoming developments.

4 / 91

Page 5: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Mathematical framework

A shape optimization problem writes as the minimization of a cost (orobjective) function J of the domain Ω:

minΩ∈Uad

J(Ω),

where Uad is a set of admissible shapes (e.g. that satisfy constraints).

In most mechanical or physical applications, the relevant objectivefunctions J(Ω) depend on Ω via a state uΩ, which arises as the solutionto a PDE posed on Ω (e.g. the linear elasticity system, or Stokesequations).

5 / 91

Page 6: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Various settings for shape optimization (I)

I. Parametric optimization

The considered shapes are described by means of a set of physicalparameters pii=1,...,N , typically thicknesses, curvature radii, etc...

••

••

••

pi

S• x

h(x)

Description of a wing by NURBS; theparameters of the representation are thecontrol points pi .

A plate with fixed cross-section S isparametrized by its thickness func-tion h : Ω→ R.

6 / 91

Page 7: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Various settings for shape optimization (II)

• The parameters describing shapes are the only optimizationvariables, and the shape optimization problem rewrites:

minpi∈Pad

J(p1, ..., pN),

where Pad is a set of admissible parameters.

• Parametric shape optimization is eased by the fact that it isstraightforward to account for variations of a shape pii=1,...,N :

pii=1,...,N → pi + δpii=1,...,N .

• However, the variety of possible designs is severely restricted, andthe use of such a method implies an a priori knowledge of thesought optimal design.

7 / 91

Page 8: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Various settings for shape optimization (III)

II. Geometric shape optimization

• The topology (i.e. the number ofholes in 2d) of the considered shapesis fixed.

• The boundary ∂Ω of the shapes Ωitself is the optimization variable.

• Geometric optimization allows morefreedom than parametric optimization,since no a priori knowledge of therelevant regions of shapes to act on isrequired.

@

Optimization of a shape by per-forming ‘free’ perturbations ofits boundary.

8 / 91

Page 9: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Various settings for shape optimization (IV)

III. Topology optimization

• In some applications, the suitabletopology of shapes is unknown, and alsosubject to optimization.

• In this context, it is often preferred not todescribe the boundaries of shapes, but toresort to different representations whichallow for a more natural account oftopological changes.

For instance: Describing shapes Ω asdensity functions χ : D → [0, 1].

Optimizing a shape byacting on its topology.

9 / 91

Page 10: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Various settings for shape optimization (V)

• A shape optimization process is a combination of:• A physical model, most often based on PDE (e.g. the linear

elasticity equations, Stokes system, etc...) for describing themechanical behavior of shapes,

• A description of shapes and their variations (e.g. as sets ofparameters, density functions, etc...),

• A numerical description of shapes (e.g. by a mesh, a splinerepresentation, etc...)

• These choices are strongly inter-dependent and influenced by thesought application.

• However very different in essence, all these different methods forshape optimization share a lot of common features.

• We are going to focus on geometric shape optimization methods.

10 / 91

Page 11: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Disclaimer

DisclaimerI This course is very introductory, and by no means exhaustive, as

well for theoretical as for numerical purposes.I See the (non exhaustive) References section to go further.

11 / 91

Page 12: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Part IIExamples of shape

optimization problems

12 / 91

Page 13: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Shape optimization in structure mechanics (I)

We consider a structure Ω ⊂ Rd , which is• fixed on a part ΓD ⊂ ∂Ω of its boundary,• submitted to surface loads g , applied on

ΓN ⊂ ∂Ω, ΓD ∩ ΓN = ∅.The displacement vector field uΩ : Ω → Rd isgoverned by the linear elasticity system:−div(Ae(u)) = 0 in Ω

u = 0 on ΓD

Ae(u)n = g on ΓN

Ae(u)n = 0 on Γ := ∂Ω \ (ΓD ∪ ΓN)

,

where e(u) = 12(∇uT +∇u) is the strain tensor

field, and A is the Hooke’s law of the material.

Ω

ΓD

ΓN

A ‘Cantilever’ beam

The deformed cantilever

13 / 91

Page 14: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Shape optimization in structure mechanics (II)

Examples of objective functions:

• The work of the external loads g or compliance C (Ω) of domain Ω:

C (Ω) =

∫ΩAe(uΩ) : e(uΩ)dx =

∫ΓN

g .uΩ ds

• A least-square discrepancy between the displacement uΩ and atarget displacement u0 (useful when designing micro-mechanisms):

D(Ω) =

(∫Ωk(x)|uΩ − u0|αdx

) 1α

,

where α is a fixed parameter, and k(x) is a weight factor.

14 / 91

Page 15: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Shape optimization in structure mechanics (III)

Examples of constraints:

• A constraint on the volume Vol(Ω) =∫

Ω 1 dx , or on the perimeterP(Ω) =

∫∂Ω 1 ds of shapes.

• A constraint on the total stress developped in shapes:

S(Ω) =

∫Ω||σ(uΩ)||2 dx ,

where σ(u) = Ae(u) is the stress tensor.

• Geometric constraints, e.g. on the minimal and maximal thicknessof shapes, on molding directions, etc... Such constraints play acrucial role when it comes to manufacturing shapes.

15 / 91

Page 16: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Shape optimization in fluid mechanics (I)

An incompressible fluid lies in a domain Ω ⊂ Rd .• the flow uin through the input boundary Γin is known.• a pressure profile pout is imposed on the exit boundary Γout .• no slip boundary conditions are considered on the free boundary∂Ω \ (Γin ∪ Γout).

The velocity uΩ : Ω→ Rd and pressure pΩ : Ω→ R of the fluid satisfyStokes equations:

−div(D(u)) +∇p = f in Ωdiv(u) = 0 in Ωu = uin on ΓD

u = 0 on Γσ(u)n = −pout on Γout

,

where D(u) = 12(∇uT +∇u) is the symmetrized gradient of u.

16 / 91

Page 17: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Shape optimization in fluid mechanics (II)

Model problem I: Optimization of the shape of a pipe.

• The shape subject to optimization isa pipe, connecting the (fixed) inputarea Γin and output area Γout .

• One is interested in minimizing thetotal work of the viscous forcesinside the shape:

J(Ω) = 2µ∫

ΩD(uΩ) : D(uΩ) dx .

• A constraint on the volume Vol(Ω)of the pipe is enforced.

in

out

17 / 91

Page 18: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Shape optimization in fluid mechanics (III)

Model problem II: Reconstruction of the shape of an obstacle.• An obstacle of unknown shape ω is immersed in a fixed domain Dfilled by the considered fluid.

• Given a mesure umeas of the velocity uΩ of the fluid inside a smallobservation area O, one aims at reconstructing the shape of ω.

• The optimized domain is Ω := D \ ω, and only the part ∂ω of ∂Ω isoptimized. One then minimizes the least-square criterion:

J(Ω) =

∫O|uΩ − umeas |2 dx .

!in out

D

O

18 / 91

Page 19: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

A simplified, academic example (I)

A membrane Ω ⊂ Rd is:• fixed on a part ΓD of its boundary ∂Ω.• subject to traction loads g , applied ona part ΓN ⊂ ∂Ω, with ΓD ∩ ΓN = ∅.

The vertical displacement uΩ : Ω → Rof the membrane is solution to the Laplaceequation:−∆u = 0 in Ωu = 0 on ΓD∂u∂n = g on ΓN∂u∂n = 0 on Γ := ∂Ω \ (ΓD ∪ ΓN)

.

D N

u(x)

•x

g

The considered membrane

19 / 91

Page 20: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

A simplified, academic example (II)

Examples of objective functions:• Again, the compliance C (Ω) of the membrane Ω:

C (Ω) =

∫Ω|∇uΩ|2dx =

∫ΓN

g .uΩ ds.

• A least-square error between uΩ and a target displacement u0:

D(Ω) =

(∫Ωk(x)|uΩ − u0|αdx

) 1α

,

where α is a fixed parameter, and k(x) is a weight factor.• The opposite of the first eigenvalue of the membrane:

−λ1(Ω),where λ1(Ω) = minu∈H1(Ω)u=0 on ΓD

∫Ω|∇u|2 dx∫Ωu2 dx

.

20 / 91

Page 21: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

More examples

• Optimization of the shape of an airfoil: reducing the drag acting onairplanes (even by a few percents) has been a tremendous challengein aerodynamic industry for decades.

• Optimization of the microstructure of composite materials: in linearelasticity for instance, one is interested in the design of negativePoisson ratio materials, etc...

• Optimization of the shape of wave guides (e.g. optical fibers), inorder to minimize the power loss of conducted electromagneticwaves.

• etc...

21 / 91

Page 22: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Why are those problems difficult?

• From the modelling viewpoint: difficulty to describe the physicalproblem at stake by a model which is relevant (thus complicatedenough), yet tractable (i.e. simple enough).

• From the theoretical viewpoint: often, optimal shapes do not exist,and shape optimization problems enjoy at most local optima.

• From both theoretical and numerical viewpoints: the optimizationvariable is the domain! Hence the need for of a means todifferentiate functions depending on the domain, and before that,to parametrize shapes and their variations.

• On the numerical side: difficulty to represent shapes and theirevolutions.

• On the numerical side: shape optimization problems may be verysensitive and can be completely dominated by discretization errors.

22 / 91

Page 23: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Part IIIShape derivatives of

PDE-constrainedfunctionals of the

domain

23 / 91

Page 24: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Differentiation with respect to the domain: Hadamard’s method

Hadamard’s boundary variationmethod describes variations of areference, Lipschitz domain Ω ofthe form:

Ω 7→ Ωθ := (I + θ)(Ω),

for ‘small’ vector fields θ ∈W 1,∞ (Rd ,Rd

).

•x

(x)

Lemma 1.For θ ∈W 1,∞(Rd ,Rd) such that ||θ||W 1,∞(Rd ,Rd )< 1, the application(I + θ) is a Lipschitz diffeomorphism.

24 / 91

Page 25: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Differentiation with respect to the domain: Hadamard’s method

Definition 2.Given a smooth domain Ω, a scalar function Ω 7→ J(Ω) ∈ R is said to beshape differentiable at Ω if the function

W 1,∞(Rd ,Rd

)3 θ 7→ J(Ωθ)

is Fréchet-differentiable at 0, i.e. the following expansion holds in thevicinity of 0:

J(Ωθ) = J(Ω) + J ′(Ω)(θ) + o(||θ||W 1,∞(Rd ,Rd)

).

The linear mapping θ 7→ J ′(Ω)(θ) is the shape derivative of J at Ω.

25 / 91

Page 26: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Structure of shape derivatives (I)

Idea: The shape derivative J ′(Ω)(θ) of a ‘regular’ functional J(Ω) onlydepends on the normal component θ · n of the vector field θ.

Figure : At first order, a tangential vector field θ, (i.e. θ · n = 0) only results ina convection of the shape Ω, and it is expected that J ′(Ω)(θ) = 0.

26 / 91

Page 27: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Structure of shape derivatives (II)

Lemma 3.Let Ω be a domain of class C1. Assume that the application

C1,∞(Rd ,Rd) 3 θ 7→ J(Ωθ) ∈ R

is of class C1. Then, for any vector field θ ∈ C1,∞(Rd ,Rd) such thatθ · n = 0 on ∂Ω, one has: J ′(Ω)(θ) = 0.

Corollary 4.Under the same hypotheses, if θ1, θ2 ∈ C1,∞(Rd ,Rd) have the samenormal component, i.e. θ1 · n = θ2 · n on ∂Ω, then:

J ′(Ω)(θ1) = J ′(Ω)(θ2).

27 / 91

Page 28: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Structure of shape derivatives (III)

Actually, the shape derivatives of ‘many’ integral objective functionalsJ(Ω) can be put under the form:

J ′(Ω)(θ) =

∫∂Ω

vΩ (θ · n) ds,

where vΩ : ∂Ω→ R is a scalar field which depends on J and on thecurrent shape Ω.

This structure lends itself to the calculation of a descent direction:letting θ = −tvΩn, for a small enough descent step t > 0 yields:

J(Ωtθ) = J(Ω)− t

∫∂Ω

v2Ω ds + o(t) < J(Ω).

28 / 91

Page 29: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

First examples of shape derivatives

Theorem 5.

Let Ω ⊂ Rd be a bounded Lipschitz domain, and f ∈W 1,1(Rd) be afixed function. Consider the functional:

J(Ω) =

∫Ωf (x) dx ;

then J is shape differentiable at Ω and its shape derivative is:

∀θ ∈W 1,∞(Rd ,Rd), J ′(Ω)(θ) =

∫∂Ω

f (θ · n) ds.

29 / 91

Page 30: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

First examples of shape derivatives

xx + (x)

Figure : Physical intuition: J(Ωθ) is obtained from J(Ω) by adding the bluearea, where θ · n > 0, and removing the red area, where θ · n < 0. The processis ‘weighted’ by the integrand function f .

30 / 91

Page 31: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

First examples of shape derivatives

Remarks:• This result is actually a particular case of the Transport (orReynolds) theorem, used to derive the equations of conservationfrom conservation principles.

• It allows to calculate the shape derivative of the volume functionalVol(Ω) =

∫Ω 1 dx :

∀θ ∈W 1,∞(Rd ,Rd), Vol′(Ω)(θ) =

∫∂Ωθ · n ds =

∫Ω

div(θ) dx .

In particular, if div(θ) = 0, the volume does not vary (at first order)when Ω is perturbed by θ.

31 / 91

Page 32: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

First examples of shape derivatives

Proof: The formula proceeds from a change of variables:

J(Ωθ) =

∫(I+θ)(Ω)

f (x)dx =

∫Ω|det(I +∇θ)| f (I + θ) dx .

• The mapping θ 7→ det(I +∇θ) is Fréchet differentiable, and:

det(I +∇θ) = 1 + div(θ) + o(θ),o(θ)

||θ||W 1,∞(Rd ,Rd

θ→0→ 0.

• If f ∈W 1,1(Rd), θ 7→ f (I + θ) is also Fréchet differentiable and:

f (I + θ) = f +∇f · θ + o(θ).

• Combining those three identites and Green’s formula lead to the result.

32 / 91

Page 33: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

First examples of shape derivatives

Theorem 6.Let Ω0 ⊂ Rd be a bounded, regular enough domain, and g ∈W 2,1(Rd)be a fixed function. Consider the functional:

J(Ω) =

∫∂Ω

g(x) ds;

then J is shape differentiable at Ω0 and its shape derivative is:

J ′(Ω)(θ) =

∫∂Ω

(∂g

∂n+ κg

)(θ · n) ds,

where κ stands for the mean curvature of ∂Ω.

Example: The shape derivative of the perimeter P(Ω) =∫∂Ω 1 ds is:

P ′(Ω)(θ) =

∫∂Ωκ (θ · n) ds.

33 / 91

Page 34: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Towards more sophisticated examples

The examples of physical interest are those of PDE constrained shapeoptimization, i.e. one aims at minimizing functions which depend on Ωvia the solution uΩ of a PDE posed on Ω, for instance (in most of theforthcoming examples):

J(Ω) =

∫Ωj(uΩ) dx +

∫∂Ω

k(uΩ) ds,

where uΩ is e.g. the solution to the linear elasticity system posed on Ω,and j , k are given functions.

Doing so borrows methods from optimal control theory (adjointtechniques, etc...)

34 / 91

Page 35: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

The framework

• Henceforth, we rely on the model of the Laplace equation: the stateuΩ is solution to the system

−∆u = f in Ωu = 0 on ∂Ω (Dirichlet B.C)∂u∂n = 0 on ∂Ω (Neumann B.C)

where∫

Ω f dx = 0 in the Neumann case.

• The associated variational formulation reads:

∀v ∈ H10 (Ω)/H1(Ω),

∫Ω∇u · ∇v dx −

∫Ωfv dx = 0.

• We aim at calculating the shape derivative of J(Ω) =∫

Ω j(uΩ) dx ,where j : R→ R is a ‘smooth enough’ function.

35 / 91

Page 36: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (I)

The rigorous way to address this problem requires a notion ofdifferentiation of functions Ω 7→ uΩ, which to a domain Ω associate afunction defined on Ω. One could think of two ways of doing so:

The Eulerian point of view:For a fixed x ∈ Ω, u′Ω(θ)(x) isthe derivative of the application

θ 7→ uΩθ(x).

•x

u

u

The Lagrangian point of view:For a fixed x ∈ Ω, uΩ(θ)(x) isthe derivative of the application

θ 7→ uΩθ((I + θ)(x)).

•x

(x)

• x + (x)

36 / 91

Page 37: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (II)

• The Eulerian notion of shape derivative, however more intuitive, ismore difficult to define rigorously. In particular, differentiating theboundary conditions satsifies by uΩ is clumsy:even for θ ‘small’, uΩθ(x) may not make any sense if x ∈ ∂Ω!

• The Lagrangian notion of shape derivative can be rigorouslydefined, and lends itself to mathematical analysis.

• The Eulerian derivative will be defined after the Lagrangianderivative, from the formal use of chain rule over the expressionu(I+θ)(Ω) (I + θ):

∀x ∈ Ω, uΩ(θ)(x) = u′Ω(θ)(x) +∇uΩ(x) · θ(x).

37 / 91

Page 38: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (III)

Let Ω 7→ u(Ω) ∈ H1(Ω) be a function which to a domain, associates afunction on the domain.

Definition 7.The function u : Ω 7→ u(Ω) admits a material, or Lagrangian derivativeu(Ω) at a given domain Ω provided the transported function

W 1,∞(Rd ,Rd) 3 θ 7−→ u(θ) := u(Ωθ) (I + θ) ∈ H1(Ω),

which is defined in the neighborhood of 0 ∈W 1,∞(Rd ,Rd), isdifferentiable at θ = 0.

38 / 91

Page 39: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (IV)

We are now in position to define the notion of Eulerian derivative.

Definition 8.The function u : Ω 7→ u(Ω) admits a Eulerian derivative u′(Ω)(θ) at agiven domain Ω in the direction θ ∈W 1,∞(Rd ,Rd) if it admits amaterial derivative u(Ω)(θ) at Ω, and ∇u(Ω) · θ ∈ H1(Ω).One defines then:

u′(Ω)(θ) = u(Ω)(θ)−∇u(Ω).θ ∈Wm,p(Ω). (1)

39 / 91

Page 40: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (V)

Proposition 9.Let Ω ⊂ Rd be a smooth bounded domain, and suppose that Ω 7→ u(Ω)has a Lagrangian derivative ˙u(Ω) at Ω. If j : R→ R is regular enough,the function J(Ω) =

∫Ω j(u(Ω)) dx is then shape differentiable at Ω, and:

∀θ ∈W 1,∞(Rd ,Rd), J ′(Ω)(θ) =

∫Ω

(˙u(Ω)(θ) + θdiv(u(Ω))

)dx .

If u(Ω) has a Eulerian derivative u′(Ω) at Ω, one has the ‘chain rule’:

J ′(Ω)(θ) =

∫∂Ω

j(u(Ω)) θ · n ds︸ ︷︷ ︸Derivative of Ω7→

∫Ω j(uΩ)

with respect to its first argument

+

∫Ωj ′(u(Ω))u′(Ω)(θ) dx︸ ︷︷ ︸Derivative of Ω7→

∫Ω j(uΩ)

with respect to its second argument

.

40 / 91

Page 41: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (VI)

Let us return to our problem of calculating the shape derivative of:

J(Ω) =

∫Ωj(uΩ) dx , where

−∆u = f in Ωu = 0 on ∂Ω

.

The following result characterizes the Lagrangian derivative of Ω 7→ uΩ.Its proof can be adapted to many different PDE models:

Theorem 10.Let Ω ⊂ Rd be a smooth bounded domain. The applicationΩ 7→ uΩ ∈ H1

0 (Ω) admits a Lagrangian derivative uΩ(θ), and for anyθ ∈W 1,∞(Rd ,Rd), uΩ(θ) ∈ H1

0 (Ω) is the unique solution to:−∆Y = −∆(θ · ∇uΩ) in Ω

Y = 0 on ∂Ω.

41 / 91

Page 42: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (VII)

Idea of the proof: The variational problem satisfied by uΩθ is:

∀v ∈ H10 (Ωθ),

∫Ωθ

∇uΩθ · ∇v dx =

∫Ωθ

fv dx .

By a change of variables, the transported function u(θ) := uΩθ (I + θ)satisfies:

∀v ∈ H10 (Ω),

∫ΩA(θ)∇u(θ) · ∇v dx =

∫Ωθ

|det(I +∇θ)|fv dx ,

where A(θ) := |det(I +∇θ)|∇θ ∇θT .

This variational problem features a fixed domain and a fixed functionspace H1

0 (Ω), and only the coefficients of the formulation depend on θ.

42 / 91

Page 43: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (VIII)

• The problem can now be written as an equation for u(θ):

F(θ, u(θ)) = G(θ),

for appropriate definitions of the operators:• F : W 1,∞(Rd ,Rd)× H1

0 (Ω)→ H−1(Ω),• G : W 1,∞(Rd ,Rd)→ H−1(Ω).

• A use of the implicit function theorem provides the result.

• In particular, the transported function u(θ) satisfies:

∀v ∈ H10 (Ω),

∫Ω∇u(θ) · ∇v dx =

∫Ω∇(θ · ∇uΩ) · ∇v dx .

43 / 91

Page 44: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (IX)

Remark: The Eulerian derivative of uΩ can now be computed from itsLagrangian derivative. It satisfies: −∆U = 0 in Ω

U = −(θ · n)∂uΩ∂n on ∂Ω

,

or under variational form:

∀v ∈ H10 (Ω),

∫Ω∇u′Ω(θ) · ∇v dx =

∫∂Ω

∂uΩ

∂nv θ · n ds.

Using this formula in combination with:

J ′(Ω)(θ) =

∫∂Ω

j(uΩ) θ · n ds +

∫Ωj ′(uΩ)u′Ω(θ) dx

will allow to express J ′(Ω)(θ) as a completely explicit expression of θ:this is the adjoint method from optimal control theory.

44 / 91

Page 45: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (X): the adjoint method

Idea: ‘lift up’ the term of J ′(Ω)(θ) which features the Eulerianderivative of uΩ by introducing an adequate auxiliary problem.

• Let pΩ ∈ H10 (Ω) be defined as the solution to the problem:

−∆p = −j ′(uΩ) in Ωp = 0 on ∂Ω

.

• The variational formulation for pΩ is:

∀v ∈ H10 (Ω),

∫Ω∇pΩ · ∇v dx = −

∫Ωj ′(uΩ) v dx ,

• ... to be compared with:

J ′(Ω)(θ) =

∫∂Ω

j(uΩ) θ · n ds +

∫Ωj ′(uΩ)u′Ω(θ) dx .

45 / 91

Page 46: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives (XI): the adjoint method

Thus, J ′(Ω)(θ) =

∫∂Ω

j(uΩ) θ · n ds +

∫Ωj ′(uΩ)u′Ω(θ) dx

=

∫∂Ω

j(uΩ) θ · n ds −∫

Ω∇pΩ · ∇u′Ω(θ) dx

=

∫∂Ω

j(uΩ) θ · n ds −∫∂Ω

∂pΩ

∂n

∂uΩ

∂nθ · n dx

,

where the variational problem for u′Ω:

∀v ∈ H10 (Ω),

∫Ω∇u′Ω(θ) · ∇v dx =

∫∂Ω

∂uΩ

∂nv θ · n ds.

was used in the last line, with test function v = pΩ.

∀θ ∈W 1,∞(Rd ,Rd), J ′(Ω)(θ) =

∫∂Ω

(j(uΩ)− ∂uΩ

∂n

∂pΩ

∂n

)θ · n ds,

46 / 91

Page 47: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Eulerian and Lagrangian derivatives: summary

• Mathematically speaking, it is the rigorous way to assess thedifferentiability of shape functionals.

• Several techniques presented above (in particular the adjointtechnique) exist in much more general frameworks than shapeoptimization, and pertain to the framework of optimal controltheory.

• This way of obtaining shape derivatives is very involved in terms ofcalculations.

• In practice, a formal method, which is much simpler, allows tocalculate shape derivatives: Céa’s method.

47 / 91

Page 48: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method

The philosophy of Céa’s method comes from optimization theory:

Write the problem of minimizing J(Ω) as that of searching for thesaddle points of a Lagrangian functional:

L(Ω, u, p) =

∫Ωj(u) dx︸ ︷︷ ︸

Objective function at stake

+

∫Ω

(−∆u − f )p dx︸ ︷︷ ︸u=uΩ is enforced as a constraint

by penalization with the Lagrange multiplier p

,

where the variables Ω, u, p are independent.

This method is formal: in particular, it assumes that we already knowthat Ω 7→ uΩ is differentiable.

48 / 91

Page 49: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Neumann case (I)

Consider the following Lagrangian functional:

L(Ω, v , q) =

∫Ωj(v) dx︸ ︷︷ ︸

Objective functionwhere uΩ is replaced by v

+

∫Ω∇v · ∇q dx −

∫Ωfq dx︸ ︷︷ ︸

Penalization of the ’constraint’ v=uΩ:∫Ω (−∆v−f )q dx=0

,

which is defined for any shape Ω ∈ Uad , and for any v , q ∈ H1(Rd), sothat the variables Ω, v and q are independent.

One observes that, evaluating L with v = uΩ, it comes:

∀q ∈ H1(Rd), L(Ω, uΩ, q) =

∫Ωj(uΩ) dx = J(Ω).

49 / 91

Page 50: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Neumann case (II)

For a fixed shape Ω, we search for the saddle points (u, p) ∈ Rd ×Rd ofL(Ω, ·, ·). The first-order necessary conditions read:

• ∀q ∈ H1(Rd),∂L∂q

(Ω, u, p)(q) =

∫Ω∇u · ∇q dx −

∫Ωfv dx = 0.

• ∀v ∈ H1(Rd),∂L∂v

(Ω, u, p)(v) =

∫Ωj ′(u) · v dx +

∫Ω∇u · ∇p dx = 0.

50 / 91

Page 51: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Neumann case (III)

Step 1: Identification of u:

∀q ∈ H1(Rd),

∫Ω∇u · ∇q dx −

∫Ωfq dx = 0.

• Taking q as any C∞ function ψ with compact support in Ω yields:

∀ψ ∈ C∞c (Ω),

∫Ω∇u · ∇ψ dx = 0 ⇒ −∆u = f in Ω .

• Now taking q as a C∞ function ψ and using Green’s formula:

∀ψ ∈ C∞c (Rd),

∫∂Ω

∂u

∂nψ ds = 0 ⇒ ∂u

∂n = 0 on ∂Ω .

Conclusion: u = uΩ.

51 / 91

Page 52: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Neumann case (IV)

Step 2: Identification of p:

∀v ∈ H1(Rd),

∫Ωj ′(u)v +

∫Ω∇v · ∇p dx = 0.

• Taking v as any C∞ function ψ with compact support in Ω yields:

∀ψ ∈ C∞c (Ω),

∫Ω∇p · ∇ψ dx +

∫Ωj ′(u)ψ dx = 0

⇒ −∆u = −j ′(uΩ) in Ω .

• Now taking v as a C∞ function ψ and using Green’s formula:

∀ψ ∈ C∞(Rd),

∫∂Ω

∂p

∂nϕ ds = 0 ⇒ ∂p

∂n = 0 on ∂Ω .

Conclusion: p = pΩ, solution to −∆p = −j ′(uΩ) in Ω

∂p∂n = 0 on ∂Ω

52 / 91

Page 53: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Neumann case (V)

Step 3: Calculation of the shape derivative J ′(Ω)(θ):

• We go back to the fact that:

∀q ∈ H1(Rd), L(Ω, uΩ, q) =

∫Ωj(uΩ) dx .

• Differentiating with respect to Ω yields:

∀θ ∈W 1,∞(Rd ,Rd), J ′(Ω)(θ) =∂L∂Ω

(Ω, uΩ, q)(θ)+∂L∂v

(Ω, uΩ, q)(u′Ω(θ)),

where u′Ω(θ) is the Eulerian derivative of Ω 7→ uΩ (assumed toexist).

• Now, choosing q = pΩ produces, since ∂L∂v (Ω, uΩ, pΩ) = 0:

J ′(Ω)(θ) = ∂L∂Ω (Ω, uΩ, pΩ)(θ).

53 / 91

Page 54: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Neumann case (VI)

This last (partial) derivative amounts to the shape derivative of afunctional of the form:

Ω 7→∫

Ωf (x) dx ,

where f is a fixed function.

Using Theorem 5, we end up with:

∀θ ∈W 1,∞(Rd ,Rd),

J ′(Ω)(θ) =

∫∂Ω

(j(uΩ) +∇uΩ · ∇pΩ − fpΩ) θ · n ds.

54 / 91

Page 55: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Dirichlet case (I)

• We now consider the problem of derivating:

J(Ω) =

∫Ωj(uΩ) dx , where

−∆u = f in Ωu = 0 on ∂Ω

.

• Warning: When the state uΩ satisfies essential boundaryconditions, i.e. boundary conditions that are tied to the definitionspace of functions (here, H1

0 (Ω)), an additional difficulty arises.

• We can no longer use the Lagrangian

L(Ω, v , q) =

∫Ωj(v) dx +

∫Ω∇v · ∇q dx −

∫Ωfv dx ,

since it would have to be defined for v , q ∈ H10 (Ω).

• In this case, the variables Ω, v , q would not be independent.

55 / 91

Page 56: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Dirichlet case (II)

Solution: Add an extra variable µ ∈ H1(Rd) to the Lagrangian topenalize the boundary condition: for all v , q, µ ∈ H1(Rd);

L(Ω, v , q, µ) =

∫Ωj(v) dx︸ ︷︷ ︸

Objective functionwhere uΩ is replaced by v

+

∫Ω

(−∆v − f )q dx︸ ︷︷ ︸penalization of the‘constraint’−∆v=f

+

∫∂Ωµv ds︸ ︷︷ ︸

penalization of the‘constraint’ v=0 on ∂Ω

.

By Green’s formula, L rewrites:

L(Ω, v , q, µ) =

∫Ωj(v) dx+

∫Ω∇v · ∇q dx−

∫Ωfq dx+

∫∂Ω

(µv − ∂v

∂nq

)ds.

Of course, evaluating L with v = uΩ, it comes:

∀q, µ ∈ H1(Rd), L(Ω, uΩ, q) =

∫Ωj(uΩ) dx .

56 / 91

Page 57: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Dirichlet case (III)

For a fixed shape Ω, we look for the saddle points (u, p, λ) ∈ (H1(Rd))3

of the functional L(Ω, ·, ·, ·). The first-order necessary conditions are:

• ∀q ∈ H1(Rd),∂L∂q

(Ω, u, p, λ)(q) =∫Ω∇u · ∇q dx −

∫Ωfq dx +

∫∂Ω

∂u

∂nq ds = 0.

• ∀v ∈ H1(Rd),∂L∂v

(Ω, u, p, λ)(v) =∫Ωj ′(u) · v dx +

∫Ω∇v · ∇p dx +

∫∂Ω

(λv − ∂v

∂np

)ds = 0.

• ∀µ ∈ H1(Rd),∂L∂µ

(Ω, u, p, λ)(µ) =

∫∂Ωµu ds = 0.

57 / 91

Page 58: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Dirichlet case (IV)

Step 1: Identification of u:

∀q ∈ H1(Rd),

∫Ω∇u · ∇q dx −

∫Ωfq dx +

∫∂Ω

∂u

∂nq ds = 0.

• Taking q as any C∞ function ψ with compact support in Ω yields:

∀ψ ∈ C∞c (Ω),

∫Ω∇u · ∇ψ dx = 0 ⇒ −∆u = f in Ω .

• Using ∂L∂µ (Ω, u, pλ)(µ) = 0 for any µ = ψ ∈ C∞c (Rd) yields:

∀ψ ∈ C∞c (Rd),

∫∂Ωψu dx = 0 ⇒ u = 0 on ∂Ω .

Conclusion: u = uΩ.

58 / 91

Page 59: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Dirichlet case (V)

Step 2: Identification of p:

∀v ∈ H1(Rd),

∫Ωj ′(u) · v dx+

∫Ω∇v · ∇p dx+

∫∂Ω

(λv − ∂v

∂np

)ds = 0.

• Taking q as any C∞ function ψ with compact support in Ω yields:

∀ψ ∈ C∞c (Ω),

∫Ω∇p · ∇ψ dx +

∫Ωj ′(u) · ψ dx = 0

⇒ −∆p = −j ′(uΩ) in Ω .

• Now taking v as a C∞ function ψ and using Green’s formula:

∀ψ ∈ C∞c (Rd),

∫∂Ω

∂p

∂nψ ds +

∫∂Ω

(λψ − ∂ψ

∂np

)ds = 0.

59 / 91

Page 60: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Dirichlet case (VI)

Step 2 (continued):

• Varying the normal trace ∂ψ∂n while imposing ψ = 0 on ∂Ω, one gets:

p = 0 on ∂Ω .

Conclusion: p = pΩ, solution to−∆p = −j ′(uΩ) in Ω

p = 0 on ∂Ω

• In addition, varying the trace of ψ on ∂Ω while imposing ∂ψ∂n = 0:

λΩ = −∂pΩ∂n on ∂Ω.

60 / 91

Page 61: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Dirichlet case (VII)

Step 3: Calculation of the shape derivative J ′(Ω)(θ):• We go back to the fact that:

∀q, µ ∈ H1(Rd), L(Ω, uΩ, q, µ) =

∫Ωj(uΩ) dx .

• Differentiating with respect to Ω yields, for all θ ∈W 1,∞(Rd ,Rd):

J ′(Ω)(θ) =∂L∂Ω

(Ω, uΩ, q, µ)(θ) +∂L∂v

(Ω, uΩ, q, µ)(u′Ω(θ)),

where u′Ω(θ) is the Eulerian derivative of Ω 7→ uΩ.• Taking q = pΩ, µ = λΩ produces, since ∂L

∂v (Ω, uΩ, pΩ, λΩ) = 0:

J ′(Ω)(θ) =∂L∂Ω

(Ω, uΩ, pΩ, λΩ)(θ).

61 / 91

Page 62: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Céa’s method: the Dirichlet case (VIII)

Again, this (partial) derivative amounts to the shape derivative of afunctional of the form:

Ω 7→∫

Ωf (x) dx ,

where f is a fixed function.

Using Theorem 5 (and after some calculation), we end up with:

∀θ ∈W 1,∞(Rd ,Rd), J ′(Ω)(θ) =

∫∂Ω

(j(uΩ)− ∂uΩ

∂n

∂pΩ

∂n

)θ · n ds,

62 / 91

Page 63: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Part IVNumerical aspects ofshape optimization

63 / 91

Page 64: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

The generic numerical algorithm

Gradient algorithm: Start from an initial shape Ω0,For n = 0, ... convergence,1. Compute the state uΩn (and possibly the adjoint pΩn) of the

considered PDE system on Ωn.2. Compute the shape gradient J ′(Ωn) thanks to the previous

formula, and infer a descent direction θn for the costfunctional.

3. Advect the shape Ωn according to this displacement field fora small pseudo-time step τn, so as to get

Ωn+1 = (I + τnθn)(Ωn).

64 / 91

Page 65: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

One possible implementation

• Each shape Ωn is represented by a simplicial mesh T n (i.e.composed of triangles in 2d and of tetrahedra in 3d).

• The Finite Element method is used on the mesh T n for computinguΩn (and pΩn) The descent direction θn is then calculated using thetheoretical formula for the shape derivative of J(Ω).

• The shape advection step Ωn (I+τnθn)7−→ Ωn+1 is performed by pushingthe nodes of T n along τnθn, to obtain the new mesh T n+1.

Deformation of a mesh by relocating its nodes to a prescribed final position.

65 / 91

Page 66: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Numerical examples (I)

• In the context of linear elasticity, one aims at minimizing thecompliance C (Ω) of a cantilever beam:

C (Ω) =

∫ΩAe(uΩ) : e(uΩ) dx .

• An equality constraint on the volume Vol(Ω) of shapes is imposed.

D

N

g

Minimization of the compliance of a cantilever (from [AlPan]; code available on [Allaire2]).

66 / 91

Page 67: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Numerical examples (II)

• In the context of fluid mechanics (Stokes equations), one aims atminimizing the viscous dissipation D(Ω) in a pipe:

D(Ω) = 2µ∫

ΩD(uΩ) : D(uΩ) dx .

• A volume constraint is imposed by a fixed penalization of thefunction D(Ω) - i.e. the minimized function is D(Ω) + `Vol(Ω),where ` is a fixed Lagrange multiplier.

in

out

Minimization of the viscous dissipation inside a pipe.

67 / 91

Page 68: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Numerical examples (II)

• Still in fluid mechanics, minimization of the viscous dissipationD(Ω) in a double pipe.

• A volume constraint is imposed by a fixed penalization of thefunction D(Ω).

in

uin out

Minimization of the viscous dissipation inside a double pipe.

68 / 91

Page 69: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Numerical issues and difficulties (I)

I - The difficulty of mesh deformation:

• When the shape is explicitly meshed, an update of the mesh isnecessary at each step Ωn 7→ (I + θn)(Ωn) = Ωn+1: the new meshT n+1 is obtained by relocating each node x ∈ T n to x + τnθn(x).

• This may prove difficult, partly because it may cause inversion ofelements, resulting in an invalid mesh.

Pushing nodes according to the velocity field may result in an invalid configuration.

• For this reason, mesh deformation methods are generally preferredfor accounting for ‘small displacements’.

69 / 91

Page 70: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Numerical issues and difficulties (II)

II - Velocity extension:• A descent direction θ = −vΩn from a shape Ω is inferred from theshape derivative of J(Ω):

J ′(Ω)(θ) =

∫ΩvΩ(θ · n) ds.

• The new shape (I + θ)(Ω) only depends on these values of θ on ∂Ω.

• For many reasons, in numerical practice, it is crucial to extend θ toΩ (or even Rd) in a ‘clever’ way.(for instance, deforming a mesh of Ω using a ‘nice’ vector field θdefined on the whole Ω may considerably ease the process)

• The ‘natural’ extension of the formula θ = −vΩn, which is onlylegitimate on ∂Ω may not be a ‘good’ choice.

70 / 91

Page 71: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Numerical issues and difficulties (III)

III - Velocity regularization:• Taking θ = −vΩn on ∂Ω may produce a very irregular descentdirection, because of

• numerical artifacts arising during the finite element analyses.• an inherent lack of regularity of J ′(Ω) for the problem at stake.

• In numerical practice, it is often necessary to smooth this descentdirection so that the considered shapes stay regular.

Irregularity of the shape derivative in the very sensitive problem of drag minimization of an airfoil (Taken from[MoPir]). In one iteration, using the unsmoothed shape derivative of J(Ω) produces large undesirable artifacts.

71 / 91

Page 72: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Numerical issues and difficulties (IV)

A popular idea: extend AND regularize the velocity field

• Suppose we aim at extending the scalar field vΩ : ∂Ω→ R to Ω.• Idea: (≈ Laplacian smoothing) Trade the ‘natural’ inner productover L2(∂Ω) for a more regular inner product over functions on Ω.

• Example: Search the extended / regularized scalar field V as:

Find V ∈ H1(Ω) s.t. ∀w ∈ H1(Ω),

α

∫Ω∇V · ∇w dx +

∫ΩVw dx =

∫∂Ω

vΩw ds.

• The regularizing parameter α controls the balance between thefidelity of V to vΩ and the intensity of smoothing.

72 / 91

Page 73: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Numerical issues and difficulties (IV)

• The resulting scalar field V is inherently defined on Ω and moreregular than vΩ.

• Multiple other regularizing problems are possible, associated todifferent inner products or different function spaces.

• A similar process allows:• to extend vΩ to a large computational box D (an inner product over

functions defined on D is used),• to extend the vector velocity θ = −vΩn to Ω / D (an inner product

over vector functions is used, e.g. that of linear elasticity).

73 / 91

Page 74: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Numerical issues: moral conclusion

The choice of a numerical method for shape optimization has toreach a tradeoff between numerical accuracy and robustness:• The more accurate the representation of the boundaries ofshapes, the more accurate the mechanical analysesperformed on shapes (computation of uΩn , pΩn , etc...), andthe more accurate the computation of descent directions.

• ... But the more tedious and error-prone the advection stepbetween shapes Ωn 7→ Ωn+1.

74 / 91

Page 75: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Part VTo go further: twopopular methods

75 / 91

Page 76: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Other kinds of representation of shapes: the level set method (I)

A paradigm:the motion of an evolving domain is conveniently describedin an implicit way.

A bounded domain Ω ⊂ Rd is equivalently defined by a functionφ : Rd → R such that:

φ(x) < 0 if x ∈ Ω ; φ(x) = 0 if x ∈ ∂Ω ; φ(x) > 0 if x ∈ cΩ

A bounded domain Ω ⊂ R2 (left), some level sets of an associated level setfunction (right).

76 / 91

Page 77: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Other kinds of representation of shapes: the level set method (II)

The motion of a domain Ω(t) ⊂ Rd alonga velocity field v(t, x) ∈ Rd is translatedin terms of a ‘level set function’ φ(t, .) bythe level set advection equation:

∂φ

∂t(t, x) + v(t, x).∇φ(t, x) = 0

If v(t, x) is normal to the boundary ∂Ω(t):

v(t, x) := V (t, x)∇φ(t, x)

|∇φ(t, x)| ,

the evolution equation rewrites as aHamilton-Jacobi equation:

∂φ

∂t(t, x) + V (t, x)|∇φ(t, x)| = 0

Ω(t) = [φ(t, .) < 0]

Ω(t + dt) = [φ(t + dt, .) < 0]

v(t, x)

x•

77 / 91

Page 78: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

The level set method in the context of shape optimization (I)

• A fixed computational box D is meshed onceand for all (e.g. with quadrilateral elements).

• Each shape Ωn is represented by a level setfunction φn, defined at the nodes of the mesh.

• As soon as a descent direction θn from Ωn

has been calculated (as a scalar field definedat the nodes of the mesh), the advection stepΩn 7→ Ωn+1 = (I + τnθn)(Ωn) is achieved bysolving:

∂φ∂t + θn|∇φ|= 0 t ∈ (0, τn), x ∈ Dφ(0, ·) = φn

74 G. ALLAIRE, F. de GOURNAY, F. JOUVE, A.-M. TOADER

Figure 8. Optimal mast in 2-d: boundary conditions and iterations 6, 11, 16,21 and 100

of a sti! material and excluded from optimization. In the formula for J2, thelocalization coe"cient k(x) is non-zero (equal to 1) only at the boundary and thetarget displacement u0 is (0, 1) on the top boundary, (0, !1) on the bottom oneand (0, 0) on the lateral ones. The Lagrange multiplier is ! = 0. Starting from afull domain initialization we perform 500 iterations with the coupling parameterntop = 15 (see Fig. 9). As usual, the convergence is slower than for complianceminimization (see Fig. 10). Furthermore, the computed optimal design is verysensitive to all parameters of the algorithm including the sti!ness ratio betweenthe weak ersatz material and the true material (which is here equal to 10!2),the coupling parameter ntop, and the initialization. Di!erent choices of theseparameters lead to di!erent topologies with similar performances.

Our second example is a gripping mechanism. Fig. 11 shows the boundaryconditions and the target displacement. A small force, parallel to the targetdisplacement in the opposite direction, is also applied on the jaws of the me-

Shape accounted for bya level set description(from [AlJouToa])

78 / 91

Page 79: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

The level set method in the context of shape optimization (II)

Problem: Shapes are not meshed: how to solve a pde on a shape Ω?

Solution: Approximate the PDE problem posed on Ω by a problemposed on the whole box D.

Example: In the context of linear elasticity, the ersatz materialapproach consists in filling the void D \ Ω with a very ‘soft’ material,with Hooke’s law εA, ε 1.

−div(Ae(u)) = 0 in Ω

+B.C .≈

−div(AΩe(u)) = 0 in DAΩ = 1ΩA + (1− 1Ω)εA

+B.C .(Problem posed on Ω) (Problem posed on D)

79 / 91

Page 80: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

The level set method in the context of shape optimization (II)

In the context of linear elasticity, we are interested in the optimization ofa bridge with respect to its compliance C (Ω).

An equality constraint on the volume Vol(Ω) of shapes is imposed.

D

•g

Minimization of the compliance of a bridge usingthe level set method. (from [AlJouToa]; code available on [Allaire2])

80 / 91

Page 81: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Other kinds of representation of shapes: the SIMP method

• The SIMP method (Solid Isotropic Material Penalization) is aheuristic method for topology optimization derived from themathematical theory of homogenization.

• It is very popular within the engineering community, and is alreadyimplemented in industrial softwares.

• It relies on a completely different point of view as regards the notionof shapes, as well on the theoretical side as on the numerical one.

0

1

0.25

0.5

0.75

(Left) ‘Classical’ ‘black-and-white’ shape, (right) shape represented by a density function (from [Allaire1])

81 / 91

Page 82: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

The SIMP method: main ideas in the context of linear elasticity (I)

Problem formulationIn a fixed working domain D, find the optimal density ρ : D → [0, 1] of a

mixture of the considered elastic material and void.

Idea: The stiffness (i.e. the Hooke’s law) A(ρ) of the total structure Dis proportional to a power of the density ρ via an empiric law:

A(ρ) = ρpA, where A is the Hooke’s law of the material.

In numerical practice, one takes p ≥ 3, so as to penalize the intermediatedensities ρ 6= 0, 1 which correspond to greyscale patterns and aredifficult to interprete in terms of ‘classical’ black-and-white designs.

82 / 91

Page 83: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

The SIMP method: main ideas in the context of linear elasticity (II)

• The displacement uρ of D is solution to the linear elasticity system:−div(A(ρ)e(u)) = 0 in D

u = 0 on ΓD

A(ρ)e(u)n = g on ΓN

A(ρ)e(u)n = 0 on Γ := ∂D \ (ΓD ∪ ΓN)

.

• Example: The compliance minimization problem is formulated as:

minρ∈Dad

J(ρ), J(ρ) =

∫DA(ρ)e(uρ) : e(uρ) dx ,

where Dad is a set of admissible density functions.

• The derivative J ′(ρ) of J can be computed using the techniquespresented in this course (Céa’s method).

83 / 91

Page 84: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

The SIMP method: main ideas in the context of linear elasticity (III)

In the context of linear elasticity, one minimizes the compliance C (Ω) ofa cantilever beam.

An equality constraint on the volume Vol(Ω) of shapes is imposed.

D

D•

g

Minimization of the compliance of a cantilever usingthe SIMP method. (from [Sigmund]; code available on [DTU])

84 / 91

Page 85: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

The SIMP method: pros and cons

Assets:• Easy to analyze from the mathematical viewpoint: the problem isalmost reduced to a parametric shape optimization framework.

• Simple and robust implementation: no mesh deformation isnecessary, and the update of a ‘shape’ ρn of the process to the nextone ρn+1 is performed via the simple operation:

ρn+1 = ρn − τnJ ′(ρn).

Drawbacks:• The method is heuristic, and may entail uncontrolled approximationof the real physical model.

• The geometry of shapes is lost; it may be awkward to formulate inthis context constraints on the curvature, thickness of shapes, etc...

85 / 91

Page 86: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

A first taste of the SIMP method in fluid mechanics

• One optimizes a density function ρ : D → [0, 1] over a domain D:• ρ(x) = 0 indicates that no fluid occupies the area around x ∈ D.• ρ(x) = 1 indicates that only fluid occupies this area.

• The approximate Stokes system on the total domain D is:−div(D(u)) + α(ρ)u +∇p = f in D

div(u) = 0 in D+ boundary conditions

.

• The coefficient α(ρ) incorporates a solid part to the model by usinga heuristic penalization inspired by the homogenization theory:

α(ρ) ≈ 0 in the fluid phase, α(ρ) ≈ ∞ in the solid phase.

In practice, one uses a penalization of the form:

α(ρ) = αmax + (αmin − αmax)ρ1 + q

ρ+ q, q, αmin, αmax parameters.

86 / 91

Page 87: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

References

87 / 91

Page 88: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Mathematical references I

[Allaire1] G. Allaire, Conception optimale de structures,Mathematiques et Applications 58, Springer, Heidelberg (2006).

[AlJouToa] G. Allaire and F. Jouve and A.M. Toader, Structuraloptimization using shape sensitivity analysis and a level-set method,J. Comput. Phys., 194 (2004) pp. 363–393.

[AlPan] G. Allaire and O. Pantz, Structural Optimization withFreeFem++, Struct. Multidiscip. Optim., 32, (2006), pp. 173–181.

[HenPi] A. Henrot and M. Pierre, Variation et optimisation deformes, une analyse géométrique, Springer (2005).

[Pironneau] O. Pironneau, Optimal Shape Design for EllipticSystems, Springer, (1984).

88 / 91

Page 89: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Mathematical references II

[Sethian] J.A. Sethian, Level Set Methods and Fast MarchingMethods : Evolving Interfaces in Computational Geometry,FluidMechanics, Computer Vision, and Materials Science, CambridgeUniversity Press, (1999).

89 / 91

Page 90: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Mechanical references I

[BenSig] M.P. Bendsøe and O. Sigmund, Topology Optimization,Theory, Methods and Applications, 2nd Edition Springer Verlag,Berlin Heidelberg (2003).

[FreyGeo] P.J. Frey and P.L. George, Mesh Generation: Applicationto Finite Elements, Wiley, 2nd Edition, (2008).

[MoPir] B. Mohammadi and O. Pironneau, Applied shapeoptimization for fluids , Oxford University Press, Vol. 28, (2001).

[Sigmund] O. Sigmund, A 99 line topology optimization codewritten in MATLAB, Struct. Multidiscip. Optim., 21, 2, (2001),pp. 120–127.

[BorPet] T. Borrvall and J. Petersson, Topology optimization offluids in Stokes flow, Int. J. Numer. Methods in Fluids, Volume 41,(2003), pp. 77–107.

90 / 91

Page 91: An introduction to shape optimization, with applications in fluid

Introduction Examples Shape derivatives Numerics Other methods

Online resources I

[Allaire2] Grégoire Allaire’s web page,http://www.cmap.polytechnique.fr/ allaire/.

[Allaire3] G. Allaire, Conception optimale de structures, slides of thecourse (in English), available on the webpage of the author.

[DTU] Web page of the Topopt group at DTU,http://www.topopt.dtu.dk.

[FreeFem++] O. Pironneau, F. Hecht, A. Le Hyaric, FreeFem++version 2.15-1, http://www.freefem.org/ff++/.

91 / 91