Accurate uncertainty quantification using adjoint...

40
Accurate uncertainty quantification using adjoint solutions Praveen. C 1 and K. Duraisamy 2 1 TIFR Center for Applicable Mathematics Bangalore 2 Dept. of Aeronautics and Astronautics Stanford University Health, Safety and Environment Group BARC 6-7 October, 2010 Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 1 / 40

Transcript of Accurate uncertainty quantification using adjoint...

Page 1: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Accurate uncertainty quantification using adjointsolutions

Praveen. C1 and K. Duraisamy2

1TIFR Center for Applicable MathematicsBangalore

2Dept. of Aeronautics and AstronauticsStanford University

Health, Safety and Environment GroupBARC

6-7 October, 2010

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 1 / 40

Page 2: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Problem of UQ I

Consider a system with governing equation

R(ξ, u) = 0

where ξ ∈ Ω ⊂ Rn, u ∈X ⊂ RM and R ∶ Ω ×X → RM . This defines theimplicit relation

u = u(ξ)

ξ are some parameters in the problem, e.g, material properties, initialconditions, boundary conditions, etc.

u represents the state of the system

Output functional of interest

I = I(ξ) ∶= I(ξ, u(ξ))

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 2 / 40

Page 3: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Problem of UQ II

In practice, the parameters ξ could be random or uncertain. In thatcase, u(ξ) and I(ξ) are random variables.

We will assume that the probability structure of the input variables ξis given in terms of their PDF. Then the problem of UQ is to find theprobability structure of the output I(ξ)

The relationship

ξ → I(ξ)

is implicit, and requires the solution of the model R = 0

ξ → R(ξ, u) = 0→ u(ξ) → I(ξ)

which is usually computationally expensive because M ≫ 1

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 3 / 40

Page 4: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Our approach to UQ

• Aleatoric uncertainties

• Small number (1–4) of uncertain parameters

• Non-intrusive collocation approach Choose samples ξ1, . . . , ξNs ∈ Ω Solve the deterministic problems, R(ξj , u(ξj)) = 0 Form a grid of simplex elements covering Ω Estimate moments through multi-element quadrature

• We also compute adjoint solutions v at the sample points

∂I

∂u(ξj , u(ξj)) + v(ξj)T

∂R

∂u(ξj , u(ξj)) = 0, j = 1, . . . ,Ns

• Choose the samples in an adaptive, goal-oriented mannere.g., reduce the error in the mean value

J = ∫ΩI(ξ, u(ξ))dξ

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 4 / 40

Page 5: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Simplex elements

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 5 / 40

Page 6: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Simplex elements need less samples

Samples located on boundary of elementsSamples shared by neighbouring elements

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 6 / 40

Page 7: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Stochastic simplex grid and quadrature

contributing the maximum error is identified and three additional samples are evaluated at the midpointsof its edges. While more complicated adaptive refinement criteria can be used, such a simple strategy isemployed for demonstrative purposes. This process is then repeated until a desired error tolerance is achieved.Figures 2 and 3 show the sampling nodes and elements at the 20th and 50th iterations, respectively. Figure4 shows the error in the computed objective function before and after error correction when linear andquadratic reconstructions are employed.

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

!1

! 2

Figure 1: Initial sampling locations (NS = 5) and elements

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

!1

! 2

Figure 2: Mesh at 20th pass (NS = 5 + 19 ! 3)

References

[1] Ghanem, R., and Spanos, P., “Stochastic Finite Elements: A Spectral Approach,” Dover Publications,2003.

[2] Pierce, N., and Giles, M., “Adjoint and Defect Error Bounding and Correction for Functional Estimates,”Journal of Computational Physics, 200, pp. 769–794, 2002.

[3] Giles, M., and Pierce, N., “An introduction to the adjoint approach to design,” Flow, Turbulence andCombustion, 65(3-4):393-415, 2000.

3

Sample points

Quadrature points

J (u) = ∫ΩI(u(ξ))dξ =

NE

∑i=1∫Ei

I(u(ξ))dξ

∫Ei

I(u(ξ))dξ ≈Nq

∑j=1

wijI(u(ξij))

But we do not know uij = u(ξij)

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 7 / 40

Page 8: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Finite element interpolation I

Let u(ξ) is a finite element interpolation of u(ξ), e.g. using P1 or P2

finite elements.

If u is a Pr interpolant, then we can approximate the mean value as

J (u) =NE

∑i=1

Nq

∑j=1

wijI(u(ξij)) = J (u) +O(∆ξr+1)

We will

• reduce the error in the above approximation

• derive estimate for remaining error which can be used for choosingthe sample points

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 8 / 40

Page 9: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Error estimation I

The mean value can be computed as

J (u) =NE

∑i=1

Nq

∑j=1

wijI(u(ξij)) +O(∆ξs+1)

where the quadrature is exact for polynomials of degree s. Then

I(uij) = I(uij) + [I(uij) − I(uij)]

= I(uij) +∂I

∂u(uij)(uij − uij) +O(∥u − u∥2)

If u is exact for polynomials of degree r, then we can expect

∥u − u∥ = O(∆ξr+1)

where ∆ξ is a measure of the stochastic element size, e.g., the length ofthe largest side.

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 9 / 40

Page 10: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Error estimation IIWe will choose s + 1 ≥ 2(r + 1), so that the error will be dominated bythe interpolation error in stochastic space. Since

R(uij) = 0

introducing vij , we can write

I(uij) = I(uij) + ∂I∂u

(uij)(uij − uij) + vTij[R(uij) −R(uij) +R(uij)]

+O(∥u − u∥2)

= I(uij) + [∂I∂u

(uij) + vTij∂R

∂u(uij)] (uij − uij) + vTijR(uij)

+O(∥u − u∥2)

If we choose vij to be a solution of the adjoint equation at quadraturenode ij

∂I

∂u(uij) + vTij

∂R

∂u(uij) = 0,

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 10 / 40

Page 11: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Error estimation III

then the corrected functional is

I(uij) = I(uij) + vTijR(uij) +O(∥u − u∥2)

But the solution of adjoint equations at all the quadrature points willlead to huge computational expense.

Let v(ξ) be the Pr interpolation of the adjoint solution at the samplepoints. Then the corrected functional is

I(uij) = I(uij) + vTijR(uij)

+ [∂I∂u

(uij) + vTij∂R

∂u(uij)] (uij − uij) + (vij − vij)TR(uij)

+(vij − vij)T∂R

∂u(uij)(uij − uij) +O(∥u − u∥2)

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 11 / 40

Page 12: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Error estimation IV

Define

R∗ij(v) ∶= [∂I

∂u(uij)]

T

+ [∂R∂u

(uij)]T

v

then

J (u) =NE

∑i=1

Nq

∑j=1

wijI(uij) +NE

∑i=1

Nq

∑j=1

wij vTijR(uij)

+NE

∑i=1

Nq

∑j=1

wij (vij − vij)TR(uij) + [R∗ij(vij)]T (uij − uij)

+O(∆ξ2(r+1))= J (u) +CC +RE +O(∆ξ2(r+1))

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 12 / 40

Page 13: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Adaptation procedure I

We cannot compute RE exactly since we do not know uij and vij . Sowe will try to estimate RE approximately.

Since uij and vij are interpolations of the exact solutions, we can expect

R(uij) ≈ 0 and R∗ij(vij) ≈ 0

Let L and Q denote the P1 and P2 interpolation operators in therandom space. Then estimtate

RE =NE

∑i=1

Nq

∑j=1

wij (Qvij −Lvij)TR(uij) + [R∗ij(vij)]T (Quij −Luij)

We have a break-up of the error into elemental contributions

RE =NE

∑i=1εi

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 13 / 40

Page 14: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Adaptation procedure II

To reduce the remaining error RE, we choose sample points where REis large.

Find the element i which makes the largest contribution εi to theremaining error, and then divide this element by adding a new sample.

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 14 / 40

Page 15: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Adaptation algorithm

1 Sample the primal solution u(ξ) and adjoint solution v(ξ) at thefour vertices and center of Ω, i.e., Ns = 5

2 Construct a grid of simplex elements using the Ns samples

3 Construct the stochastic approximations u(ξ) and v(ξ) to theprimal and adjoint solutions

4 Compute J (u) and CC

5 For each simplex element i, compute εi and RE

6 Choose the element with the largest value of the element error andadd a new sample at the middle of the largest side

7 If RE > TOL, set Ns = Ns + 1 and go to step 2

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 15 / 40

Page 16: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Numerical examples

• Two random variables, uniformly distributed

• u(ξ) = linear (P1) or quadratic interpolation (Venditti-Darmofal)

• Symmetric quadrature on triangles using Dunavant rules

• Uniform refinement: ∆ξ ∼ N−1/2s

Plot log(error) against log(Ns) to find order of convergence

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 16 / 40

Page 17: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example I

The governing equation is given by

R(u, ξ1, ξ2) ∶=1

