考虑最简单情形:正方形膜 不考虑各种其他因素影响
from numpy import sin,cos,linspace,pi,meshgrid
import matplotlib.pyplot as plt
from scipy.special import jv
# In[1]
l=5
x=linspace(0,5,100)
y=linspace(0,5,100)
x,y=meshgrid(x,y)
fig = plt.figure()
def u_mn(x,y,m,n):
return cos(n*x*pi/l)*cos(m*y*pi/l)
i=0
for m in range(1,7):
n=m
ax= fig.add_subplot(231+i)
i+=1
u=u_mn(x,y,m,n)
ax.contourf(x,y,u)
cmarker=plt.contour(x,y,u,[0],colors='k')
# In[2]
l=5
x=linspace(0,5,100)
y=linspace(0,5,100)
x,y=meshgrid(x,y)
fig = plt.figure()
def u_mn(x,y,m,n):
return cos(n*x*pi/l)*cos(m*y*pi/l)
i=0
for m in range(1,4):
for n in range(1,4):
ax= fig.add_subplot(331+i)
u=u_mn(x,y,m,n)
ax.contourf(x,y,u)
cmarker=plt.contour(x,y,u,[0],colors='k')
i+=1
fig.tight_layout()
# In[3]
l=5
x=linspace(0,5,100)
y=linspace(0,5,100)
x,y=meshgrid(x,y)
fig = plt.figure()
def u_mn(x,y,m,n):
return cos(n*x*pi/l)*cos(m*y*pi/l)-cos(n*y*pi/l)*cos(m*x*pi/l)
i=0
for m in range(1,4):
for n in range(1,4):
ax= fig.add_subplot(331+i)
u=u_mn(x,y,m,n)
kk=ax.contourf(x,y,u)
cmarker1=plt.contour(x,y,u,[0],colors='k')
i+=1
fig.tight_layout()
# In[4]
l=5
x=linspace(0,5,100)
y=linspace(0,5,100)
x,y=meshgrid(x,y)
fig = plt.figure()
def u_mn(x,y,m,n):
return cos(n*x*pi/l)*cos(m*y*pi/l)+cos(n*y*pi/l)*cos(m*x*pi/l)
i=0
for m in range(1,4):
for n in range(1,4):
ax= fig.add_subplot(331+i)
u=u_mn(x,y,m,n)
ax.contourf(x,y,u)
cmarker=plt.contour(x,y,u,[0],colors='k')
i+=1
fig.tight_layout()
# In[5]
l=5
x=linspace(0,5,100)
y=linspace(0,5,100)
x,y=meshgrid(x,y)
fig = plt.figure()
def u_mn(x,y,m,n):
return sin(n*x*pi/l)*sin(m*y*pi/l)
i=0
for m in range(1,4):
for n in range(1,4):
ax= fig.add_subplot(331+i)
u=u_mn(x,y,m,n)
ax.contourf(x,y,u)
cmarker=plt.contour(x,y,u,[0],colors='k')
i+=1
fig.tight_layout()
# In[6]
a=5
phi=linspace(0,2*pi,100)
r=linspace(0,5,100)
phi,r=meshgrid(phi,r)
fig = plt.figure()
def u_m(phi,r,m):
return jv(m,r)*(cos(m*phi)+sin(m*phi))
i=0
for m in range(1,7):
ax= fig.add_subplot(231+i,projection='polar')
u=u_m(phi,r,m)
ax.contourf(phi,r,u)
# cmarker=plt.contour(phi,r,u,[0],colors='k')
i+=1
fig.tight_layout()
第二类边界条件取两方向模式数相同(1-5),即m=n:
第二类边界条件遍历两方向模式数(1-5):
第二类边界条件下简并模构成对称模:
第二类边界条件下简并模构成反对称模:
第一类边界条件下历两方向模式数(1-3):
圆形膜模式图: