Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf ·...

28
Adaptive finite elements with large aspect ratio: theory and practice M. Picasso Mathematics Institute of Computational Science and Engineering Ecole Polytechnique F´ ed´ erale de Lausanne, Switzerland Conf´ erence CRM-GIREF, Qu´ ebec, 25-27 mai 2010 M. Picasso Adaptive finite elements with large aspect ratio

Transcript of Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf ·...

Page 1: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Adaptive finite elements with large aspect ratio:theory and practice

M. Picasso

Mathematics Institute of Computational Science and EngineeringEcole Polytechnique Federale de Lausanne, Switzerland

Conference CRM-GIREF, Quebec, 25-27 mai 2010

M. Picasso Adaptive finite elements with large aspect ratio

Page 2: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Adaptive finite elements

Theory + practice: a posteriori error estimates + adaptivealgorithms.

A posteriori error estimates for elliptic, parabolic, hyperbolic ?nonlinear ? problems + efficient meshing tools → can be used forindustrial problems.

Adaptive finite element with large aspect ratio: the ultimate tool toreduce the number of vertices given a prescribed level of accuracy.

M. Picasso Adaptive finite elements with large aspect ratio

Page 3: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Finite elements with large aspect ratio

General statement (mathematician): If nothing is known about thesolution, then finite elements with large aspect ratio should not beused.

A priori error estimates: ‖∇(u − uh)‖L2(Ω) ≤ Ch|u|H2(Ω) and C islarge when the aspect ratio is large.

But engineers use finite elements with large aspect ratio. Example:viscous compressible flows around aircrafts, aspect ratio 103 in theboundary layer.

More precise statement: finite elements with large aspect ratio canbe used provided the mesh fits the solution.

This is precisely the goal of adaptive finite elements with largeaspect ratio.

The theory of finite elements has to be revisited to handle mesheswith large aspect ratio.

M. Picasso Adaptive finite elements with large aspect ratio

Page 4: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Examples

Advection-diffusion (academic problem).

Flows around aircrafts (no theory, allows very fast computations).

Microfluidics (parabolic problem, theory and practice).

M. Picasso Adaptive finite elements with large aspect ratio

Page 5: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Example 1: 2D advection-diffusion

Mesh Isovalues

−ε∆u +~a · ∇u = f , boundary layer 10−4, 241 vertices, asp. ratioO(105), same precision with isotropic mesh O(105) vertices, PicassoSISC 2003.

Design of the stabilization parameter: anisotropic a priori errorestimates, Micheletti Perotto Picasso SINUM 2003.

M. Picasso Adaptive finite elements with large aspect ratio

Page 6: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Example 2: 3D flows around aircrafts

Bourgault Picasso Alauzet Loseille IJNMF 2009, supported byDassault Aviation.

Compressible Euler solver (Alauzet), Anisotropic mesh generator(Dobrzynski Frey), Anisotropic error estimator.

Animation, Ma = 1.6, AoA = 3o , 106 vertices, single 32b processor.

Goal oriented: see A. Loseille’s PhD.

M. Picasso Adaptive finite elements with large aspect ratio

Page 7: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Example 2: 3D flows around aircrafts

With W. Hassan, F. Alauzet, supported by Dassault Aviation.

Compressible Navier-Stokes solver (Alauzet), Anisotropic meshgenerator (Dobrzynski Frey), Anisotropic error estimator.

M. Picasso Adaptive finite elements with large aspect ratio

Page 8: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Example 3: Microfluidics

Heat equation, Lozinski Picasso Prachittham SISC 2009.

Unsteady convection-diffusion, Picasso Prachittham JCAM 2009.

Microfluidics, Picasso Prachittham Gijs IJNMF 2009.

Adaptive time steps and finite elements with large aspect ratio.

Optimal a posteriori error estimates for the Crank Nicolson scheme.

Animation.

Animation.

M. Picasso Adaptive finite elements with large aspect ratio

Page 9: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

A priori error estimates

Isotropic meshes: ∃C > 0 (dep. aspect ratio, indep. u, h)

