clc; clear all ;
Lx=0.286;
Lz=0.198;
h=3.25e-3;
E=1.4e9 ;
M=265*h;
mu=0.3;
eta=4e-2;
x0=0.16;
z0=0.083;
F=1;
f=linspace(1000,1,10);
w=2*pi.*f;
t=1;
m=1:1000;
n=10;
func=zeros(n,length(m));
for i=1:n
func(i,:)=(i*pi./Lx).^2 +(m*pi/Lz).^2;
end
D=E*h^3/(12*(1-mu^2));
wnm=sqrt(D/M)*func;
vfunc=zeros(length(w),n,length(m));
for k=1:length(w)
for i=1:n
vfunc(k,i,:)= 1j*w(k)*((sin(i*pi*x0/Lx).*sin(m.*pi*z0./Lz)).^2./(-w(k)'.^2 ...
+wnm(i,:).^2.*(1+1j*eta))).*exp(1j.*w(k).*t);
end
end
v=(4/(Lx*Lz))*(F/M)*vfunc;
vSum=squeeze(sum(v,2));
RlvSum=sum(real(vSum),2);
figure('NumberTitle','off','Name','Velocity 0-1kHz')
plot(f,RlvSum);
xlabel('Frequency Hz')
ylabel('Velocity m/s')
xr=linspace(0,Lx,1000);
zr=linspace(0,Lz,1000);
wp=2*pi*500;
[X,Z]=meshgrid(xr,zr);
dfunc = zeros(1000,1000,10) ;
for n = 1:10
dfunc(:,:,i) = (sin(2.*pi*x0/Lx).*sin(m.*pi.*z0/Lz).*sin((n.*pi.*X)/Lx).*sin(m.*pi.*Z/Lz)).*exp(1j*wp*t)./(-wp^2+wnm(n,:).*(1+1j*eta));
end
dt1 = sum(dfunc,3) ;
ydt=(4/(Lx*Lz))*(F/M).*real(dt1);
figure('NumberTitle','off','Name','Displacment @ 500 Hz')
surf(X,Z,ydt,'EdgeColor','interp');
view(-90,90)
xlabel('Length')
zlabel('Displacement')
ylabel('Width')
colorbar
Best Answer