0% found this document useful (0 votes)
44 views8 pages

5 Solutions PDF

The document discusses acoustic modes and pressure response in rectangular enclosures using modal analysis. It provides MATLAB code to calculate modal wave numbers, pressure response at different frequencies, and Green's function over a frequency range for a rigid-walled rectangular area with a point source excitation. Graphs of results are shown for pressure response at 310 Hz and Green's function versus frequency.

Uploaded by

Nandha Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views8 pages

5 Solutions PDF

The document discusses acoustic modes and pressure response in rectangular enclosures using modal analysis. It provides MATLAB code to calculate modal wave numbers, pressure response at different frequencies, and Green's function over a frequency range for a rigid-walled rectangular area with a point source excitation. Graphs of results are shown for pressure response at 310 Hz and Green's function versus frequency.

Uploaded by

Nandha Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Scanned by CamScanner

Scanned by CamScanner
Scanned by CamScanner
ACOUSTICS AND NOISE CONTROL

ASSIGNMENT - 5

1.

b. For a rigid walled rectangular area, some of the modes are shown below.

(10) mode

(21) mode

(32) mode
c.

Code:
x0=1.2;
y0=2.3;
xmode=20;
ymode=20;
f_exc = 310;
k_exc = 2*pi*f_exc/343;
Lx=5;
Ly=3;
area=Lx*Ly;

k = zeros(xmode+1,ymode+1);
C = zeros(xmode+1,ymode+1);

for l=0:1:xmode %modal wave number matrix


for m=0:1:ymode
k(l+1,m+1)=((l*pi/Lx)^2+(m*pi/Ly)^2)^0.5;
end
end;

for l=0:1:xmode %to get C values


for m=0:1:ymode
if(l==0&&m==0)
C(l+1,m+1)=area;
else if(l==0||m==0)
C(l+1,m+1)=area/2;
else C(l+1,m+1)=area/4;
end;
end;
end;
end;

A=zeros(xmode+1,ymode+1); %to get A values


for l=0:1:xmode
for m=0:1:ymode
A(l+1,m+1)=cos(l*pi*x0/Lx)*cos(m*pi*y0/Ly)/(C(l+1,m+1)*(k_exc^2-
k(l+1,m+1)^2));
end;
end;

x=linspace(0,Lx);
y=linspace(0,Ly);
[X,Y]=meshgrid(x,y);
p=0;

for l=0:1:xmode %computing total pressure


for m=0:1:ymode
p=p+(A(l+1,m+1)*cos(l*pi*X/Lx).*cos(m*pi*Y/5));
end;
end;

The pressure response at 310 Hz is given below:


d.

Code
x0=1.2;
y0=2.3;
xr=1.69;
yr=3.76;
xmode=20;
ymode=20;
f_exc = [250:5:500];
k_exc = 2*pi.*f_exc/343;
Lx=5;
Ly=3;
area=Lx*Ly;

g = zeros(length(f_exc));
k = zeros(xmode+1,ymode+1);
C = zeros(xmode+1,ymode+1);

for l=0:1:xmode %modal wave number matrix


for m=0:1:ymode
k(l+1,m+1)=((l*pi/Lx)^2+(m*pi/Ly)^2)^0.5;
end
end;

for l=0:1:xmode %C matrix


for m=0:1:ymode
if(l==0&&m==0)
C(l+1,m+1)=area;
else if(l==0||m==0)
C(l+1,m+1)=area/2;
else C(l+1,m+1)=area/4;
end;
end;
end;
end;
for i=1:1:length(f_exc) %computing Green's function for frequency range
A=zeros(xmode+1,ymode+1);

for l=0:1:xmode %computing A matrix for each frequency


for m=0:1:ymode
A(l+1,m+1)=cos(l*pi*x0/Lx)*cos(m*pi*y0/Ly)/(C(l+1,m+1)*(k_exc(i)^2-
k(l+1,m+1)^2));
end;
end;

for l=0:1:xmode %computing Green's function for each frequency


for m=0:1:ymode
g(i)=g(i)+A(l+1,m+1)*cos(l*pi*xr/Lx)*cos(m*pi*yr/Ly);
end;
end;
end;

Plot of Green’s function vs Frequency

e.

Code
xmode=20;
ymode=20;
f_exc = 366;
k_exc = 2*pi*f_exc/343;
Lx=5;
Ly=3;
area=Lx*Ly;
k = zeros(xmode+1,ymode+1);
C = zeros(xmode+1,ymode+1);

for l=0:1:xmode %modal wave number


for m=0:1:ymode
k(l+1,m+1)=((l*pi/Lx)^2+(m*pi/Ly)^2)^0.5;
end
end;
for l=0:1:xmode %C matrix
for m=0:1:ymode
if(l==0&&m==0)
C(l+1,m+1)=area;
else if(l==0||m==0)
C(l+1,m+1)=area/2;
else C(l+1,m+1)=area/4;
end;
end;
end;
end;

A=zeros(xmode+1,ymode+1);

for l=0:1:xmode %A matrix


for m=0:1:ymode
func = @(a) cos(m*pi*a/Ly);
A(l+1,m+1)=(-1^(l+1))*integral(func,0.75,2.25)/(C(l+1,m+1)*(k_exc^2-
k(l+1,m+1)^2));
end;
end;

x=linspace(0,Lx);
y=linspace(0,Ly);
[X,Y]=meshgrid(x,y);
p=0;

for l=0:1:xmode %computing total pressure


for m=0:1:ymode
p=p+(A(l+1,m+1)*cos(l*pi*X/Lx).*cos(m*pi*Y/5));
end;
end;

Pressure response at 366 Hz:

You might also like