Skip to content

Commit db22f9f

Browse files
committed
Remove speed of sound calculation function. Has been moved to pyfar.
1 parent 7c384ea commit db22f9f

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

pyrato/parametric.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,6 @@
66
import numpy as np
77
from typing import Union
88

9-
def calculate_speed_of_sound(temperature):
10-
r"""Calculate the speed of sound in air depending on the temperature.
11-
12-
Speed of sound is calculated as [#]_.
13-
14-
.. math::
15-
c = c_0 \sqrt{\frac{T - T_0}{20 - T_0}}
16-
.. math::
17-
T_0=-273.15
18-
.. math::
19-
c_0 = 343.2
20-
21-
Parameters
22-
----------
23-
temperature : double
24-
Temperature in degrees Celsius.
25-
26-
Returns
27-
-------
28-
speed_of_sound : double
29-
Speed of sound in m/s.
30-
31-
References
32-
----------
33-
.. [#] ISO 9613-1 (Formula A.5)
34-
"""
35-
if temperature < -273.15:
36-
raise ValueError(
37-
"Temperature must be greater than absolute zero (-273.15 °C).")
38-
T_0 = -273.15
39-
c_0 = 343.2
40-
speed_of_sound = c_0 * np.sqrt((temperature - T_0)/(20 - T_0))
41-
return speed_of_sound
42-
439

4410
def energy_decay_curve_analytic(
4511
surfaces, alphas, volume, times, source=None,

tests/test_speed_of_sound.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)