<< Chapter < Page Chapter >> Page >
0 u t t v d x = 0 u x x v d x

If we integrate the right hand side by parts and apply Dirichlet boundary conditions, we get

0 u t t v d x = - 0 u x v x d x

This form of the wave equation is called the equation's“weak form". Notice there is only one derivative with respect to x on u ( x , t ) now. We now expand u ( x , t ) in the space spanned by our basis functions

u N ( x , t ) = j = 1 N c j ( t ) φ j ( x )

Let v ( x ) = φ i ( x ) for i { 1 , 2 , ... , N } . Plugging this into the wave equation's weak form, we get the relation

j = 1 N c j ' ' ( t ) 0 φ i ( x ) φ j ( x ) d x = j = 1 N c j ( t ) 0 φ i ' ( x ) φ j ' ( x ) d x

Note that if we define a new“energy" inner product a u , v u x , v x , we can then rewrite our whole relation as

j = 1 N c i ' ' ( t ) φ i , φ j = j = 1 N c i ( t ) a φ i , φ j

for i = 1 , 2 , ... , N . Thus, we have N unknowns along with N linear equations; we can now formulate our problem as the matrix equation

M c ' ' = K c

where M is the Gramian matrix created using regular inner products, and K is the Gramian matrix resulting from energy inner products.

Using the finite element method, we choose our basis functions to be piecewise linear“hat" functions. If we partition the space [ 0 , ] into n segments of the form [ x k - 1 , x k ] , with x 1 < x 2 < ... < x N , we can define these hat functions as

φ k ( x ) = x - x k - 1 x k - x k - 1 if x [ x k - 1 , x k ] , x k + 1 - x x k + 1 - x k if x [ x k , x k + 1 ] , 0 otherwise

for k = 1 , ... , N .

A hat function centered at x = . 6 with a step size h = . 2 .

Since the support of φ i and φ j overlap only if | i - j | 1 , most of the entries of M and K are automatically zero. For the rest of the terms, the inner products are easy to compute. If we take a uniform discretization of [ 0 , 1 ] into these n segments, with h = 1 / ( N + 1 ) and x k = k h , then for | i - j | = 1 , φ i , φ i = 2 h / 3 , φ i , φ j = h / 6 , a φ i , φ j = 1 / h , and a φ i , φ i = - 2 / h . M and K are just

M = h 6 4 1 1 4 1 1 4 , K = 1 h - 2 1 1 - 2 1 1 - 2

We can solve for our coefficients c by rewriting M c ' ' = K c as a system of equations

c ' = d d ' = M - 1 K c
t c d = 0 I M - 1 K 0 c d

We can see the relation to the continuous system,

t u v = 0 I 2 x 2 0 u v

where 2 x 2 is approximated by M - 1 K . With this discretization, we can numerically calculate the time solution of the wave equation given some initial condition, as well as approximate the eigenvalues λ .

Damping

A closely related equation is the wave equation with viscous damping (resulting from a viscous medium in which the string vibrates, i.e. air). To simulate this effect, a velocity-dependent damping function a ( x ) is added to the equation

2 u t 2 = 2 u x 2 - 2 a ( x ) u t

For the cases we consider here, we shall take a ( x ) = a , some constant.

Thankfully, the finite element discretization of this equation doesn't involve much new work; all we do is reuse some of our calculations. If we make the substitution for u

u N = j = 1 N c j ( t ) φ j ( x )

we get

j = 1 N c j ' ' ( t ) φ j ( x ) = j = 1 N c j ( t ) φ j ' ' ( x ) - 2 a j = 1 N c j ' ( t ) φ j ( x )

Taking an inner product with φ k for k = 1 , 2 , ... , N leads us to the following discretization

M c ' ' = K c - 2 a M c '

We usually refer to the matrix - 2 a M as the damping matrix G . Again, we can solve this by writing it out as a system of ordinary differential equations

c ' = d d ' = M - 1 K c - M - 1 G
t c d = 0 I M - 1 K M - 1 G c d
Eigenvalues computed from a finite element discretization of a simple string. The progression of the eigenvalues as a grows is towards the left and towards the real axis

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, The art of the pfug. OpenStax CNX. Jun 05, 2013 Download for free at http://cnx.org/content/col10523/1.34
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'The art of the pfug' conversation and receive update notifications?

Ask