-
Notifications
You must be signed in to change notification settings - Fork 1
/
wc.js
34 lines (33 loc) · 1.73 KB
/
wc.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
import { round } from "../utilities/utilities.js";
/**
* Calculates the Wind Chill Index (WCI) in accordance with the ASHRAE 2017 Handbook Fundamentals - Chapter 9 {@link #ref_18|[18]}.
*
* The wind chill index (WCI) is an empirical index based on cooling measurements taken on a cylindrical flask partially
* filled with water in Antarctica (Siple and Passel 1945). For a surface temperature of 33°C, the index describes the
* rate of heat loss from the cylinder via radiation and convection as a function of ambient temperature and wind velocity.
*
* This formulation has been met with some valid criticism. WCI is unlikely to be an accurate measure of heat loss from
* exposed flesh, which differs from plastic in terms of curvature, roughness, and radiation exchange qualities, and is
* always below 33°C in a cold environment. Furthermore, the equation’s values peak at 90 km/h and then decline as velocity
* increases. Nonetheless, this score reliably represents the combined effects of temperature and wind on subjective discomfort
* for velocities below 80 km/h {@link #ref_18|[18]}.
*
* @public
* @memberof models
* @docname Wind chill index
*
* @param {number} tdb - dry bulb air temperature,[°C]
* @param {number} v - wind speed 10m above ground level, [m/s]
* @param {object} [kwargs] (Optional) Other parameters.
* @param {boolean} [kwargs.round=true] - If True rounds output value, if False it does not round it.
* @returns {{wci: number}} wind chill index, [W/m2]
*/
export function wc(tdb, v, kwargs = { round: true }) {
let wci = (10.45 + 10 * Math.pow(v, 0.5) - v) * (33 - tdb);
// the factor 1.163 is used to convert to W/m2
wci = wci * 1.163;
if (kwargs.round) {
wci = round(wci, 1);
}
return { wci: wci };
}