-
Notifications
You must be signed in to change notification settings - Fork 1
/
net.js
50 lines (47 loc) · 2.04 KB
/
net.js
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
import { round } from "../utilities/utilities.js";
/**
* Calculates the Normal Effective Temperature (NET). Missenard (1933)
* devised a formula for calculating effective temperature. The index
* establishes a link between the same condition of the organism's
* thermoregulatory capability (warm and cold perception) and the surrounding
* environment's temperature and humidity. The index is calculated as a
* function of three meteorological factors: air temperature, relative
* humidity of air, and wind speed. This index allows to calculate the
* effective temperature felt by a person. Missenard original equation was
* then used to calculate the Normal Effective Temperature (NET), by
* considering normal atmospheric pressure and a normal human body temperature
* (37°C). The NET is still in use in Germany, where medical check-ups for
* subjects working in the heat are decided on by prevailing levels of ET,
* depending on metabolic rates. The NET is also constantly monitored by the
* Hong Kong Observatory {@link #ref_16|[16]}. In central Europe the following thresholds are
* in use: <1°C = very cold; 1–9 = cold; 9–17 = cool; 17–21 = fresh;
* 21–23 = comfortable; 23–27 = warm; >27°C = hot [1].
*
* @public
* @memberof models
* @docname Normal Effective Temperature (NET)
*
* @param {number} tdb - dry bulb air temperature, [°C]
* @param {number} rh - relative humidity, [%]
* @param {number} v - wind speed [m/s] at 1.2 m above the ground
* @param {object} [options] - configuration options for the function.
* @param {boolean} [options.round = true] - If true, rounds output value. If
* false, it does not.
*
* @returns {number} Normal Effective Temperature, [°C]
*
* @example
* const result = net(37, 100, 0.1);
* console.log(result); // -> 37
*/
export function net(tdb, rh, v, options = { round: true }) {
const frac = 1.0 / (1.76 + 1.4 * v ** 0.75);
const et =
37 -
(37 - tdb) / (0.68 - 0.0014 * rh + frac) -
0.29 * tdb * (1 - 0.01 * rh);
if (options.round) {
return round(et, 1);
}
return et;
}