Shape Derivatives for General Objective Functions and the

Deutsche Forschungsgemeinschaft
Priority Program 1253
Optimization with Partial Differential Equations
Stephan Schmidt and Volker Schulz
Shape Derivatives for General Objective
Functions and the Incompressible Navier-Stokes
Equations
February 2009
Preprint-Number SPP1253-10-05
http://www.am.uni-erlangen.de/home/spp1253
Shape Derivatives for General Objective
Functions and the Incompressible
Navier-Stokes Equations
Stephan Schmidt∗
Volker Schulz†
Abstract
The aim of this paper is to present the shape derivative for a wide array of objective
functions using the incompressible Navier-Stokes equations as a state constraint.
Most real world applications of computational fluid dynamics are shape optimization problems in nature, yet special shape optimization techniques are seldomly
used outside the field of elliptic partial differential equations and linear elasticity. As such, this work tries to be self contained, also presenting many useful
results from the literature. We conclude with optimizing the shape of several flow
channels, finding tubes which feature a greatly reduced pressure loss.
1
Introduction
Optimal control of fluids has seen much attention due to its importance for
many technical, scientific, and engineering applications. A good overview on
fluid control can for example be found in [6]. However, the problem is seldom
treated from a pure shape optimization perspective. Notable exceptions are
[9] and one chapter of [8]. When the problem is treated from a shape optimization approach, usually only one very specific type of objective function is
considered: the volume dissipation of the kinetic energy of the fluid into heat.
In the limit of the Stokes equations, this results in a self-adjoint problem,
allowing for an elegant analysis. A more general volume objective function
for the Navier-Stokes equations is considered in [7], where the existence is
shown using surprisingly weak regularity assumptions.
∗
†
Dipl.-Math S. Schmidt, Univ. Trier, [email protected]
Prof. Dr. V. Schulz, Univ. Trier, [email protected]
1
1 Introduction
2
Although many objective functions of practical relevance are defined on
the surface of the flow obstacle alone, such an objective is seldom considered.
On the one hand, the shape sensitivity analysis for surface functionals is
much more complex in itself, but on the other hand, a surface functional
often features a dependence on the geometry which adds to the difficulties
deriving the correct gradient expression in Hadamard form. The Hadamard
form enables a very efficient computation of the gradient without the need to
compute the so called “mesh sensitivity” Jacobian. This is especially true for
aerodynamic quantities such as drag or lift coefficient or matching a target
surface pressure distribution. The shape derivative for such quantities can
for example be found in [13] for a compressible fluid model. Since many
auxiliary results from a special shape analysis background are needed to
derive the Hadamard expression, this paper seeks to be self-contained, listing
them from multiple literature sources such as [1, 2, 3, 15].
As such, the present work seeks to derive the expression for the shape
derivative in an incompressible Navier-Stokes flow for an objective function
that is as general as possible, combining both a volume part and a surface
objective function. A dependence on the geometry is also included. The
Hadamard form is extremely convenient for computational purposes, but
must be re-derived for each problem, unless it is known for a general objective
function on both surface and volume, which is the main purpose of this
work. Since the pressure in an incompressible fluid has an artificial character
and usually no boundary condition on the fluid obstacle, there will be some
restriction on the surface part of the objective function such that the adjoint
state exists. For more detailed existence results we would like to refer to
[10, 11, 12]. We conclude with the optimization of internal flows where the
pressure loss along the pipe could be reduced considerably.
2 The Optimization Problem
2
3
The Optimization Problem
The aim of this paper is to show the structure of the shape derivative of a
general objective function over an incompressible Navier-Stokes fluid.
Z
Z
(2.1)
min J(u, Ω) := f (u, Du, p) dA + g(u, Dn u, p, n) dS
(u,p,Ω)
Ω
Γ0
subject to
−µ∆u + ρu∇u + ∇p = ρG in Ω
div u = 0
u = u+ on Γ+
(2.2)
u=0
on Γ0
∂u
pn − µ
=0
on Γ− .
∂n
Here, f : Rd ×Rd×d ×R → R and g : Rd ×Rd ×R×Rd → R are assumed to be
continuously differentiable in each argument. Also, d is the dimension of the
bounded domain Ω ⊂ Rd and in the following Γ := ∂Ω is used to denote the
whole boundary of Ω. Furthermore, u : Ω → Rd is the velocity of the fluid
and p : Ω → R is the pressure. The viscosity is given by µ and ρ denotes the
density, which is constant in an incompressible fluid. The outflow boundary
condition on Γ− is the finite element “do nothing” outflow condition that
naturally arises due to integration by parts during the finite element matrix
assembly. Additionally, Γ+ denotes the inflow boundary and Γ0 is the fluid
obstacle or the channel wall, using the no-slip boundary condition. The shape
Γ0 is the unknown to be found. Also, n is the normal vector with components
ni and ρGi are the outside body forces, i.e. the forces per unit volume acting
on the fluid. Due to the no-slip boundary condition on Γ0 it is sufficient to
consider the derivative in normal direction Dn u := Du · n on Γ0 since the
tangent derivative of the velocities is zero anyway.
The control we are considering is the shape of the Dirichlet boundary Γ0 .
As such, Γ0 is the unknown and we seek the total derivative of the above with
respect to Γ0 . The inflow direction is considered constant and independent
of the shape of the boundary. Since the outflow boundary has an artificial
character anyway, we also consider the shape of the outflow boundary to
be fixed. In order to keep the notation readable we refer to the Jacobian
components as follows:
Du =: [aij ]ij ∈ Rd×d
∂u
=: [bi ]i ∈ Rd .
Dn u = Du · n =
∂n
3 Shape Calculus
4
Since the pressure has no explicit boundary condition on Γ0 , but is implicitly linked with the velocity, we need to impose the following restriction on
g such that we can later arrive at a consistent adjoint boundary condition:
We choose g such that there exists a functional λ satisfying the following
conditions on Γ0 :
1 ∂g
∀i = 1, . . . , d
µ ∂bi
∂g
hλ, ni = − .
∂p
λi =
This is less restrictive than it might appear. A consequence is that for a force
minimization, the forces should be chosen in line with the state equation,
i.e. since the state equation describes a viscous fluid, the objective function
should also include the viscous forces. For a drag minimization at zero angle
of attack, we have
∂u1
− pn1
g(u, Dn u, p, n) = µ
∂n
which leads to
∂g
= −n1
∂p
∂g
= µδ1,i
∂bi
and the above is satisfied with λi = δ1,i . The inclusion of higher derivatives
on the velocities is straight forward, but further limits the allowed surface
functionals g and will not be considered here.
3
Shape Calculus
Since we are interested in a gradient with respect to the shape of Γ, we first
define a one parametric family of bijective mappings Tt : (t, x) →
7 Tt (x). A
deformed domain Ωt is then given by
Ωt := {Tt (x0 ) : x0 ∈ Ω} .
Usually, the mapping Tt is either given by the perturbation of identity
Tt (x) = x + tV (x)
or implicitly by the speed method
dx
= V (t, x), x(0) = x0
dt
3 Shape Calculus
5
where V is a vector field of appropriate smoothness. For first order calculus,
it can be shown that both approaches are equivalent. Here, however, we
will focus on the perturbation of identity. If (ut , pt ) denotes the solution of
the Navier-Stokes equations in the perturbed domain Ωt , we seek to derive a
formula for the shape derivative
dJ(Ω)[V ] := lim+
t→0
J(ut , pt , Ωt ) − J(u, p, Ω)
t
that can be computed very efficiently without taking into account the “mesh
∂c
sensitivity” ∂q
of the Navier-Stokes state equation c(u, p) = 0, which otherwise enters the calculation due to a formal Lagrangian approach
dJ
∂c
∂J
=
− λT
dq
∂q
∂q
·
¸T
∂c
∂J
λ=
∂(u, p)
∂(u, p)
when the domain is parameterized by some finite design parameters q. The
key ingredient here is the so-called Hadamard formula, a consequence from
the Delfur-Zolésio structure theorem.
The consequence of the Hadamard formula is, that under some mild
smoothness assumptions, the shape derivative dJ has the structure of a scalar
product with the normal component hV, ni of the prescribed perturbation V
of the domain Ω. One can thus use the shape gradient h directly as an update
for the boundary which results in the steepest descent direction and can be
∂c
. It also
applied without knowledge of the costly mesh sensitivity Jacobian ∂q
becomes obvious, that the choice V = αn is best in some sense, as then the
projection hV, ni vanishes, i.e.
Γt+1 = {x0 + ∆t · h(x0 )n(x0 ) : x0 ∈ Γt }
is a very simple gradient marching optimization scheme with step length ∆t.
In order to find the shape gradient h for the general Navier-Stokes problem
we are considering, we need some additional results. Most of them are known
from the literature [1, 2, 3, 15], but we think that listing them here will create
a much more consistent derivation of the Navier-Stokes gradient.
3.1
Shape Derivative for Volume Objectives
We start with recapitulating the Hadamard formula for objective functions
which are defined over the whole domain Ω, such as the first part of the
mixed objective function (2.1):
3 Shape Calculus
6
Lemma 3.1 (Derivative of deformation determinant). The derivative of the
determinant of the perturbation of identity approach is given by:
d
det DTt (x) = div V (x)
dt t=0
Proof. For a matrix A(t) ∈ Rm×m where each entry is a differentiable function such that A(t)−1 exists for some interval I ⊂ R, the derivative of the
determinant with respect to t is then given by
µ
¶
d
dA(t)
−1
det A(t) = tr
A(t)
det A(t).
dt
dt
Since DT0 (x) = I, we have
µ
¶
dDTt (x)
d
det DTt (x) = tr
dt t=0
dt
t=0
= tr (DV (x))
= div V (x)
Lemma 3.2 (Hadamard formula for volume objective functions). For a general volume objective function f : Ω → R, not depending on a PDE constraint, i.e.
Z
J(Ω) =
f dA,
Ω
the shape derivative and shape gradient are given by
Z
dJ(Ω)[V ] = hV, nif dS
Γ
Proof. The proof requires the multi-dimensional substitution rule, the structure of the Jacobian DTt of the deformation, the derivative of the determinant
3 Shape Calculus
7
operator, the multiplication rule backwards, and the divergence theorem:
Z
d
d
f (x) dA(x)
J(Ωt ) :=
dJ(Ω)[V ] : =
dt t=0
dt t=0
Ωt
Z
d
=
f (Tt (x)) det(DTt (x)) dA(x)
dt t=0
Ω
Z
d
f (Tt (x)) det(DTt (x)) dA(x)
=
dt t=0
Ω
Z
= h∇f (x), V (x)i + f (x)div V (x) dA(x)
Ω
Z
=
div (f (x)V (x)) dA(x)
Ω
Z
=
hV, nif dS
Γ
3.2
Definitions and Lemmas
Before we recapitulate the Hadamard formula for objective functions which
are defined on the boundary of the domain Ω, such as the second part of
(2.1), some definitions and lemmas should be presented from the literature:
Definition 3.3 (Submanifold). For k ∈ N and m ∈ {1, ..., d} a subset Ω ⊂
Rd is called m-dimensional submanifold in Rd of class C k if for each x ∈ Ω
there exists an open neighborhood U (x) ⊂ Rd around x and a diffeomorphism
h of class C k such that
h−1 (U (x) ∩ Ω) = h−1 (U (x)) ∩ Rm
where Rm = {(x1 , . . . , xm , 0, . . . , 0) ∈ Rd : (x1 , . . . , xm ) ∈ Rm }
Definition 3.4 (Integral over submanifolds). Let Ω be an m-dimensional
compact submanifold in Rd with finite open cover
Ω⊂
l
[
j=1
Mj
3 Shape Calculus
8
such that Ωj := h−1
j (Mj ) and a corresponding partition of unity
l
X
rj (x) = 1
j=1
with rj infinitely continuously differentiable with compact support. The integral over Ω is then defined by
Z
Ω
g dΩ :=
l Z
X
j=1
Ωj
grj dΩ :=
l Z
X
j=1
h−1
j (Mj )
q
grj (hj (s)) det(Dhj T Dhj )(s) dS
where Dhj is the Jacobian of hj .
Lemma 3.5 (Integral over the surface of submanifolds). Let Ω be as in the
definition above. The integral over the surface of Ω is then given by
Z
Z
g dS =
g(h(s))| det Dh|k (Dh)−T ed k ds
∂Ω
B0
where B0 = {ξ ∈ Rd : kξk ≤ 1, ξd = 0} is the cut of the open d-dimensional
unit ball with the ξd = 0 hyperplane and ed is the d-th unit vector.
Proof. Let B := {ξ ∈ Rd : kξk ≤ 1} ⊂ Rd be the open unit Ball in Rd . The
unit ball is segmented by a cut with the ξd = 0 hyperplane in
B+ := {ξ ∈ B : ξd > 0}
B− := {ξ ∈ B : ξd < 0}
B0 := {ξ ∈ B : ξd = 0}.
Without loss of generality, one can assume that the interior of Ωj is given by
int Ωj = hj (B+ )
and consequently the boundary is given by
∂Ωj = hj (B0 ),
i.e. ∂Ωj = {hj (ξ, 0) : (ξ, 0) := (ξ1 , · · · , ξd−1 , 0) ∈ B0 }. Hence, for a proper
computation of the surface integral it is necessary to project the integration
density
det(Dhj T Dhj )
of the volume case above to the (ξ, 0)-hyperplane, i.e. dropping the last
column and last row from the matrix, which is the dd-minor [Dhj T Dhj ]dd
3 Shape Calculus
9
of Dhj T Dhj . By the definition of the cofactor-matrix, the determinant of
the dd-minor is exactly the mdd -entry of the cofactor-matrix M (Dhj T Dhj ).
Thus, the proper integration density for the surface integral is given by
q
√
mdd = eTd M (Dhj T Dhj )ed
q
= eTd M (Dhj T )M (Dhj )ed
q
= kM (Dhj )ed k22
= kM (Dhj )ed k2
= | det(Dhj )|kDh−T
j e d k2
where in the last line the well known property M (A) = det(A)A−T was used.
Hence, the corresponding boundary integral is given by
Z
∂Ω
g dS :=
l Z
X
j=1
=
∂Ωj
l Z
X
j=1
Z
=:
B0
B0
grj dS
grj (hj (s))| det Dhj |k (Dhj )−T ed k ds
g(h(s))| det Dh|k (Dh)−T ed k ds
where s = (ξ, 0) = (ξ1 , · · · , ξd−1 , 0).
Lemma 3.6 (Unit normal field on ∂Ω). For a regular surface ∂Ω, the unit
normal field at x = h(ξ, 0) on ∂Ω is given by
Pl
−T
ed
Dh(ξ, 0)−T ed
j=1 rj Dhj (ξ, 0)
n(x) = Pl
=:
kDh(ξ, 0)−T ed k
k j=1 rj Dhj (ξ, 0)−T ed k
Proof. The tangent space of the regular surface ∂Ωj at x = hj (ξ, 0) is given
by the span of the columns of the Jacobian Dhj (ξ, 0):
Tx Ωj = span(Dhj (ξ, 0)ei , i = 1, · · · , d − 1),
i.e. the (non-unit) tangent direction is given by τi := Dhj (ξ, 0)ei . Since
hτi , Dhj (ξ, 0)−T ed i = hDhj (ξ, 0)ei , Dhj (ξ, 0)−T ed i
= hDhj (ξ, 0)−1 Dhj (ξ, 0)ei , ed i
= hei , ed i
= 0 ∀i = 1, · · · , d − 1,
3 Shape Calculus
10
the expression for the normal follows by summation over the partition of Ω
and normalization.
Remark 3.7 (Alternate representation of the normal). According to the
above, a non-unit normal field m(x) at x = (ξ, 0) for the regular surface
∂Ω is given by
m(x) = Dh(ξ, 0)−T ed .
Due to the property M (A) = det(A)A−T , we have
m(x) = det(Dh(ξ, 0))−1 M (Dh(ξ, 0))ed .
The scalar determinant is non-zero due to the regularity of ∂Ω and can be
dropped during the normalization, such that
n(x) =
M (Dh(ξ, 0))ed
kM (Dh(ξ, 0))ed k2
The structure of the normal can now be used in the definition of the
surface integral. Using the above, the integral over the perturbed surface Γt
can now be expressed with respect to the unperturbed surface Γ:
Lemma 3.8 (Perturbed surface integral). The surface integral over the perturbed surface Γt is given by
Z
Z
g dΓt = g(Tt (x))kM (DTt (x))n(x)k2 dΓ(x)
Γ
Γt
where n is the unit normal to the unperturbed boundary Γ.
Proof. The perturbed submanifold Γt can be described by
ht (ξ, 0) := Tt (h(ξ, 0)).
(3.1)
The surface integral is then given by
Z
Z
g(ht (s))kM (Dht (s))ed k2 ds
g dSt =
∂Ωt
B0
The chain rule results in
Dht (ξ, 0) = D[Tt (h(ξ, 0))] = DTt (h(ξ, 0))Dh(ξ, 0)
and
M (Dht (ξ, 0)) = M (DTt (h(ξ, 0)Dh(ξ, 0)))
= M (DTt (h(ξ, 0)))M (Dh(ξ, 0)).
(3.2)
3 Shape Calculus
11
Using the alternate representation of the normal:
kM (Dht (s))ed k2 = kM (DTt (h(ξ, 0)))M (Dh(ξ, 0))ed k2
= kM (DTt (h(ξ, 0)))kM (Dh(ξ, 0))ed k2 n(h(ξ, 0))k2
= kM (Dh(ξ, 0))ed k2 kM (DTt (h(ξ, 0)))n(h(ξ, 0))k2
Thus,
Z
∂Ωt
Z
g dSt =
=
B0
Z
∂Ω
g(Tt (h(s))kM (DTt (h(s)))n(h(s))k2 kM (Dh(s))ed k2 ds
g(Tt (x))kM (DTt (x))n(x)k2 dΓ(x)
where again s = (ξ, 0) and x = h(s).
Remark 3.9. Due to the definition of the cofactor matrix, we also have
Z
Z
g(Tt (x))kM (DTt (x))n(x)k2 dΓ(x)
g dSt =
∂Ω
∂Ωt
Z
g(Tt (x))| det DTt (x)|k(DTt (x))−T n(x)k2 dΓ(x).
=
∂Ω
Since we assume the deformation mapping Tt does not change the orientation
of Ωt relative to Ω, we can assume det DTt > 0 in subsequent considerations.
Lemma 3.10 (Derivative through matrix inverse). Let A(t) ∈ Rm×m be a
matrix where each entry is a differentiable function such that A(t)−1 exists
for some interval I ⊂ R. The derivative of the matrix inverse with respect to
t is then given by
d
dA(t)
A(t)−1 = −A(t)−1
A(t)−1
dt
dt
Proof. Let aij (t) be the component functions of A(t) and let ajk (t) be the
components of A(t)−1 , i.e.:
δik =
⇒0=
m
X
j=1
m
X
j=1
aij (t)ajk (t)
dajk (t)
daij (t) jk
a (t) + aij (t)
dt
dt
dA(t)
dA(t)−1
−1
⇒0=
A(t) + A
dt
dt
3 Shape Calculus
3.3
12
Shape Derivative for Surface Objectives
One can now form a preliminary shape derivative for objective functions
which are defined on the boundary of the domain Ω alone, such as the second
part of (2.1):
Lemma 3.11 (Preliminary shape derivative). For g ∈ C(T (Γ)), where T (Γ)
is a tubular neighborhood of Γ such that ∇g is defined on Γ, the preliminary
shape derivative, not yet in Hadamard form, for the surface integral is given
by
Z
Z
d
g dSt = h∇g, V i + g (div V − hDV n, ni) dS
dt t=0 Γt
Γ
Proof. We start with the expression from remark 3.9:
Z
d
g dSt
dt t=0 ∂Ωt
Z
d
=
(g(Tt (x)) det DTt (x)k(DTt (x))−T n(x)k2 ) dΓ(x).
∂Ω dt t=0
Furthermore,
γt := DTt−T n = ((I + tDV )T )−1 n
gives
à d
! 21
µ
¶
X
d
1
d
d
2
T
=
kγ(t)k2 =
γi (t)
γ (0)
γ(t) .
dt t=0
dt t=0 i=1
kγ(0)k2
dt t=0
Especially
γ(0) = n
d
d
γ(t) = −I −1
(I + tDV )T I −1 n
dt t=0
dt t=0
= −DV T n.
Thus
d
kγ(t)k2 = −nT DV T n = −hDV n, ni.
dt t=0
Using det DT0 = det I = 1 and the product rule, the above results in
¸
Z
Z ·
d
d
g dSt =
(g(Tt ) det DTt ) n − ghDV n, ni dS
dt t=0 ∂Ωt
dt t=0
Z∂Ω
=
h∇g, V i + g (div V − hDV n, ni) dS,
∂Ω
where the formula for the determinant was again used.
3 Shape Calculus
13
Definition 3.12 (Tangential gradient, tangential divergence, curvature).
For a sufficiently smooth d-dimensional submanifold M ⊂ Rd and g ∈ C 2 (M ),
the tangential gradient of g is defined by the projection of the ordinary gradient onto the tangent plane
d−1
X
∂g
τi ∈ Rd−1
∇M g := PT (∇g) =
∂τ
i
i=1
where the τi form an orthonormal basis of the tangent space. For a differentiable vector field V , the tangential divergence is defined by
À
d−1 ¿
X
∂V
divM V := tr(PT (DM V )) =
, τi ∈ R.
∂τi
i=1
It can be shown that this is well defined and independent of the particular
choice of the orthonormal tangent basis. Furthermore, the mean curvature is
defined by the tangential divergence of the unit normal:
κ := divM n
Remark 3.13. In the more general setting of manifolds
Z
Z
p
d
g(h(ξ)) γ(ξ) dξ
g dH =
M
Ω
where the metric is given by γij = ∂i h∂j h and the area element by
p
det γij , the tangential gradient is usually defined by
√
γ =
∇M g := γ ij ∂j g∂i h
where Einstein’s summation convention was used and γ ij denotes the inverse
metric. The object is often called covariant derivative in this context. Thus,
tangential gradient and tangential divergence are intrinsic objects.
In the context we are primarily considering, i.e. the shape optimization
under a PDE constraint, it is sufficient to assume that M is a submanifold
in Rd of codimension 1, i.e. the set of unit normal and unit tangent vectors
{n, τ1 , · · · , τd−1 }
creates an orthonormal basis of Rd . The gradient ∇g can then be expressed
in this basis, i.e.
∇g = h∇g, nin +
d−1
X
h∇g, τi iτi .
i=1
3 Shape Calculus
14
Thus, for a function that extends into a tubular neighborhood of M such that
∂g
exists, the tangential gradient can also be expressed as
∂n
∇M g = ∇g −
∂g
n
∂n
and likewise
divM V = div V − hDV n, ni
Lemma 3.14. Tangential gradient and tangential divergence are related to
each other just like their ordinary counter parts, i.e. for a differentiable scalar
function g and a differentiable vector field V
divM gV = h∇M g, V i + gdivM V
Proof. Since
X
∂g j
∂g
∂g
, τi i =
Vj
τi = h τi , V i = h∇M g, V i
hV
∂τi
∂τi
∂τi
j=1
d−1
where upper indices denote the vector component, we have
divM gV =
d ¿
X
∂gV
i=1
∂τi
À
, τi
d−1
X
∂g
, τi i + g
=
hV
∂τ
i
i=1
¿
∂V
, τi
∂τi
À
= h∇M g, V i + gdivM V
Lemma 3.15. For a general surface objective function g : T (Γ) → R such
∂g
that ∂n
exists, the shape derivative and shape gradient are given by
·
¸
Z
∂g
dJ(Ω)[V ] = hV, ni
+ κg dS
∂n
Γ
where κ = divΓ n is the tangential divergence of the normal, i.e. the additive
mean curvature of Γ.
Proof. Starting form the preliminary gradient of lemma 3.11, we have
Z
Z
d
g dSt =
h∇g, V i + g (div V − hDV n, ni) dS
dt t=0 ∂Ωt
∂Ω
Z
=
h∇g, V i + gdivΓ V dS.
∂Ω
3 Shape Calculus
15
Suppose Ṽ := hV, nin. Since perturbations in tangent direction are mere
reparametrizations, the shape derivative only depends on the normal component of V . Hence we have
dJ(Ω)[Ṽ ] = dJ(Ω)[V ]
and
d
dt t=0
Z
·
Z
∂g
+ gdivΓ n
g dSt =
hV, ni
∂n
∂Ωt
∂Ω
¸
dS
where we have used that
divΓ (hV, nin) = h∇M hV, ni, ni + hV, nidivΓ n
= hV, nidivΓ n = hV, niκ
3.4
Shape Derivative of the Unit Normal
The derivative of the unit normal field with respect to shape perturbations
is very often needed. Many objective functions stemming from physics, such
as the fluid forces we are also considering, or any PDE constraint of the
Neumann type require this knowledge.
Lemma 3.16 (Unit normal on the perturbed domain). The unit normal on
the perturbed domain Ωt is given by
nt (Tt (x)) =
(DTt (x))−T n(x)
k(DTt (x))−T n(x)k2
Proof. According to lemma 3.6, the unit normal on the perturbed domain is
given by
Dht (ξ, 0)−T ed
nt (x) =
kDht (ξ, 0)−T ed k
Using equations (3.1) and (3.2), we have
(DTt (h(ξ, 0)))−T (Dh(ξ, 0))−T ed
k(DTt (h(ξ, 0)))−T (Dh(ξ, 0))−T ed k
(DTt (x))−T n(x)
=
k(DTt (x))−T n(x)k
nt (Tt (x)) =
where lemma 3.6 was used again for the unperturbed domain.
3 Shape Calculus
16
Lemma 3.17 (Preliminary shape derivative of the unit normal). The preliminary shape derivative of the unit normal is given by
dn[V ](x) :=
d
nt (Tt (x)) = hn, (DV (x))T n(x)in(x) − (DV (x))T n(x)
dt t=0
Proof. Since DT0 (x) = I, the quotient rule simplifies to
µ
¶
£
¤
d
−T
(DTt (x)) n(x)
dn[V ](x) :=
dt t=0
¶
µ
d
−T
k(DTt (x)) n(x)k2 .
− n(x)
dt t=0
Using lemma 3.10, the above transforms to
µ
¶
d
−T
dn[V ](x) = n(x)
k(DTt (x)) n(x)k2 − (DV (x))T n(x).
dt t=0
For any vector v(t) where the components are differentiable functions, the
chain rule gives
d
d
kv(t)k2 =
dt t=0
dt t=0
Ã
X
! 12
2
vi (t)
i
hv(0), v 0 (0)i
=
.
kv(0)k2
Hence, for v(t) = (DTt (x))−T n(x) we have v(0) = n(x) and again due to
lemma 3.10 we have v 0 (0) = (DV (x))T n(x), resulting in
d
kDTt (x)n(x)k2 = hn(x), (DV (x))T n(x)i,
dt t=0
which gives the desired expression.
Unfortunately, lemma 3.17 is not yet applicable to the Hadamard form
and additional transformations are required for finding the Hadamard formula for the shape derivative when the objective function or the state constraint depend on the unit normal:
Definition 3.18 (Tangential Jacobian). Similar to definition 3.12, the tangential Jacobian for a differentiable vector valued function V is defined as
DM V = [∇M Vi ]Ti ,
that is, the rows of the matrix are given by the tangential gradient of the
component functions.
3 Shape Calculus
17
Remark 3.19. Similar to remark 3.13, there is also the equality
" d−1
#T ·
¸T
X ∂Vi
∂Vi
DM V =
τk = ∇Vi −
n = DV − DV nnT
∂τ
∂n
k
i
k=1
i
should the required derivative in normal direction exist.
Remark 3.20. The tangential Jacobian of the unit normal field n(x) at a
point x lies in the tangent space Tx M , i. e.
¡
¢
0 = DM 1 = DM n(x)T n(x) = 2 (DM n(x))T n(x),
thus DM n ⊥ n.
Lemma 3.21. The shape derivative of the normal is equivalently given by
dn[V ] = − (DΓ V )T n
Proof. Assuming that the perturbation field V extends into a tubular neighborhood, we have
DΓ V = DV − DV nnT
and likewise
(DΓ V )T n = (DV )T n − n (DV n)T n = −dn[V ]
due to lemma 3.17 and the symmetry of DV .
Lemma 3.22. For a perturbation normal to the boundary Γ, i.e. Ṽ :=
hV, nin or equivalently hṼ , τ i = 0 for a vector τ ∈ Tx Γ, we have
dn[Ṽ ] = −∇Γ hṼ , ni
Proof. Let {τi ∈ Tx Γ : 1 ≤ i ≤ d − 1} be an orthonormal basis of the
tangent space and let the unit normal be given by n with components nk .
By definition we have
∇Γ hṼ , ni =
=
=
d−1
X
∂hṼ , ni
i=1
d−1
X
∂τi
" d
∂ X
∂τi k=1
i=1
"
d−1 X
d
X
∂ Ṽk
i=1
k=1
#
Ṽk nk τi
#
∂nk
nk + Ṽk
τi .
∂τi
∂τi
3 Shape Calculus
18
According to remark 3.20, the variation of the normal in tangent directions is
perpendicular to the normal and with the particular choice of Ṽ , the second
part vanishes. This results in
∇Γ hṼ , ni =
=
d−1 X
d
X
∂ Ṽk
nk τi
∂τi
i=1 k=1
(DΓ Ṽ )T n =
−dn[Ṽ ].
One can now use the tangential Stokes formula to perform an integration
by parts on surfaces to arrive at a more convenient expression for the shape
derivative of the normal:
Lemma 3.23 (Tangential Stokes Formula). Let g be a real valued differentiable function on Γ and v be a differentiable vector valued function on Γ.
Then the following relation holds:
Z
Z
gdivΓ v + h∇Γ g, vi dS = κ g hv, ni dS
Γ
Γ
Proof. Due to lemma 3.15 the following holds for a sufficiently smooth perturbation field V :
·
¸
Z
Z
∂g
+ g κ dS.
h∇g, V i + gdivΓ V dS = hV, ni
∂n
Γ
Γ
∂g
Using ∇Γ g = ∇g − ∂n
n and V = v one arrives at the desired expression.
The Hadamard formula for the variation of the normal is thus given by
Lemma 3.24 (Hadamard Formula of the Shape Derivative of the Normal).
∂g
exists, let the
For a sufficiently smooth vector valued function g such that ∂n
objective be given by
Z
J(Γ) := hg, ni dS.
Γ
Then the shape derivative of the above expression is
·
¸
Z
∂g
dJ(Γ)[V ] = hV, ni
n + divΓ g dS,
∂n
Γ
i.e. the shape derivative of the normal fulfills
hg, dn[V ]i = divΓ g − κhg, ni.
3 Shape Calculus
19
Proof. The product rule and lemma 3.15 give
·
¸
Z
∂g
dJ(Γ)[V ] = hV, ni
n + κhg, ni + hg, dn[V ]i dS
∂n
Γ
¸
·
Z
∂g
n + κhg, ni + hg, − (DΓ V )T ni dS
= hV, ni
∂n
Γ
Let Ṽ := hV, nin be the perpendicular component of V . Applying lemma
3.22 results in
·
¸
Z
∂g
dJ(Γ)[Ṽ ] = hṼ , ni
n + κhg, ni + hg, −∇Γ hṼ , nii dS
∂n
Γ
and furthermore lemma 3.23 gives
Z
Z
hg, −∇Γ hṼ , nii dS = hṼ , ni [divΓ g − κhg, ni] dS.
Γ
Γ
Using the same argumentation as in the proof of lemma 3.15, i.e. the tangential component of V does not change the shape and hṼ , ni = hV, ni, one
can see that the above also holds for arbitrary smooth perturbation fields V ,
which gives the desired formula.
3.5
Shape Derivatives under a State Constraint
In the presence of a state constraint, i.e.
Z
Z
min J(u, Ω) :=
f (u) dA + g(u) dS
(u,Ω)
Ω
subject to
L(u) = uf in Ω
Lb (u) = ub on Γ
Γ
where f and g do not depend on the geometry Ω (respective Γ), the chain
rule immediately results in
¸
·
Z
∂g(u)
+ κg(u) dS +
dJ(u, Ω) :=
hV, ni f (u) +
∂n
Γ
Z
Z
∂f (u) 0
∂g(u) 0
+
u [V ] dA +
u [V ] dS
∂u
∂u
Ω
subject to
L(u) = uf in Ω
∂L(u) 0
u [V ] = 0 in Ω
∂u
Γ
3 Shape Calculus
20
which does not yet fulfill the Hadamard form. The Hadamard form for such
a problem can now be found by the adjoint approach. Crucial for the adjoint
approach is knowledge of the boundary conditions of the linearized problem
which determines the local shape derivative u0 [V ] of the state.
Definition 3.25 (Material Derivative, Local Derivative). Let ut solve the
PDE constraint on the perturbed domain Ωt = Tt (Ω) and let xt := Tt (x) be
a shifted boundary point. The material derivative is then defined as the total
derivative
du[V ](x) :=
d
ut (xt )
dt t=0
and the local shape derivative is defined as the partial derivative
u0 [V ](x) :=
d
ut (x).
dt t=0
A straight forward linearization of the PDE boundary conditions usually results in an expression for the material derivative. The general strategy when
deriving shape derivatives is to first transfer the problem back to the original
boundary before computing the limit, resulting in the need to compute the
local shape derivative. The chain rule combines both by the relation:
du[V ] = u0 [V ] + h∇u, V i.
Thus, if the right hand side of the boundary condition does not depend on the
geometry, one has
dub [V ] = h∇ub , V i.
Lemma 3.26 (Shape Derivative of the Dirichlet Boundary Condition). Suppose the state u is given as the solution of a PDE of the form
L(u) = uf in Ω
u = ub on ∂Ω,
such that uf and ub do not depend on the geometry of Ω, e.g. the unit normal
n, etc. The local shape derivative under the perturbation V is then given as
the solution of the problem
∂L(u) 0
u [V ] = 0 in Ω
∂u
∂(ub − u)
u0 [V ] = hV, ni
on Γ
∂n
where Γ is the variable part of the boundary of ∂Ω.
3 Shape Calculus
21
Proof. The linearization in Ω is straight forward. Taking the total derivative
of the boundary condition results in
du[V ] = dub [V ] on Γ.
Using definition 3.25 the above can be transformed to
u0 [V ] + h∇u, V i = du[V ] = dub [V ] = h∇ub , V i
⇒ u0 [V ] = h∇ (ub − u) , V i .
The usual orthogonality argument gives the desired expression
µ
¶
∂ (ub − u)
0
u [V ] = hV, ni
.
∂n
Lemma 3.27 (Shape Derivative of the Slip Boundary Condition). The slipboundary condition is often encountered in fluid dynamics, especially when
an inviscid fluid is modeled:
hu, ni(x) = 0 on Γ.
The local shape derivative then satisfies the boundary condition
hu0 [V ], ni = −hDuV, ni − hu, dn[V ]i
À
¶
µ ¿
∂u
, n + hu, ∇Γ hV, nii
= hV, ni −
∂n
where the second part of the identity holds for a perturbation in normal direction only.
Proof. The derivation is analog to lemma 3.26 using the product rule and
the extension of definition 3.25 for a vector valued state u:
du[V ] = u0 [V ] + hDu, V i.
Lemma 3.28 (Shape Derivative of the Neumann Boundary Condition). Suppose the state u is given as the solution of a PDE of the form
L(u) = uf in Ω
∂u
= ub on ∂Ω,
∂n
3 Shape Calculus
22
such that uf and ub do not depend on the geometry of Ω, e.g. the unit normal
n, etc. The local shape derivative under the perturbation V is then given as
the solution of the problem
∂L(u) 0
u [V ] = 0 in Ω
∂u
∂u0 [V ]
= h∇ub , V i − hD2 uV, ni − h∇Γ u, dn[V ]i
∂n
¸
·
∂ub ∂ 2 u
− 2 + h∇Γ u, ∇Γ hV, nii
= hV, ni
∂n
∂n
where the second identity holds for the orthogonal component of the perturbation field only.
Proof. The Neumann boundary condition at xt = Tt (x) on the deformed
domain Ωt reads
ub ◦ xt = h∇ut , nt i ◦ xt
= h∇ut , nt i ◦ Tt (x)
= h(∇ut ) ◦ Tt (x), nt (xt )i.
The chain rule results in
∇(ut ◦ Tt (x)) = ((∇ut ) ◦ Tt (x))T · DTt (x)
= (DTt (x))T · [(∇ut ) ◦ Tt (x)]
and the boundary condition becomes
ub (xt ) = h(DTt (x))−T ∇(ut ◦ Tt (x)), nt (xt )i
= (∇(ut (xt )))T DTt (x)−1 · nt (xt ).
The total derivative with respect to t now yields the material derivative of
ut (xt ). Using lemma 3.10 results in:
dub [V ] = (∇du[V ])T n + (∇u)T (−DV ) n + h∇u, dn[V ]i,
which results in
∂du[V ]
= dub [V ] − h∇u, (−DV ) ni − h∇u, dn[V ]i.
∂n
Using the relationship
du[V ] = u0 [V ] + h∇u, V i
dub [V ] = h∇ub , V i
dn[V ] = −∇Γ hV, ni
3 Shape Calculus
23
we have
∂du[V ]
∂u0 [V ]
=
+ hD2 uV, ni + h∇u, DV ni
∂n
∂n
and the above can now be expressed in terms of the local shape derivatives:
∂u0 [V ]
= h∇ub , V i − hD2 uV, ni − h∇u, dn[V ]i.
∂n
Since h∇u, ni = 0, we have ∇u = ∇Γ u and with the usual orthogonality
argument the boundary condition can be expressed as
·
¸
∂ub ∂ 2 u
∂u0 [V ]
= hV, ni
− 2 + h∇Γ u, ∇Γ hV, nii
∂n
∂n
∂n
where the last part can be brought into Hadamard form using lemma 3.23.
Remark 3.29. For the standard Laplace problem
−∆u = uf in Ω
∂u
= ub on ∂Ω,
∂n
the local shape derivative can be further refined. The Laplace-Beltrami operator
∆Γ u := divΓ ∇Γ u = ∆u − κ
∂u ∂ 2 u
−
∂n ∂n2
provides
∂ 2u
= −∆Γ u − uf − κub
∂n2
which results in
∂u0 [V ]
= divΓ (hV, ni∇Γ u) + hV, ni
∂n
µ
∂ub
+ κub + uf
∂n
¶
.
Instead of conducting the adjoint calculus in a general setting, we now
return to the Navier-Stokes problem.
4 Shape Derivative and Adjoint Calculus for the general Navier-Stokes Problem
4
24
Shape Derivative and Adjoint Calculus for the general
Navier-Stokes Problem
According to section 3, a formal shape differentiation of (2.1) immediately
yields
dJ(u, p, Ω)[V ] =
Z
hV, nif (u, Du, p) dS
(4.1)
Γ0
! Ã d
!
Z ÃX
d
X ∂f ∂u0 [V ]
∂f 0
∂f 0
i
+
ui [V ] +
+
p [V ] dA
∂ui
∂aij ∂xj
∂p
i=1
i,j=1
Ω
Z
+ hV, ni [h∇g(u, Dn u, p, n), ni + κg(u, Dn u, p, n)] dS
(4.2)
(4.3)
Γ0
!
! Ã d
Z ÃX
d
X ∂g ∂u0 [V ]
∂g 0
∂g
i
+
ui [V ] +
nj + p0 [V ] dS
∂ui
∂bi ∂xj
∂p
i=1
i,j=1
(4.4)
Z X
d
∂g
+
dni [V ] dS
∂n
i
i=1
(4.5)
Γ0
Γ0
where u0 [V ] and p0 [V ] are given as the solution of the linearized Navier-Stokes
equations
−µ∆u0 [V ] + ρ (u0 [V ]∇u + u∇u0 [V ]) + ∇p0 [V ] = 0 in Ω
div u0 [V ] = 0.
The boundary condition on Γ0 is given by lemma 3.26. Since the other
boundaries are considered fixed, one does not have to consider differences
between the material and the local shape derivative and a linearization is
straight forward:
u0i [V ] = −hV, ni
∂ui
on Γ0
∂n
u0i [V ] = 0 on Γ+
p0 [V ]ni − µh∇u0i [V ], ni = 0 on Γ−
(4.6)
(4.7)
(4.8)
4 Shape Derivative and Adjoint Calculus for the general Navier-Stokes Problem
25
Lemma 4.1. For a sufficiently smooth, arbitrary λ and λp the relation
"
à d
!
#
Z X
d
X ∂λj
∂λi
∂λp 0
(4.9)
0=
−µ∆λi − ρ
uj +
uj −
ui [V ] dA
∂xi
∂xj
∂xi
i=1
i,j=1
Ω
Z X
d
∂λi 0
−
p [V ] dA
∂xi
i=1
Ω
"
#
Z X
d
d
X
∂λi
+
µ
+ρ
(λj uj ni + λi uj nj ) u0i [V ] dS
∂n
i=1
j=1
Γ
Z
λp
+
d
X
u0i [V
]ni dS +
i=1
Γ
Z X
d
Γ
0
λi ni p [V ] dS +
i=1
Z X
d
Γ
i=1
(4.10)
(4.11)
−µλi
∂u0i [V ]
dS
∂n
(4.12)
holds.
Proof. Multiplying the volume part of the linearized Navier-Stokes equations
with an arbitrary λ and λp results in
"
à d
!
#
Z X
d
0
0
X
∂ui
∂u [V ]
∂p [V ]
λi −µ∆u0i [V ] + ρ
u0j [V ]
0=
+ uj i
+
dA
∂xj
∂xj
∂xi
i=1
j=1
Ω
Z
+ λp div u0 [V ] dA.
Ω
Integration by parts gives
Z X
d
Ω
−µλi ∆u0i [V
] dA =
i=1
Z X
d
Γ
+
i=1
µ
¶
∂u0i [V ]
∂λi
0
−µ λi
− ui [V ]
dS
∂n
∂n
Z X
d
Ω
−µu0i [V ]∆λi dA
i=1
and likewise due to div u0 [V ] = 0:
Z X
d
Ω i,j=1
λi u0j [V
∂ui
dA =
]
∂xj
Z X
d
Γ
i,j=1
λi u0j [V
Z X
d
∂λi 0
]ui nj dS −
uj [V ]ui dA.
∂x
j
i,j=1
Ω
Note that in the above equation the index on the local shape derivative is
j and not i. To derive the desired expression, the indices i and j must be
4 Shape Derivative and Adjoint Calculus for the general Navier-Stokes Problem
26
switched. Integration by parts on the second part of the linearized convection
results in
Z X
Z X
Z X
d
d
d
∂λi
∂u0i [V ]
0
λi uj
λi uj ui [V ]nj dS −
dA =
uj u0i [V ] dA.
∂xj
∂xj
i,j=1
i,j=1
i,j=1
Ω
Ω
Γ
The pressure variation provides
Z X
Z
Z X
d
d
∂λi 0
∂p0 [V ]
0
dA = λi ni p [V ] dS −
p [V ] dA
λi
∂x
∂x
i
i
i=1
i=1
Γ
Ω
Ω
and the divergence constraint provides
Z
Z X
Z
d
d
d
X
X
∂u0i [V ]
∂λp 0
0
λp
ui [V ]ni dS −
dA = λp
u [V ] dA.
∂xi
∂xi i
i=1
i=1
i=1
Ω
Ω
Γ
Summarizing the above creates the desired expression.
It is now possible to state the adjoint right hand side in the volume
Lemma 4.2 (Adjoint Right Hand Side, Volume). The adjoint equation must
fulfill in the domain Ω:
¶
d
d µ
X
X
∂λj
∂λi
∂λp
∂f
∂ ∂f
uj +
uj −
=
−
µ∆λi − ρ
∂xi
∂xj
∂xi
∂ui j=1 ∂xj ∂aij
j=1
div λp =
∂f
.
∂p
Proof. Due to equations (4.9) - (4.12) summing to zero, they can be added
to the preliminary gradient (4.1) - (4.5). Integration by parts on equation
(4.2) yields
! Ã d
!
Z ÃX
d
X ∂f ∂u0 [V ]
∂f 0
∂f 0
i
ui [V ] +
+
p [V ] dA
∂ui
∂aij ∂xj
∂p
i,j=1
i=1
Ω
Z X
d
∂f 0
=
u [V ]nj dS
∂aij i
i,j=1
Γ
Ã
!
Z X
Z
d
d
X
∂f
∂f 0
∂ ∂f
0
+
−
ui [V ] dA +
p [V ] dA
∂ui j=1 ∂xj ∂aij
∂p
i=1
Ω
(4.13)
(4.14)
Ω
and a direct comparison between the above and equations (4.9) and (4.10) reveals the required adjoint right hand side in Ω. Note that this has introduced
a new boundary term.
4 Shape Derivative and Adjoint Calculus for the general Navier-Stokes Problem
27
Lemma 4.3 (Adjoint Boundary Condition at Inflow). The adjoint boundary
condition on the inflow boundary Γ+ is given by
λ=0
λp free.
Proof. Since the inflow velocity is fixed and independent of the shape of the
fluid obstacle, we have u0 [V ] = 0 on Γ+ . Hence, the only term appearing
on Γ+ is the normal variation of u0 [V ] and the pressure variation p0 [V ] from
equation (4.12):
Z X
d
0
λi ni p [V ] dS +
Z X
d
−µλi
Γ+ i=1
Γ+ i=1
∂u0i [V ]
dS
∂n
which is removed by λ = 0 on Γ+ .
Lemma 4.4 (Adjoint Boundary Condition at No-Slip). The adjoint boundary condition on the no-slip boundary Γ0 is given by
1 ∂g
∀i = 1, . . . , d
µ ∂bi
∂g
hλ, ni = −
∂p
λp free.
λi =
Proof. The sensitivities on Γ0 are equations (4.13), (4.4), (4.11), and (4.12):
Z X
d
∂f 0
ui [V ]nj dS
∂a
ij
Γ0 i,j=1
! Ã d
!
Z ÃX
d
0
X
∂g 0
∂g ∂ui [V ]
∂g
+
ui [V ] +
+ p0 [V ] dS
∂ui
∂aij ∂xj
∂p
i=1
i,j=1
Γ0
#
"
Z X
d
d
X
∂λi
+
µ
+ρ
(λj uj ni + λi uj nj ) u0i [V ] dS
∂n
i=1
j=1
Γ0
Z
+
λp
Γ0
d
X
i=1
u0i [V
]ni dS +
Z X
d
Γ0
i=1
0
λi ni p [V ] dS +
Z X
d
Γ0
i=1
−µλi
∂u0i [V ]
dS.
∂n
4 Shape Derivative and Adjoint Calculus for the general Navier-Stokes Problem
28
Using the no-slip boundary condition and the boundary condition for the
local shape derivative, the above transforms to
" d Ã
!
#
Z
d
X ∂g
X
∂λi
∂ui
∂f
hV, ni −
+µ
+ λp ni +
nj
dS
∂ui
∂n
∂aij
∂n
i=1
j=1
Γ0
! Ã
!
Z ÃX
d
d
∂g ∂u0i [V ]
∂g X
+
+
+
λi ni p0 [V ] dS
∂b
∂n
∂p
i
i=1
i=1
Γ0
+
Z X
d
Γ0
i=1
−µλi
∂u0i [V ]
dS,
∂n
where the first part now also enters the gradient (4.1) - (4.5). Expressing
∇ui in local coordinates on the boundary results in
d
X
∇ui = h∇ui , nin +
h∇ui , τj iτj ,
j=1
hence
X ∂ui
∂ui
∂ui
nj ⇒ 0 = λp
ni
=
∂xj
∂n
∂n
i=1
d
due to the mass conservation on Γ0 . Hence, λp does not receive a boundary
condition. The remaining sensitivities can be eliminated by
1 ∂g
∀i = 1, . . . , d
µ ∂bi
∂g
hλ, ni = − .
∂p
λi =
Using lemma 4.2, 4.3, and lemma 4.4, the preliminary gradient simplifies
4 Shape Derivative and Adjoint Calculus for the general Navier-Stokes Problem
29
to
dJ(u, p, Ω)[V ] =
Z
hV, nif (u, Du, p) dS
(4.15)
Γ0
Z
hV, ni [h∇g(u, Dn u, p, n), ni + κg(u, Dn u, p, n)] dS
+
Γ0
"
Z
hV, ni −
+
d
X
i=1
Γ0
Ã
∂g
∂λi X ∂f
+µ
+
nj
∂ui
∂n
∂aij
j=1
d
!
∂ui
∂n
(4.16)
#
Z X
d
∂g
dni [V ] dS.
+
∂n
i
i=1
dS
(4.17)
(4.18)
Γ0
Lemma 4.5 (Adjoint Boundary Condition at Outflow). The adjoint boundary condition on the outflow boundary Γ− is given by
à d
!
X
∂λi
+ρ
µ
λj uj ni + λi uj nj + λp ni = 0.
∂n
j=1
Proof. Inserting equation (4.8) into equations (4.9) - (4.12), the remaining
sensitivity is
"
#
Z X
d
d
X
∂λi
µ
+ρ
(λj uj ni + λi uj nj ) u0i [V ] dS
∂n
i=1
j=1
Γ−
Z
+
Γ−
λp
d
X
u0i [V ]ni dS.
i=1
Hence, the required boundary condition is
!
à d
X
∂λi
µ
λj uj ni + λi uj nj + λp ni = 0.
+ρ
∂n
j=1
4 Shape Derivative and Adjoint Calculus for the general Navier-Stokes Problem
30
Lemma 4.6 (Shape Derivative for the General Navier-Stokes Problem). The
shape derivative in Hadamard form for the problem under consideration is
given by
dJ(u, p, Ω)[V ] =
Z
hV, nif (u, Du, p) dS
Γ0
Z
hV, ni [h∇g(u, Dn u, p, n), ni + κg(u, Dn u, p, n)] dS
+
Γ0
"
Z
hV, ni −
+
i=1
Γ0
Z
+
d
X
Ã
∂g
∂λi X ∂f
+µ
+
nj
∂ui
∂n
∂a
ij
j=1
d
!
∂ui
∂n
#
dS
hV, ni [divΓ ∇n g − κh∇n g, ni] dS
Γ0
where ∇n denotes the vector consisting of components
and p solve the incompressible Navier-Stokes equations
−µ∆u + ρu∇u + ∇p = ρG
div u = 0
u = u+
u=0
∂u
pn − µ
=0
∂n
∂g
.
∂ni
in
Ω
on
on
Γ+
Γ0
on
Γ−
Furthermore, u
and λ and λp solve the adjoint incompressible Navier-Stokes equations
µ∆λi − ρ
d µ
X
∂λj
j=1
∂λi
uj +
uj
∂xi
∂xj
¶
X ∂ ∂f
∂f
∂λp
=
−
∂xi
∂ui j=1 ∂xj ∂aij
d
−
div λp =
∂f
∂p
in Ω
5 Example Application
31
with boundary conditions
λ=0
on Γ+
1 ∂g
λi =
on Γ0
µ ∂bi
∂g
hλ, ni = −
on Γ0
∂p
à d
!
X
∂λi
µ
+ρ
λj uj ni + λi uj nj + λp ni = 0
∂n
j=1
on Γ− .
Proof. The adjoint boundary conditions are derived in lemma 4.3, 4.4, and
4.5. The adjoint right hand side is derived in lemma 4.2 and removing the
shape derivative of the normal follows exactly lemma 3.24.
5
Example Application
As an example application we consider the optimization of a channel filled
with water in two dimensions. The objective is to minimize the dissipation
of kinetic energy into heat, given by
f (u, Du, p) = µ
¶2
2 µ
X
∂ui
i,j=1
∂xj
g(u, Dn u, p, n) = 0
which results in
∂f
∂ui
= 2µaij = 2µ
∂aij
∂xj
∂f
= 0.
∂ui
According to lemma 4.6, the adjoint equation is given by
µ∆λi − ρ
d µ
X
∂λj
j=1
∂λi
uj +
uj
∂xi
∂xj
¶
X ∂ ∂f
∂λp
∂f
−
=
−
∂xi
∂ui j=1 ∂xj ∂aij
d
= −2µ∆ui
∂f
div λp =
=0
∂p
in Ω
5 Example Application
32
with boundary conditions
λ=0
on Γ+
1 ∂g
λi =
= 0 on Γ0
µ ∂bi
∂g
hλ, ni = −
= 0 on Γ0
∂p
à 2
!
X
∂λi
+ρ
µ
λj uj ni + λi uj nj + λp ni = 0
∂n
j=1
on Γ− .
Both conditions on Γ0 are satisfied by λ = 0 and consequently the gradient
is given by
#
" 2 µ
Z
X ∂ui ¶2
dS
dJ(u, p, Ω)[V ] = hV, ni µ
∂x
j
i,j=1
Γ0
" 2 Ã
#
!
Z
2
X
∂λi X ∂f
∂ui
+ hV, ni −
µ
+
dS
nj
∂n
∂a
∂n
ij
i=1
j=1
Γ0
"
#
¶2
Z
2 µ
X
∂ui
= hV, ni µ
dS
∂n
i=1
Γ0
!
#
" 2 Ã
Z
2
X
∂ui
∂λi X ∂ui
+
2µ
nj
dS
+ hV, ni −
µ
∂n
∂x
∂n
j
j=1
i=1
Γ0
"
µ
¶2 #
Z
2
X
∂ui
∂λi ∂ui
+
dS.
= hV, ni −µ
∂n
∂n
∂n
i=1
Γ0
5.1
Flow Solver
The Navier-Stokes equations are discretized by mixed Taylor-Hood finite elements. The velocities are discretized using a 6 node triangular element
with quadratic ansatz functions while the pressure exists on standard 3 node
triangular elements using linear ansatz functions. The non-linear convection operator in the momentum equation creates a set of non-linear discrete
equations which are solved by an exact Newton method. Although a Picard linearization provides a larger radius of convergence for high Reynolds
numbers, the Newton method has the advantage of easily creating a discrete
exact adjoint solver by solving the Newton system once in transpose mode.
5 Example Application
33
In each Newton step for the forward problem, a system of the type
¸µ
¶
·
δu
A B∗
= −c(u, p)
B 0
δp
has to be solved, where A is the diffusion and linearized convection operator
and B is the discrete divergence operator. Both A and B ∗ also contain the
boundary conditions but not B, as the divergence freedom must be valid
everywhere. Thus, the analytical correct boundary condition for λ is not
created when the system is transposed, which makes manual intervention
necessary to ensure the adjoint solver enforces the adjoint boundary condition
λ = 0 precisely on Γ0 . Using the shape derivative appears to be somewhat
sensitive at this point to a continuous versus discrete adjoint approach. To
prevent a loss of smoothness in the shape, the discrete adjoint had to be
adapted to satisfy the analytic boundary conditions precisely.
5.2
Flow Through a Pipe
As a first test case, we optimize the shape of a tube connecting two points.
The geometry is shown in figure 5.1. The channel has a cross section of 1.0
fixed variable
variable fixed
Fig. 5.1: The initial tube. The area inside the stylized compartment is the
unknown to be found, the remainder outside is considered fixed.
Color denotes pressure.
1
and we set the viscosity to µ = 400
. The inflow velocity profile is parabolic up
to a maximum value of u1 = 1.5. The fluid enters the channel on the bottom
left edge. With a constant density of ρ = 1.0, the average mass influx results
in a Reynolds number of 400 using the channel width as reference length. The
Reynolds number is close to the maximum such that the Newton iteration
5 Example Application
34
converges, with the flow probably becoming instationary for higher Reynolds
numbers. Each of the sharp bends create a strong stationary vortex in the
Fig. 5.2: Magnification oft the initial tube. Strong counter vortices develop
after the bends. Color denotes speed.
flow, with the streamlines shown in figure 5.2. As a consequence, the initial
tube has a comparatively strong pressure gradient, resulting in a distinct
pressure loss of the flow, see figure 5.1. As an optimization procedure, we
Fig. 5.3: Pressure distribution optimized tube. The pressure loss is almost
completely removed.
employ a straight forward steepest descent algorithm using a fixed step length
and the shape derivative. The perturbation direction is chosen as V = αn,
i.e. in each iteration each boundary node is shifted into the direction of the
normal at that node. Thus, the boundary nodes follow a curved path during
5 Example Application
35
the optimization. In order to prevent a degeneration of the tube, there is
also the constraint that the volume must be preserved, which is enforced by
a projection step after each shape update. The optimized tube is shown in
figure 5.3.
Without a line search, the steepest descent algorithm manages to reduce
the objective function very quickly at first, but slows down considerably
afterwards. Since the main focus of this paper was to derive the general
shape derivative for the Navier-Stokes equations, we would like to refer to
[4, 5, 14] for higher order optimization schemes such as approximative SQP
methods. The initial channel has a net loss of kinetic energy into heat of
J = 0.9077, which is reduced to J = 0.4308, a reduction by 52.54%.
5.3
Flow through a T-Connection
We conclude with optimizing a T-junction. Inlet and outlet are positioned
such that the flow enters on the bottom and must be redirected by 90◦ ,
leaving the pipe system on the left and right. The initial geometry is shown
in figure 5.4 and the optimized in figure 5.5. A considerable amount of
the channel after the actual fork is fixed, such that the optimization cannot
circumvent a net turning of 90◦ after the fork and the flow has to exit parallel
to the x-axis. The inflow profile is quadratic and the average mass influx
results in a Reynolds number of Re = 100 with the channel cross-section as
reference area. The initial junction has a net loss of kinetic energy into heat
Fig. 5.4: Inital T-connection. The fluid is entering on the bottom. The stylized box contains the variable part of the boundary. Its upper side
is unbounded. Color denotes speed.
of J = 0.9208, which is reduced to J = 0.6900, a reduction by 25.05%. The
total area occupied by the fluid was enforced to stay the same during the
whole optimization.
6 Summary
36
Fig. 5.5: Optimized T-connection.
6
Summary
The main purpose of this work was to derive the Hadamard form of the
shape derivative for a wide class of objective functions in a Navier-Stokes
flow, especially also considering boundary integrals as the objective. The
Hadamard form enables a very efficient computation of the gradient, since
knowledge of the “mesh sensitivity” Jacobian is not required. Being an analytic expression, the Hadamard form must be re-derived for each problem
unless a generic objective is considered. Due to the artificial nature of the
pressure in an incompressible flow, some restrictions appear on the surface
part of the objective function. Otherwise one cannot formulate a consistent
adjoint equation, since the pressure does not have a boundary condition but
is implicitly given such that mass is conserved. We also list many important literature results from shape analysis and geometry, such that the paper
is self contained and can easily be adapted to other kind of problems. We
conclude with an application of the shape derivative to the optimization of
internal channel flows, where the energy loss of the flow - and consequently
the pressure gradient along the pipe - could be reduced by more than 50%.
References
[1] C. Amrouche, Š. Nečasová, and J. Sokolowski. Shape sensitivity analysis of the neumann problem of the laplace equation in the half-space.
Technical Report preprint 2007-12-20, Institute of Mathematics, AS CR,
Prague, 2007.
[2] S. Boisgérault and J.-P. Zolésio. Shape derivative of sharp functionals
governed by navier-stokes flow. In W. Jäger, J. Necas, O. John, K. Najzar, and J. Stará, editors, Partial Differential Equations: Theory and
6 Summary
37
Numerical Solution, pages 49–63. Chapman & Hall/CRC Reseach Notes
in Mathematics, 1993.
[3] M. C. Delfour and J.-P. Zolésio. Shapes and Geometries: Analysis, Differential Calculus, and Optimization. Advances in Design and Control.
SIAM Philadelphia, 2001.
[4] K. Eppler and H. Harbrecht. A regularized newton method in electrical
impedance tomography using shape hessian information. Control and
Cybernetics, 34(1):203–225, 2005.
[5] K. Eppler, S. Schmidt, V. Schulz, and C. Ilic. Preconditioning the pressure tracking in fluid dynamics by shape Hessian information. Technical
Report Preprint-Nr.: SPP1253-10-01, DFG-SPP 1253, 2007. to appear
in JOTA, April 2009.
[6] M.D. Gunzburger. Perspectives in Flow Control and Optimization. Advances in Design and Control. SIAM Philadelphia, 2003.
[7] K. Ito, K. Kunisch, G. Gunther, and H. Peichl. Variational approach
to shape derivatives. Control, Optimisation and Calculus of Variations,
14:517–539, 2008.
[8] B. Mohammadi and O. Pironneau. Applied Shape Optimization for Fluids. Numerical Mathematics and Scientific Computation. Clarendon
Press Oxford, 2001.
[9] O. Pironneau. On optimum profiles in stokes flow. Journal of Fluid
Mechanics, 59(1):117–128, 1973.
[10] P. I. Plotnikov, E. V. Ruban, and J. Sokolowski. Inhomogeneous
boundary value problems for compressible navier-stokes equations: Wellposedness and sensitivity analysis. Journal on Mathematical Analysis,
40(3):1152–1200, 2008.
[11] P. I. Plotnikov and J. Sokolowski. On compactness, domain dependence
and existence of steady state solutions to compressible isothermal navierstokes equations. Journal of Mathematical Fluid Mechanics, 7(4):529–
573, 2005.
[12] P. I. Plotnikov and J. Sokolowski. Stationary boundary value problems
for compressible navier-stokes equations. Handbook of Dierential Equations, 6:313–410, 2008.
6 Summary
38
[13] S. Schmidt, C. Ilic, N. Gauger, and V. Schulz. Shape gradients and their
smoothness for practical aerodynamic design optimization. Technical
Report Preprint-Nr.: SPP1253-10-03, DFG-SPP 1253, 2008. submitted
(OPTE).
[14] S. Schmidt and V. Schulz. Impulse response approximations of discrete
shape Hessians with application in cfd. Technical Report Preprint-Nr.:
SPP1253-10-02, DFG-SPP 1253, 2008. submitted (SICON).
[15] J. Sokolowski and J.-P. Zolésio. Introduction to Shape Optimization:
Shape Sensitivity Analysis. Springer, 1992.