‖∇(u − uh)‖L2(Ω) ≤ Ch|u|H2(Ω).

Anisotropic meshes: Hessian matrix H(u).Dompierre Vallet Bourgault Fortin Habashi 2002, Frey George 2008,Chen Sun Xu 2007, Mirebeau Cohen 2009.Formaggia Perotto 2001, ∃C > 0 (indep. aspect ratio, u, h)Z

K

|∇(u − rhu)|2 ≤ C

λ4

1,K

λ22,K

ZK

(~rT1,KH(u)~r1,K )2

+ 2λ21,K

ZK

(~rT1,KH(u)~r2,K )2 + λ2

2,K

ZK

(~rT2,KH(u)~r2,K )2

!.

K

~r1,K~r2,K

λ1,Kλ2,K

Ex: the mesh is aligned with u, u = u(x2), ~r1,K = (1 0)TZK

|∇(u − rhu)|2 ≤ Cλ22,K

ZK

„∂2u

∂x22

«2

.

Most anisotropic adaptive algorithms use an estimate of H(u),Castro-Diaz Hecht Mohammadi Pironneau 1997, Vallet ManoleDompierre Dufour Guibault 2007, Picasso 2010.

M. Picasso Adaptive finite elements with large aspect ratio

Page 10: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

A posteriori error estimates

Isotropic meshes: ∃C1,C2 > 0 (dep. aspect ratio, indep. u, h)

C1η ≤ ‖∇(u − uh)‖L2(Ω) ≤ C2η + h.o.t.,

where the error estimator η is a computable quantity dep. on themesh size, the data and on uh.

Anisotropic meshes:

Kunert 2000: C2 depends on the alignement of the mesh with the(unknown) solution u.Picasso 2003, 2006: C1 and C2 indep. aspect ratio, u, h, providedthe error estimator is equidistributed in the directions of min. andmax. stretching.

M. Picasso Adaptive finite elements with large aspect ratio

Page 11: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Outline

A posteriori error estimates (iso and aniso) for the Laplace equationin the natural H1(Ω) norm.

The heat equation in the natural L2(0,T ; H1(Ω)) norm.

M. Picasso Adaptive finite elements with large aspect ratio

Page 12: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

A posteriori error estimates for the Laplace problem

Find u : Ω→ R such that

−∆u = f in Ω,

u = 0 on ∂Ω.

Let Th be a mesh of Ω into triangles K with diameter hK less than h.

Find uh ∈ Vh (continuous, piecewise linears) such that, for allvh ∈ Vh ∫

Ω

∇uh · ∇vh =

∫Ω

fvh.

M. Picasso Adaptive finite elements with large aspect ratio

Page 13: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

A posteriori error estimates for the Laplace problem

The classical procedure to obtain an explicit, residual based errorestimator is:∫

Ω

|∇(u − uh)|2 =

∫Ω

f (u − uh)−∫

Ω

∇uh · ∇(u − uh),

=

∫Ω

f (u − uh − vh)−∫

Ω

∇uh · ∇(u − uh − vh) ∀vh ∈ Vh,

=∑K∈Th

(∫K

(f + ∆uh)(u − uh − vh)

+1

2

∫∂K

[∇uh · n](u − uh − vh)

).

Use Cauchy-Schwarz inequality, take vh = Rh(u − uh) Clementinterpolant, use interpolation estimates to obtain ...

M. Picasso Adaptive finite elements with large aspect ratio

Page 14: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

A posteriori error estimates for the Laplace problem

|∇(u − uh)|2 ≤ CX

K∈Th

η2K ,

where, in the isotropic case (C depends on the aspect ratio)

η2K = h2

K‖f + ∆uh‖2L2(K) +

1

2|∂K | ‖[∇uh · n]‖2

L2(∂K),

and in the anisotropic case (C does not depend on the aspect ratio)

η2K =

‖f + ∆uh‖L2(K) +

1

2

„|∂K |

λ1,Kλ2,K

«1/2

‖[∇uh · n]‖2L2(∂K)

