Speed of Sound Calculator


The Java source code of this applet and its documentation are freely available.

Notes:

  • A programa calculates speed of sound for a temperature range of 0 to 30 degrees C and relative humidity 0 to 100% RH.

  • The algorithm is based on the approximate formula published in JASA [1993] by Owen Cramer, "The variation of the specific heat ratio and the speed of sound in air with temperature, pressure, humidity, and CO2 concentration."

    f (t, p, xw, xc) = a0 + a1 t + a2 t2 + (a3 + a4 t + a5 t2) xw + (a6 + a7 t + a8 t2) p + (a9 +a10 t +a11 t2) xc + a12 xw2 + a13  p2 + a14 xc2 + a15 xw p xc
    where the t is the celsius temperature, p is the pressure, xw is the water vapor mole fraction, and xc is the carbon dioxide mole fraction.
    The coefficients are:
    a0 = 331.5024
    a1 = 0.603 055
    a2 = -0.000 528
    a3 = 51.471 935
    a4 = 0.149 587 4
    a5 = -0.000 782
    a6 = -1.82 * 10-7
    a7 = 3.73 * 10-8
    a8 = -2.93 * 10-10
    a9 = -85.209 31
    a10 = -0.228 525
    a11 = 5.91 * 10-5
    a12 = -2.835 149
    a13 = -2.15 * 10-13
    a14 = 29.179 762
    a15 = 0.000 486

    xw = h f psv / p
    where h is the relative humidity expressed as a fraction, f is the enhancement factor, and psv is the saturation vapor pressure of water vapor in air.

    f = 1.000 62 + 3.14 * 10-8 p + 5.6 * 10-7 t2

    and

    psv = exp (1.281 180 5 * 10-5 T2 - 1.950 987 4 * 10-2 T + 34.049 260 34 - 6.353 631 1 * 103 / T) Pa
     

    The above equations are only valid over the temperature range 0 C to 30 C.

  • Reference: J.Acoust.Soc.Am.93(5) p2510-2616; formula at p2514.