Worksheet: Bongo.mw
Solution to the Wave Equation in a Disc
In this worksheet we solve the radial wave equation for u(r,θ,t):
DE:
=
+
+
r<1
BC: u(1,θ,t)=0
IC: u(r,
,0)=f(r,θ)
(r,
,0)=0
Cylindrical coordinates
| > |
addcoords(z_cylindrical,[z,r,theta],[r*cos(theta),r*sin(theta),z]); |
I don't like typing BesselJZeros! Maple has a nice alias feature:
Eigenfunctions in the Disc
| > |
p:=3;q:=2; p is the angular mode number; q is the radial mode number |
| > |
R:=(p,q)->BesselJ(p,Z(p,q)*r); R(p,q) is the (p,q)-eigenfunction |
| > |
T:=(p,q)->cos(Z(p,q)*t); T(p,q) is the (p,q)- time function |
| > |
u:=(p,q)->R(p,q)*T(p,q)*cos(p*theta); |
| > |
Tmax:=evalf(2*Pi/Z(p,q));Let's graph a solution R[j]*T[j] |
| > |
animate3d(u(p,q),r=0..1,theta=0..2*Pi,t=0..Tmax,shading=zhue,style=patchnogrid,coords=z_cylindrical); |
Orthogonal Expansion of an Initial Condition
Now, let's expand the solution for a given initial condition f(r)*cos(theta)
| > |
plot(f(r),r=0..1,thickness=2); |
Compute the coefficients:
| > |
A:=n->int(r*f(r)*R(1,n),r=0..1)/int(r*R(1,n)^2,r=0..1); |
| > |
M1:=3; M is the number of terms in the expansion |
| > |
a:=seq(evalf(A(n)),n=1..M1); |
Approximate the Initial Condition
| > |
F:=sum(a[n]*R(1,n),n=1..M1); |
To see if we're on track lets plot the real initial data with its solution approximation (at t=0)
| > |
plot({f(r),F},r=0..1,thickness=2); |
Solution to the Wave Equation
| > |
u:=cos(theta)*sum(a[n]*T(1,n)*R(1,n),n=1..M1); |
| > |
animate3d(u,r=0..1,theta=0..2*Pi,t=0..5*2*Pi/Z(1,1),shading=zhue,style=patchnogrid,coords=z_cylindrical,frames=120); |