Adjoint Error Estimation for Tsunami Modeling Brisa Davis - - PowerPoint PPT Presentation

adjoint error estimation for tsunami modeling
SMART_READER_LITE
LIVE PREVIEW

Adjoint Error Estimation for Tsunami Modeling Brisa Davis - - PowerPoint PPT Presentation

Adjoint Error Estimation for Tsunami Modeling Brisa Davis Department of Applied Mathematics University of Washington Clawpack Developers Workshop and Hackathon 2016 AMR Basics Refinement Process: Flagging cells that need refinement


slide-1
SLIDE 1

Adjoint Error Estimation for Tsunami Modeling

Brisa Davis Department of Applied Mathematics University of Washington Clawpack Developer’s Workshop and Hackathon 2016

slide-2
SLIDE 2

AMR Basics

Refinement Process:

  • Flagging cells that need refinement according to some criteria.
  • Clustering the flagged cells into rectangular patches that will

form the new set of grids at the next higher level.

  • Creating the new grids and initializing the values of q and also

any aux arrays for each new grid.

slide-3
SLIDE 3

AMR Basics

Flagging cells for refinement. Check if

  • the maximum max-norm of the undivided difference of qi,j

based its four neighbors in two space dimensions (or 6 neighbors in 3d)

  • the surface elevation of the water (in GeoClaw)
  • the estimated error in the cell (based on using Richardson

extrapolation) is greater than some specified tolerance. If is it, flag the cell for refinement.

slide-4
SLIDE 4

For problems where a small region of the domain is of interest,

  • nly certain waves actually need to be refined. Because of multiple

reflections or edge waves it can be difficult to determine what waves should to be refined.

slide-5
SLIDE 5

For problems where a small region of the domain is of interest,

  • nly certain waves actually need to be refined. Because of multiple

reflections or edge waves it can be difficult to determine what waves should to be refined. Solution:

  • solve the time−dependent adjoint equation
  • solve the forward (original) problem
  • each time you wish to refine, use the adjoint solution to

estimate the effect of the forward solution

  • refine the relevant waves
slide-6
SLIDE 6

Shallow Water Equations: ht + (hu)x + (hv)y = 0 (hu)t + (hu2 + 1

2gh2)x + (huv)y = −ghBx

(hv)t + (huv)x + (hv2 + 1

2gh2)y = −ghBy.

Here,

  • u(x, y, t) and v(x, y, t) are the depth-averaged velocities
  • g is the gravitational constant
  • h(x, y, t) is the fluid depth
  • B(x, y, t) is the bottom surface elevation relative to mean sea

level

slide-7
SLIDE 7

Linearized Shallow Water Equations: ˜ ηt + ˜ µx + ˜ γy = 0 ˜ µt + g¯ h(x, y)˜ ηx = 0 ˜ γt + g¯ h(x, y)˜ ηy = 0 for the perturbation (˜ η, ˜ µ, ˜ γ) about (¯ η, 0, 0). Here,

  • µ = hu and γ = hv represent the momenta
  • η(x, y, t) = h(x, y, t) + B(x, y, t) is the water surface

elevation

slide-8
SLIDE 8

Dropping tildes and setting A(x, y) =   1 g¯ h   B(x, y) =   1 g¯ h   q(x, y, t) =   η µ γ   gives us the linearized system qt(x, y, t) + A(x, y)qx(x, y, t) + B(x, y)qy(x, y, t) = 0.

slide-9
SLIDE 9

One-Dimensional Theory Suppose we are interested in calculating the value of a functional J = b

a

ϕ(x)Tq(x, tf )dx, where the q is the solution to the time dependent equation qt + A(x)qx = 0 subject to some initial and boundary conditions.

slide-10
SLIDE 10

One-Dimensional Theory Suppose we are interested in calculating the value of a functional J = b

a

ϕ(x)Tq(x, tf )dx, where the q is the solution to the time dependent equation qt + A(x)qx = 0 subject to some initial and boundary conditions. Here, ϕ(x) is selected to highlight the small region of the domain that is of primary interest.

slide-11
SLIDE 11

Note that b

a

tf

t

ϕ(x)T (qt + A(x)qx) dtdx = 0.

slide-12
SLIDE 12

Note that b

a

tf

t

ϕ(x)T (qt + A(x)qx) dtdx = 0. If we

  • integrate by parts,
  • set ϕ(x) = ˆ

q(x, tf ),

  • require that ˆ

qt + (A(x)T ˆ q)x = 0,

  • and select the appropriate boundary conditions for ˆ

q this equation simplifies to b

a

ˆ qT(x, tf )q(x, tf ) dx = b

a

ˆ qT(x, t)q(x, t) dx.

slide-13
SLIDE 13

So, we have that J = b

a

ˆ qT(x, t)q(x, t) dx for any t0 ≤ t ≤ tf .

slide-14
SLIDE 14

So, we have that J = b

a

ˆ qT(x, t)q(x, t) dx for any t0 ≤ t ≤ tf . Note that this requires solving the adjoint equation backward in time, since setting ϕ(x) = ˆ q(x, tf ) means data is given at the final time tf .

slide-15
SLIDE 15

Two problems: Forward Problem qt + A(x)qx = 0 Adjoint Problem ˆ qt + (A(x)T ˆ q)x = 0 Our functional: J = b