2u2 − ξ1u −

1

2exp(ξ2) = 0

where ξ1, ξ2 ∈ [0,1] are uniform random variables. The randomfunctional of interest is I(u) = u2 and we would like to compute itsmean value

J = ∫1

0∫

1

0I(u)dξ1dξ2

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 17 / 40

Page 18: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example IRandom functional I(ξ1, ξ2)

ξ1

ξ 2

0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1

2

3

4

5

6

7

8

0

0.5

1

0

0.5

10

2

4

6

8

10

ξ1

ξ2

1

2

3

4

5

6

7

8

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 18 / 40

Page 19: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example IConvergence rates under uniform refinement

100

101

102

10−12

10−10

10−8

10−6

10−4

10−2

100

sqrt(Number of samples)

Err

or

Linear, JLinear, J + CCQuadratic, JQuadratic, J+CC

Convergence rates for algebraic example I under uniform refinement:(∗) 2.2, () 4.5, () 3.3, (◻) 5.8

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 19 / 40

Page 20: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example I: Adaptive refinement

0 20 40 60 80 100 120 140 160

3.86

3.88

3.9

3.92

3.94

3.96

3.98

4

4.02

Number of samples

Mea

n fu

nctio

nal

JJ + CCJexact

0 20 40 60 80 100 120 140 160

3.86

3.87

3.88

3.89

3.9

3.91

3.92

3.93

Number of samples

Mea

n fu

nctio

nal

JJ + CCJexact

100

101

102

103

10−6

10−5

10−4

10−3

10−2

10−1

100

101

Number of samples

% E

rror

JJ + CC

100

101

102

103

10−7

10−6

10−5

10−4

10−3

10−2

10−1

100

101

Number of samples

% E

rror

JJ + CC

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 20 / 40

Page 21: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example I: Adaptive refinement

0 20 40 60 80 100 120 140 160

0.986

0.988

0.99

0.992

0.994

0.996

0.998

1

1.002

Number of samples

Fra

ctio

n of

err

or r

ecov

ered

by

adjo

int

0 20 40 60 80 100 120 140 1600.988

0.99

0.992

0.994

0.996

0.998

1

1.002

Number of samples

Fra

ctio

n of

err

or r

ecov

ered

by

adjo

int

0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

ξ1

ξ 2

0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

ξ1

ξ 2

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 21 / 40

Page 22: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example II

The governing equation is given by

R(u, ξ1, ξ2) ∶=1

2u2 − ξ1u −

1

2exp(−50(ξ2 − 1/2)2) = 0

which is a slight modification of the previous example in order tointroduce a higher sensitivity of the solution to the random variables,ξ1 ∈ [1/2,1], ξ2 ∈ [0,1] which are uniformly distributed. The randomfunctional of interest is

I(u) = u2

and we would like to estimate

J = ∫1

0∫

1

1/2I(u)dξ1dξ2

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 22 / 40

Page 23: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example IIRandom functional I(ξ1, ξ2)

ξ1

ξ 2

0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1.5

2

2.5

3

3.5

4

4.5

5

5.5

0.4

0.6

0.8

1

0

0.5

11

2

3

4

5

6

ξ1

ξ2

1.5

2

2.5

3

3.5

4

4.5

5

5.5

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 23 / 40

Page 24: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example IIConvergence rate under uniform refinement

100

101

102

10−10

10−8

10−6

10−4

10−2

100

sqrt(Number of samples)

Err

or

Linear, JLinear, J + CCQuadratic, JQuadratic, J+CC

Convergence rates for algebraic example II under uniform refinement:(∗) 2.7, () 4.8, () 3.7, (◻) 6.4

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 24 / 40

Page 25: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example II: Adaptive refinement

0 20 40 60 80 100 120 140 160

1.25

1.3

1.35

1.4

1.45

1.5

1.55

1.6

Number of samples

Mea

n fu

nctio

nal

JJ + CCJexact

0 20 40 60 80 100 120 140 1601.35

1.4

1.45

1.5

1.55

1.6

1.65

1.7

Number of samples

Mea

n fu

nctio

nal

JJ + CCJexact

100

101

102

103

10−4

10−3

10−2

10−1

100

101

102

Number of samples

% E

rror

JJ + CC

100

101

102

103

10−5

10−4

10−3

10−2

10−1

100

101

102

Number of samples

% E

rror

JJ + CC

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 25 / 40

Page 26: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Algebraic example II: Adaptive refinement

0 20 40 60 80 100 120 140 1600

