![]() Volume 9, Issue 3 Articles Tricks of the Trade In and Out Trott's Corner New Products New Publications Calendar News Bulletins New Resources Letters Classifieds Download This Issue Editorial Policy Staff and Contributors Submissions Subscriptions Advertising Back Issues Contact Information |
T R O T T ' S C O R N E R
Solving the Eigenvalue ProblemTo solve the Helmholtz equation for the drum, we will use a finite difference approximation of the Laplacian. To obtain a sufficient discretization, we subdivide the individual drum squares into rL points in each direction.
The two functions refinePolygon and refineEdge subdivide the squares that form the drum and the outer edges of the drum.
Here are the refined squares and the interior and boundary points of the discretized problem.
We will have to determine the function values for each eigenfunction at 28521 points.
Here is a graphic of the resulting discretized drum.
The following rules for testing and retrieving the boundary and interior points allow us to build the global finite differences easily and quickly. These rules also make it possible to quickly access the node number of a discretization point in the visualization functions to be defined later.
Next, we must approximate the second derivative at the grid points. The function stencilWeightList[
For instance, these are the weights for a stencil of length seven for the second derivative.
Now we assemble the system of coupled linear equations representing the approximations of the derivatives. The function addVertexWeights adds the contributions of the list of finite difference weights vws for each vertex.
For a given stencil of odd length
The resulting matrix approximates the negative Laplacian. It has 332637 nonvanishing entries.
The matrix is symmetric by construction.
And it is nicely banded.
Now we are in a position to calculate the eigenvalues and eigenfunctions. Here are the first few eigenvalues, which we reorder and scale.
|
||||||||
About Mathematica | Download Mathematica Player © 2005 Wolfram Media, Inc. All rights reserved. |