10.09.2014 Views

Sensitivity Analysis for Shallow Water Equations - Advanced Study ...

Sensitivity Analysis for Shallow Water Equations - Advanced Study ...

Sensitivity Analysis for Shallow Water Equations - Advanced Study ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Sensitivity</strong> <strong>Analysis</strong> <strong>for</strong> <strong>Shallow</strong> <strong>Water</strong> <strong>Equations</strong><br />

Vani Cheruvu<br />

<strong>Advanced</strong> <strong>Study</strong> Program Research Review<br />

National Center <strong>for</strong> Atmospheric Research<br />

June 14, 2007<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 1 / 30


Organization of the talk<br />

Motivation<br />

Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> <strong>for</strong> SWE<br />

◮ Direct <strong>Sensitivity</strong> Method<br />

◮ Adjoint <strong>Sensitivity</strong> Method<br />

◮ SWE and its Adjoint<br />

◮ Spectral Element Method<br />

Spectral finite volume method <strong>for</strong> SWE<br />

Wavelet based limiter <strong>for</strong> discontinuous Galerkin Method<br />

◮ Gibbs phenomenon<br />

◮ Limiters<br />

Summary<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 2 / 30


Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 3 / 30


Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 4 / 30


Chennai’s coastline be<strong>for</strong>e and after tsunami<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 5 / 30


Chennai’s coastline be<strong>for</strong>e and after tsunami<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 6 / 30


Chennai’s Marina beach after tsunami<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 7 / 30


Chennai’s Marina beach after tsunami<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 8 / 30


Why an Adjoint Equation?<br />

Diffusion equation defined in the domain x ∈ (0, L) is<br />

Objective function :<br />

where r = δ(x − x T ).<br />

Adjoint Equation<br />

Objective function:<br />

where f = Mδ(x − x s ).<br />

D ∂2 C<br />

+ f = 0, C(0) = C(L) = 0<br />

∂x 2<br />

J =<br />

J =<br />

∫ L<br />

0<br />

r(x)C(x) dx<br />

D ∂2 C ∗<br />

∂x 2 + r = 0<br />

∫ L<br />

0<br />

f (x)C ∗ (x) dx<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 9 / 30


Derivation<br />

∫ L<br />

0<br />

[ ] [<br />

C ∗ D ∂2 C<br />

∂x 2 + f dx = D C ∗ ∂C ] L [ ] ∂C<br />

∗ L<br />

− D<br />

∂x<br />

0<br />

∂x C 0<br />

∫ L<br />

+<br />

[CD ∂2 C ∗ ]<br />

∂x 2 + C ∗ f dx = 0<br />

0<br />

J =<br />

∫ L<br />

0<br />

[CD ∂2 C ∗<br />

∂x 2<br />

]<br />

+ C ∗ f dx +<br />

∫ L<br />

0<br />

rCdx<br />

J =<br />

∫ L<br />

0<br />

C<br />

[D ∂2 C ∗<br />

∂x 2 + r ]<br />

dx +<br />

∫ L<br />

0<br />

fC ∗ dx<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 10 / 30


<strong>Shallow</strong> <strong>Water</strong> <strong>Equations</strong><br />

Objective Function<br />

∂η<br />

∂t + ∂(Hu′ + Ūη)<br />

∂x<br />

∂u ′<br />

∂t + ∂(Ūu′ + gη)<br />

∂x<br />

= 0<br />

= 0<br />

J =<br />

∫ T ∫ L<br />

0<br />

0<br />

r(η, u ′ ; x, t)dxdt<br />

t= time; x = distance along the channel; η = depth of flow;<br />

u ′ = discharge per unit width; r = user-defined measuring function<br />

r = 1 2 [η(x 0, t) − ¯η(x 0 )] 2 δ(x − x 0 )<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 11 / 30


Direct <strong>Sensitivity</strong> Method<br />

The basic problem is solved<br />

