For an ideal gas; the speed of sound is mainly a function of temperature. Luckily for us on earth, the behaviour of air is very close to that of an ideal gas unless the temperature or pressure is very high or very low compared to standard sea level conditions, or my office. This is what the text books tell us, and I have no reason to doubt it.
Therefore the speed of sound c for an ideal gas, in our case air, is: -
c = g R T
where
c = Speed of sound in metres per second
g = Ratio of specific heats. For dry air g = 1.4 (non-dimensional)
R = Gas constant. For dry air, R = 286.9 N×m/(kg×K)
T = Absolute temperature (Kelvin), where 0°C = 273.16 K
For example, the speed of sound at room temperature (22°C, 71.6°F) is: -
c = 1.4 * (22 + 273.16) * 286.9 = 344.31 metres per second
The speed of sound also depends on the type of gas. Suppose we want to operate a sonar range finder on Mars! How can we determine the speed of sound there?
The atmosphere on Mars is approximately 95.3 % carbon dioxide (CO2). For CO2, the ratio of specific heat g equals 1.29, and the gas constant R equals 188.9 N×m/(kg×K). Assuming a pure CO2 atmosphere, the speed of sound at room temperature, which on Mars is considered a hot day, is as follows: -
c = 1.29 * (295.16) * 188.9 = 268 metres per second
Notice that neither pressure nor density appear in this equation. Even though surface pressure on Mars is only a tiny fraction of that on Earth, the low pressure has essentially no effect on the speed of sound in a gas.
Aptly named ‘Echo Ranging’ or SONAR does not exclusively require ultrasound, ‘during the war’, submarine detection was carried out by transmitting a relatively low frequency, but high amplitude ‘ping’ in the order of 2KHz. Any submarines in the proximity of the sound wave will reflect a portion of the sound back to the receiver. By moving the transmit/receive device named a transducer, the submarine’s bearing and approximate distance could be ascertained. However, as electronics gained more sophistication, it became possible to transmit and receive higher frequency sound. Coupled to that, the discovery that higher frequency sound had more directional properties and was able to carry more energy, produced the now very sophisticated fish finding SONAR carried by virtually all fishing vessels. And allows sunken ship wrecks to be pinpointed with impressive accuracy.
Uses for ultrasonic sound are constantly increasing and now number in their hundreds; ranging from medical to metallurgic, but even though the technology has moved forward, the principle stays the same.