!„λ2

1,K

“~rT

1,KGK (u − uh)~r1,K

”+ λ2

2,K

“~rT

2,KGK (u − uh)~r2,K

”«1/2

.

K

~r1,K~r2,K

λ1,Kλ2,K

ZZ (Zienkiewicz-Zhu) post-processing to guess

GK (u − uh) =

0BBB@Z

∆K

„∂(u − uh)

∂x1

«2 Z∆K

∂(u − uh)

∂x1

∂(u − uh)

∂x2Z∆K

∂(u − uh)

∂x1

∂(u − uh)

∂x2

Z∆K

„∂(u − uh)

∂x2

«2

1CCCA.

M. Picasso Adaptive finite elements with large aspect ratio

Page 15: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

A posteriori error estimates for the Laplace problem

∫Ω

|∇(u − uh)|2 ≤ C∑K∈Th

η2K ,

Can we prove a lower bound ?

Yes in the isotropic case, but the constant depends on the aspectratio.

Yes in the anisotropic case, the constant does not depend on theaspect ratio provided, ∀K ∈ Th :

λ21,K

(~rT

1,KGK (u − uh)~r1,K

)' λ2

2,K

(~rT

2,KGK (u − uh)~r2,K

).

M. Picasso Adaptive finite elements with large aspect ratio

Page 16: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Adaptive finite elements

Goal: find Th such that:

0.75 TOL ≤

(∑K∈Th

η2K

)1/2

(∫Ω|∇uh|2

)1/2≤ 1.25 TOL.

Sufficient condition (NK is the number of triangles):

0.752TOL2∫

Ω|∇uh|2

NK≤ η2

K ≤1.252TOL2

∫Ω|∇uh|2

NK

Isotropic case: if ηK is too large, refine, too small, coarsen.

Anisotropic case: refine or coarsen in the directions of stretching,align the triangles with the eigenvectors of GK (u − uh).

Use the INRIA remeshing tools: BL2D (Laug Borouchaki) GHS(George Hecht Saltel) MMG3D (Dobrzynski Frey).

Alternative remeshing tools: Gruau Coupez 2005, CompereMarchandise Remacle 2008.

M. Picasso Adaptive finite elements with large aspect ratio

Page 17: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Adaptive meshes for the Laplace problem in 2D and 3D

2D: TOL = 0.25, 30 mesh generations, animation, zoom.

The effectivity index is aspect ratio independent on adapted meshes

TOL vertices error ei eiZZ asp. ratio0.125 854 0.25 2.70 1.00 262

0.0625 2793 0.13 2.75 0.99 2880.03125 10812 0.062 2.79 0.95 425

0.015625 42562 0.031 2.79 0.98 1199

3D: TOL = 0.25, 30 mesh generations, animation, zoom.

M. Picasso Adaptive finite elements with large aspect ratio

Page 18: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

A posteriori error estimates for the heat equation withspace discretization only

∂u

∂t−∆u = f in Ω× (0,T ).

Find uh : t → uh(·, t) ∈ Vh such that, for all t ∈ (0,T ), for allvh ∈ Vh ∫

Ω

∂uh

∂tvhdx +

∫Ω

∇uh · ∇vhdx =

∫Ω

fvhdx .

e = u − uh⟨∂e

∂t, e

⟩+

∫Ω

|∇e|2dx =

∫Ω

(f − ∂uh

∂t

)edx −

∫Ω

∇uh · ∇edx

=

∫Ω

(f − ∂uh

∂t

)(e−vh)dx−

∫Ω

∇uh ·∇(e−vh)dx ∀vh ∈ Vh.

Use Cauchy-Schwarz inequality, take vh = Rhe Clement interpolant,use interpolation estimates to obtain ...

M. Picasso Adaptive finite elements with large aspect ratio

Page 19: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

A posteriori error estimates for the heat equation withspace discretization only

1

2

(u − uh)2(T )dx +

Z T

0

|∇(u − uh)(t)|2dxdt

≤ 1

2

(u − uh)2(0)dx + C

