20
Sampling and Low-Rank Tensor Approximations Alexander Litvinenko * H. G. Matthies * * TU Braunschweig, Brunswick, Germany [email protected] http://www.wire.tu-bs.de $Id: 12_Sydney-MCQMC.tex,v 1.3 2012/02/12 16:52:28 hgm Exp $

Low-rank response surface in numerical aerodynamics

Embed Size (px)

Citation preview

Page 1: Low-rank response surface in numerical aerodynamics

Sampling and Low-Rank Tensor Approximations

Alexander Litvinenko∗

H. G. Matthies∗

∗TU Braunschweig, Brunswick, Germany

[email protected]

http://www.wire.tu-bs.de

$Id: 12_Sydney-MCQMC.tex,v 1.3 2012/02/12 16:52:28 hgm Exp $

Page 2: Low-rank response surface in numerical aerodynamics

2

Introduction, aims

Uncertain Input: Variables (α, Ma), geometry of airfoil

Uncertain solution:

1. statistical moments of (v, p, ρ), exceedance probab. P (v ≤ v∗)2. pdf of CL and of CD, position of shock.

Our aims:

1. Low-rank representation of the input data (random fields)

2. Use the deterministic solver as a black box

3. A low-rank format for the solution

4. Postprocessing in the low-rank format

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 3: Low-rank response surface in numerical aerodynamics

3

Example 1:

5% and 95% quantiles for cp from 500 MC realisations.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 4: Low-rank response surface in numerical aerodynamics

4

Example 2:

5% and 95% quantiles for cf from 500 MC realisations.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 5: Low-rank response surface in numerical aerodynamics

5

Compression of PCE coefficients

Let RF q(x,θ), θ = (θ1, ..., θM , ...) is approximated:

q(x,θ) =∑β∈J

qβ(x)Hβ(θ) (1)

qβ(x) =1

β!

∫Θ

Hβ(θ)q(x,θ)P(dθ) ≈ 1

β!

nq∑i=1

Hβ(θi)q(x,θi)wi,

where nq - number of quadrature points.

Using low-rank format, obtain

qβ(x) =1

β![q(x,θ1), ..., q(x,θnq)] · [Hβ(θ1)w1, ...,Hβ(θnq)wnq]

T

Denote

cβ :=1

β![Hβ(θ1)w1, ...,Hβ(θnq)wnq]

T ∈ Rnq (2)

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 6: Low-rank response surface in numerical aerodynamics

6and approximate the set of realisations in low-rank format:

[q(x,θ1), ..., q(x,θnq)] ≈ ABT .

The matrix of all PCE coefficients will be

RN×|J | 3 [...qβ(x)...] ≈ ABT [...cβ...], β ∈ J . (3)

Put all together, obtain low-rank representation of RS

q(x,θ) =∑β∈J

qβ(x)Hβ(θ) = [...qβ(x)...]HT (θ), (4)

where H(θ) = (..., Hβ(θ), ...).

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 7: Low-rank response surface in numerical aerodynamics

7

Application of response surface

Now, having discretised RS

q(x,θ) ≈ q(θ) = ABT [...cβ...]HT (θ) (5)

Sample RV θ 106 times and then use the obtained sample to compute

• errorbars,

• quantiles,

• cumulative density function.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 8: Low-rank response surface in numerical aerodynamics

8

Sampling of response surface with residual

Collocation points are θ`, ` = 1..Z.

Algorithm:

1. Compute RS q(x,θ) ≈ ABT [...cβ...]HT (θ) from ` points.

2. (` = `+ 1), evaluate RS in θ`+1 , obtain q(x,θ`+1).

3. Compute residual ‖r(q(x,θ))‖. Only if ‖r‖ is large, solve expensive

determ. problem.

4. Update A, BT , [...cβ...] and go to (2).

If we are lucky, we solve the determ. problem only few times, otherwise

we must solve the determ. problem Z times for all θ1,...,θZ.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 9: Low-rank response surface in numerical aerodynamics

9

Conjunction of two low-rank matrices

Wk = [q(x,θ1), ..., q(x,θZ)], W′= [q(x,θZ+1), ..., q(x,θZ+m)]

• Suppose Wk = ABT ∈ Rn×Z is given

• Suppose W′ ∈ Rn×m contains new m solution vectors

• Compute C ∈ Rn×k and D ∈ Rm×k such that W′ ≈ CDT .

• Build Anew := [AC] ∈ Rn×2k and

BTnew = blockdiag[BT DT ] ∈ R2k×(Z+m)

• Rank-k truncation of Wnew = AnewBTnew costs

O((n+ Z +m)k2 + k3)

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 10: Low-rank response surface in numerical aerodynamics

10

Mean and variance in the rank-k format

u :=1

Z

Z∑i=1

ui =1

Z

Z∑i=1

A · bi = Ab. (6)

Cost is O(k(Z + n)).

C =1

Z − 1WcW

Tc ≈

1

Z − 1UkΣkΣ

TkU

Tk . (7)

Cost is O(k2(Z + n)).

Lemma: Let ‖W−Wk‖2 ≤ ε, and uk be a rank-k approximation of the

mean u. Then a) ‖u− uk‖ ≤ ε√Z

,

b) ‖C−Ck‖ ≤ 1Z−1ε

2.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 11: Low-rank response surface in numerical aerodynamics

11

Tensor product structure

Story does not end here as one may choose S =⊗

k Sk,

approximated by SB =⊗K

k=1 SBk, with SBk ⊂ Sk.

Solution represented as a tensor of grade K + 1

in WB,N =(⊗K

k=1 SBk)⊗ UN .

For higher grade tensor product structure, more reduction is possible,

— but that is a story for another talk, here we stay with K = 1.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 12: Low-rank response surface in numerical aerodynamics

12

Use in MC sampling solution—storage

Inflow and air-foil shape uncertain.

Data compression achieved by updated SVD:

Made from 600 MC Simulations, SVD is updated every 10 samples.

n = 260, 000 Z = 600

Updated SVD: Relative errors, memory requirements:rank k pressure turb. kin. energy memory [MB]

10 1.9e-2 4.0e-3 21

20 1.4e-2 5.9e-3 42

50 5.3e-3 1.5e-4 104

Dense matrix ∈ R260000×600 costs 1250 MB storage.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 13: Low-rank response surface in numerical aerodynamics

13

Trans-sonic flow with shock with Z = 2600 samples

Relative error for the density mean for rank k = 5, 10, 30, 50.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 14: Low-rank response surface in numerical aerodynamics

14

Trans-sonic flow with shock with Z = 2600 samples

Relative error for the density variance for rank k = 5, 10, 30, 50.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 15: Low-rank response surface in numerical aerodynamics

15

Abbildung 1: Comparison of the mean pressures computed with PCE and

with MC. (Left) ∆p := |pPCE137 − pMC|, Case 1 without shock, (Right)

∆p := |pPCE201 − pMC|, Case 9 with shock.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 16: Low-rank response surface in numerical aerodynamics

16

Errors, Case 1

Abbildung 2: (left) Relative errors in the Frobenius and the maximum

norms for pressure and density. (right) 10 points (α,Ma) were chosen in

the neigbourhood of α = 1.93 and Ma = 0.676.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 17: Low-rank response surface in numerical aerodynamics

17

Density

The mean density and variance of the density. Case 9, RAE-2822 airfoil.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 18: Low-rank response surface in numerical aerodynamics

18

Density with preconditioning failed

Density evaluated from two different PCE-based response surfaces (of

order p = 2 and p = 4). Failed.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 19: Low-rank response surface in numerical aerodynamics

19

Conclusion

• Can compress the set of simulations via SVD.

• The large rank k the more accurate is the approximation and higher

memory requirement.

• PCE produces results which are similar to MC and requires a smaller

number of determ. computations.

• PCE coeffs are computed on sparse GH grid (29 and 201 nodes). For

the mean value there is no difference. The variance on 201 nodes is

better.

• PCE can be used to build response surface/surrogate for statistics.

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing

Page 20: Low-rank response surface in numerical aerodynamics

20

Literature

1. Wahnert, A. L. et al., Approximation of the stoch. Galerkin matrix in thelow-rank canonical tensor format , Comp. and Math. with Appl., 2012;

2. Espig, A. L., et al., Efficient low-rank approximation of the stochastic Galerkinmatrix in tensor formats, Springer 2012.

3. H. G. M., E. Zander, Solving stochastic systems with low-rank tensorcompression, Linear Algebra and its Appl., Vol. 436, Issue 10, pp. 3819-3838, 2012.

4. A. L. and H. G. M. Uncertainty Quantification in numerical Aerodynamic vialow-rank Response Surface, PAMM Proc. Appl. Math. Mech., GAMM Darmstadt2012;

5. B. V. Rosic, A. L., O. Pajonk and H. G. M. Sampling-free linear Bayesian updateof polynomial chaos representations, J. of Comp. Phys. 2012;

TU Braunschweig Institute of Scientific Computing

CCScien

tifi omputing