Created
February 17, 2018 01:39
-
-
Save dbetchkal/bc6b724e5c63786106f3559dd0ab6cf8 to your computer and use it in GitHub Desktop.
Acoustic Attenuation Due to Atmospheric Absorption, ISO 9613-1:1993
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a function that will return the atmospheric absorption coefficient, a in dB/m - given the frequency of interest and atmospheric state | |
def atm_abs(frequency, air_temp_celcius, percent_relative_humidity, atm_pressure): | |
import math | |
T_K = air_temp_celcius + 273.15 | |
psat = 101.325*math.pow(10, (-6.8346*math.pow(273.16/T_K, 1.261))+4.6151) # atmospheric saturation pressure | |
x = 1/(10*math.log(math.pow(math.exp(1),2), 10)) # 'equation shortener #1' | |
h = percent_relative_humidity*(psat/atm_pressure)/100 # molar concentration of water vapor | |
frO = (atm_pressure/101.325)*(24 + (4.04*math.pow(10, 4)*h*((0.02 + h)/(0.391 + h)))) # oxygen relaxation frequency | |
frN = (atm_pressure/101.325)*math.pow(T_K/293.15, -0.5)*(9 + (280 *h*math.exp(-4.17*(-1*math.pow(T_K/293.15, -1/3))))) # nitrogen relaxation frequency | |
z = 0.1068*math.exp(-3352/T_K)*math.pow((frN+math.pow(frequency,2))/frN, -1) # 'equation shortener #2' | |
y = math.pow(T_K/293.15, -5/2)*((0.01275*math.exp(-2239.1/T_K)*math.pow((frO+math.pow(frequency,2))/frO, -1))+z) # 'equation shortener #3' | |
# here's the atmospheric absorption coefficient, itself: | |
a = 8.686*math.pow(frequency,2)*(1.84*math.pow(10, -11)*math.pow(atm_pressure/101.325, -1)*math.pow(T_K/293.15,0.5)+y) | |
return a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment