/
water_viscosity_korson_1969.py
58 lines (49 loc) · 1.53 KB
/
water_viscosity_korson_1969.py
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
import warnings
from .._util import _any
A, B, C = 1.1709, 0.001827, 89.93
eta20_cP = 1.0020
def water_viscosity(T=None, eta20=None, units=None, warn=True):
"""Viscosity of water (cP) as function of temperature (K)
Parameters
----------
T : float
Temperature (in Kelvin) (default: 298.15 K)
eta20 : float
Viscosity of water at 20 degree Celsius.
units : object (optional)
object with attributes: kelvin & centipoise
warn : bool
Emit UserWarning when outside temperature range.
Returns
-------
Water viscosity at temperature ``T``.
"""
if units is None:
cP = 1
K = 1
else:
cP = units.centipoise
K = units.kelvin
if T is None:
T = 298.15 * K
if eta20 is None:
eta20 = eta20_cP * cP
t = T - 273.15 * K
if warn and (_any(t < 0 * K) or _any(t > 100 * K)):
warnings.warn("Temperature is outside range (0-100 degC)")
# equation (5) in the paper says "log" but they seem to mean "log10"
# when comparing with Table II.
return eta20 * 10 ** ((A * (20 - t) - B * (t - 20) ** 2) / (t + C))
reference = dict(
doi="10.1021/j100721a006",
url="https://doi.org/10.1021/j100721a006",
year=1969,
month="jan",
publisher="American Chemical Society ({ACS})",
volume=73,
number=1,
pages=(34, 39),
author="Lawrence Korson and Walter Drost-Hansen and Frank J. Millero",
title="Viscosity of water at various temperatures",
journal="The Journal of Physical Chemistry",
)