<< Chapter < Page | Chapter >> Page > |
If we integrate the right hand side by parts and apply Dirichlet boundary conditions, we get
This form of the wave equation is called the equation's“weak form". Notice there is only one derivative with respect to on now. We now expand in the space spanned by our basis functions
Let for . Plugging this into the wave equation's weak form, we get the relation
Note that if we define a new“energy" inner product , we can then rewrite our whole relation as
for . Thus, we have unknowns along with linear equations; we can now formulate our problem as the matrix equation
where is the Gramian matrix created using regular inner products, and 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 into segments of the form , with , we can define these hat functions as
for .
Since the support of and overlap only if , most of the entries of and are automatically zero. For the rest of the terms, the inner products are easy to compute. If we take a uniform discretization of into these segments, with and , then for , , , , and . and are just
We can solve for our coefficients by rewriting as a system of equations
We can see the relation to the continuous system,
where is approximated by . With this discretization, we can numerically calculate the time solution of the wave equation given some initial condition, as well as approximate the eigenvalues .
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 is added to the equation
For the cases we consider here, we shall take , 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
we get
Taking an inner product with for leads us to the following discretization
We usually refer to the matrix as the damping matrix . Again, we can solve this by writing it out as a system of ordinary differential equations
Notification Switch
Would you like to follow the 'The art of the pfug' conversation and receive update notifications?