Sound speed in air. Cramer equation
Mathematical definition
$$\boxed{\begin{array}{l} C\left( {T,P,{X_w},{X_c}} \right) = {a_0} + {a_1}T + {a_2}{T^2} + \left( {{a_3} + {a_4}T + {a_5}{T^2}} \right){X_w}\\ + \left( {{a_6} + {a_7}T + {a_8}{T^2}} \right)P + \left( {{a_9} + {a_{10}}T + {a_{11}}{T^2}} \right){X_c}\\ + {a_{12}}{X_w}^2 + {a_{13}}{P^2} + {a_{14}}{X_c}^2 + {a_{15}}{X_w}P{X_c} \end{array}}$$
Notation | Description | Units | Limits | Conversion |
---|---|---|---|---|
$C$ | sound speed | $\text{m/s}$ | ||
$T$ | temperature | $^{\circ}\text{C}$ | $0 < T < 30$ | |
$P$ | pressure | $\text{kPa}$ | $75 < P < 102$ | $P\left[ {{\rm{Pa}}} \right] = P\left[ {{\rm{kPa}}} \right] \times {10^3}$ |
$X_{w}$ | water vapor mole fraction | $X_{w} < 0.06$ | ||
$X_{c}$ | carbon dioxide mole fraction |
$${p_{sv}} = 1{\rm{Pa}} \times \exp \left( {A{T_K}^2 + B{T_K} + C + \frac{D}{{{T_K}}}} \right)$$
$$f = \alpha + \beta P + \gamma {T^2}$$
$${x_v} = hf\left( {P,T} \right)\frac{{{p_{sv}}\left( T \right)}}{P}$$
Notation | Description | Units |
---|---|---|
$p_{sv}$ | saturation vapour pressure of moist air | $\text{Pa}$ |
$f$ | enhancement factor | |
$x_{v}$ | the mole fraction of water vapour | |
$h$ | relative humidity | $\text{\%}$ |
Coefficient | Value | Coefficient | Value |
---|---|---|---|
$a_{1}$ | $+331.5024$ | $a_{9}$ | $-85.20931$ |
$a_{2}$ | $+0.603055$ | $a_{10}$ | $-0.228525$ |
$a_{3}$ | $-0.000528$ | $a_{11}$ | $+5.91 \times 10^{-5}$ |
$a_{4}$ | $+51.471935$ | $a_{12}$ | $-2.835149$ |
$a_{5}$ | $+0.1495874$ | $a_{13}$ | $-2.15 \times 10^{-13}$ |
$a_{6}$ | $-0.000782$ | $a_{14}$ | $+29.179762$ |
$a_{7}$ | $-1.82 \times 10^{-7}$ | $a_{15}$ | $+0.000486$ |
$a_{8}$ | $+3.73 \times 10^{-8}$ |
Coefficient | Value | Units |
---|---|---|
$A$ | $+1.2378847 \times 10^{-5}$ | $\text{K}^{-2}$ |
$B$ | $-1.9121316 \times 10^{-2}$ | $\text{K}^{-1}$ |
$C$ | $+33.93711047$ | |
$D$ | $-6.3431645 \times 10^{3}$ | $\text{K}$ |
$\alpha$ | $+1.00062$ | |
$\beta$ | $+3.14 \times 10^{-8}$ | $\text{Pa}^{-1}$ |
$\gamma$ | $+5.6 \times 10^{-7}$ | $\text{K}^{-2}$ |
Octave/Matlab implementation
function C = sound_speed_air_cramer(T,RH,P)
% Inputs
% T: temperature \ degree Celsius \ 0 < T < 30
% RH: relative humidity \ percentage
% P: pressure \ kPa \ 75 < P < 102
% Outputs
% C: speed of sound in air \ m/s
T_kel = T + 273.15;
P = P*1e3;
A = +1.2378847e-5;
B = -1.9121316e-2;
C = +33.93711047;
D = -6.3431645e3;
alpha = 1.00062;
beta = 3.14e-8;
gamma = 5.6e-7;
Psv = exp(A*(T_kel.^2) + B*T_kel + C + D./T_kel);
F = alpha + beta*P + gamma*(T.^2);
H = RH.*F.*Psv./P;
Xw = H/100.0;
Xc = 400e-6;
a0 = 331.5024; a1 = 0.603055; a2 = -0.000528; a3 = 51.471935;
a4 = 0.1495874; a5 = -0.000782; a6 = -1.82e-7; a7 = 3.73e-8;
a8 = -2.93e-10; a9 = -85.20931; a10 = -0.228525; a11 = 5.91e-5;
a12 = -2.835149; a13 = -2.15e-13; a14 = 29.179762; a15 = 0.000486;
C = a0 + a1*T + a2*(T.^2) + (a3 + a4*T + a5*(T.^2)).*Xw ...
+ (a6 + a7*T + a8*(T.^2)).*P + (a9 + a10*T+a11*(T.^2)).*Xc ...
+ a12*Xw.^2 + a13*(P.^2) + a14*(Xc.^2) + a15.*Xw.*P.*Xc;
end
Computational examples
References
- Cramer, Owen, "The variation of the specific heat ratio and the speed of sound in air with temperature, pressure, humidity, and CO2 concentration", 1993
- Davis, Richard S, "Equation for the determination of the density of moist air (1981/91)", 1992
- Giacomo, P, "Equation for the determination of the density of moist air (1981)", 1982