0.5

1

1.5

2

2.5

3

3.5

4

4.5

Number of samples

Fra

ctio

n of

err

or r

ecov

ered

by

adjo

int

0 20 40 60 80 100 120 140 1600.5

1

1.5

2

2.5

3

3.5

4

4.5

Number of samples

Fra

ctio

n of

err

or r

ecov

ered

by

adjo

int

0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

ξ1

ξ 2

0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

ξ1

ξ 2

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 26 / 40

Page 27: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Convection-diffusion equation I

Consider the steady viscous Burgers equation with a random forcingterm given by

uux = uxx + s, x ∈ (0,1)u(0) = u(1) = 0

The source term s(x; ξ1, ξ2) is chosen so that the exact solution is

u(x; ξ1, ξ2) = 10x(1 − x) sin(π(ξ1 + ξ2x))

where ξ1, ξ2 ∈ [0.9,1.1] are uniform random variables. The ODE isapproximated using a finite volume method on M cells so that thegoverning equations R ∶ RM ×Ω→ RM is given by

R(u)i ∶=Fi+1/2 − Fi−1/2

∆x− ui+1 − 2ui + ui−1

∆x2− si = 0, 1 ≤ i ≤M

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 27 / 40

Page 28: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Convection-diffusion equation II

where Fi+1/2 = F (ui, ui+1) is a numerical flux function, e.g. theLax-Friedrich’s flux defined as

F (u, v) = 1

2[f(u) + f(v)] − 1

2λ(v − u)

The boundary conditions are implemented by appropriate definition ofthe boundary fluxes. The random functional of interest is

I = ∆xM

∑i=1u2i

and in the computations we use M = 20 cells. We are interested in themean value of the random functional given by

J = ∫1.1

0.9∫

1.1

0.9Idξ1dξ2

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 28 / 40

Page 29: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Convection-diffusion equationRandom functional I(ξ1, ξ2)

ξ1

ξ 2

0.9 0.95 1 1.05 1.10.9

0.92

0.94

0.96

0.98

1

1.02

1.04

1.06

1.08

1.1

2

2.05

2.1

2.15

2.2

2.25

2.3

2.35

2.4

2.45

0.91

1.11.2

1.3

0.9

1

1.1

1.2

1.31.9

2

2.1

2.2

2.3

2.4

2.5

ξ1

ξ2

2

2.05

2.1

2.15

2.2

2.25

2.3

2.35

2.4

2.45

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 29 / 40

Page 30: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Convection-diffusion equationConvergence rates under uniform refinement

100

101

102

10−12

10−10

10−8

10−6

10−4

10−2

100

sqrt(Number of samples)

Err

or

Linear, JLinear, J + CCQuadratic, JQuadratic, J+CC

Convergence rates for convection-diffusion problem under uniformrefinement: (∗) 2.2, () 4.4, () 3.3, (◻) 6.3

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 30 / 40

Page 31: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Convection-diffusion equation: Adaptive sampling

0 20 40 60 80 100 120 140 1600.088

0.0885

0.089

0.0895

0.09

0.0905

0.091

0.0915

0.092

0.0925

0.093

Number of samples

Mea

n fu

nctio

nal

JJ + CCJexact

0 20 40 60 80 100 120 140 1600.09

0.0905

0.091

0.0915

0.092

0.0925

Number of samples

Mea

n fu

nctio

nal

JJ + CCJexact

100

101

102

103

10−5

10−4

10−3

10−2

10−1

100

101

Number of samples

% E

rror

JJ + CC

100

101

102

103

10−7

10−6

10−5

10−4

10−3

10−2

10−1

100

101

Number of samples

% E

rror

JJ + CC

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 31 / 40

Page 32: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Convection-diffusion equation: Adaptive sampling

0 20 40 60 80 100 120 140 160

0.986

0.988

0.99

0.992

0.994

0.996

0.998

1

1.002

Number of samples

Fra

ctio

n of

err

or r

ecov

ered

by

adjo

int

0 20 40 60 80 100 120 140 1600.99

0.992

0.994

0.996

0.998

1

1.002

Number of samples

Fra

ctio

n of

err

or r

ecov

ered

by

adjo

int

0.9 0.95 1 1.05 1.10.9

0.92

0.94

0.96

0.98

1

1.02

1.04

1.06

1.08

1.1

ξ1

ξ 2

0.9 0.95 1 1.05 1.10.9

0.92

0.94

0.96

0.98

1

1.02

1.04

1.06

1.08

1.1

ξ1

