Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Joe Wallwork - - PowerPoint PPT Presentation

anisotropic goal oriented mesh adaptation in firedrake
SMART_READER_LITE
LIVE PREVIEW

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Joe Wallwork - - PowerPoint PPT Presentation

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Joe Wallwork 1 Nicolas Barral 2 David Ham 1 Matthew Piggott 1 1 Imperial College London, UK 2 University of Bordeaux, France Firedrake


slide-1
SLIDE 1

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake

Joe Wallwork1 Nicolas Barral2 David Ham1 Matthew Piggott1

1Imperial College London, UK 2University of Bordeaux, France

Firedrake ’19, Durham

1 / 20

slide-2
SLIDE 2

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Mesh Adaptation Riemannian Metric Field

Metric-Based Mesh Adaptation.

Riemannian metric fields M = {M(x)}x∈Ω are SPD ∀x ∈ Rn. ∴ Orthogonal eigendecomposition M(x) = V ΛV T.

Steiner ellipses [Barral, 2015] Resulting mesh [Barral, 2015]

(1,0) (0,1) M

1 2

M− 1

2

(λ1, 0) (0, λ2) E2 = (R2, I2) (R2, M)

node insertion edge swap node deletion node movement

Rokos and Gorman [2013]

2 / 20

slide-3
SLIDE 3

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Mesh Adaptation Hessian-Based Adaptation

The Hessian.

Consider interpolating u ≈ Ihu ∈ P1. It is shown in [Frey and Alauzet, 2005] that u − ΠhuL∞(K) ≤ γ max

x∈K max e∈∂K eT|H(x)|e

where γ > 0 is a constant related to the spatial dimension. A metric tensor M = {M(x)}x∈Ω may be defined as M(x) = γ ǫ |H(x)|, where ǫ > 0 is the tolerated error level.

3 / 20

slide-4
SLIDE 4

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Model Validation Test Case

Point Discharge with Diffusion

Analytical solution. Finite element forward solution.

(Presented on a 1,024,000 element uniform mesh.) Test case taken from TELEMAC-2D Valida- tion Document 7.0 [Riadh et al., 2014].    u · ∇φ − ∇ · (ν∇φ) = f ν n · ∇φ|walls = 0 φ|inflow = 0 f = δ(x − 2, y − 5)

4 / 20

slide-5
SLIDE 5

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Model Validation Test Case

Point Discharge with Diffusion: Adjoint Problem

Adjoint solution for J1. Adjoint solution for J2.

(Presented on a 1,024,000 element uniform mesh.)

Ji(φ) =

  • Ri

φ dx R1 = B 1

2 ((20, 5))

R2 = B 1

2 ((20, 7.5)) 5 / 20

slide-6
SLIDE 6

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Model Validation Test Case

Point Discharge with Diffusion: Convergence

Elements J1(φ) J1(φh) J2(φ) J2(φh) 4,000 0.20757 0.20547 0.08882 0.08901 16,000 0.16904 0.16873 0.07206 0.07205 64,000 0.16263 0.62590 0.06924 0.06922 256,000 0.16344 0.16343 0.06959 0.06958 1,024,000 0.16344 0.16345 0.06959 0.06958

Ji(φ) : analytical solutions Ji(φh) : P1 finite element solutions

6 / 20

slide-7
SLIDE 7

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Theory

Dual Weighted Residual (DWR).

Given a PDE Ψ(u) = 0 and its adjoint written in Galerkin forms ρ(uh, v) :=L(v) − a(uh, v) = 0, ∀v ∈ Vh ρ∗(u∗

h, v) :=J(v) − a(v, u∗ h) = 0,

∀v ∈ Vh = ⇒ a posteriori error results [Becker and Rannacher, 2001] J(u) − J(uh) = ρ(uh, u∗ − u∗

h) + R(2)

J(u) − J(uh) = 1 2ρ(uh, u∗ − u∗

h) + 1

2ρ∗(u∗

h, u − uh) + R(3)

[Remainders R(2) and R(3) depend on errors u − uh and u∗ − u∗

h.]

7 / 20

slide-8
SLIDE 8

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Theory

DWR Integration by Parts

J(u) − J(uh) = ρ(uh, u∗ − u∗

h) + R(2)

Applying integration by parts (again) elementwise: |J(u) − J(uh)|

  • K ≈ |Ψ(uh), u∗ − u∗

hK + ψ(uh), u∗ − u∗ h∂K|.

Ψ(uh) is the strong residual on K; ψ(uh) embodies flux terms over elemental boundaries.

8 / 20

slide-9
SLIDE 9

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Isotropic Goal-Oriented Mesh Adaptation

Isotropic Metric

|J(u) − J(uh)|

  • K ≈ η := |Ψ(uh), u∗ − u∗

hK + ψ(uh), u∗ − u∗ h∂K|.

Isotropic case: M = ΠP1η ΠP1η

  • .

9 / 20

slide-10
SLIDE 10

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Isotropic Goal-Oriented Mesh Adaptation

Isotropic Meshes

Centred receiver (12,246 elements). Offset receiver (19,399 elements).

10 / 20

slide-11
SLIDE 11

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Anisotropic Goal-Oriented Mesh Adaptation

A posteriori Approach

Motivated by the approach of [Power et al., 2006], consider the interpolation error: |J(u) − J(uh)| ≈ |Ψ(uh), u∗ − u∗

h u∗−Πhu∗

K + ψ(uh), u∗ − u∗

h u∗−Πhu∗

∂K| This suggests the node-wise metric, M = |Ψ(uh)||H(u∗)|, and correspondingly for the adjoint, M = |Ψ∗(u∗

h)||H(u)|.

11 / 20

slide-12
SLIDE 12

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Anisotropic Goal-Oriented Mesh Adaptation

A posteriori Anisotropic Meshes

Centred receiver (16,407 elements). Offset receiver (9,868 elements).

12 / 20

slide-13
SLIDE 13

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Anisotropic Goal-Oriented Mesh Adaptation

A priori Approach

Alternative a priori error estimate [Loseille et al., 2010]: J(u) − J(uh) = (Ψh − Ψ)(u), u∗ + R. Assume we have the conservative form Ψ(u) = ∇ · F(u), so J(u) − J(uh) ≈ (F − Fh)(u), ∇u∗Ω − n · (F − Fh(u), u∗)∂Ω. This gives Riemannian metric fields Mvolume =

n

  • i=1

|H(Fi(u))|

  • ∂u∗

∂xi

  • ,

Msurface =|u∗|

  • H

n

  • i=1

Fi(u) · ni

  • 13 / 20
slide-14
SLIDE 14

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Anisotropic Goal-Oriented Mesh Adaptation

A priori Anisotropic Meshes

Centred receiver (44,894 elements). Offset receiver (29,143 elements).

14 / 20

slide-15
SLIDE 15

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Anisotropic Goal-Oriented Mesh Adaptation

Meshes from Combined Metrics (Offset Receiver)

Averaged isotropic (13,980 elements). Superposed isotropic (19,588 elements). Averaged a posteriori (9,289 elements). Superposed a posteriori (14,470 elems). Averaged a priori (25,204 elements). Superposed a priori (49,793 elements).

15 / 20

slide-16
SLIDE 16

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Results

Convergence Analysis: Centred Receiver.

16 / 20

slide-17
SLIDE 17

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Results

Convergence Analysis: Offset Receiver.

17 / 20

slide-18
SLIDE 18

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Results

Three Dimensions.

Anisotropic mesh resulting from averaging a posteriori metrics.

Uniform mesh (1,920,000 elements). Adapted mesh (1,766,396 elements).

18 / 20

slide-19
SLIDE 19

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Results

Outlook.

To appear in proceedings of the 28th International Meshing Roundtable: JW, N Barral, D Ham, M Piggott, “Anisotropic Goal-Oriented Mesh Adaptation in Firedrake” (2019). Future work: Time dependent (tidal) problems. Other finite element spaces, e.g. DG. Boundary and flux terms for anisotropic methods. Realistic desalination application.

19 / 20

slide-20
SLIDE 20

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Goal-Oriented Adaptation Results

References

Nicolas Barral. Time-accurate anisotropic mesh adaptation for three-dimensional moving mesh problems. PhD thesis, Universit´ e Pierre et Marie Curie, 2015. Roland Becker and Rolf Rannacher. An optimal control approach to a posteriori error estimation in finite element methods. Acta Numerica 2001, 10:1–102, May 2001. ISSN 0962-4929. Pascal-Jean Frey and Fr´ ed´ eric Alauzet. Anisotropic mesh adaptation for cfd computations. Computer methods in applied mechanics and engineering, 194(48-49):5068–5082, 2005. Adrien Loseille, Alain Dervieux, and Fr´ ed´ eric Alauzet. Fully anisotropic goal-oriented mesh adaptation for 3d steady euler equations. Journal of computational physics, 229(8):2866–2897, 2010. PW Power, Christopher C Pain, MD Piggott, Fangxin Fang, Gerard J Gorman, AP Umpleby, Anthony JH Goddard, and IM Navon. Adjoint a posteriori error measures for anisotropic mesh optimisation. Computers & Mathematics with Applications, 52(8):1213–1242, 2006. A Riadh, G Cedric, and MH Jean. TELEMAC modeling system: 2D hydrodynamics TELEMAC-2D software release 7.0 user manual. Paris: R&D, Electricite de France, page 134, 2014. Georgios Rokos and Gerard Gorman. Pragmatic–parallel anisotropic adaptive mesh toolkit. In Facing the Multicore-Challenge III, pages 143–144. Springer, 2013.

20 / 20

slide-21
SLIDE 21

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Appendix Combining Metrics

Metric Combination.

Consider metrics M1 and M2. How to combine these in a meaningful way? Metric average: M := 1

2(M1 + M2).

Metric superposition: intersection of Steiner ellipses.

Metric superposition [Barral, 2015]

21 / 20

slide-22
SLIDE 22

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Appendix Hessian recovery

Double L2 projection

We recover H = ∇T∇u by solving the auxiliary problem H = ∇Tg g = ∇u as

τ : Hh dx +

div(τ) : gh dx −

n

  • i=1

n

  • j=1
  • ∂Ω

(gh)iτijnj ds = 0, ∀τ

ψ · gh dx =

  • ∂Ω

uhψ · n ds −

div(ψ)uh dx, ∀ψ.

22 / 20

slide-23
SLIDE 23

Anisotropic Goal-Oriented Mesh Adaptation in Firedrake Appendix A priori Metric

Accounting for Source Term

Forward equation: ∇ · F(φ) = f , F(φ) = uφ − ν∇φ. M = |H(F1(φ))|

  • ∂φ∗

∂x

  • + |H(F2(φ))|
  • ∂φ∗

∂y

  • + |H(f )| |φ∗|.

Adjoint equation: ∇ · G(φ∗) = g, G(φ∗) = −uφ∗ − ν∇φ∗, M = |H(G1(φ∗))|

  • ∂φ

∂x

  • + |H(G2(φ∗))|
  • ∂φ

∂y

  • + |H(g)| |φ|,

23 / 20