a

ˆ qT(x, t)q(x, t) dx This equation tells us in which locations in the solution space are contributing to the final answer.

slide-16
SLIDE 16

One Dimensional Example

slide-17
SLIDE 17

One Dimensional Example

slide-18
SLIDE 18

One Dimensional Example

slide-19
SLIDE 19

When using GeoClaw, what is actually calculated is J(QH), where QH is the solution on the current grid.

slide-20
SLIDE 20

When using GeoClaw, what is actually calculated is J(QH), where QH is the solution on the current grid. If we consider a refined grid, with the solution Qh, the error in the functional J due to the calculated forward solution can be written as |J(Qh) − J(QH)| =

  • b

a

ˆ qT(x, t)Qh(x, t)dx − b

a

ˆ qT(x, t)QH(x, t)dx

  • =
  • b

a

ˆ qT(x, t) [Qh(x, t)dx − QH(x, t)] dx

  • =
  • b

a

ˆ qT(x, t)RH(x, t)dx

  • where RH is the residual error on the current grid, found by using a

Richardson extrapolation error estimator.

slide-21
SLIDE 21

Taking into account the fact that the adjoint solution is also calculated gives |J(Qh) − J(QH)| ≤

  • b

a

ˆ QH

T(x, t)RH(x, t)dx

  • +
  • b

a

  • ˆ

qT(x, t) − ˆ QH

T(x, t)

  • RH(x, t)dx
  • The first term on the right hand side can be evaluated.

The second term cannot, but schemes can be chosen to make the second term O(hp) smaller than the first where p is the order of the method[1].

[1] Pierce, N. A. and Giles, M. B. “Adjoint and defect error bounding and correction for functional estimates.” Journal of Computational Physics, 200(2):769—794, 2004.

slide-22
SLIDE 22

So |J(Qh) − J(QH)| ≤ b

a

  • ˆ

QH

T(x, t)RH(x, t)

  • dx

gives us a error bound that is asymptotically correct as h decreases, but may be violated for a finite h.

slide-23
SLIDE 23

So |J(Qh) − J(QH)| ≤ b

a

  • ˆ

QH

T(x, t)RH(x, t)

  • dx

gives us a error bound that is asymptotically correct as h decreases, but may be violated for a finite h. Recall that our aim is not only to estimate the error, but also to minimize the error.

slide-24
SLIDE 24

So |J(Qh) − J(QH)| ≤ b

a

  • ˆ

QH

T(x, t)RH(x, t)

  • dx

gives us a error bound that is asymptotically correct as h decreases, but may be violated for a finite h. Recall that our aim is not only to estimate the error, but also to minimize the error. This equation tells us in which locations in the solution space are contributing error to the final answer.

slide-25
SLIDE 25

Original challenge: For problems where a small region of the domain is of primary interest, only certain waves actually need to be refined. Because of multiple reflections or edge waves it can be difficult to determine what waves should to be refined.

slide-26
SLIDE 26

Original challenge: For problems where a small region of the domain is of primary interest, only certain waves actually need to be refined. Because of multiple reflections or edge waves it can be difficult to determine what waves should to be refined. Solution:

  • solve the time−dependent adjoint equation
  • solve the forward (original) problem
  • each time you wish to refine, use the adjoint solution to

estimate the effect of the forward solution

  • refine the relevant waves
slide-27
SLIDE 27

Hypothetical Alaska Tsunami

slide-28
SLIDE 28

Hypothetical Alaska Tsunami

(a) tf − 1 hour (b) tf − 3 hours (c) tf − 5 hours (d) tf − 7 hours

slide-29
SLIDE 29

Hypothetical Alaska Tsunami

Grids Solution Inner Product t = 0.5 hours

slide-30
SLIDE 30

Verification and Timing of Results

slide-31
SLIDE 31

Verification and Timing of Results

Adjoint Flagging Surface-Flagging Forward Problem Adjoint Problem 8310.285 5984.48 26.901

slide-32
SLIDE 32

Hypothetical Alaska Tsunami

slide-33
SLIDE 33

Conclusion

  • We can selectively apply adaptive mesh refinement to the

relevant waves.

  • This also gives us a better handle on the physical meaning of

the tolerance selected.

slide-34
SLIDE 34

Conclusion

  • We can selectively apply adaptive mesh refinement to the

relevant waves.

  • This also gives us a better handle on the physical meaning of

the tolerance selected. Future Work

  • Examine how tight the error bound is in practice.
  • Develop more examples showcasing the power of this method.
slide-35
SLIDE 35

Using the Adjoint Method in AMRClaw and GeoClaw

To use this method for AMRClaw you will need to clone

  • the adjoint branch from

https://github.com/BrisaDavis/amrclaw

  • the adjoint branch from

https://github.com/BrisaDavis/riemann

slide-36
SLIDE 36

Using the Adjoint Method in AMRClaw and GeoClaw

To use this method for AMRClaw you will need to clone

  • the adjoint branch from

https://github.com/BrisaDavis/amrclaw

  • the adjoint branch from

https://github.com/BrisaDavis/riemann To use this method for GeoClaw you will also need to clone

  • the adjoint branch from

https://github.com/BrisaDavis/geoclaw