ξ 2

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 32 / 40

Page 33: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Burgers ODE with discontinuos solution I

The governing equation is taken as steady-state inviscid Burgersequation with a source term

ddx(u

2/2) = 4xu, x ∈ (0,1)u(0) = 1 + ξ1, u(1) = −1 + ξ2

The ODE is of first order but we impose two boundary conditions; thesolution will be discontinuous in general at x = xs which is given by theRankine-Hugoniot condition as xs =

√1/2 − (ξ1 + ξ2)/4. The random

variables ξ1, ξ2 are assumed to be uniformly distributed in [−1/2,+1/2]so that the shock location xs varies in the interval [0.5,0.86]approximately. The ODE is solved using a finite-volume method withLax-Friedrich’s flux, so that the governing equation R ∶ RM ×Ω→ RM is

R(u)i ∶=Fi+1/2 − Fi−1/2

∆x− 4xiui = 0, 1 ≤ i ≤M

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 33 / 40

Page 34: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Burgers ODE with discontinuos solution II

For the computations we take M = 50 cells and the random functionalis

I = ∆x50

∑i=36

ui ≈ ∫1.0

0.7u(x)dx

As the parameters vary randomly, the shock can be inside or outsidethe domain of integration.

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 34 / 40

Page 35: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Burgers ODESample solutions

0 0.2 0.4 0.6 0.8 1−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x

u

NumericalExact

0 0.2 0.4 0.6 0.8 1−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

x

u

NumericalExact

(a) ξ1 = −1/2, ξ2 = −1/2, (b) ξ1 = 1/2, ξ2 = 1/2

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 35 / 40

Page 36: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Burgers ODERandom functional I(ξ1, ξ2)

ξ1

ξ 2

−0.5 0 0.5−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

−0.5

−0.4

−0.3

−0.2

−0.1

0

−0.5

0

0.5 −0.50

0.5−0.6

−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

ξ2ξ

1

−0.5

−0.4

−0.3

−0.2

−0.1

0

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 36 / 40

Page 37: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Burgers ODEConvergence rate under uniform refinement

100

101

102

10−7

10−6

10−5

10−4

10−3

10−2

10−1

sqrt(Number of samples)

Err

or

Linear, JLinear, J + CCQuadratic, JQuadratic, J+CC

Convergence rates for Burgers problem under uniform refinement:(∗) 2.0, () 5.2, () 3.4, (◻) 5.3

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 37 / 40

Page 38: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Burgers ODE: Adaptive refinement

0 20 40 60 80 100 120 140 160−0.37

−0.365

−0.36

−0.355

−0.35

−0.345

−0.34

−0.335

−0.33

−0.325

−0.32

Number of samples

Mea

n fu

nctio

nal

JJ + CCJexact

0 20 40 60 80 100 120 140 160−0.37

−0.365

−0.36

−0.355

−0.35

−0.345

−0.34

−0.335

Number of samples

Mea

n fu

nctio

nal

JJ + CCJexact

100

101

102

103

10−4

10−3

10−2

10−1

100

101

Number of samples

% E

rror

JJ + CC

100

101

102

103

10−4

10−3

10−2

10−1

100

101

Number of samples

% E

rror

JJ + CC

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 38 / 40

Page 39: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Burgers ODE: Adaptive refinement

0 20 40 60 80 100 120 140 1600.8

1

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

Number of samples

Fra

ctio

n of

err

or r

ecov

ered

by

adjo

int

0 20 40 60 80 100 120 140 160−1

0

1

2

3

4

5

Number of samples

Fra

ctio

n of

err

or r

ecov

ered

by

adjo

int

−0.5 0 0.5−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

ξ1

ξ 2

−0.5 0 0.5−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

ξ1

ξ 2

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 39 / 40

Page 40: Accurate uncertainty quantification using adjoint …math.tifrbng.res.in/~praveen/slides/barc-adjuq-7oct2010.pdfAccurate uncertainty quanti cation using adjoint solutions Praveen.

Summary/Future work

• Adjoint solutions allow to control error in statistical moments

• Stochastic samples can be chosen in an optimal way

• Provides way to gurantee accuracy of UQ

• Automatic differentiation can be used for obtaining adjointsolutions

• Non-intrusive approach allows application to complex problems

• However, it is limited to small number of uncertain parameters

• Need for non-oscillatory approach in case of discontinuousdependance u(ξ)

• Need to include error of spatial discretization

Praveen. C (TIFR-CAM) UQ using adjoints BARC, 7 Oct 2010 40 / 40