m21.mws

mem1-2.mws   Vibrating of circular membrane (example2 for wave2-1.doc) - Standing Waves

>    restart;

>    with(plots):

Warning, the name changecoords has been redefined

>    a:=0.05;

a := .5e-1

>    r1:=1;

r1 := 1

Eigenvalues:

>    w(x):=BesselJ(0,x*r1);

w(x) := BesselJ(0,x)

>    plot(w(x),x=0..30);

[Maple Plot]

>    lambda:=array(1..50);

lambda := array(1 .. 50,[])

>    n:=1: for m from 1 to 300 do z:=fsolve(w(x)=0,x=m/10..(m+1)/10); if type (z,float) then lambda[n]:=z: n:=n+1 fi od:

>    for i to 5 do lambda[i] od;

2.404825558

5.520078110

8.653727913

11.79153444

14.93091771

>    N:=n-1;

N := 9

>    n:='n':i:='i':

Initial conditions:

>    f(r):=BesselJ(0,lambda[4]*r);

f(r) := BesselJ(0,11.79153444*r)

>    g(r):=0;

g(r) := 0

>    n:=4;

n := 4

Fourier coefficients:

>    b[n]:=int(r*f(r)*BesselJ(0,lambda[n]*r),r=0..r1)/int(r*BesselJ(0,lambda[n]*r)^2,r=0..r1);

b[4] := 1.000000000

>    d[n]:=int(r*g(r)*BesselJ(0,lambda[n]*r),r=0..r1)/int(r*BesselJ(0,lambda[n]*r)^2,r=0..r1)/a/lambda[n];

d[4] := 0.

>    u[n](r,t):=BesselJ(0,lambda[n]*r)*(b[n]*cos(lambda[n]*a*t)+d[n]*sin(lambda[n]*a*t));

u[4](r,t) := 1.000000000*BesselJ(0,11.79153444*r)*cos(.5895767220*t)

>    u(r,t):=u[n](r,t):

>    u(r,0):=subs(t=0,u(r,t)):

>    u(r,1):=subs(t=1,u(r,t)):

>    u(r,2):=subs(t=2,u(r,t)):

>    u(r,3):=subs(t=3,u(r,t)):

>    u(r,4):=subs(t=4,u(r,t)):

>    u(r,5):=subs(t=5,u(r,t)):

>    plot({f(r),u(r,0),u(r,1),u(r,2),u(r,3),u(r,4),u(r,5)},r=0..r1,color=black,axes=boxed);

[Maple Plot]

>    un(-r,t)=u(r,t):

>    T:=2*Pi/a/lambda[1];

T := 16.63322309*Pi

>    animate({un(-r,t),u(r,t)},r=-1..1,t=0..T,frames=100,color=blue,axes=boxed);

[Maple Plot]

>    cylinderplot([r,theta,u(r,5)],r=0..r1,theta=0..2*Pi,grid=[50,50]);

[Maple Plot]

>    animate3d([r,theta,u(r,t)],r=0..r1,theta=0..2*Pi,t=0..2*T,coords=cylindrical,style=patchnogrid,frames=100);

[Maple Plot]

>