## Shape Sensitivity and Design for Fluids with Shocks

OLIVIER PIRONNEAU*

University of Paris VI & IUF, Laboratoire Jacques-Louis Lions, 175 rue du Chevaleret, F-75013 Paris, France

(Received March 2003)

Dedicated to Professor Mutsuto Kawahara on the occasion of his 60th birthday For many problems of compressible fluid dynamics it is desirable to find the sensitivity of the shock position with respect to the shape of the domain occupied by the fluid. One application is for the minimization of the sonic boom of airplanes; another is for the stability of the stream in fast-flowing rivers or canals. Classical calculus of variation is not valid for these cases because of the presence of Dirac functions appearing when a discontinuous function is differentiated, but we show here on the compressible potential flow equation how to find the equations of the derivatives and what are the linearized problems. Some numerical test cases are given for illustration.

Keywords: Partial differential equations; Nozzle flow; Sensitivity; Transonic equation; Shallow water equations; Optimal shape design

INTRODUCTION

There are two pioneering papers on the linearized Euler equations for potential flow: one by Majda (1983) and one by Godlewskiet al.(1998). There are also many studies directed to the Euler equation (see Giles and Pierce, 2001;

Alekseev and Navon, 2002; Homescu and Navon, 2003 for example). In Bardos and Pironneau (2002a,b) we have reinterpreted the results of Godlewski et al. (1998) and introduced a formalism which we shall apply here to find the linearized transonic equation in cases where the position of the shock is sensitive to the parameter of the linearization.

Following di Cesare and Pironneau (2000) and extending Pironneau (2002) we analyze the stationary problem for the transonic equation, we formally derive an equation for the derivative of the potential of the flow with respect to parameters in the data, including the shape of the domain, we discuss the well posedness of the problem and we present some numerical tests to confirm the theory.

This is done first in one dimension of space for stationary and transient cases and then for two-dimensional cases.

We also adapt the results to the shallow water equations for the stability of streams in rivers and canals.

COMPRESSIBLE POTENTIAL FLOWS Isentropic Flow

Consider the Euler equations for compressible perfect isentropic flows in a domainVof boundaryG.

›trþ7·ðruÞ ¼0; ›tðruÞ þ7·ðru^uÞ þ7r^{g}¼0: ð1Þ
For aerodynamics g¼1:4 and for shallow waters
g¼1:

Initial and boundary conditions must be given such as
r¼r^{0};u¼u^{0} at time zero inVandu·n¼uG·n onG
plusr¼rG;onG^{2}¼{x[G:uG·n,0}:If in addition
the inflow velocity is supercritical thenu·s¼uG·smust
be given too. The vectors n, sare the outer normal and
tangent vector(s) toG.

Irrotational Flow

The following holds for any vector fieldu 7·ðru^uÞ ¼ru·7uþ7·ðruÞu

¼r7u^{2}

2 2ru£7£uþ7·ðruÞu: ð2Þ

ISSN 1061-8562 print/ISSN 1029-0257 onlineq2003 Taylor & Francis Ltd DOI: 10.1080/1061856031000113617

*E-mail: pironneau@ann.jussieu.fr

The Caseg>1

So the irrotational stationary solutions to Eq. (1) satisfy
(recall that7r^{g}¼ ðgr=g21Þ7r^{g21}):

7£u¼0 ›trþ7·ðruÞ ¼0;

›tuþ7 u^{2}

2 þ g

g21r^{g21}

¼0:

The first equation tells us that u derives from a
potential f, i.e. u¼7f: The third equation gives an
algebraic relation betweenrandu^{2},2gr^{g21}þ ðg21Þu^{2}

¼K2›tf;where the constantKis fixed by the boundary conditions. After renormalization it can be written as

›tfþ1

2j7fj^{2}þr^{1=b}¼1 ›trþ7·ðr7fÞ ¼0: ð3Þ
Stationary solutions of this system must satisfy the
transonic equation:

7· 12j7fj^{2}b

7f

¼0 in V;

12j7fj^{2}
b›f

›njG_{N} ¼g;

f¼fG on GDUG\GN;

ð4Þ

with g¼1:4; b¼1=ðg21Þ ¼2:5 in air. Boundary conditions come from the knowledge of ru·n on G.

On G^{2}, ›f/›s is also known, or equivalently f
up to a constant k_{j} on each connected component G^{2}_{j}
of G^{2}.

There are also integral quantities which are prescribed and which come from an integration over time of Eq. (1), the conservation of mass and the conservation of momentum which may put a constraint of compatibility on the data above:

ð

V

rþ ð

G

ru·n¼ ð

V

r^{0}þ
ð

G

r^{0}u^{0}·n;

ð

V

ruþ ð

G

ruðu·nÞ ¼ ð

V

r^{0}u^{0}þ
ð

G

r^{0}u^{0}ðu^{0}·nÞ:

For instance, from Eq. (4) we see that it is necessary that the integral onGofgbe zero, therefore the integral ofron Vis prescribed.

An entropy inequality must be added for well posedness (see Glowinski, 1984; Necˇas, 1989):

Df. 21:

It is automatically satisfied whenu is continuous and also when uis discontinuous with a decreasing jump in the direction of the flow u.

A time-dependent, simple (yet physically meaningful) model between Eqs. (3) and (4) is

›ttf27· 12j7fj^{2}b

7f

¼0 in V£ð0;TÞ

f¼f^{0}; ›tf¼f^{1} on V£{0}

12j7fj^{2}
b›f

›n ¼g on G_{N}£ð0;TÞ;

f¼fG on GD£ð0;TÞ:

ð5Þ

The Caseg51

For shallow water flows,g¼1and the trick used, namely
7r^{g}¼ g

g21r7r^{g21}

must be replaced by7r¼r7logr:Then Eq. (3) becomes

›tfþ1

2j7fj^{2}þlogr¼1 ›trþ7·ðr7fÞ ¼0; ð6Þ
and the stationary potential flow equation for shallow
waters is:

7·^{}e^{2}^{1}^{2}^{j7fj}^{2}7f^{}¼0 in V;

e^{2}^{1}^{2}^{j7fj}^{2}›f

›nj_{G}_{N} ¼g; fj_{G}_{D} ¼fG: ð7Þ
The time-dependent approximation of Eq. (6) is

›ttf27·^{}e^{2}^{1}^{2}^{j7fj}^{2}7f^{}¼0 in V£ð0;TÞ
f¼f^{0}; ›tf¼f^{1} on V£{0}

e^{2}^{1}^{2}^{j7fj}^{2}›f

›n ¼g on G_{N}£ð0;TÞ;

f¼fG on G_{D}£ð0;TÞ:

ð8Þ

Slender Shock Tube

We can compound the caseg¼1with the caseg.1in one framework by defining

rðuÞ ¼ ð12u^{2}Þ^{b} with b¼ 1

g21 if g.1 and

rðuÞ ¼e^{2}^{1}^{2}^{u}^{2} if g¼1:

WhenVis slender of lengthLon thexaxis with cross- section of surface S(x) then, following Landau and Lifschitz (1956), the solution to Eq. (4) is

rðuÞuðxÞSðxÞ ¼K;

ðL 0

rðuÞSðxÞdx¼a ð9Þ

where K is fixed by the inflow/outflow boundary conditions and a is the prescribed total mass of gas.

Equation (9a) has two solutions at eachx, one subcritical and one supercritical. Only one discontinuous switch from super to subcritical is allowed by the entropy condition and the position of the switch (shock) is determined by Eq. (9b).

Derivative with Respect to the Total Mass

Let u^{0} denote the derivative of u with respect to a.

By differentiation of Eq. (9a) we find that u^{0}¼0 almost
everywhere. However, the position of the shockxsvaries
withaand since

u¼u2þ ðu_{þ}2u2ÞHðx2xsÞ;

whereHis the Heavyside function, we have

u^{0}¼2x^{0}_{s}½udðx2xsÞ where ½uUuþ2u2:
By the same principle

d

darðuÞ ¼2x^{0}_{s}½rðuÞdðx2xsÞ:

Putting this information into Eq. (9b) differentiated gives the shock displacement:

x^{0}_{s}¼2 1

½rðuÞSðx_{s}Þ:

Derivative with Respect to the Inflow/Outflow Condition
The derivative u^{0} of u with respect to K will have two
parts, a regular part denoted by u^{0}_{K} and a singular part
which as before is2x^{0}_{s}½udðx2x_{s}Þ:After differentiation,
Eq. (9) is

MðuÞu^{0}_{K}¼1

S with MðuÞ

¼

ð12u^{2}Þ^{b} 122b_{12u}^{u}^{2}2

if g.1
ð12u^{2}Þe^{2}^{1}^{2}^{u}^{2} if g¼1

½rðuÞSðx_{s}Þx^{0}_{s}¼2
ðL

0

r_ðuÞu^{0}_{K}Sdx where

r_ðuÞUdrðuÞ

du giving x^{0}_{s}¼ 21

½rðuÞSðxsÞ ðL

0

r_ðuÞ MðuÞdx:

ð10Þ

Derivative with Respect to Shape

Assume now that S( · ) depends on a parameter b
and denote S^{0} its derivative in b. Differentiation of

Eq. (9) yields

MðuÞu^{0}_{S}¼2KS^{0}
S^{2} ;

½rðuÞSðxsÞx^{0}_{s}¼
ðL

0

ðr_ðuÞu^{0}_{S}SþrðuÞS^{0}Þdx: ð11Þ

Here toox_{s}^{0}can be computed explicitly:

x^{0}_{s}¼2 1

½rðuÞSðx_{s}Þ
ðL

0

Kr_ðuÞ MðuÞS2rðuÞ

S^{0}dx:

Remark 1 In all cases the shock position is unstable when½u!0(weak shocks).

The Time-dependent Slender Case

Integrated over the cross-section of the slender
domain {ðx;yÞ:2S_{m}ðxÞ,y,SMðxÞ; x[ð0;LÞ}; with
S¼S_{M}2S_{m};Eq. (5) leads to

›ttf21

S›xðSrð›xfÞ›xfÞ ¼0: ð12Þ
As before when S depends on a parameter a, the
derivativef^{0}with respect toawill be discontinuous and
will satisfy in the sense of distribution theory:

›ttf^{0}2›xð›urðuÞ›xfþrðuÞ›xf^{0}Þ2›xS
S MðuÞu^{0}

¼ ›xS S

0rðuÞu: ð13Þ

As an illustration assume thatS^{0}is zero before the shock
and that stability is studied at a stationary equilibrium state.

ThenrðuÞu¼Kbefore the shock and sof^{0}¼0 before the
shock and the Rankine – Hugoniot conditions at the
shock imply›xf^{0}¼0: Hence, Eq. (13) can be integrated
after the shock only for x[ðS;LÞ with the boundary
conditions

›xf^{0}¼0 at the shock s; f^{0}ðLÞ ¼0 or ›xf^{0}ðLÞ ¼0:

Numerical Simulation

A simple numerical test was made. A geometry is chosen:

SðxÞ ¼1þaðbÞ* sinðpðx=LÞ; x[ð0;LÞ with að0Þ ¼0:2
andL¼1:Stability is studied around the stationary state,
i.e. u(x) satisfying ue^{2ð1=2Þu}^{2}¼0:35=SðxÞ: Equation (13)
is integrated up toT ¼10 by an explicit scheme with all

“primes” being derivatives with respect tobwitha^{0}such
that0:35ð›xS=SÞ^{0}¼sinð2pðx=LÞÞ:

Figure 1 showst!f^{0}ð0;tÞ;which is proportional to the
displacement of the shock, andx!f^{0}ðx;TÞ:This is a case
where the displacement of the shock can be computed
quite easily.

THE TWO-DIMENSIONAL CASE

Assume now thatf, solution of Eq. (4) is a function of a scalar parameter a via the data of the partial differential equation and that it has a shock S(a). We wish to differentiatefwith respect toa. For clarity we will seek the result ata¼0:

Denote bya(x)athe distance in the directionn_{S}, normal
to the shock S pointing inside Vþ, between S(a) and
SUSð0Þ;i.e.

SðaÞ ¼{xþaaðxÞn_{S}ðxÞ: x[S}:

Denote by V^ the region before the shock and after
the shock. Then,I_{D}being the characteristic function of a
setD,

u¼u2þ ðu_{þ}2u2ÞI_{V}_{þ}

whereu^are smooth functions. The derivative ofIV_{þ}is a
Dirac mass onS(see Bardos and Pironneau, 2002). So if
f^{0},u^{0}denotes the derivative off,uwith respect toa, we
have

u^{0}¼u^{0}_{2}þ ðu^{0}_{þ}2u^{0}_{2}ÞIVþ2½uadS

FIGURE 1 Top: Variation of the shock position (downstream to its initial value) versus time. Bottom: Water level before (smoother curve) and after the change in geometry, at final time.

and therefore if u^{0} has a Dirac mass on S, f^{0} must be
discontinuousacrossS, and

½f^{0}_{S}¼2½u_{S}·n_{S}a: ð14Þ

Away from the shock the transonic equation can be differentiated, giving:

7·ðr^{0}7f·7wþr7f^{0}Þ

;7· r 122bu^u
12juj^{2}

7f^{0}

¼0:

ð15Þ

But Eq. (15) makes no sense at the shock because a Dirac mass is multiplied by a discontinuous function.

In Bardos and Pironneau (2002) a formalism has been introduced to differentiate such functions. Suppose that u andvare discontinuous at x(a). Then the following is expected:

u^{0}¼u^{0}_{a}2½ux^{0}_{s}dðx2x_{s}Þ v^{0}¼v^{0}_{a}2½vx^{0}_{s}dðx2x_{s}Þ
ðuvÞ^{0}¼ ðuvÞ^{0}_{a}2½uvx^{0}_{s}dðx2x_{s}Þ:

The trick is to define

u¼

1

2ðu^{þ}þu^{2}Þ at the shock

u elsewhere

and then notice that “(uv)^{0}¼{u}¯v^{0}þu^{0}{v}¯v¯” contains
the identity “[uv]¼{u¯}[v]þ[u]{v}¯”.

When b¼5/2, r^{2}¼(12u^{2})^{5}¼AB withA¼(12u^{2}),
B¼C^{2};C¼A^{2};

2rr ^{0}¼A^{0}BþAB ^{0}¼22uu^{0}Bþ2ACC ^{0}

¼22uu ^{0}ð12u^{2}Þ^{4}þ4ð12u^{2}Þ ð12u^{2}Þ^{2}AA ^{0}

¼22uu ^{0}ðð12u^{2}Þ^{4}þ4ðð12u^{2}ÞÞ^{2}ð12u^{2}Þ^{2}Þ: ð16Þ

Therefore, the linearized transonic equation is
7·ðM7 f^{0}Þ ¼0 with M

¼ ð12u^{2}Þ^{2:5} 122b^{u}^{^}^{u}
12u^{2}

inV\S ð17Þ

withu¼ j7fjand, at the shockS
M ¼ ð12u^{2}Þ^{2:5}

£ I2ð12u^{2}Þ^{4}þ4ð12u^{2}Þ^{2}ð12u^{2}Þ^{2}
ð12u^{2}Þ^{2:5}^{2}

u^u

!

: ð18Þ

Notice that both formulae forM agree inV\S.

FIGURE 2 Level lines offwith a changing potential at the outflow boundary going from 0.4 (left) to 0.44 (right). Bottom: Plot ofx!fðxÞj_{G}_{w}:

In variational form, Eq. (4) is

;w[H^{1}ðVÞ
ð

V

r7f·7w¼ ð

G

gw:

WhenV¼VðaÞ;assuming thatg¼0on the parts ofG which depend ona, the derivative of this formulation is (see Pironneau, 1983)

;w[H^{1}ðVÞ
ð

V

M7f^{0}·7w¼2
ð

G

ðr7f·7wÞa

which is also Proposition 1.

Proposition 1 The differentiated transonic equation
with respect to boundary variations a is a system for
ðf^{0}_{S};½f^{0};x^{0}_{s}Þ;its regular part, its jump across the shockS
and the variation of the shock position:

;w[H^{1}ðVÞ
ð

V\S

M7 f^{0}·7w2
ð

S

M½7f·n_{S}›w

›nx^{0}_{s}

¼2 ð

G

ðr7f·7wÞa: ð19Þ

Remark 2 (19) contains the Rankine – Hugoniot con-
dition½M7f^{0}·n_{S}¼0. It is interpreted as

7·ðM7f^{0}Þ ¼0; ½M7 f^{0}·nj_{S}¼0;

M7 f^{0}·nj_{G}¼2r›f

›s

›a

›s; ½f^{0} ¼2½u·n_{S}x^{0}_{S}:
ð20Þ

Comparison with the one-dimensional case shows that an additional integral condition is needed, like the total mass of fluid specified.

NUMERICAL SIMULATION

Consider first a very simple case, that of a transonic divergent nozzle with supersonic inflow conditions and a difference of potential so that there is a shock in the flow. This example has been investigated in Bardos and Pironneau (2003) for sensitivity with respect to changes in the inflow or outflow boundary condition.

We recall the results obtained. Upstream of the shock
the PDE is hyperbolic and so the perturbation f^{0} is
zero because it is entirely defined by the inflow
conditions, which are zero, integrated on the
streamlines.

Suppose we want to move the shock by a known
quantity x_{s}^{0}, then the value off^{0}is known on Sand we
must find the boundary conditionfwhich gives^{›f}_{›n}^{0}¼0on
S, for instance by solving

minf

ð

S

ðf^{0}2f^{0}_{S}Þ^{2}:7·ðM7f^{0}Þ ¼0; in V^{þ}

›f^{0}

›n j_{S}¼0; ›f^{0}

›n jG ¼f

:

FIGURE 3 Mach lines with a changing Neumann outflow condition at the outflow. Bottom: Plot ofx!fðxÞj_{G}_{w} andx!ð›f=›xÞðxÞj_{G}_{w} on the
symmetry lineGw.

Numerical Algorithm

As the transonic equation is nonlinear we used a fixed point algorithm with a small under-relaxation parameter (for instance 0.01); convergence is obtained with 50 – 200 iterations:

7·ðr^{m}7f^{mþ1}Þ ¼0:

To computer^{mþ1}we compute the two rootsu^of
ð12u^{2}Þ^{b}u¼12j7f^{mþ1}j^{2}b

j7f^{mþ1}j
and set r^{mþ1}¼ ð12u^{2}_{2}Þ^{b} if u decreases or if both u
andrugrow on the streamline and setr^{mþ1}¼ ð12u^{2}_{þ}Þ^{b}
otherwise.

The Divergent Nozzle

Using freefemþ(http://www.freefem.org) we com- puted the solution of the transonic equation in a symmetric nozzle of equation

Gw¼ ðyðxÞ;xÞ:yðxÞ ¼1þ1

8ð3x^{2}22x^{3}Þ; x[ð0;1Þ

: We performed two computations withui¼0:4;and a potential difference of 0.4 or 0.44. The level curves of

›f

›x for these are reported on Fig. 3.2. They show that
only the region after the shock changes, as predicted by
the theory. Finally, we have solved numerically the PDE
of f^{0} in the domain right to the shock with Neumann
homogeneous conditions except on the outflow bound-
ary where we have a Dirichlet condition equal to 0.04.

The level lines are shown in Fig. 3.3. It predicts a shock displacement parallel and of distance 0:04=ð0:62 0:2Þ ¼0:1 which is compatible with the experiments of Fig. 3.2.

The Convergent Divergent Nozzle The nozzle’s equation is now

Gw¼{ðyðxÞ;xÞ:yðxÞ ¼1þ1

8ð3x^{2}22x^{3}Þ;

x[ð20:9;0:9Þ}:

The inflow and outflow boundary conditions are now
ru·n¼M*ð12M^{2}Þ^{b}þk

3 1 162y

M¼0:4; k¼0 or 1:

Next we solved the equation for f^{0} with Neumann
condition equal to zero at the shock boundary and equal to

1

3ð_{16}^{1} 2yÞ at the outflow boundary. The level lines are
shown in Figs. 3.3 and 4. This test is not very conclusive, it
is at the border of numerical noise. The results on f^{0}
predict a displacement of the shock at the symmetry line
equal to 0.003/0.4, i.e. a little less than one per cent, which
is about what we obtain numerically. However, there
should not be any changes left of the shock and the
numerical scheme does not show that.

Perspective

The numerical strategy for nozzle flows may not work for wing profiles because the elliptic zone surrounds the hyperbolic zone and so there is no independent decomposition of the zones. Another problem with the method we have used here is that it is necessary to “track”

the shock and remesh the domain with the shock as one boundary.

It would be convenient to put the linearized equation, the Rankine – Hugoniot conditions and the equation for the shock displacement into one single variational

FIGURE 4 Level lines off^{0}for the first and second test.

formulation. To do so we observed in Bernardi and Pironneau (2002) that

ð

V

7f·7w¼ ð

›D

›w

›nD

,f¼I_{D}:

This leads us to try, for an appropriateg ð

V

M7f^{0}7w¼
ð

S

g›w

›n

;w[H¼{w[H^{1}ðVÞ: wjG_{i}<Go ¼0}

with M¼r I22bu^u
12juj^{2}

: ð21Þ

The solution would satisfy (15), and its Rankine – Hugoniot conditions, but it is hard to see that Eq. (14) would be satisfied because an integration by part in the neighborhood of Sgives a term which has no meaning, MdS. However, in mixed form consider a similar problem with

U^{0};M7f^{0}¼r I22bu^u
12juj^{2}

7f^{0};

that is (subject to non-homogeneous boundary con- ditions):

ð

V

ðM^{21}U^{0}·Wþf^{0}7·WÞ þ
ð

S

gW·n¼0

;W [Hðdiv;VÞ ð

V

7·U^{0}w¼0 ;w[L^{2}ðVÞ

ð22Þ

for which the unknowns are U^{0},f^{0},g. Then f^{0} is also
discontinuous and there is no ambiguity when integrated
by part becauseU^{0}does not jump acrossS.

Two problems remain:

1. Justify Eq. (22) and show that it definesgindeed (ifM was elliptic everywhere g would be a data of the problem, but we have shown that it is not so for transonic flows, at least in the case of nozzles).

2. Solve numerically Eq. (22) with automatic numerical detection ofS.

References

Alekseev, A. and Navon, I. (2002) “On adjoint variables for discontinuous flow”, http://www.math.fsu.edu/aluffi/archive/

paper185.pdf.

Bardos, C. and Pironneau, O. (2002a) Sensitivities for Euler flows, accepted in C.R. Acad. Sci., Paris, Ser I.

Bardos, C. and Pironneau, O. (2002b) “Derivatives and control in the presence of shocks”, Int J. Comput. Fluid Dyn., submitted for publication.

Bardos, C. and Pironneau, O. (2003) In: Periaux, J., ed, Sensitivity of Stationary Shocks, Special volume dedicated to P. Perrier, euro-days, to appear.

Bernardi, C. and Pironneau, O. (2002) “Sensitivities to discontinuities in Darcy’s law”,C.R. Acad. Sci., Paris, Ser I335, 1 – 6.

Di Cesare, N. and Pironneau, O. (2000) “Shock sensitivity analysis”, Comput. Fluid Dyn. J.9(2), 1 – 15.

Giles, M.A. and Pierce, N.A. (2001) “Analytic adjoint solutions for the quasi-one-dimensional Euler equations”, J. Fluid Mech. 426, 327 – 345.

Glowinski, R. (1984) Numerical Methods for Nonlinear Variational Problems (Springer-Verlag, New York).

Godlewski, E., Olazabal, M. and Raviart, P.A. (1998) “On the linearization of hyperbolic systems of conservation laws. Application to stability”, In: Gauthier-Villars, ed, E´quations aux De´rive´es Partielles et Applications (Sci. Me´d. Elsevier, Paris), pp 549 – 570.

Homescu, C. and Navon, I. (2003) “Numerical and theoretical considerations for sensitivity calculation of discontinuous flow”, Syst. Control Lett.48, 253 – 260.

Landau, L. and Lifschitz, F. (1956) Fluid Mechanics (MIR Editions, Moscow).

Majda, A. (1983) The Stability of Multi-dimensional Shock Fronts, Memoire of the A.M.S. 281 (American Math. Soc., Providence).

Necˇas, J. (1989) E´ coulements de Fluide: Compacite´ par Entropie (Masson, Paris).

Pironneau, O. (1983) Optimal Shape Design for Elliptic Systems Springer Lecture Notes in Computational Physics (Springer, Heidelberg).

Pironneau, O. (2002) Control of Transonic Shock Positions. ESAIM: Control, Optimisation and Calculus of Variations, to appear.