This is my code that you see here: function Visous_Inertial_Thermal_Dissipation_
ID: 3619978 • Letter: T
Question
This is my code that you see here:function Visous_Inertial_Thermal_Dissipation_Model( L,a,d,Q )
% This program computes the absorption coefficients over a desired range of frequencies of a uniform porous celullar
% solid based on Biot/Zwikker-Kosten single porosity model. Where L is the
% thickness of the sample, a is the pore size, d is the size of the air gap
% behind the sample and Q is the porosity.
for f=100:100:1000;
u=1.9e-05;
x=(8*u)/a^2;
G=1.4;
Pr=.702;
Po=101320;
qo=1.2;
Ua=((4*pi*qo*f)/(x))^(1/2);
za=(1+i)*Ua;
Ja=besselj(1,za);
Fa=(2*Ja)/((1+i)*Ua*Ja);
pw=(qo/Q)/(1-Fa);
Ub=(Pr*Ua);
zb=(1+i)*Ub;
Jb=besselj(0,zb);
Fb=(2*Jb)/((1+i)*Ub*Jb);
kw=(G*Po/Q)/(1+(G-1)*Fb);
Zw=(pw*kw)^(1/2);
mw=i*2*pi*f*(pw/kw)^(1/2);
co=343;
Zr=-(qo*co)*i*cot((2*pi*f*d)/(co));
Zs=Zw*((Zr*cosh(mw*L)+Zw*sinh(mw*L))/(Zr*sinh(mw*L)+Zw*cosh(mw*L)));
Zo=qo*co;
alpha=1-abs((Zs-Zo)/(Zs+Zo))^(2)
end
When I enter this into Matlab I get this:
EDU>> Visous_Inertial_Thermal_Dissipation_Model(.025,.0005,0.005,.61)
alpha =
0.0397
alpha =
0.0571
alpha =
0.0719
alpha =
0.0861
alpha =
0.1006
alpha =
0.1159
alpha =
0.1324
alpha =
0.1505
alpha =
0.1705
alpha =
0.1925
How do I get the answers for alpha into a matrix? I know ten results doesnt seem like much, but I actually need it for f = 20:1:20000.
Explanation / Answer
Somewhere near the start do: alpha=[]; then instead of alpha = 1-abs((Zs-Zo)/(Zs+Zo))^(2) do: alpha = [alpha, 1-abs((Zs-Zo)/(Zs+Zo))^(2)]; that will just keep appending values to the end of the alpha array. then after you run it you could get the data you wanted with: alpha(20:1:20000)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.