Z T

0

XK∈Th

η2K ,

where, in the isotropic case (C depends on the aspect ratio)

η2K = h2

K‖f −∂uh

∂t+ ∆uh‖2

L2(K) +1

2|∂K | ‖[∇uh · n]‖2

L2(∂K),

and in the anisotropic case (C does not depend on the aspect ratio)

η2K =

‖f − ∂uh

∂t+ ∆uh‖L2(K) +

1

2

„|∂K |

λ1,Kλ2,K

«1/2

‖[∇uh · n]‖2L2(∂K)

!„λ2

1,K

“~rT

1,KGK (u − uh)~r1,K

”+ λ2

2,K

“~rT

2,KGK (u − uh)~r2,K

”«1/2

.

M. Picasso Adaptive finite elements with large aspect ratio

Page 20: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

The heat equation with Euler backward scheme

∂u

∂t−∆u = f in Ω× (0,T ).

For n = 1, ...,N, find unh ∈ Vh such that, for all vh ∈ Vh

1

τ

∫Ω

(unh − un−1

h )vhdx +

∫Ω

∇unh · ∇vhdx =

∫Ω

f nvhvdx .

Isotropic meshes: Picasso 1998, Verfurth 2003, Bergam BernardiMghazli 2004.

uhτ (x , t) =t − tn−1

τun

h(x) +tn − t

τun−1

h (x).∫Ω

∂uhτ

∂tvhdx +

∫Ω

∇uhτ · ∇vhdx

=

∫Ω

fvhdx +

∫Ω

(f n − f )vhdx + (tn − t)

∫Ω

∇∂uhτ

∂t· ∇vhdx .

M. Picasso Adaptive finite elements with large aspect ratio

Page 21: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

The heat equation with Euler backward scheme

e = u − uhτ⟨∂e

∂t, e

⟩+

∫Ω

|∇e|2dx

=

∫Ω

(f − ∂uhτ

∂t

)e dx −

∫Ω

∇uhτ · ∇edx

=

∫Ω

(f − ∂uhτ

∂t

)(e − vh) dx −

∫Ω

∇uhτ · ∇(e − vh)dx

+

∫Ω

(f − f n)vhdx + (tn − t)

∫Ω

∇∂uhτ

∂t· ∇vhdx .

Take vh = Rhe, use anisotropic interpolation estimates:

1

2

∫Ω

(u − uhτ )2(T )dx +

∫ T

0

∫Ω

|∇(u − uhτ )(t)|2dxdt

≤ 1

2

∫Ω

(u − uhτ )2(0)dx + CN∑

n=1

∑K∈Th

η2K ,n.

M. Picasso Adaptive finite elements with large aspect ratio

Page 22: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

The heat equation with Euler backward scheme

with C independent of u, the mesh size, time step, aspect ratio and

η2K ,n

=

∫ tn

tn−1

(∥∥∥∥f − ∂uhτ

∂t+ ∆uhτ

∥∥∥∥L2(K)

+1

2λ1/22,K

‖[∇uhτ · ~n]‖L2(∂K)

)(λ2

1,K

(~rT

1,KGK (u − uhτ )~r1,K

)+ λ2

2,K

(~rT

2,KGK (u − uhτ )~r2,K

))1/2

+ ‖f − f n‖2L2(K) + τ 2

n

∥∥∥∥∇∂uhτ

∂t

∥∥∥∥2

L2(K)

dt.

M. Picasso Adaptive finite elements with large aspect ratio

Page 23: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

The heat equation with Crank-Nicolson scheme

Optimal L2(H1) a posteriori error estimates for Crank-Nicolson timediscretization: Akrivis Makridadkis Nochetto, Math. Comp. 2006.

For n = 1, ...,N, find unh ∈ Vh such that, for all vh ∈ Vh

1

τ

∫Ω

(unh −un−1

h )vhdx +1

2

∫Ω

∇(un−1h +un

h) ·∇vhdx =1

2

∫Ω

(f n−1 + f n)vhdx .

