Underwater acoustics
API reference
soundspeed(temperature=27, salinity=35, depth=0; γ=0, cₐ=340, ρᵣ=1000)
Compute sound speed in water in m/s, given:
- water
temperaturein °C salinityin pptdepthin meters- void fraction (
γ) in bubbly water - sound speed in gas (
cₐ) ifγ> 0 - ratio of density of water to gas (
ρᵣ) ifγ> 0
Implementation based on Mackenzie (1981), Wood (1964) and Buckingham (1997).
shearspeed(c)
Compute shear wave speed based on compressional wave speed c using a regression relationship from Hamilton (1980).
absorption(frequency, distance=1000, salinity=35, temperature=27, depth=0, pH=8.1)
Compute volume acoustic absorption coefficient in water, given:
frequencyin Hzdistancein meterssalinityin ppt- water
temperaturein °C depthin meterspHof water
The result is a unitless linear scale factor for sound pressure over the given distance. To get absorption in terms of dB / m, set distance = 1.0 and convert the result to decibels. For instance, at a frequency of 100 kHz:
julia> A = absorption(100e3, 1.0)
0.9959084838594522
julia> α = -20log10(A)
0.035611359656810865
Implementation based on the Francois and Garrison (1982) model.
water_density(temperature=27, salinity=35)
Compute density of water (kg/m³), given temperature in °C and salinity in ppt.
Implementation based on Fofonoff (1985 - IES 80).
dBperλ(x)
Compute dimensionless absorption coefficient δ from dB/λ. Implementation based on APL-UW TR 9407 (1994), IV-9 equation (4).
in_dBperλ(δ)
Compute dB/λ from dimensionless absorption coefficient δ. Implementation based on APL-UW TR 9407 (1994), IV-9 equation (4).
reflection_coef(θ, ρᵣ, cᵣ, δ=0.0)
Compute complex reflection coefficient at a fluid-fluid boundary, given:
- angle of incidence
θ(angle to the surface normal) - relative density of the reflecting medium to incidence medium
ρᵣ - relative sound speed of the reflecting medium to incidence medium
cᵣ - dimensionless absorption coefficient
δ
Implementation based on Brekhovskikh & Lysanov. Dimensionless absorption coefficient based on APL-UW Technical Report 9407.
surface_reflection_coef(windspeed, frequency, θ)
Compute surface reflection coefficient, given:
windspeedin m/sfrequencyin Hz- angle of incidence
θ(angle to the surface normal)
Implementation based on the APL-UW Technical Report 9407 II-21.
bubble_resonance(radius, depth=0; γ=1.4, p₀=1.013e5, ρ=1022.72, g=9.80665)
Compute resonance frequency of a freely oscillating has bubble in water, given:
- bubble
radiusin meters depthof bubble in water in meters- gas ratio of specific heats ‘γ’
- atmospheric pressure ‘p₀’ in Pa
- density of water ‘ρ’ in kg/m³
- acceleration due to gravity ‘g’ in m/s²
This ignores surface-tension, thermal, viscous and acoustic damping effects, and the pressure-volume relationship is taken to be adiabatic. Implementation based on Medwin & Clay (1998).
doppler(speed, frequency)
doppler(speed, frequency, soundspeed)
Compute Doppler frequency, given relative speed between transmitter and receiver in m/s. soundspeed is the nominal sound speed in water.