A reference value of the objective function J 0 is computed<br />

A flow variable is perturbed at the boundary at the selected<br />

perturbation time<br />

The associated objective function value is computed again<br />

This procedure is repeated <strong>for</strong> sufficiently many selections of time<br />

This yields the temporal evolution of the sensitivities<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 12 / 30


Adjoint <strong>Sensitivity</strong> Method<br />

Derivation of 1D Adjoint <strong>Equations</strong><br />

Adjoint variables : φ(x, t) and ψ(x, t)<br />

Multiply the continuity equation by φ(x, t) and the momentum<br />

equation by ψ(x, t)<br />

The sum of these two products is then integrated over space and time<br />

Flow control is desired, hence the variation with respect to η and u ′<br />

Variation of the objective function with respect to η and u ′<br />

Add the variations<br />

Choose initial condition <strong>for</strong> the adjoint problem<br />

Choose boundary values <strong>for</strong> the adjoint variables<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 13 / 30


<strong>Shallow</strong> water equations and its Adjoint<br />

Adjoint<br />

∂η<br />

∂t + Ū ∂η<br />

∂x + ¯V ∂η<br />

∂y + H ∂u′<br />

∂x + H ∂v ′<br />

∂y<br />

∂u ′<br />

∂t + Ū ∂u′<br />

∂x + ¯V ∂u′<br />

∂y + g ∂η<br />

∂x<br />

∂v ′<br />

∂t + Ū ∂v ′<br />

∂x + ¯V ∂v ′<br />

∂y + g ∂η<br />

∂y<br />

= 0<br />

= 0<br />

= 0<br />

∂φ<br />

∂τ − Ū ∂φ<br />

∂x − ¯V ∂φ<br />

∂y − g ∂ψ 1<br />

∂x − g ∂ψ 2<br />

∂y + ∂r<br />

∂η<br />

= 0<br />

∂ψ 1<br />

∂τ − Ū ∂ψ 1<br />

∂x − ¯V ∂ψ 1<br />

∂y − H ∂φ<br />

∂x + ∂r<br />

∂u ′ = 0<br />

∂ψ 2<br />

∂τ − Ū ∂ψ 2<br />

∂x − ¯V ∂ψ 2<br />

∂y − H ∂φ<br />

∂y + ∂r<br />

∂v ′ = 0<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 14 / 30


Solution of <strong>Shallow</strong> <strong>Water</strong> <strong>Equations</strong><br />

Contour lines of Gaussian Hill; 1000 time steps with ∆t = 0.0005<br />

400<br />

350<br />

300<br />

250<br />

200<br />

150<br />

100<br />

50<br />

50 100 150 200 250 300 350 400<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 15 / 30


Solution of Adjoint <strong>Shallow</strong> <strong>Water</strong> <strong>Equations</strong><br />

Contour lines of Gaussian Hill; 500 time steps with ∆t = 0.0005<br />

400<br />

350<br />

300<br />

250<br />

200<br />

150<br />

100<br />

50<br />

50 100 150 200 250 300 350 400<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 16 / 30


Spectral Element Method<br />

The domain [a, b] is partitioned into N x non-overlapping intervals<br />

called elements.<br />

I j = [x j−1/2 , x j+1/2 ], j = 1, . . . , N x , and ∆x j = (x j+1/2 − x j−1/2 )<br />

I<br />

j!1<br />

I j<br />

I j+1<br />

x x x x<br />

j!3/2<br />

j!1/2<br />

j+1/2<br />

j+3/2<br />

Map every Element I j onto the reference element [−1, +1].<br />

Introduce a local coordinate ξ ∈ [−1, +1] s.t.,<br />

ξ = 2 (x − x j)<br />

∆x j<br />

, x j = (x j−1/2 + x j+1/2 )/2 ⇒ ∂<br />

∂x = 2<br />

∆x j<br />

∂<br />

∂ξ .<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 17 / 30


SE-1D: Space Discretization<br />

Regular Element<br />

I j<br />

Reference Element<br />

!<br />

x j!1/2<br />

x j+1/2<br />

! 1<br />

GLL Grid<br />

+1<br />

How do the neighboring elements talk?<br />

Nodal - Averaging the values on the element boundaries<br />

Time Integration Scheme<br />

Leapfrog Scheme u n+1 = u n−1 − 2∆tF (u n )<br />

The solution within each element is interpolated with a high-order<br />

polynomial using nodal basis set.<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 18 / 30


SFV in 1D<br />

For a given order of accuracy k, each SV is divided into k control<br />

volumes (CV)<br />

The ith CV of jth SV is : C j,i = [x j,i−1/2 , x j,i+1/2 ] and with cell width<br />

∆x j,i = x j,i+1/2 − x j,i−1/2<br />

x<br />

CV<br />

j,i!1/2<br />

x j,i+1/2<br />

x j!1/2<br />

SV<br />

I j<br />

x j+1/2<br />

Discontinuous Galerkin: Flux evaluation - Riemann Solver<br />

Spectral Finite Volume: Numerical flux at element boundaries and<br />

analytical flux at the cell boundaries<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 19 / 30


SFV-1D: Flux term<br />

(<br />

_<br />

) ( + ) (_<br />

) ( + )<br />

L R L R<br />

x j!1/2<br />

I j<br />

x j+1/2<br />

Flux function F (U) is not uniquely defined at x j±1/2<br />

F (U) is replaced by a numerical flux function ˆF (U), dependent on<br />

the left and right limits of the discontinuous function U<br />

Typical flux <strong>for</strong>mulae: Godunov, Lax-Friedrichs, Roe, HLLC, etc<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 20 / 30


2D Grid<br />

X<br />

X<br />

X<br />

X<br />

X<br />

X<br />

CV<br />

X<br />

X<br />

X<br />

X<br />

X<br />

X<br />

Given SV is partitioned into 4 × 4 CVs using 5 × 5 GLL nodes<br />

3 GL nodes are used <strong>for</strong> the evaluation of boundary integral on each<br />

side of a CV<br />

Ū ij are centered at each CV<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 21 / 30


<strong>Sensitivity</strong> <strong>Equations</strong><br />

Sensitivities required <strong>for</strong> subcritical flow control are given by<br />

δJ<br />

δu ′ (0,t) and<br />

δJ<br />

δη(L,t)<br />

Sensitivities required <strong>for</strong> supercritical flow control are given by<br />

δJ<br />

δu ′ (0,t) and<br />

δJ<br />

δη(0,t)<br />

To derive expressions <strong>for</strong> sensitivities in terms of the adjoint variables<br />

Initial condition <strong>for</strong> the basic problem<br />

η(x, 0) = η 0 (x), u ′ (x, 0) = u ′ 0 (x); δη(x, 0) = 0, δu′ (x, 0) = 0<br />

Initial conditions in the adjoint problem<br />

φ(x, T ) = 0 = ψ(x, T )<br />

Selection of boundary conditions <strong>for</strong> the adjoint problem is motivated<br />

by the boundary conditions of the basic problem<br />

Expressions are then derived <strong>for</strong> sensitivities to these boundary values<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 22 / 30


Nonreflective Outflow Boundary<br />

Adjoint boundary conditions:<br />

ψ(0, t) = 0 and<br />

φ(L, t) + 2 u′ (L, t)<br />

ψ(L, t) = 0<br />

η(L, t)<br />

Sensitivities <strong>for</strong> the subcritical flow then are:<br />

δJ<br />

δu ′ (0, t p )<br />

δJ<br />

δη(L, t p )<br />

= φ(0, t p )<br />

[ (u ′ )<br />

(L, t p ) 2<br />

=<br />

− gη(L, t p )]<br />

