We define a frequency spectrum.
f is obviously the frequency, omega the pulsation.
f = [20:10:4000];
omega = 2*pi*f;
%%%%%
%%%%% Atmospheric conditions / constants
%%%%%
T0 = 20; % Celsius degrees
P0 = 101325; % Pa
%%%%%
%%%%% Do not modify anything below this line
%%%%% unless you understand what you're doing
%%%%%
% Compute air parameters related to room conditions
% (acknowledgment goes to Dominic Pilon,
% dominic.pilon@metafoam.com, for gathering almost all these
% expressions from the references below)
%
% References:
% Lide, D. R. and Kehiaian H. V.,
% CRC. Handbook of Thermophysical and Thermochemical Data,
% CRC. Press Inc, 1994
%
% Touloukian, Y. S. and Makita, T.,
% Specific Heat - Non metallic Liquids and gases,
% The TPRC Data Series, Volume 6, IFI/PLENUM, 1970
%
% Pierce, A. D.,
% Acoustics, An Introduction to Its Physical Principles and Applications
% Acoustical Society of America, 2nd edition, 1989
% Convert temperature from Celsius to Kelvin
T = 273.16+T0;
% Universal gas constant (J.K-1.kg-1) [also 8.314 J.mol-1.K-1]
R = 287.031;
% Specific heat at constant pressure (J.kg-1.K-1; 260 K < T < 600 K
Cp = 4168.8*(0.249679-7.55179e-5*T+1.69194e-7*T^2-6.46128e-11*T^3);
% Specific heat at constant volume (J.kg-1.K-1; 260 K < T < 600 K
Cv = Cp-R;
% Dynamic viscosity (N.s.m-2; 100 K < T < 600 K
eta = 7.72488e-8*T-5.95238e-11*T^2+2.71368e-14*T^3;
% Ratio of specific heats
gamma = Cp/Cv;
% Density of air (kg.m-3)
rho0 = P0/(R*T);
% Velocity of sound (m.s^-1)
c0 = sqrt(gamma*R*T);
% Thermal conductivity (W.m-1.K-1) - cf A. D. Pierce p 513
kappa = 2.624e-02 * ( (T/300)^(3/2) * (300+245.4*exp(-27.6/300))/(T+245.4*exp(-27.6/T)) );
% Prandtl's number
Pr = eta*Cp/kappa;