0% found this document useful (0 votes)
8 views17 pages

FEMWave Eq

Ecuacion de onda 1D elementos finitos

Uploaded by

Felipe Galarce
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
8 views17 pages

FEMWave Eq

Ecuacion de onda 1D elementos finitos

Uploaded by

Felipe Galarce
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 17

The Finite Element Method for the Wave Equation

The Wave Equation


We consider the scalar wave equation modelling acoustic wave propagation in a bounded domain 3 , with boundary : 1 2u c(x)2 t2 u = 0, in (0, T ), (1)

u(, 0) = 0, n u
1

u (, 0) = f, in , t = 0, on (0, T ),

where u(x, t) is the pressure and c(x) is the wave speed depending on x = (x1 , x2 , x3 ) , t is the time variable, T is a nal time, and f is a load vector.

Finite Element Discretization


We now formulate a nite element method for (1) based on using continuous piecewise linear functions in space and time. We discretise (0, T ) in the usual way denoting by Kh = {K } a partition of the domain into tetrahedra K (h = h(x) being a mesh function representing the local diameter of the elements), and we let Jk = {J } be a partition of the time interval (0, T ) into time intervals J = (tk1 , tk ] of uniform length = tk tk1 , k = 1, ..., N . To formulate the nite element method for (1) we introduce the nite u dened by : element space Wh Wu
u Wh

:= {u H 1 ( J ) : u(, 0) = 0, n u| = 0}, := {u W u : u|K J P1 (K ) P1 (J ), K Kh , J Jk }, (2)


3

where P1 (K ) and P1 (J ) are the set of piecewise linear functions on K and J , respectively.

Fully discrete scheme


To obtain discrete scheme we apply CG(1) in space and time and seek a u for u spanned by the functions discrete solution in the space Wh
N M

u(x, t) =
l=0 i=1

ul i i (x)l (t),

where i (x) and l (t) are standard continuous piecewise linear functions in space and time, respectively.

Substituting this into (1), we obtain the following system of linear equations: 1 k1 2 k 1 k+1 M (u 2u +u ) = F A( u + u + u ), k = 1, ..., N 1, 6 3 6 (3) with initial conditions :
k+1 k k1 2 k 2

u(0) =

u t

t=0

= 0.

(4)

Here, M is the mass matrix in space, A is the stiffness matrix, F k is the load vector at time level tk , k = 1, 2, 3 . . . , u is the unknown discrete eld values of u, and is the time step.

The explicit formulas for the entries in system (3) at each element e can be given as:
e Mi,j e Ki,j

1 = ( 2 i , j )e , c = ( i , j )e ,

(5)

Fje = (f, j )e , where (., .)e denotes the L2 (e) scalar product. The matrix Me is the contribution from element e to the global assembled matrix in space M , K e is the contribution from element e to the global assembled matrix K .

u u Wh is a nite dimensional vector space, dim Wh = M N , with a basis consisting of the standard continuous piecewise linear functions{i }M i=1 in space and hat functions {l }N l=1 in time, where: if t / [tl1 , tl+1 ], 0, tl1 (6) l (t) = tt , if t [tl1 , tl ], i tl1 tl+1 t if t [tl , tl+1 ]; tl+1 tl ,

l1

l+1

0 = t0

t1

tl1

tl

tl+1

tN +1 = T

The discrete system of equations


N Using basis of functions {i }M i=1 in space and {l }l=1 in time we have: N M uh = l=0 i=1 uh l i i (x)l (t). Substituting into (1) we get: N M

l=0 i=1 N M

uh l i

1 i (x) c2
tl+1

tl+1 tl1

l (t) v (x, t) dxdt t t (7)

+
l=0 i=1 T

uh l i
tl1

i (x)v (x, t)l (t) dxdt

=
0

u f (x)v (x, t) dxdt v Wh .

We take v (x, t) = j (x)m (t) and get:


N M

l=0 i=1 N M

uh l i

1 i (x)j (x) 2 c i (x)j (x)

tl+1 tl1

l (t) m (t) dxdt t t l (t)m (t) dxdt (8)

tl+1

+
l=0 i=1 T

uh l i

tl1

=
0

u f (x)v (x, t) dxdt v Wh .

10

Let U = uh l i denote the vector of unknown coefcients, M = (mij ), A = (aij ) are mass and stiffness matrices M M in space, correspondingly, with coefcients mij =

i (x)j (x) dx, (9) i (x)j (x) dx,

aij =

P = (plm ), K = (klm ) are stiffness and mass matrices N N in time with coefcients
tl+1

klm =
tl1 tl+1

l (t) m (t) dt, t t l (t)m (t) dt,

(10)

klm =
tl1

11

and the load vector b = (bjm ) with coefcients


tl+1

bjm =
tl1

f (x)j (x)m (t) dxdt.

(11)

12

First, we compute K = (klm ) and P = (plm ). Note, that klm = 0, plm = 0 unless l = m 1, l = m, l = m + 1. Using the denition of test functions (6), we compute rst diagonal elements kll :
tl+1

kll =
tl1 tl

l (t)l (t) dt 1
2 tl+1

=
tl1 tl+1

dt +
tl

dt =

2 ,

(12)

pll =
tl1 tl

l (t)l (t) dt t tl1


2 tl+1

=
tl1

dt +
tl

tl+1 t

dt =

2 , 3

13

Similarly,
tl+1

kl,l+1 =
tl1 tl+1

l (t)l+1 (t) dt 1 1 dt (13) l1 (t)l (t) dt


tl1 tl

=
tl

1 = ,
tl+1

kl1,l = =
tl1

1 1 dt

1 = . Verication: write (6) for l+1 and l1 and insert then into (14).
14

tl+1

pl,l+1 =
tl1 tl

l (t)l+1 (t) dt t tl t tl1 dt

=
tl 1

1 = , 6
tl+1

(14) l1 (t)l (t) dt

pl1,l =
tl1 tl+1

=
tl

tl t tl+1 t dt

1 . 6

Verication: write (6) for l+1 and l1 and insert then into (14).

15

We compute coefcients of b in the same way to get:


tm+1

bjm =
tm1

f (x)j (x)m (t) dxdt


tm

f (x)j (x)
tm1 tm+1

t tm1 dxdt tm+1 t dxdt

(15)

f (x)j (x)
tm

f (xj )j (x) dx.

16

We substitude computed coefcients to (8) and get the system of linear equations (3): M (uk+1 2uk + uk1 ) = 2 F k 1 2 1 A( uk1 + uk + uk+1 ), k = 1, ..., N 1. 6 3 6
2

(16)

To obtain an explicit scheme we approximate M with the lumped mass matrix M L in space, the diagonal approximation obtained by taking the row sum of M , as well use mass lumping in time by replacing the terms 1 k1 1 k+1 k +2 by uk . By multiplying (16) with (M L )1 we 6u 3u + 6u obtain an efcient explicit formulation: uk+1 = 2 F k + 2uk 2 (M L )1 K uk uk1 , k = 1, ..., N 1, (17)

17

You might also like