soundSpeed {sonicscrewdriver}R Documentation

Calculate the speed of sound in a medium

Description

Given sufficient parameters (i.e. wavelength and frequency, bulk modulus and density) this function calculates the speed of sound.

Usage

soundSpeed(
  medium = NULL,
  method = NULL,
  wl = NULL,
  f = NULL,
  bulkModulus = NULL,
  density = NULL,
  ...
)

Arguments

medium

Propagation medium (e.g. "air"), or "all" to return a list of all available media.

method

Use a specific method to calculate the speed of sound (see Details).

wl

Wavelength

f

Frequency

bulkModulus

Bulk modulus

density

Density

...

Additional parameters passed to the method.

Details

The speed of sound can be calculated using the following methods:

References

Cramer O (1993). “The variation of the specific heat ratio and the speed of sound in air with temperature, pressure, humidity, and CO2 concentration.” The Journal of the Acoustical Society of America, 93(5), 2510-2516. ISSN 0001-4966, doi:10.1121/1.405827.

Sueur J, Aubin T, Simonis C (2008). “Seewave, a free modular tool for sound analysis and synthesis.” Bioacoustics, 18(2), 213–226.

Examples

soundSpeed(medium="air")
soundSpeed(medium="sea water")

soundSpeed(method="cramer", temp=14, pressure=3, RH=10)
soundSpeed(method="cramer", temp=14, temp.unit="C", pressure=3, pressure.unit="kPa", RH=10)

t <- 1:30
s <- lapply(t, \(x){soundSpeed(method="cramer", temp=x)})

[Package sonicscrewdriver version 0.0.7 Index]