• Non ci sono risultati.

CCM, Part II

N/A
N/A
Protected

Academic year: 2021

Condividi "CCM, Part II"

Copied!
76
0
0

Testo completo

(1)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

CCM, Part II

Daniele Boffi

Dipartimento di Matematica, Universit` a di Pavia http://www-dimat.unipv.it/boffi

Complexity and its Interdisciplinary Applications

(2)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Elliptic PDE’s

One dimensional model problem (Ω =]a, b[)

( − u 00 (x ) = f (x ) in Ω u(a) = u(b) = 0

Boundary value problem (other boundary conditions possible)

Generalization to Ω ∈ R d with boundary ∂Ω ( − ∆u = f in Ω

u = 0 on ∂Ω

Theorem: well-posedness (existence, uniqueness, stability)

(3)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Elliptic PDE’s

One dimensional model problem (Ω =]a, b[)

( − u 00 (x ) = f (x ) in Ω u(a) = u(b) = 0

Boundary value problem (other boundary conditions possible) Generalization to Ω ∈ R d with boundary ∂Ω

( − ∆u = f in Ω

u = 0 on ∂Ω

Theorem: well-posedness (existence, uniqueness, stability)

(4)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Elliptic PDE’s

One dimensional model problem (Ω =]a, b[)

( − u 00 (x ) = f (x ) in Ω u(a) = u(b) = 0

Boundary value problem (other boundary conditions possible) Generalization to Ω ∈ R d with boundary ∂Ω

( − ∆u = f in Ω

u = 0 on ∂Ω

Theorem: well-posedness (existence, uniqueness, stability)

(5)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences

Summary: easy to design (approximate derivatives with

difference quotients), easy to implement, very hard extension to general domains and boundary conditions

x 0 x 1 x 2 x 3 x 4 x 5

a h 3 b

Here N = 5, x 0 = a, x i = a +

i

P

j =1

h j , i = 1, . . . , N Denoting u i = u(x i ), u i 0 = u 0 (x i ), first finite difference is

u i 0 ' u i +1 − u i −1

h i + h i +1 second order accurate in h (consistent)

(6)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences

Summary: easy to design (approximate derivatives with

difference quotients), easy to implement, very hard extension to general domains and boundary conditions

x 0 x 1 x 2 x 3 x 4 x 5

a h 3 b

Here N = 5, x 0 = a, x i = a +

i

P

j =1

h j , i = 1, . . . , N Denoting u i = u(x i ), u i 0 = u 0 (x i ), first finite difference is

u i 0 ' u i +1 − u i −1

h i + h i +1 second order accurate in h (consistent)

(7)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences

Summary: easy to design (approximate derivatives with

difference quotients), easy to implement, very hard extension to general domains and boundary conditions

x 0 x 1 x 2 x 3 x 4 x 5

a h 3 b

Here N = 5, x 0 = a, x i = a +

i

P

j =1

h j , i = 1, . . . , N

Denoting u i = u(x i ), u i 0 = u 0 (x i ), first finite difference is u i 0 ' u i +1 − u i −1

h i + h i +1 second order accurate in h (consistent)

(8)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences

Summary: easy to design (approximate derivatives with

difference quotients), easy to implement, very hard extension to general domains and boundary conditions

x 0 x 1 x 2 x 3 x 4 x 5

a h 3 b

Here N = 5, x 0 = a, x i = a +

i

P

j =1

h j , i = 1, . . . , N Denoting u i = u(x i ), u i 0 = u 0 (x i ), first finite difference is

u i 0 ' u i +1 − u i −1

h i + h i +1 second order accurate in h (consistent)

(9)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences (cont’ed)

Approximation of second derivative

u i 00 ' u i +1/2 0 − u 0 i −1/2

h

i

+h

i +1

2

'

u

i +1

−u

i

h

i +1

u

i

−u h

i −1

i

h

i

+h

i +1

2

If h i = h (constant mesh size), simpler expression u 00 i ' u i −1 − 2u i + u i +1

h 2 second order consistent Our approximate equation at x i reads

−u i −1 + 2u i − u i +1

h 2 = f i , i = 1, . . . , N − 1

(10)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences (cont’ed)

Approximation of second derivative

u i 00 ' u i +1/2 0 − u 0 i −1/2

h

i

+h

i +1

2

'

u

i +1

−u

i

h

i +1

u

i

−u h

i −1

i

h

i

+h

i +1

2

If h i = h (constant mesh size), simpler expression u 00 i ' u i −1 − 2u i + u i +1

h 2 second order consistent Our approximate equation at x i reads

−u i −1 + 2u i − u i +1

h 2 = f i , i = 1, . . . , N − 1

(11)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences (cont’ed)

Approximation of second derivative

u i 00 ' u i +1/2 0 − u 0 i −1/2

h

i

+h

i +1

2

'

u

i +1

−u

i

h

i +1

u

i

−u h

i −1

i

h

i

+h

i +1

2

If h i = h (constant mesh size), simpler expression u 00 i ' u i −1 − 2u i + u i +1

h 2 second order consistent

Our approximate equation at x i reads

−u i −1 + 2u i − u i +1

h 2 = f i , i = 1, . . . , N − 1

(12)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences (cont’ed)

Approximation of second derivative

u i 00 ' u i +1/2 0 − u 0 i −1/2

h

i

+h

i +1

2

'

u

i +1

−u

i

h

i +1

u

i

−u h

i −1

i

h

i

+h

i +1

2

If h i = h (constant mesh size), simpler expression u 00 i ' u i −1 − 2u i + u i +1

h 2 second order consistent Our approximate equation at x i reads

−u i −1 + 2u i − u i +1

h 2 = f i , i = 1, . . . , N − 1

(13)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences (cont’ed)

Putting things together we are led to the linear system

 

 

 

 

 

 

 

 

 u 0 = 0

. . .

−u i −1 + 2u i − u i +1

h 2 = f i

. . . u N = 0

AU = F A = [tridiag(−1, 2, −1)]/h 2

(14)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite differences (cont’ed)

Putting things together we are led to the linear system

 

 

 

 

 

 

 

 

 u 0 = 0

. . .

−u i −1 + 2u i − u i +1

h 2 = f i

. . . u N = 0

AU = F A = [tridiag(−1, 2, −1)]/h 2

(15)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations

Need for more general formulations.

Let’s consider space V = H 0 1 (a, b) consisting of continuous functions on [a, b], piecewise differentiable with bounded derivative, and vanishing at endpoints.

Generalization to 2D requires Lebesgue integral and Hilbert spaces

H 1 (Ω) = {v ∈ L 2 (Ω) s.t. grad v ∈ L 2 (Ω)} where

L 2 (Ω) =



v : Ω → R integrable s.t. Z

v 2 < ∞



(16)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations

Need for more general formulations.

Let’s consider space V = H 0 1 (a, b) consisting of continuous functions on [a, b], piecewise differentiable with bounded derivative, and vanishing at endpoints.

Generalization to 2D requires Lebesgue integral and Hilbert spaces

H 1 (Ω) = {v ∈ L 2 (Ω) s.t. grad v ∈ L 2 (Ω)} where

L 2 (Ω) =



v : Ω → R integrable s.t. Z

v 2 < ∞



(17)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations

Need for more general formulations.

Let’s consider space V = H 0 1 (a, b) consisting of continuous functions on [a, b], piecewise differentiable with bounded derivative, and vanishing at endpoints.

Generalization to 2D requires Lebesgue integral and Hilbert spaces

H 1 (Ω) = {v ∈ L 2 (Ω) s.t. grad v ∈ L 2 (Ω)}

where

L 2 (Ω) =



v : Ω → R integrable s.t.

Z

v 2 < ∞



(18)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

Take our model equation, multiply by a generic v ∈ V (test function), and integrate over (a, b)

− Z b

a

u 00 (x )v (x ) dx = Z b

a

f (x )v (x ) dx

Integrating by parts gives Z b

a

u 0 (x )v 0 (x ) dx = Z b

a

f (x )v (x ) dx

a : V × V → R , F ∈ V

a(u, v ) = Z b

a

u 0 (x )v 0 (x ) dx , F (v ) = Z b

a

f (x )v (x ) dx

(19)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

Take our model equation, multiply by a generic v ∈ V (test function), and integrate over (a, b)

− Z b

a

u 00 (x )v (x ) dx = Z b

a

f (x )v (x ) dx

Integrating by parts gives Z b

a

u 0 (x )v 0 (x ) dx = Z b

a

f (x )v (x ) dx

a : V × V → R , F ∈ V

a(u, v ) = Z b

a

u 0 (x )v 0 (x ) dx , F (v ) = Z b

a

f (x )v (x ) dx

(20)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

Take our model equation, multiply by a generic v ∈ V (test function), and integrate over (a, b)

− Z b

a

u 00 (x )v (x ) dx = Z b

a

f (x )v (x ) dx

Integrating by parts gives Z b

a

u 0 (x )v 0 (x ) dx = Z b

a

f (x )v (x ) dx

a : V × V → R , F ∈ V

a(u, v ) = Z b

a

u 0 (x )v 0 (x ) dx , F (v ) = Z b

a

f (x )v (x ) dx

(21)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

Lax–Milgram Lemma

Find u ∈ V such that a(u, v ) = F (v ) ∀v ∈ V

This problem is well posed (exist., uniq., and stab.) provided

1 V Hilbert space

2 a bilinear, continuous, F linear, continuous

3 a coercive, that is there exists α > 0 s.t. a(v , v ) ≥ αkv k 2 V , ∀v ∈ V

kuk V ≤ 1

α kF k V

Stability estimate

(22)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

Lax–Milgram Lemma

Find u ∈ V such that a(u, v ) = F (v ) ∀v ∈ V

This problem is well posed (exist., uniq., and stab.) provided

1 V Hilbert space

2 a bilinear, continuous, F linear, continuous

3 a coercive, that is there exists α > 0 s.t.

a(v , v ) ≥ αkv k 2 V , ∀v ∈ V

kuk V ≤ 1

α kF k V

Stability estimate

(23)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

Lax–Milgram Lemma

Find u ∈ V such that a(u, v ) = F (v ) ∀v ∈ V

This problem is well posed (exist., uniq., and stab.) provided

1 V Hilbert space

2 a bilinear, continuous, F linear, continuous

3 a coercive, that is there exists α > 0 s.t.

a(v , v ) ≥ αkv k 2 V , ∀v ∈ V

kuk V ≤ 1

α kF k V

Stability estimate

(24)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

In our case hypotheses of LM Lemma OK (Poincar´ e inequality)

Remark

If f is smooth enough, the unique solution to weak formulation solves the original equation as well (strong solution)

More general situation

( − div(ε grad u) + ~ β · grad u + σu = f in Ω

u = 0 on ∂Ω

a(u, v ) = Z

ε grad u · grad v d x + Z

v ~ β · grad u d x + Z

σuv d x

(25)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

In our case hypotheses of LM Lemma OK (Poincar´ e inequality) Remark

If f is smooth enough, the unique solution to weak formulation solves the original equation as well (strong solution)

More general situation

( − div(ε grad u) + ~ β · grad u + σu = f in Ω

u = 0 on ∂Ω

a(u, v ) = Z

ε grad u · grad v d x + Z

v ~ β · grad u d x + Z

σuv d x

(26)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

In our case hypotheses of LM Lemma OK (Poincar´ e inequality) Remark

If f is smooth enough, the unique solution to weak formulation solves the original equation as well (strong solution)

More general situation

( − div(ε grad u) + ~ β · grad u + σu = f in Ω

u = 0 on ∂Ω

a(u, v ) = Z

ε grad u · grad v d x + Z

v ~ β · grad u d x + Z

σuv d x

(27)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

In our case hypotheses of LM Lemma OK (Poincar´ e inequality) Remark

If f is smooth enough, the unique solution to weak formulation solves the original equation as well (strong solution)

More general situation

( − div(ε grad u) + ~ β · grad u + σu = f in Ω

u = 0 on ∂Ω

a(u, v ) = Z

ε grad u · grad v d x + Z

v ~ β · grad u d x + Z

σuv d x

(28)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

In general problem in weak form, when a is symmetric, is equivalent to the following variational problem:

Find u ∈ V such that J(u) = min

v ∈V J(v ), J(v ) = 1

2 a(v , v ) − F (v )

In the one dimensional model problem, we have

J(v ) = 1 2

Z b a

(v 0 (x )) 2 dx − Z b

a

f (x )v (x ) dx

(29)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Weak formulations (cont’ed)

In general problem in weak form, when a is symmetric, is equivalent to the following variational problem:

Find u ∈ V such that J(u) = min

v ∈V J(v ), J(v ) = 1

2 a(v , v ) − F (v ) In the one dimensional model problem, we have

J(v ) = 1 2

Z b a

(v 0 (x )) 2 dx − Z b

a

f (x )v (x ) dx

(30)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (Galerkin method)

Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).

Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h Problem is solvable by Lax–Milgram

Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =

N

P

j =1

u j ϕ j Problem can be written: find u = {u j } s.t. for any i

a  X N

j =1

u j ϕ j , ϕ i 

= F (ϕ i )

(31)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (Galerkin method)

Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).

Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h

Problem is solvable by Lax–Milgram

Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =

N

P

j =1

u j ϕ j Problem can be written: find u = {u j } s.t. for any i

a  X N

j =1

u j ϕ j , ϕ i 

= F (ϕ i )

(32)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (Galerkin method)

Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).

Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h Problem is solvable by Lax–Milgram

Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =

N

P

j =1

u j ϕ j Problem can be written: find u = {u j } s.t. for any i

a  X N

j =1

u j ϕ j , ϕ i 

= F (ϕ i )

(33)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (Galerkin method)

Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).

Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h Problem is solvable by Lax–Milgram

Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =

N

P

j =1

u j ϕ j

Problem can be written: find u = {u j } s.t. for any i

a  X N

j =1

u j ϕ j , ϕ i 

= F (ϕ i )

(34)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (Galerkin method)

Consider a finite dimensional subspace V h ⊂ V (h refers to a mesh parameter).

Find u h ∈ V h such that a(u h , v h ) = F (v h ) ∀v h ∈ V h Problem is solvable by Lax–Milgram

Suppose that V h = span{ϕ 1 , . . . , ϕ N (h)}, so u h =

N

P

j =1

u j ϕ j Problem can be written: find u = {u j } s.t. for any i

a  X N

j =1

u j ϕ j , ϕ i 

= F (ϕ i )

(35)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Bilinearity of a gives

N

X

j =1

u j a(ϕ j , ϕ i ) = F (ϕ i ), i = 1, . . . , N

Let’s denote by A the stiffness matrix A ij = a(ϕ j , ϕ i ) and by b the load vector b i = F (ϕ i ). Then we have the matrix form of discrete problem

Au = b

a symmetric and coercive implies A symmetric positive definite

(36)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Bilinearity of a gives

N

X

j =1

u j a(ϕ j , ϕ i ) = F (ϕ i ), i = 1, . . . , N

Let’s denote by A the stiffness matrix A ij = a(ϕ j , ϕ i ) and by b the load vector b i = F (ϕ i ). Then we have the matrix form of discrete problem

Au = b

a symmetric and coercive implies A symmetric positive definite

(37)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Bilinearity of a gives

N

X

j =1

u j a(ϕ j , ϕ i ) = F (ϕ i ), i = 1, . . . , N

Let’s denote by A the stiffness matrix A ij = a(ϕ j , ϕ i ) and by b the load vector b i = F (ϕ i ). Then we have the matrix form of discrete problem

Au = b

a symmetric and coercive implies A symmetric positive definite

(38)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Existence and uniqueness (Lax–Milgram)

Convergence = Consistency + Stability

Stability:

ku h k V ≤ 1 α kF k V

Strong consistency

a(u − u h , v h ) = 0 ∀v h ∈ V h

(39)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Existence and uniqueness (Lax–Milgram) Convergence = Consistency + Stability

Stability:

ku h k V ≤ 1 α kF k V

Strong consistency

a(u − u h , v h ) = 0 ∀v h ∈ V h

(40)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Existence and uniqueness (Lax–Milgram) Convergence = Consistency + Stability

Stability:

ku h k V ≤ 1 α kF k V

Strong consistency

a(u − u h , v h ) = 0 ∀v h ∈ V h

(41)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Existence and uniqueness (Lax–Milgram) Convergence = Consistency + Stability

Stability:

ku h k V ≤ 1 α kF k V

Strong consistency

a(u − u h , v h ) = 0 ∀v h ∈ V h

(42)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Error estimate (C´ ea’s Lemma)

αku − u h k 2 V ≤ a(u − u h , u − u h ) = a(u − u h , u − v h )

≤ Mku − u h k V ku − v h k V

ku − u h k V ≤ M α inf

v ∈V

h

ku − v h k V Error bounded by best approximation

Need for good choice of V h !

(43)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Error estimate (C´ ea’s Lemma)

αku − u h k 2 V ≤ a(u − u h , u − u h ) = a(u − u h , u − v h )

≤ Mku − u h k V ku − v h k V

ku − u h k V ≤ M α inf

v ∈V

h

ku − v h k V

Error bounded by best approximation

Need for good choice of V h !

(44)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Error estimate (C´ ea’s Lemma)

αku − u h k 2 V ≤ a(u − u h , u − u h ) = a(u − u h , u − v h )

≤ Mku − u h k V ku − v h k V

ku − u h k V ≤ M α inf

v ∈V

h

ku − v h k V Error bounded by best approximation

Need for good choice of V h !

(45)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Moreover, when a is symmetric, we have the variational property

J(u h ) = min

v

h

∈V

h

J(v h )

Since V h ⊂ V , in particular, we have

J(u) ≤ J(u h )

(46)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Galerkin method (cont’ed)

Moreover, when a is symmetric, we have the variational property

J(u h ) = min

v

h

∈V

h

J(v h ) Since V h ⊂ V , in particular, we have

J(u) ≤ J(u h )

(47)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements

One dimensional p/w linear approximation.

Shape (or basis) func- tions: hat functions.

A finite element is defined by:

1 a domain (interval, triangle, tetrahedron,. . . ),

2 a finite dimensional (polynomial) space,

3 a set of degrees of freedom.

(48)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements

One dimensional p/w linear approximation.

Shape (or basis) func- tions: hat functions.

A finite element is defined by:

1 a domain (interval, triangle, tetrahedron,. . . ),

2 a finite dimensional (polynomial) space,

3 a set of degrees of freedom.

(49)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements

One dimensional p/w linear approximation.

Shape (or basis) func- tions: hat functions.

A finite element is defined by:

1 a domain (interval, triangle, tetrahedron,. . . ),

2 a finite dimensional (polynomial) space,

3 a set of degrees of freedom.

(50)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements

One dimensional p/w linear approximation.

Shape (or basis) func- tions: hat functions.

A finite element is defined by:

1 a domain (interval, triangle, tetrahedron,. . . ),

2 a finite dimensional (polynomial) space,

3 a set of degrees of freedom.

(51)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

One dimensional finite elements

1 domain: interval

2 space: P p

3 d.o.f.’s: depend on polynomial order linear element: endpoints (2)

quadratic element: endpoints + midpoint (3) . . .

Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.

ϕ(a j ) = α j , j = 1, . . . , N

(52)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

One dimensional finite elements

1 domain: interval

2 space: P p

3 d.o.f.’s: depend on polynomial order linear element: endpoints (2)

quadratic element: endpoints + midpoint (3) . . .

Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.

ϕ(a j ) = α j , j = 1, . . . , N

(53)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

One dimensional finite elements

1 domain: interval

2 space: P p

3 d.o.f.’s: depend on polynomial order

linear element: endpoints (2)

quadratic element: endpoints + midpoint (3) . . .

Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.

ϕ(a j ) = α j , j = 1, . . . , N

(54)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

One dimensional finite elements

1 domain: interval

2 space: P p

3 d.o.f.’s: depend on polynomial order linear element: endpoints (2)

quadratic element: endpoints + midpoint (3) . . .

Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.

ϕ(a j ) = α j , j = 1, . . . , N

(55)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

One dimensional finite elements

1 domain: interval

2 space: P p

3 d.o.f.’s: depend on polynomial order linear element: endpoints (2)

quadratic element: endpoints + midpoint (3) . . .

Set {a j } N j =1 of degrees of freedom is unisolvent, that is, given N numbers α 1 , . . . , α N , there exists a unique polynomial ϕ in P p s. t.

ϕ(a j ) = α j , j = 1, . . . , N

(56)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Approximation properties of one dimensional finite elements

v

h

inf ∈V

h

ku − v h k H

k

≤ Ch p+1−k |u| H

p+1

k = 0, 1

Remark on hp FEM

• Refine in h where solution is singular

• Refine in p where solution is regular

(57)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Approximation properties of one dimensional finite elements

v

h

inf ∈V

h

ku − v h k H

k

≤ Ch p+1−k |u| H

p+1

k = 0, 1

Remark on hp FEM

• Refine in h where solution is singular

• Refine in p where solution is regular

(58)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Approximation properties of one dimensional finite elements

v

h

inf ∈V

h

ku − v h k H

k

≤ Ch p+1−k |u| H

p+1

k = 0, 1

Remark on hp FEM

• Refine in h where solution is singular

• Refine in p where solution is regular

(59)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Generalization to more space dimensions

Example of unisolvent degrees of freedom

(60)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

How to construct stiffness matrix and load vector

In general one considers reference elements and mappings to actual elements

F

F

Notation: K ˆ reference element; K actual element ˆ

ϕ 1 , . . . ˆ ϕ N reference shape functions;

ϕ 1 , . . . ϕ N actual shape functions

(61)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

How to construct stiffness matrix and load vector

In general one considers reference elements and mappings to actual elements

F

F

Notation: K ˆ reference element; K actual element ˆ

ϕ 1 , . . . ˆ ϕ N reference shape functions;

ϕ 1 , . . . ϕ N actual shape functions

(62)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

How to construct stiffness matrix and load vector

In general one considers reference elements and mappings to actual elements

F

F

Notation: K ˆ reference element; K actual element

ˆ

ϕ 1 , . . . ˆ ϕ N reference shape functions;

ϕ 1 , . . . ϕ N actual shape functions

(63)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

How to construct stiffness matrix and load vector

In general one considers reference elements and mappings to actual elements

F

F

Notation: K ˆ reference element; K actual element ˆ

ϕ 1 , . . . ˆ ϕ N reference shape functions;

ϕ 1 , . . . ϕ N actual shape functions

(64)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

How to map the shape functions

F K : ˆ K → K , ~ x = F (ˆ ~ x ) ϕ(~ x ) = ˆ ϕ(F −1 (~ x ))

Example of computation of local stiffness matrix (one dimensional)

A ji = a(ϕ i , ϕ j ) = Z b

a

ϕ 0 i (x )ϕ 0 j (x ) dx = X

K

Z

K

ϕ 0 i (x )ϕ 0 j (x ) dx

Z

K

ϕ 0 i (x )ϕ 0 j (x ) dx = Z

K ˆ

ˆ ϕ 0 i (ˆ x ) F 0 (ˆ x )

ˆ ϕ 0 j (ˆ x )

F 0 (ˆ x ) F 0 (ˆ x ) d ˆ x = Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )

F 0 (ˆ x ) d ˆ x

(65)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

How to map the shape functions

F K : ˆ K → K , ~ x = F (ˆ ~ x ) ϕ(~ x ) = ˆ ϕ(F −1 (~ x ))

Example of computation of local stiffness matrix (one dimensional)

A ji = a(ϕ i , ϕ j ) = Z b

a

ϕ 0 i (x )ϕ 0 j (x ) dx = X

K

Z

K

ϕ 0 i (x )ϕ 0 j (x ) dx

Z

K

ϕ 0 i (x )ϕ 0 j (x ) dx = Z

K ˆ

ˆ ϕ 0 i (ˆ x ) F 0 (ˆ x )

ˆ ϕ 0 j (ˆ x )

F 0 (ˆ x ) F 0 (ˆ x ) d ˆ x = Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )

F 0 (ˆ x ) d ˆ x

(66)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

How to map the shape functions

F K : ˆ K → K , ~ x = F (ˆ ~ x ) ϕ(~ x ) = ˆ ϕ(F −1 (~ x ))

Example of computation of local stiffness matrix (one dimensional)

A ji = a(ϕ i , ϕ j ) = Z b

a

ϕ 0 i (x )ϕ 0 j (x ) dx = X

K

Z

K

ϕ 0 i (x )ϕ 0 j (x ) dx

Z

K

ϕ 0 i (x )ϕ 0 j (x ) dx = Z

K ˆ

ˆ ϕ 0 i (ˆ x ) F 0 (ˆ x )

ˆ ϕ 0 j (ˆ x )

F 0 (ˆ x ) F 0 (ˆ x ) d ˆ x = Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )

F 0 (ˆ x ) d ˆ x

(67)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) F 0 (ˆ x ) d ˆ x

In general, F = α + βˆ x is affine so that F 0 = β is constant (and equal to h)

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )

F 0 (ˆ ~ x ) dx = 1 h

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) dx

In more space dimensions, F is affine for most popular elements. Z

K

grad ϕ i (~ x ) · grad ϕ j (~ x ) d~ x =?

(68)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) F 0 (ˆ x ) d ˆ x

In general, F = α + βˆ x is affine so that F 0 = β is constant (and equal to h)

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )

F 0 (ˆ ~ x ) dx = 1 h

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) dx

In more space dimensions, F is affine for most popular elements. Z

K

grad ϕ i (~ x ) · grad ϕ j (~ x ) d~ x =?

(69)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) F 0 (ˆ x ) d ˆ x

In general, F = α + βˆ x is affine so that F 0 = β is constant (and equal to h)

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )

F 0 (ˆ ~ x ) dx = 1 h

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) dx

In more space dimensions, F is affine for most popular elements. Z

K

grad ϕ i (~ x ) · grad ϕ j (~ x ) d~ x =?

(70)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) F 0 (ˆ x ) d ˆ x

In general, F = α + βˆ x is affine so that F 0 = β is constant (and equal to h)

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x )

F 0 (ˆ ~ x ) dx = 1 h

Z

K ˆ

ˆ

ϕ 0 i (ˆ x ) ˆ ϕ 0 j (ˆ x ) dx

In more space dimensions, F is affine for most popular elements. Z

K

grad ϕ i (~ x ) · grad ϕ j (~ x ) d~ x =?

(71)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

General strategy for assembling stiffness matrix and load vector

• Loop over elements ie = 1, . . . , ne

• Compute local stiffness matrix A loc ji = a(ϕ i , ϕ j ), i , j = 1, . . . , ndof and local load vector F i loc = F (ϕ i ), i = 1, . . . , ndof

• Loop for i , j = 1, . . . , ndof and assembly of global matrix A iglob,jglob = A iglob,jglob + A loc ij

• Account for boundary conditions

(72)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

General strategy for assembling stiffness matrix and load vector

• Loop over elements ie = 1, . . . , ne

• Compute local stiffness matrix A loc ji = a(ϕ i , ϕ j ), i , j = 1, . . . , ndof and local load vector F i loc = F (ϕ i ), i = 1, . . . , ndof

• Loop for i , j = 1, . . . , ndof and assembly of global matrix A iglob,jglob = A iglob,jglob + A loc ij

• Account for boundary conditions

(73)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Some remarks on the discrete linear system

• matrix is sparse (sparsity pattern, so called skyline, can be determined a priori)

• matrix is SPD (CG can be succesfully applied)

• conditioning of matrix grows as h goes to zero (need for preconditioning)

End of part II

(74)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Some remarks on the discrete linear system

• matrix is sparse (sparsity pattern, so called skyline, can be determined a priori)

• matrix is SPD (CG can be succesfully applied)

• conditioning of matrix grows as h goes to zero (need for preconditioning)

End of part II

(75)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Some remarks on the discrete linear system

• matrix is sparse (sparsity pattern, so called skyline, can be determined a priori)

• matrix is SPD (CG can be succesfully applied)

• conditioning of matrix grows as h goes to zero (need for preconditioning)

End of part II

(76)

CCM, Part II Daniele Boffi

Elliptic PDE’s Finite differences Finite elements

Finite elements (cont’ed)

Some remarks on the discrete linear system

• matrix is sparse (sparsity pattern, so called skyline, can be determined a priori)

• matrix is SPD (CG can be succesfully applied)

• conditioning of matrix grows as h goes to zero (need for preconditioning)

End of part II

Riferimenti

Documenti correlati

A prospective trial tested this hypothesis and showed a reduction in mortality when supranormal oxygen transport values were used as endpoints for resuscitation of surgical

To provide a framework to better understand difficulties encountered using surrogate endpoints in cancer prevention trials, review of experience with surrogate endpoints in

Effect of alendronate on risk of fracture in women with low bone density but without vertebral fractures: results from the Fracture Intervention Trial. Predicting femoral neck

The rate of fracture would be too low, requiring a vast number of subjects in the study to demonstrate a significant treatment effect.. Acceptable to the scientific community

I Artificial viscosity, streamline diffusion (loosing consistency) I Petrov–Galerkin, SUPG (strongly consistent).. Hyperbolic

Dipartimento di Matematica

Remark: implicit schemes (in time) don’t have restrictions, but add artificial diffusion.. CCM, Part III

For the simpler case of Laplace operator in two dimensions the Virtual Element Method in the primal form (see 5 ) could be seen essentially as a re-formulation (in a simpler,