-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathproper_speed_of_sound_calculator.html
125 lines (110 loc) · 4.36 KB
/
proper_speed_of_sound_calculator.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<head>
<title>Proper speed of sound in water calculator</title>
<link href="style.css" rel="stylesheet" type="text/css">
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(28716631, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/28716631" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<script src="https://ucnl.github.io/UCNLPhysics/JS/ucnlphysics.js" type="text/javascript"></script>
<script type="text/javascript">
function onInput() {
var t_in = document.getElementById("t_C_input");
var p_in = document.getElementById("P_mBar_input");
var s_in = document.getElementById("s_PSU_input");
var res;
if ((p_in.validity.valid) && (!p_in.validity.valueMissing) &&
(s_in.validity.valid) && (!s_in.validity.valueMissing) &&
(t_in.validity.valid) && (!t_in.validity.valueMissing)) {
res = PHX_speed_of_sound_UNESCO_calc(t_in.value, p_in.value, s_in.value).toFixed(3);
}
else {
res = "error"
}
document.getElementById("v_mps_out").innerText = res;
}
</script>
</head>
<body>
<h1>Proper water properties calculator: Speed of sound in water</h1>
<hr>
<p>
<i>God speed on your way! (C) An archaic expression<br></i>
</p>
<h2>0. Brief description. Very basic theory.</h2>
In real-world applications, speed of sound in water is a function of water
temperature <b><i>t</i></b>, water salinity <b><i>s</i></b> and hydrostatic
pressure <b><i>P</i></b>. The range of these three parameters in most of Earth's
water bodies varies from -2 to 40°C for temperature, 0..42 PSU for salinity, and
from ~1 to 1100 bar for pressure. So, the speed of sound varies from approximately
1400 m/s in cold freshwater under low pressure to up to 1700 m/s in warm saline
water under high pressure. There is a lot slightly different empiric equations
for estimation of the speed of sound in water, obtained from big datasets of
measurements. One can find it in works, listed
<a href="http://resource.npl.co.uk/acoustics/techguides/soundseawater/refs.html">here</a>.
Here we use the equation from the work of Chen and Millero<a href="#footnote1">[1]</a>
pp 1129-1135, so-called UNESCO Equation. It uses pressure rather than depth as a parameter.
It is more convenient since the depth itself cannot be measured directly in most cases.
<h2>1. Calculation</h2>
<table id="in_values_tbl">
<tr>
<th>Parameter</th>
<th>Notation</th>
<th>Value</th>
<th>Range</th>
<th>Units</th>
</tr>
<tr>
<td>Water temperature</td>
<td><b><i>t</i></b></td>
<td><input type="number" step="0.01" value="10" min="-2" max="40" name="t_C" id="t_C_input" oninput="onInput()"></td>
<td>-2 .. 40</td>
<td>°C</td>
</tr>
<tr>
<td>Hydrostatic pressure</td>
<td><b><i>P</i></b></td>
<td><input type="number" step="0.01" value="100000" min="1000" max="1200000" name="P_mBar" id="P_mBar_input" oninput="onInput()"></td>
<td>10<sup>3</sup> .. 10<sup>6</sup></td>
<td>mBar</td>
</tr>
<tr>
<td>Water salinity</td>
<td><b><i>s</i></b></td>
<td><input type="number" step="0.1" value="38" min="0" max="42" name="s_PSU" id="s_PSU_input" oninput="onInput()"></td>
<td>0 .. 42</td>
<td>PSU</td>
</tr>
<tr>
<td>Speef of sound</td>
<td><b><i>v</i></b></td>
<td><b><a id="v_mps_out"></a></b></td>
<td></td>
<td>m/s</td>
</tr>
</table>
<br>
<hr>
<ol>
<li id="footnote1"><a href="https://asa.scitation.org/doi/10.1121/1.381646">C-T. Chen and F.J. Millero, Speed of sound in seawater at high pressures (1977) J. Acoust. Soc. Am. 62(5)</a>.
</ol>
<p>This calculator is made with <a href="https://github.com/ucnl/UCNLPhysics">UCNLPhysics</a> free and open source library.</p>
<hr>
<a href="https://docs.unavlab.com/online_utilities_en.html">Back to Online Utilities page</a>
<hr>
(C) Alek Dikarev, 2020<br>
For bug reports, suggestions and questions, please feel free to <a href="https://github.com/AlekUnderwater">reach me</a><br>
<script type="text/javascript">
onInput();
</script>
</body>
</html>