ψ(L, t p )<br />

η(L, t p )<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 23 / 30


Cubed-Sphere Geometry<br />

Sadourny (1972)<br />

HOMME High-Order Method Modeling Environment<br />

Z<br />

P 1<br />

Y<br />

P5<br />

(Top)<br />

X<br />

P4<br />

P1 P2 P3<br />

Figure: Cube inscribed in a<br />

Sphere<br />

P6<br />

(Bottom)<br />

Figure: Faces of the Cube<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 24 / 30


Neighboring elements that share same cube edge<br />

Face ! A<br />

Face ! B<br />

y<br />

x<br />

x<br />

y<br />

Figure: (a)<br />

Figure: (b)<br />

To compute the flux on the edge of the cubed-sphere, both the left and<br />

right components F − n and F + n are required.<br />

A l<br />

"<br />

F +<br />

l<br />

G +<br />

l<br />

#<br />

»<br />

F<br />

+<br />

= s<br />

G s<br />

+<br />

– »<br />

, A −1 F<br />

+<br />

s<br />

n G s<br />

+<br />

– »<br />

F<br />

+<br />

= n<br />

G n<br />

+<br />

–<br />

⇒<br />

A −1<br />

n A l<br />

"<br />

F +<br />

l<br />

G +<br />

l<br />

#<br />

.<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 25 / 30


Spectral Finite Volume Results<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

!1 !0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 26 / 30


Gibbs Phenomenon<br />

(sin(x) + 1 3 sin(3x) + 1 5 sin(5x) + . . . )<br />

f (x) = 4 π<br />

1.5<br />

S1<br />

1<br />

S3<br />

0.5<br />

0<br />

!0.5<br />

S2<br />

!1<br />

!1.5<br />

!4 !3 !2 !1 0 1 2 3 4<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 27 / 30


DG-1D : Numerical Examples<br />

U t + F x (U) = 0, Ω ≡ [−1, 1], periodic domain. For linear advection (square wave) F (U) = U without limiter (left panel) and<br />

with limiter (right panel)<br />

1<br />

1<br />

0.5<br />

0.5<br />

0<br />

0<br />

!1 !0.5 0 0.5 1<br />

!1 !0.5 0 0.5 1<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 28 / 30


DG-1D : Numerical Examples<br />

U t + F x (U) = 0, Ω ≡ [−1, 1], periodic domain. For linear advection (sine wave) F (U) = U without limiter (left panel) and<br />

with limiter (right panel)<br />

1<br />

1<br />

0.8<br />

0.8<br />

0.6<br />

0.6<br />

0.4<br />

0.4<br />

0.2<br />

0.2<br />

0<br />

0<br />

!0.2<br />

!0.2<br />

!0.4<br />

!0.4<br />

!0.6<br />

!0.6<br />

!0.8<br />

!0.8<br />

!1<br />

!1 !0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1<br />

!1<br />

!1 !0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1<br />

Figure: Without Limiter<br />

Figure: With Limiter<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 29 / 30


Summary<br />

Adjoint sensitivity method <strong>for</strong> SWE using high-order spectral element<br />

method<br />

◮ Fast and accurate tool <strong>for</strong> computing the sensitivities<br />

◮ Efficient in determining how a specific condition is dependent on many<br />

different parameters which influence it<br />

◮ Adjoint sensitivity method is more efficient than Direct sensitivity<br />

method<br />

Wavelets can be used <strong>for</strong> limiting the discontinuous Galerkin solutions<br />

“Numerical <strong>Analysis</strong> is service to science and engineering” -<br />

Gene Golub<br />

Acknowledgements: Maura Hagan, Al Kellie, Joe Tribbia<br />

Vani Cheruvu (ASP Research Review) Adjoint <strong>Sensitivity</strong> <strong>Analysis</strong> 06/14/2007 30 / 30

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

Saved successfully!

Ooh no, something went wrong!