FEMWave Eq
FEMWave Eq
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.
where P1 (K ) and P1 (J ) are the set of piecewise linear functions on K and J , respectively.
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
l=0 i=1 N M
uh l i
1 i (x) c2
tl+1
tl+1 tl1
+
l=0 i=1 T
uh l i
tl1
=
0
l=0 i=1 N M
uh l i
tl+1 tl1
tl+1
+
l=0 i=1 T
uh l i
tl1
=
0
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 =
aij =
P = (plm ), K = (klm ) are stiffness and mass matrices N N in time with coefcients
tl+1
klm =
tl1 tl+1
(10)
klm =
tl1
11
bjm =
tl1
(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
=
tl1
dt +
tl
tl+1 t
dt =
2 , 3
13
Similarly,
tl+1
kl,l+1 =
tl1 tl+1
=
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
=
tl 1
1 = , 6
tl+1
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
bjm =
tm1
f (x)j (x)
tm1 tm+1
(15)
f (x)j (x)
tm
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