uhτ (x , t) =t − tn−1

τun

h(x) +tn − t

τun−1

h (x).∫Ω

∂uhτ

∂tvhdx +

∫Ω

∇uhτ · ∇vhdx

=1

2

∫Ω

(f n−1 + f n)vhdx + (t − tn−1/2)

∫Ω

∇∂uhτ

∂t· ∇vhdx .

M. Picasso Adaptive finite elements with large aspect ratio

Page 24: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

The three points time reconstruction

Lozinski Prachittham Picasso SISC 2009.

Lagrange interpolant of degree 2: for tn−1 ≤ t ≤ tn

uhτ (x , t) =(t − tn−2)(t − tn−1)

(tn − tn−2)(tn − tn−1)un

h

+(t − tn)(t − tn−2)

(tn−1 − tn)(tn−1 − tn−2)un−1

h

+(t − tn)(t − tn−1)

(tn−2 − tn)(tn−2 − tn−1)un−2

h .

Or equivalently

uhτ (x , t) = uhτ (x , t) +1

2(t − tn−1)(t − tn)∂2

nuh,

∂2nuh =

unh − un−1

h

τ−

un−1h − un−2

h

ττ

.

M. Picasso Adaptive finite elements with large aspect ratio

Page 25: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Error indicator

Approach

Z T

t1

|∇(u − uhτ )|2 byNX

n=2

XK∈Th

η2K ,n with η2

K ,n =

Z tn

tn−1

( ‚‚‚‚f − ∂uhτ

∂t+ ∆uhτ

‚‚‚‚L2(K)

+1

2λ1/22,K

‖[∇uhτ · ~n]‖L2(∂K)

!„λ2

1,K

“~rT

1,KGK (u − euhτ )~r1,K

”+ λ2

2,K

“~rT

2,KGK (u − euhτ )~r2,K

”«1/2

+

‚‚‚‚f − „f n−1/2 + (t − tn−1/2)f n − f n−2

«‚‚‚‚2

L2(K)

+τ 4‚‚‚∇∂2

nuh

‚‚‚2

L2(K)

)dt.

M. Picasso Adaptive finite elements with large aspect ratio

Page 26: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Adaptive space-time algorithm

Choose the time step and the mesh size so that

0.875TOL ≤ ηspace + ηtime“R T

0

RΩ|∇uhτ |2 dx dt

”1/2≤ 1.125TOL.

Test case 1 Animation

Test case 2 Animation

TOL error eiZZ ei space ei time Vert N Gen. AR

0.125 0.03 0.99 2.87 2.68 155 142 84 630.0625 0.015 0.99 2.89 2.91 348 201 52 108

0.03125 0.0078 0.99 2.96 2.99 892 285 52 1650.015625 0.0040 1.00 2.88 2.71 4408 401 40 118

Conclusion: Vert = O(TOL−2) and N = O(TOL−1/2).

M. Picasso Adaptive finite elements with large aspect ratio

Page 27: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Conclusions

Adaptive finite elements with large aspect ratio → reduce thenumber of vertices.

Anisotropic interpolation estimates (Formaggia-Perotto, Kunert) +ZZ postprocessing → residual based, explicit anisotropic errorestimator for the H1 norm.

Effectivity index aspect ratio independent whenever the estimator isequidistributed in the direction of maximum and minimumstretching.

Applied to a wide range of elliptic and parabolic problems, very wellsuited for problems with boundary or internal layers.

M. Picasso Adaptive finite elements with large aspect ratio

Page 28: Adaptive finite elements with large aspect ratio: theory ...sma.epfl.ch/~picasso/quebec.pdf · Adaptive nite elements with large aspect ratio: theory and practice M. Picasso Mathematics

Perspectives

Goal oriented estimations → Formaggia, Micheletti, Perotto et al.

Residual based, implicit error estimators?

Numerical linear algebra with anisotropic meshes?

Hyperbolic problems? Compressible Navier-Stokes?

Interpolation error induced by remeshing?

M. Picasso Adaptive finite elements with large aspect ratio