您的位置:首页 > 编程语言 > MATLAB

Matlab的logo是怎么来的? L形区域上的波动方程的解

2016-02-01 15:02 716 查看
下面是mathworks的头儿Cleve Moler写的文章

"L形区域上波动方程的特征函数"

不过, 我打算稍后用Mathematica新增加的功能来计算这个结果, 我看到这里提到mathematica的文档中已经添加了解决类似问题的例子.

注意到这还只是线性的偏微分方程,如果问题复杂一些,可能要手动完成很多转换工作,才能实现求解.

Wolfram你要加油,努力吧

The MathWorks Logo is an Eigenfunction of the Wave Equation

By Cleve Moler, MathWorks

We hope you’ve seen it many times. It’s on the covers of our books. It’s on our business cards and stationery. It’s even on a “sponsor a highway” sign on Route 9 in Natick,Massachusetts. But, do you really know what the logo is?

I’m talking about the L-shaped membrane.We’ve used various pictures of it ever since The MathWorks was founded almost twenty years ago, but it only recently became the official company logo. I’d like to tell you about its mathematical background.

The wave equation is a fundamental model in mathematical physics that describes how a disturbance travels through matter. If t is time and x and y are spatial coordinates with the units chosen so that the wave propagation speed is equal to one, then the
amplitude of a wave satisfies the partial differential equation



Periodic time behavior gives solutions of the form



The quantities λ are the eigenvalues and the corresponding functions
v(x,y) are the eigenfunctions or modes of vibration. They are determined by the physical properties, the geometry, and the boundary conditions of each particular situation. Any solution to the wave equation can be expressed as a linear
combination of these eigenfunctions. The square roots of the eigenvalues are resonant frequencies. A periodic external driving force at one of these frequencies will generate an unboundedly strong response in the medium.





Click on image to see enlarged view.

The L-shaped region formed from three unit squares is interesting for several reasons. It is one of the simplest geometries for which solutions to the wave equation cannot be expressed analytically, so numerical computation is necessary. The 270º nonconvex
corner causes a singularity in the solution.Mathematically, the gradient of the first eigenfunction is unbounded near the corner. Physically, a membrane stretched over such a region would rip at the corner. This singularity limits the accuracy of finite difference
methods with uniform grids.








Click on images to see enlarged view.

A ridged microwave waveguide-to-coax adapter and a contour plot of the electric field in the active region. Notice that one-fourth of the H-shaped channel is L-shaped. (Image courtesy of Advanced Technical Materials, Inc., www.atmmicrowave.com)

The simple physical situations involving waves on an L-shaped region include a vibrating L-shaped membrane, or tambourine, and a beach towel blowing in the wind, constrained by a picnic basket on onefourth of the towel. A more practical example involves
microwave waveguides. One such device is a waveguide-to-coax adapter. The active region is the channel with the H-shaped cross section visible at the end of the adapter. The ridges increase the bandwidth of the guide at the expense of higher attenuation and
lower power-handling capability. Symmetry about the dotted lines in the contour plot of the electric field in the channel implies that only one-quarter of the cross section needs to be modeled and that the resulting geometry is our L-shaped region. The boundary
conditions are not the same as the membrane problem, but the differential equation and the solution techniques are the same.

You can use classic finite difference methods to compute the eigenvalues and eigenfunctions of the L-shaped membrane in MATLAB with

n = 200

h = 1/n

A = delsq(numgrid('L',2*n+1))/h^2

lambda = eigs(A,12,0)

The resulting sparse matrix
A
has order 119201 and 594409 nonzero entries. The
eigs
function uses Arnoldi’s method from the MATLAB implementation of ARPACK to compute the first 12 eigenvalues. This takes only a little over a minute on a 1.4 GHz Pentium laptop. However, the corner singularity causes the computed
eigenvalues to be accurate to only three or four significant digits. If you try for more accuracy with a finer mesh and a larger matrix, you soon exceed half a gigabyte of main memory.

For the L-shaped membrane and similar problems, a technique using analytic solutions to the underlying differential equation is much more efficient and accurate than finite difference methods. The building blocks are the fractional order Bessel functions
and trig functions that yield eigenfunctions of circular sectors. Remember Pac-Man? How would Pac-Man vibrate? This simple graphics character from one of the earliest video games provides a two-dimensional test domain. When he was not chomping ghosts, Pac-Man
was three-quarters of the unit disc.With polar coordinates r and θ, and parameters
α and λ, the eigenfunctions of a circular sector are



The eigenvalues are determined by the requirement that θ = 0 vanish on the boundary of the sector. For Pac-Man, the straight edges have
v(r,θ) and θ = 3π/2, so we can satisfy the boundary conditions on these edges by choosing α to be an integer multiple of two-thirds,



The circular portion of the boundary has r = 1, so we can satisfy the boundary conditions on the circle by taking
λ to be a square of a zero of a Bessel function,



Contour plots of the first six eigenfunctions show that two are symmetric about the center line,
θ = 3π/4 two are antisymmetric about the center line, and two are eigenfunctions of the quarter disc, reflected twice to fill out the entire region. Linear combinations of these circular sector basis functions provide accurate approximations to the
eigenvalues and eigenfunctions of other regions with corners. Let



These functions are exact solutions to the eigenvalue differential equation. They also satisfy the boundary conditions on the two edges that meet at the origin. All that remains is to pick
λ and the cj ’s so that the boundary conditions on the remaining edges are satisfied.

A least squares approach employing the matrix singular value decomposition is used to determine
λ and the cj ’s. Pick m points, riθi on the remaining edges of the boundary. Let
n be the number of fundamental solutions to be used. Define an m-by-n matrix
A with elements that depend upon λ,



Then, for any vector c, the vector Ac is the vector of boundary values,
v(riθi). We want to make ||Ac||small without making ||c|| small. The SVD does this job. Let
σn(A(λ)) denote the smallest singular value of the matrix
A(λ) and let λk denote the values of (λ) that produce local minima of the smallest singular value,



Each (λ)k approximates an eigenvalue of the region. The
n-th column of the corresponding matrix V from the singular value decomposition provides the coefficient vector
c for the linear combination.

The MATLAB function
membrane
uses an older version of this algorithm to compute eigenfunctions of the L-shaped membrane. Contour plots of the first six eigenfunctions show that the first, fifth, and sixth are symmetric about the
center line; the second and fourth are antisymmetric about the center line; and the third is actually the first eigenfunction of a unit square, reflected into the other two squares.

The MATLAB function
logo
generates our company logo, a lighted, reflective, surface plot of a variant of the first eigenfunction. After being so careful to satisfy the boundary conditions, the logo uses only the first two terms
in the sum. This artistic license gives the edge of the logo a more interesting, curved shape.





Click on images to see enlarged view.

First six eigenfunctions of three-quarters of the disc.





Click on images to see enlarged view.

First six eigenfunctions of the L-shaped domain.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: