• Non ci sono risultati.

CCM, Part III (3)

N/A
N/A
Protected

Academic year: 2021

Condividi "CCM, Part III (3)"

Copied!
17
0
0

Testo completo

(1)

CCM, Part III (3)

Daniele Boffi

Dipartimento di Matematica “F. Casorati”

Universit` a di Pavia boffi@dimat.unipv.it

http://www-dimat.unipv.it/boffi/

March 2004

(2)

Finite elements (cont’ed)

Generalization to more space dimensions

Example of unisolvent degrees of freedom

(3)

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

(4)

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

(5)

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 more popular elements.

Z

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

(6)

Finite elements (cont’ed)

General strategy for assembling the stiffness matrix and the load vector

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

I 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

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

I Account for boundary conditions

(7)

Finite elements (cont’ed)

Some remarks on the discrete linear system

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

I matrix is SPD (CG can be succesfully applied)

I conditioning of matrix grows as h goes to zero (need for

preconditioning)

(8)

Convection diffusion equation

As usual. . . a one dimensional example ( − εu 00 (x) + bu 0 (x) = 0 0 < x < 1

u(0) = 0, u(1) = 1

Non-homogeneous boundary conditions (!)

P´ eclet number P = |b|L/(2ε) (L = 1 in our case) Closed form solution can be explicitly computed

u(x) = exp(bx/ε) − 1

exp(b/ε) − 1

(9)

Convection diffusion equation (cont’ed)

u(x) = exp(bx/ε) − 1

exp(b/ε) − 1

(10)

If b/ε  1 then u(x) ' x

If b/ε  1 then u(x) ' exp(−b(1 − x)/ε)

In the second case, boundary layer of size O(ε/b)

(11)

Convection diffusion equation (cont’ed)

Approximation by finite elements

a(u, v) =

Z 1 0

(εu 0 (x)v 0 (x) + bu 0 (x)v(x)) dx

After some computations. . . stiffness matrix is (uniform mesh):

 b

2 − ε h



u i+1 + 2ε

h u i +



− b

2 − ε h



u i−1

Local P´ eclet number is P(h) = |b|h/(2ε), so that our system has the

structure

(12)

Convection diffusion equation (cont’ed)

(P(h) − 1)u i+1 + 2u i − (P(h) + 1)u i−1 = 0 General solution

u i =

1 −

 1+P(h) 1−P(h)

 i

1 −

 1+P(h) 1−P(h)

 N i = 1, . . . , N

If P(h) > 1 solution oscillates!

(13)

Stabilization techiniques

I Upwind (finite differences)

I Artificial viscosity, streamline diffusion (loosing consistency)

I Petrov–Galerkin, SUPG (strongly consistent)

(14)

Hyperbolic equations

Let’s consider the model problem (one dimensional convection equation)

∂u

∂t + a ∂u

∂x = 0, t > 0, x ∈ R u(x, 0) = u 0 (x), x ∈ R

Solution is a traveling wave u(x, t) = u 0 (x − at).

We consider a finite difference approximation.

(15)

Hyperbolic equations (cont’ed)

u n j ' u(x j , t n )

∂u

∂t + a ∂u

∂x = 0 u n+1 j = u n j − ∆t

∆x (h n j+1/2 − h n j−1/2 )

where h j+1/2 = h(u j , u j+1 ) is a numerical flux Indeed,

∂t U j = − (au)(x j+1/2 ) − (au)(x j−1/2 ) 

with U j =

Z x j+1/2

u, dx

(16)

Hyperbolic equations (cont’ed)

Courant–Friedrichs–Lewy (CFL) condition

a ∆t

∆x

≤ 1

Very clear geometrical interpretation (see also multidimensional extension and generalization to systems)

Remark: implicit schemes (in time) don’t have restrictions, but add

artificial diffusion

(17)

End of part III

Riferimenti

Documenti correlati

Voci dall'inferno (Italian Edition). Author: Joshua Levine. Binding: Kindle Edition. Iniziava nel luglio 1916 la Battaglia della Somme, tra le più lunghe della prima guerra mondiale,

optical properties of QD’s, relatively little is known on the influence of the dot-induced potentials on transport of electrons flowing in the neighborhood of dots, particularly,

Preliminaries and functional spaces: Hilbert spaces, multiplication opera- tors, Sobolev spaces, distributions, Gevrey spaces and Gevrey ultradistributions..

a symmetric and coercive implies A symmetric positive definite..

Dipartimento di Matematica

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

Sono attestati anche materiali in bronzo, in ambra, in pasta vitrea; quelli classificati come protostorici 123 sono stati rinvenuti soprattutto nella camera e nell' esedra

Skropeta, Colvin and Sladen S., (2014) have explored the benefits of participation in an intergenerational program in care settings for older people, in which the elderly, and people