jsthermalcomfort 0.0.2 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/lib/cjs/index.js +7 -434
- package/lib/cjs/models/a_pmv.js +140 -0
- package/lib/cjs/models/adaptive_ashrae.js +290 -0
- package/lib/cjs/models/adaptive_en.js +300 -0
- package/lib/cjs/models/ankle_draft.js +82 -0
- package/lib/cjs/models/at.js +52 -0
- package/lib/cjs/models/athb.js +135 -0
- package/lib/cjs/models/clo_tout.js +58 -0
- package/lib/cjs/models/cooling_effect.js +164 -0
- package/lib/cjs/models/discomfort_index.js +115 -0
- package/lib/cjs/models/e_pmv.js +154 -0
- package/lib/cjs/models/heat_index.js +60 -0
- package/lib/cjs/models/humidex.js +63 -0
- package/lib/cjs/models/index.js +71 -0
- package/lib/cjs/models/net.js +50 -0
- package/lib/cjs/models/pet_steady.js +443 -0
- package/lib/cjs/models/phs.js +458 -0
- package/lib/cjs/models/pmv.js +200 -0
- package/lib/cjs/models/pmv_ppd.js +404 -0
- package/lib/cjs/models/set_tmp.js +203 -0
- package/lib/cjs/models/solar_gain.js +163 -0
- package/lib/cjs/models/two_nodes.js +790 -0
- package/lib/cjs/models/use_fans_heatwave.js +203 -0
- package/lib/cjs/models/utci.js +609 -0
- package/lib/cjs/models/vertical_tmp_grad_ppd.js +95 -0
- package/lib/cjs/models/wbgt.js +72 -0
- package/lib/cjs/models/wc.js +37 -0
- package/lib/cjs/psychrometrics/enthalpy.js +24 -0
- package/lib/cjs/psychrometrics/index.js +28 -0
- package/lib/cjs/psychrometrics/p_sat.js +46 -0
- package/lib/cjs/psychrometrics/p_sat_torr.js +34 -0
- package/lib/cjs/psychrometrics/psy_ta_rh.js +51 -0
- package/lib/cjs/psychrometrics/t_dp.js +19 -0
- package/lib/cjs/psychrometrics/t_mrt.js +117 -0
- package/lib/cjs/psychrometrics/t_o.js +82 -0
- package/lib/cjs/psychrometrics/t_wb.js +23 -0
- package/lib/cjs/types/index.d.ts +7 -79
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/models/a_pmv.d.ts +133 -0
- package/lib/cjs/types/models/a_pmv.d.ts.map +1 -0
- package/lib/cjs/types/models/adaptive_ashrae.d.ts +211 -0
- package/lib/cjs/types/models/adaptive_ashrae.d.ts.map +1 -0
- package/lib/cjs/types/models/adaptive_en.d.ts +217 -0
- package/lib/cjs/types/models/adaptive_en.d.ts.map +1 -0
- package/lib/cjs/types/models/ankle_draft.d.ts +60 -0
- package/lib/cjs/types/models/ankle_draft.d.ts.map +1 -0
- package/lib/cjs/types/models/at.d.ts +34 -0
- package/lib/cjs/types/models/at.d.ts.map +1 -0
- package/lib/cjs/types/models/athb.d.ts +96 -0
- package/lib/cjs/types/models/athb.d.ts.map +1 -0
- package/lib/cjs/types/models/clo_tout.d.ts +45 -0
- package/lib/cjs/types/models/clo_tout.d.ts.map +1 -0
- package/lib/cjs/types/models/cooling_effect.d.ts +49 -0
- package/lib/cjs/types/models/cooling_effect.d.ts.map +1 -0
- package/lib/cjs/types/models/discomfort_index.d.ts +91 -0
- package/lib/cjs/types/models/discomfort_index.d.ts.map +1 -0
- package/lib/cjs/types/models/e_pmv.d.ts +139 -0
- package/lib/cjs/types/models/e_pmv.d.ts.map +1 -0
- package/lib/cjs/types/models/heat_index.d.ts +27 -0
- package/lib/cjs/types/models/heat_index.d.ts.map +1 -0
- package/lib/cjs/types/models/humidex.d.ts +54 -0
- package/lib/cjs/types/models/humidex.d.ts.map +1 -0
- package/lib/cjs/types/models/index.d.ts +78 -0
- package/lib/cjs/types/models/index.d.ts.map +1 -0
- package/lib/cjs/types/models/net.d.ts +39 -0
- package/lib/cjs/types/models/net.d.ts.map +1 -0
- package/lib/cjs/types/models/pet_steady.d.ts +59 -0
- package/lib/cjs/types/models/pet_steady.d.ts.map +1 -0
- package/lib/cjs/types/models/phs.d.ts +242 -0
- package/lib/cjs/types/models/phs.d.ts.map +1 -0
- package/lib/cjs/types/models/pmv.d.ts +198 -0
- package/lib/cjs/types/models/pmv.d.ts.map +1 -0
- package/lib/cjs/types/models/pmv_ppd.d.ts +246 -0
- package/lib/cjs/types/models/pmv_ppd.d.ts.map +1 -0
- package/lib/cjs/types/models/set_tmp.d.ts +124 -0
- package/lib/cjs/types/models/set_tmp.d.ts.map +1 -0
- package/lib/cjs/types/models/solar_gain.d.ts +76 -0
- package/lib/cjs/types/models/solar_gain.d.ts.map +1 -0
- package/lib/cjs/types/models/two_nodes.d.ts +412 -0
- package/lib/cjs/types/models/two_nodes.d.ts.map +1 -0
- package/lib/cjs/types/models/use_fans_heatwave.d.ts +188 -0
- package/lib/cjs/types/models/use_fans_heatwave.d.ts.map +1 -0
- package/lib/cjs/types/models/utci.d.ts +79 -0
- package/lib/cjs/types/models/utci.d.ts.map +1 -0
- package/lib/cjs/types/models/vertical_tmp_grad_ppd.d.ts +58 -0
- package/lib/cjs/types/models/vertical_tmp_grad_ppd.d.ts.map +1 -0
- package/lib/cjs/types/models/wbgt.d.ts +51 -0
- package/lib/cjs/types/models/wbgt.d.ts.map +1 -0
- package/lib/cjs/types/models/wc.d.ts +29 -0
- package/lib/cjs/types/models/wc.d.ts.map +1 -0
- package/lib/cjs/types/psychrometrics/enthalpy.d.ts +12 -0
- package/lib/cjs/types/psychrometrics/enthalpy.d.ts.map +1 -0
- package/lib/cjs/types/psychrometrics/index.d.ts +26 -0
- package/lib/cjs/types/psychrometrics/index.d.ts.map +1 -0
- package/lib/cjs/types/psychrometrics/p_sat.d.ts +13 -0
- package/lib/cjs/types/psychrometrics/p_sat.d.ts.map +1 -0
- package/lib/cjs/types/psychrometrics/p_sat_torr.d.ts +26 -0
- package/lib/cjs/types/psychrometrics/p_sat_torr.d.ts.map +1 -0
- package/lib/cjs/types/psychrometrics/psy_ta_rh.d.ts +51 -0
- package/lib/cjs/types/psychrometrics/psy_ta_rh.d.ts.map +1 -0
- package/lib/cjs/types/psychrometrics/t_dp.d.ts +9 -0
- package/lib/cjs/types/psychrometrics/t_dp.d.ts.map +1 -0
- package/lib/cjs/types/psychrometrics/t_mrt.d.ts +43 -0
- package/lib/cjs/types/psychrometrics/t_mrt.d.ts.map +1 -0
- package/lib/cjs/types/psychrometrics/t_o.d.ts +31 -0
- package/lib/cjs/types/psychrometrics/t_o.d.ts.map +1 -0
- package/lib/cjs/types/psychrometrics/t_wb.d.ts +12 -0
- package/lib/cjs/types/psychrometrics/t_wb.d.ts.map +1 -0
- package/lib/cjs/types/utilities/index.d.ts +28 -0
- package/lib/cjs/types/utilities/index.d.ts.map +1 -0
- package/lib/cjs/types/utilities/utilities.d.ts +377 -0
- package/lib/cjs/types/utilities/utilities.d.ts.map +1 -0
- package/lib/cjs/utilities/index.js +27 -0
- package/lib/cjs/utilities/utilities.js +903 -0
- package/lib/esm/index.js +4 -0
- package/lib/esm/models/a_pmv.js +135 -0
- package/lib/esm/models/adaptive_ashrae.js +285 -0
- package/lib/esm/models/adaptive_en.js +294 -0
- package/lib/esm/models/ankle_draft.js +78 -0
- package/lib/esm/models/at.js +48 -0
- package/lib/esm/models/athb.js +130 -0
- package/lib/esm/models/clo_tout.js +53 -0
- package/lib/esm/models/cooling_effect.js +159 -0
- package/lib/esm/models/discomfort_index.js +110 -0
- package/lib/esm/models/e_pmv.js +149 -0
- package/lib/esm/models/heat_index.js +56 -0
- package/lib/esm/models/humidex.js +59 -0
- package/lib/esm/models/index.js +69 -0
- package/lib/esm/models/net.js +46 -0
- package/lib/esm/models/pet_steady.js +439 -0
- package/lib/esm/models/phs.js +454 -0
- package/lib/esm/models/pmv.js +195 -0
- package/lib/esm/models/pmv_ppd.js +398 -0
- package/lib/esm/models/set_tmp.js +198 -0
- package/lib/esm/models/solar_gain.js +158 -0
- package/lib/esm/models/two_nodes.js +784 -0
- package/lib/esm/models/use_fans_heatwave.js +199 -0
- package/lib/esm/models/utci.js +604 -0
- package/lib/esm/models/wbgt.js +68 -0
- package/lib/esm/models/wc.js +33 -0
- package/lib/esm/psychrometrics/enthalpy.js +20 -0
- package/lib/esm/psychrometrics/index.js +26 -0
- package/lib/esm/psychrometrics/p_sat.js +42 -0
- package/lib/esm/psychrometrics/p_sat_torr.js +29 -0
- package/lib/esm/psychrometrics/psy_ta_rh.js +47 -0
- package/lib/esm/psychrometrics/t_dp.js +15 -0
- package/lib/esm/psychrometrics/t_mrt.js +112 -0
- package/lib/esm/psychrometrics/t_o.js +77 -0
- package/lib/esm/psychrometrics/t_wb.js +19 -0
- package/lib/esm/types/index.d.ts +7 -79
- package/lib/esm/types/index.d.ts.map +1 -1
- package/lib/esm/types/models/a_pmv.d.ts +133 -0
- package/lib/esm/types/models/a_pmv.d.ts.map +1 -0
- package/lib/esm/types/models/adaptive_ashrae.d.ts +211 -0
- package/lib/esm/types/models/adaptive_ashrae.d.ts.map +1 -0
- package/lib/esm/types/models/adaptive_en.d.ts +217 -0
- package/lib/esm/types/models/adaptive_en.d.ts.map +1 -0
- package/lib/esm/types/models/ankle_draft.d.ts +60 -0
- package/lib/esm/types/models/ankle_draft.d.ts.map +1 -0
- package/lib/esm/types/models/at.d.ts +34 -0
- package/lib/esm/types/models/at.d.ts.map +1 -0
- package/lib/esm/types/models/athb.d.ts +96 -0
- package/lib/esm/types/models/athb.d.ts.map +1 -0
- package/lib/esm/types/models/clo_tout.d.ts +45 -0
- package/lib/esm/types/models/clo_tout.d.ts.map +1 -0
- package/lib/esm/types/models/cooling_effect.d.ts +49 -0
- package/lib/esm/types/models/cooling_effect.d.ts.map +1 -0
- package/lib/esm/types/models/discomfort_index.d.ts +91 -0
- package/lib/esm/types/models/discomfort_index.d.ts.map +1 -0
- package/lib/esm/types/models/e_pmv.d.ts +139 -0
- package/lib/esm/types/models/e_pmv.d.ts.map +1 -0
- package/lib/esm/types/models/heat_index.d.ts +27 -0
- package/lib/esm/types/models/heat_index.d.ts.map +1 -0
- package/lib/esm/types/models/humidex.d.ts +54 -0
- package/lib/esm/types/models/humidex.d.ts.map +1 -0
- package/lib/esm/types/models/index.d.ts +77 -0
- package/lib/esm/types/models/index.d.ts.map +1 -0
- package/lib/esm/types/models/net.d.ts +39 -0
- package/lib/esm/types/models/net.d.ts.map +1 -0
- package/lib/esm/types/models/pet_steady.d.ts +59 -0
- package/lib/esm/types/models/pet_steady.d.ts.map +1 -0
- package/lib/esm/types/models/phs.d.ts +242 -0
- package/lib/esm/types/models/phs.d.ts.map +1 -0
- package/lib/esm/types/models/pmv.d.ts +198 -0
- package/lib/esm/types/models/pmv.d.ts.map +1 -0
- package/lib/esm/types/models/pmv_ppd.d.ts +246 -0
- package/lib/esm/types/models/pmv_ppd.d.ts.map +1 -0
- package/lib/esm/types/models/set_tmp.d.ts +124 -0
- package/lib/esm/types/models/set_tmp.d.ts.map +1 -0
- package/lib/esm/types/models/solar_gain.d.ts +76 -0
- package/lib/esm/types/models/solar_gain.d.ts.map +1 -0
- package/lib/esm/types/models/two_nodes.d.ts +412 -0
- package/lib/esm/types/models/two_nodes.d.ts.map +1 -0
- package/lib/esm/types/models/use_fans_heatwave.d.ts +188 -0
- package/lib/esm/types/models/use_fans_heatwave.d.ts.map +1 -0
- package/lib/esm/types/models/utci.d.ts +79 -0
- package/lib/esm/types/models/utci.d.ts.map +1 -0
- package/lib/esm/types/models/wbgt.d.ts +51 -0
- package/lib/esm/types/models/wbgt.d.ts.map +1 -0
- package/lib/esm/types/models/wc.d.ts +29 -0
- package/lib/esm/types/models/wc.d.ts.map +1 -0
- package/lib/esm/types/psychrometrics/enthalpy.d.ts +12 -0
- package/lib/esm/types/psychrometrics/enthalpy.d.ts.map +1 -0
- package/lib/esm/types/psychrometrics/index.d.ts +26 -0
- package/lib/esm/types/psychrometrics/index.d.ts.map +1 -0
- package/lib/esm/types/psychrometrics/p_sat.d.ts +13 -0
- package/lib/esm/types/psychrometrics/p_sat.d.ts.map +1 -0
- package/lib/esm/types/psychrometrics/p_sat_torr.d.ts +26 -0
- package/lib/esm/types/psychrometrics/p_sat_torr.d.ts.map +1 -0
- package/lib/esm/types/psychrometrics/psy_ta_rh.d.ts +51 -0
- package/lib/esm/types/psychrometrics/psy_ta_rh.d.ts.map +1 -0
- package/lib/esm/types/psychrometrics/t_dp.d.ts +9 -0
- package/lib/esm/types/psychrometrics/t_dp.d.ts.map +1 -0
- package/lib/esm/types/psychrometrics/t_mrt.d.ts +43 -0
- package/lib/esm/types/psychrometrics/t_mrt.d.ts.map +1 -0
- package/lib/esm/types/psychrometrics/t_o.d.ts +31 -0
- package/lib/esm/types/psychrometrics/t_o.d.ts.map +1 -0
- package/lib/esm/types/psychrometrics/t_wb.d.ts +12 -0
- package/lib/esm/types/psychrometrics/t_wb.d.ts.map +1 -0
- package/lib/esm/types/utilities/index.d.ts +28 -0
- package/lib/esm/types/utilities/index.d.ts.map +1 -0
- package/lib/esm/types/utilities/utilities.d.ts +377 -0
- package/lib/esm/types/utilities/utilities.d.ts.map +1 -0
- package/lib/esm/utilities/index.js +25 -0
- package/lib/esm/utilities/utilities.js +885 -0
- package/package.json +21 -14
- package/lib/esm/index.mjs +0 -430
package/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# jsthermalcomfort
|
|
2
|
+
|
|
2
3
|
jsthermalcomfort is a JavaScript package that allows users to calculate thermal comfort indices, including Predicted Mean Vote (PMV), Standard Effective Temperature (SET), and Predicted Heat Strain (PHS).
|
|
3
4
|
|
|
4
5
|
## Installation
|
|
6
|
+
|
|
5
7
|
Using npm:
|
|
6
8
|
|
|
7
9
|
```
|
|
8
10
|
npm install jsthermalcomfort
|
|
9
|
-
```
|
|
11
|
+
```
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,436 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Calculates vapour pressure of water at different temperatures
|
|
6
|
-
* @param {number} tdb - air temperature, [°C]
|
|
7
|
-
* @returns {number} - operative temperature, [Pa]
|
|
8
|
-
*/
|
|
9
|
-
function p_sat(tdb) {
|
|
10
|
-
const c_to_k = 273.15;
|
|
11
|
-
const ta_k = tdb + c_to_k;
|
|
12
|
-
const c1 = -5674.5359;
|
|
13
|
-
const c2 = 6.3925247;
|
|
14
|
-
const c3 = -0.9677843 * Math.pow(10, -2);
|
|
15
|
-
const c4 = 0.62215701 * Math.pow(10, -6);
|
|
16
|
-
const c5 = 0.20747825 * Math.pow(10, -8);
|
|
17
|
-
const c6 = -0.9484024 * Math.pow(10, -12);
|
|
18
|
-
const c7 = 4.1635019;
|
|
19
|
-
const c8 = -5800.2206;
|
|
20
|
-
const c9 = 1.3914993;
|
|
21
|
-
const c10 = -0.048640239;
|
|
22
|
-
const c11 = 0.41764768 * Math.pow(10, -4);
|
|
23
|
-
const c12 = -0.14452093 * Math.pow(10, -7);
|
|
24
|
-
const c13 = 6.5459673;
|
|
25
|
-
let pascals;
|
|
26
|
-
if (ta_k < c_to_k) {
|
|
27
|
-
pascals = Math.exp(c1 / ta_k +
|
|
28
|
-
c2 +
|
|
29
|
-
ta_k * (c3 + ta_k * (c4 + ta_k * (c5 + c6 * ta_k))) +
|
|
30
|
-
c7 * Math.log(ta_k));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
pascals = Math.exp(c8 / ta_k +
|
|
34
|
-
c9 +
|
|
35
|
-
ta_k * (c10 + ta_k * (c11 + ta_k * c12)) +
|
|
36
|
-
c13 * Math.log(ta_k));
|
|
37
|
-
}
|
|
38
|
-
return Math.round(pascals * 10) / 10;
|
|
39
|
-
}
|
|
40
|
-
exports.p_sat = p_sat;
|
|
41
|
-
/**
|
|
42
|
-
* Calculates the Heat Index (HI). It combines air temperature and relative humidity to determine an apparent temperature.
|
|
43
|
-
*
|
|
44
|
-
* @param tdb Dry bulb air temperature, default in [°C] in [°F] if `units` = 'IP'.
|
|
45
|
-
* @param rh Relative humidity, [%].
|
|
46
|
-
* @param options (Optional) Other parameters.
|
|
47
|
-
* @param options.round If True rounds output value, if False it does not round it.
|
|
48
|
-
* @param options.units Select the SI (International System of Units) or the IP (Imperial Units) system.
|
|
49
|
-
*
|
|
50
|
-
* @returns Heat Index, default in [°C] in [°F] if `units` = 'IP'.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* const hi = heatIndex(25, 50); // returns 25.9
|
|
54
|
-
*/
|
|
55
|
-
function heatIndex(tdb, rh, options = {}) {
|
|
56
|
-
const defaultOptions = {
|
|
57
|
-
round: true,
|
|
58
|
-
units: "SI",
|
|
59
|
-
};
|
|
60
|
-
let round, units;
|
|
61
|
-
let heatIndexOptions;
|
|
62
|
-
// @ts-ignore
|
|
63
|
-
heatIndexOptions = { round, units } = Object.assign(defaultOptions, options);
|
|
64
|
-
let hi;
|
|
65
|
-
if (units === "SI") {
|
|
66
|
-
hi =
|
|
67
|
-
-8.784695 +
|
|
68
|
-
1.61139411 * tdb +
|
|
69
|
-
2.338549 * rh -
|
|
70
|
-
0.14611605 * tdb * rh -
|
|
71
|
-
0.012308094 * Math.pow(tdb, 2) -
|
|
72
|
-
0.016424828 * Math.pow(rh, 2) +
|
|
73
|
-
0.002211732 * Math.pow(tdb, 2) * rh +
|
|
74
|
-
0.00072546 * tdb * Math.pow(rh, 2) -
|
|
75
|
-
0.000003582 * Math.pow(tdb, 2) * Math.pow(rh, 2);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
hi =
|
|
79
|
-
-42.379 +
|
|
80
|
-
2.04901523 * tdb +
|
|
81
|
-
10.14333127 * rh -
|
|
82
|
-
0.22475541 * tdb * rh -
|
|
83
|
-
0.00683783 * Math.pow(tdb, 2) -
|
|
84
|
-
0.05481717 * Math.pow(rh, 2) +
|
|
85
|
-
0.00122874 * Math.pow(tdb, 2) * rh +
|
|
86
|
-
0.00085282 * tdb * Math.pow(rh, 2) -
|
|
87
|
-
0.00000199 * Math.pow(tdb, 2) * Math.pow(rh, 2);
|
|
88
|
-
}
|
|
89
|
-
if (round) {
|
|
90
|
-
return Math.round(hi * 10) / 10;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
return hi;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.heatIndex = heatIndex;
|
|
97
|
-
/**
|
|
98
|
-
* Calculates the Predicted Heat Strain (PHS) index based in compliance with
|
|
99
|
-
* the ISO 7933:2004 Standard [8]_. The ISO 7933 provides a method for the
|
|
100
|
-
* analytical evaluation and interpretation of the thermal stress experienced
|
|
101
|
-
* by a subject in a hot environment. It describes a method for predicting the
|
|
102
|
-
* sweat rate and the internal core temperature that the human body will
|
|
103
|
-
* develop in response to the working conditions.
|
|
104
|
-
* The PHS model can be used to predict the: heat by respiratory convection, heat flow
|
|
105
|
-
* by respiratory evaporation, steady state mean skin temperature, instantaneous value
|
|
106
|
-
* of skin temperature, heat accumulation associated with the metabolic rate, maximum
|
|
107
|
-
* evaporative heat flow at the skin surface, predicted sweat rate, predicted evaporative
|
|
108
|
-
* heat flow, and rectal temperature.
|
|
109
|
-
* @param {number} tdb - dry bulb air temperature, default in [°C]
|
|
110
|
-
* @param {number} tr - mean radiant temperature, default in [°C]
|
|
111
|
-
* @param {number} v - air speed, default in [m/s]
|
|
112
|
-
* @param {number} rh - relative humidity, [%]
|
|
113
|
-
* @param {number} met - metabolic rate, [W/(m2)]
|
|
114
|
-
* @param {number} clo - clothing insulation, [clo]
|
|
115
|
-
* @param {number} posture - a numeric value presenting posture of person [sitting=1, standing=2, crouching=3]
|
|
116
|
-
* @param {number} wme - external work, [W/(m2)] default 0
|
|
117
|
-
* @param {number} i_mst - static moisture permeability index, [dimensionless], default 0.38
|
|
118
|
-
* @param {number} a_p - fraction of the body surface covered by the reflective clothing, [dimensionless], default 0.54
|
|
119
|
-
* @param {number} drink - 1 if workers can drink freely, 0 otherwise, default 1
|
|
120
|
-
* @param {number} weight - body weight, [kg], default 75
|
|
121
|
-
* @param {number} height - height, [m], default 1.8
|
|
122
|
-
* @param {number} walk_sp - walking speed, [m/s], default 0
|
|
123
|
-
* @param {number} theta - angle between walking direction and wind direction [degrees], default 0
|
|
124
|
-
* @param {number} acclimatized - 100 if acclimatised subject, 0 otherwise, default 100
|
|
125
|
-
* @param {number} duration - duration of the work sequence, [minutes], default 480
|
|
126
|
-
* @param {number} f_r - emissivity of the reflective clothing, [dimensionless], default 0.97
|
|
127
|
-
* @param {number} t_sk - mean skin temperature when worker starts working, [°C], default 34.1
|
|
128
|
-
* @param {number} t_cr - mean core temperature when worker starts working, [°C], default 36.8
|
|
129
|
-
* @param {number} t_re - mean rectal temperature when worker starts working, [°C], default false
|
|
130
|
-
* @param {number} t_cr_eq - mean core temperature as a function of met when worker starts working, [°C], default false
|
|
131
|
-
* @param {number} sweat_rate - default 0
|
|
132
|
-
* @returns {[number]} - an array of the following results:
|
|
133
|
-
*/
|
|
134
|
-
function phs(tdb, tr, rh, v, met, clo, posture, wme = 0, i_mst = 0.38, a_p = 0.54, drink = 1, weight = 75, height = 1.8, walk_sp = 0, theta = 0, acclimatized = 100, duration = 480, f_r = 0.97, t_sk = 34.1, t_cr = 36.8, t_re = 999, t_cr_eq = 999, t_sk_t_cr_wg = 0.3, sw_tot = 0, round = true) {
|
|
135
|
-
const p_a = ((p_sat(tdb) / 1000) * rh) / 100;
|
|
136
|
-
if (t_re == 999) {
|
|
137
|
-
t_re = t_cr;
|
|
138
|
-
}
|
|
139
|
-
if (t_cr_eq == 999) {
|
|
140
|
-
t_cr_eq = t_cr;
|
|
141
|
-
}
|
|
142
|
-
// DuBois body surface area [m2]
|
|
143
|
-
const a_dubois = 0.202 * Math.pow(weight, 0.425) * Math.pow(height, 0.725);
|
|
144
|
-
const sp_heat = (57.83 * weight) / a_dubois; // specific heat of the body
|
|
145
|
-
let d_lim_t_re = 0; // maximum allowable exposure time for heat storage [min]
|
|
146
|
-
// maximum allowable exposure time for water loss, mean subject [min]
|
|
147
|
-
let d_lim_loss_50 = 0;
|
|
148
|
-
// maximum allowable exposure time for water loss, 95 % of the working population [min]
|
|
149
|
-
let d_lim_loss_95 = 0;
|
|
150
|
-
// maximum water loss to protect a mean subject [g]
|
|
151
|
-
const d_max_50 = 0.075 * weight * 1000;
|
|
152
|
-
// maximum water loss to protect 95 % of the working population [g]
|
|
153
|
-
const d_max_95 = 0.05 * weight * 1000;
|
|
154
|
-
// exponential averaging constants
|
|
155
|
-
const const_t_eq = Math.exp(-1 / 10);
|
|
156
|
-
const const_t_sk = Math.exp(-1 / 3);
|
|
157
|
-
const const_sw = Math.exp(-1 / 10);
|
|
158
|
-
let sweat_rate = sw_tot;
|
|
159
|
-
let def_dir = 0;
|
|
160
|
-
if (theta !== 0) {
|
|
161
|
-
// def_dir = 1 for unidirectional walking, def_dir = 0 for omni-directional walking
|
|
162
|
-
def_dir = 1;
|
|
163
|
-
}
|
|
164
|
-
let def_speed = 0;
|
|
165
|
-
if (walk_sp !== 0) {
|
|
166
|
-
def_speed = 1;
|
|
167
|
-
}
|
|
168
|
-
// radiating area dubois
|
|
169
|
-
let a_r_du = 0.7;
|
|
170
|
-
if (posture === 2) {
|
|
171
|
-
a_r_du = 0.77;
|
|
172
|
-
}
|
|
173
|
-
if (posture === 3) {
|
|
174
|
-
a_r_du = 0.67;
|
|
175
|
-
}
|
|
176
|
-
// evaluation of the max sweat rate as a function of the metabolic rate
|
|
177
|
-
let sw_max = (met - 32) * a_dubois;
|
|
178
|
-
if (sw_max > 400) {
|
|
179
|
-
sw_max = 400;
|
|
180
|
-
}
|
|
181
|
-
if (sw_max < 250) {
|
|
182
|
-
sw_max = 250;
|
|
183
|
-
}
|
|
184
|
-
if (acclimatized >= 50) {
|
|
185
|
-
sw_max = sw_max * 1.25;
|
|
186
|
-
}
|
|
187
|
-
// max skin wettedness
|
|
188
|
-
let w_max = 0.85;
|
|
189
|
-
if (acclimatized > 50) {
|
|
190
|
-
w_max = 1;
|
|
191
|
-
}
|
|
192
|
-
// static clothing insulation
|
|
193
|
-
const i_cl_st = clo * 0.155;
|
|
194
|
-
const fcl = 1 + 0.3 * clo;
|
|
195
|
-
// Static boundary layer thermal insulation in quiet air
|
|
196
|
-
const i_a_st = 0.111;
|
|
197
|
-
// Total static insulation
|
|
198
|
-
const i_tot_st = i_cl_st + i_a_st / fcl;
|
|
199
|
-
let v_r = v;
|
|
200
|
-
if (def_speed > 0) {
|
|
201
|
-
if (def_dir === 1) {
|
|
202
|
-
// Unidirectional walking
|
|
203
|
-
v_r = Math.abs(v - walk_sp * Math.cos((3.14159 * theta) / 180));
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
// Omni-directional walking IF
|
|
207
|
-
if (v < walk_sp) {
|
|
208
|
-
v_r = walk_sp;
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
v_r = v;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
walk_sp = 0.0052 * (met - 58);
|
|
217
|
-
if (walk_sp > 0.7) {
|
|
218
|
-
walk_sp = 0.7;
|
|
219
|
-
}
|
|
220
|
-
v_r = v;
|
|
221
|
-
}
|
|
222
|
-
// Dynamic clothing insulation - correction for wind (Var) and walking speed
|
|
223
|
-
let v_ux = v_r;
|
|
224
|
-
if (v_r > 3) {
|
|
225
|
-
v_ux = 3;
|
|
226
|
-
}
|
|
227
|
-
let w_a_ux = walk_sp;
|
|
228
|
-
if (walk_sp > 1.5) {
|
|
229
|
-
w_a_ux = 1.5;
|
|
230
|
-
}
|
|
231
|
-
// correction for the dynamic total dry thermal insulation at or above 0.6 clo
|
|
232
|
-
let corr_cl = 1.044 *
|
|
233
|
-
Math.exp((0.066 * v_ux - 0.398) * v_ux + (0.094 * w_a_ux - 0.378) * w_a_ux);
|
|
234
|
-
if (corr_cl > 1) {
|
|
235
|
-
corr_cl = 1;
|
|
236
|
-
}
|
|
237
|
-
// correction for the dynamic total dry thermal insulation at 0 clo
|
|
238
|
-
let corr_ia = Math.exp((0.047 * v_r - 0.472) * v_r + (0.117 * w_a_ux - 0.342) * w_a_ux);
|
|
239
|
-
if (corr_ia > 1) {
|
|
240
|
-
corr_ia = 1;
|
|
241
|
-
}
|
|
242
|
-
let corr_tot = corr_cl;
|
|
243
|
-
if (clo <= 0.6) {
|
|
244
|
-
corr_tot = ((0.6 - clo) * corr_ia + clo * corr_cl) / 0.6;
|
|
245
|
-
}
|
|
246
|
-
// total dynamic clothing insulation
|
|
247
|
-
let i_tot_dyn = i_tot_st * corr_tot;
|
|
248
|
-
// dynamic boundary layer thermal insulation
|
|
249
|
-
let i_a_dyn = corr_ia * i_a_st;
|
|
250
|
-
let i_cl_dyn = i_tot_dyn - i_a_dyn / fcl;
|
|
251
|
-
// correction for the dynamic permeability index
|
|
252
|
-
let corr_e = (2.6 * corr_tot - 6.5) * corr_tot + 4.9;
|
|
253
|
-
let im_dyn = i_mst * corr_e;
|
|
254
|
-
if (im_dyn > 0.9) {
|
|
255
|
-
im_dyn = 0.9;
|
|
256
|
-
}
|
|
257
|
-
let r_t_dyn = i_tot_dyn / im_dyn / 16.7;
|
|
258
|
-
let t_exp = 28.56 + 0.115 * tdb + 0.641 * p_a; // expired air temperature
|
|
259
|
-
// respiratory convective heat flow [W/m2]
|
|
260
|
-
let c_res = 0.001516 * met * (t_exp - tdb);
|
|
261
|
-
// respiratory evaporative heat flow [W/m2]
|
|
262
|
-
let e_res = 0.00127 * met * (59.34 + 0.53 * tdb - 11.63 * p_a);
|
|
263
|
-
let z = 3.5 + 5.2 * v_r;
|
|
264
|
-
if (v_r > 1) {
|
|
265
|
-
z = 8.7 * Math.pow(v_r, 0.6);
|
|
266
|
-
}
|
|
267
|
-
// Dynamic convective heat transfer coefficient
|
|
268
|
-
let hc_dyn = 2.38 * Math.pow(Math.abs(t_sk - tdb), 0.25);
|
|
269
|
-
if (z > hc_dyn) {
|
|
270
|
-
hc_dyn = z;
|
|
271
|
-
}
|
|
272
|
-
let aux_r = 5.67e-8 * a_r_du;
|
|
273
|
-
let f_cl_r = (1 - a_p) * 0.97 + a_p * f_r;
|
|
274
|
-
let h_r;
|
|
275
|
-
let t_cl;
|
|
276
|
-
let t_cl_new;
|
|
277
|
-
let sw_req;
|
|
278
|
-
let e_v_eff;
|
|
279
|
-
let k;
|
|
280
|
-
let wp = 0;
|
|
281
|
-
let e_p;
|
|
282
|
-
let sw_tot_g = 0;
|
|
283
|
-
for (let time = 1; time <= duration; time++) {
|
|
284
|
-
const t_sk0 = t_sk;
|
|
285
|
-
const t_re0 = t_re;
|
|
286
|
-
const t_cr0 = t_cr;
|
|
287
|
-
const t_cr_eq0 = t_cr_eq;
|
|
288
|
-
const t_sk_t_cr_wg0 = t_sk_t_cr_wg;
|
|
289
|
-
// equilibrium core temperature associated to the metabolic rate
|
|
290
|
-
const t_cr_eq_m = 0.0036 * met + 36.6;
|
|
291
|
-
// Core temperature at this minute, by exponential averaging
|
|
292
|
-
t_cr_eq = t_cr_eq0 * const_t_eq + t_cr_eq_m * (1 - const_t_eq);
|
|
293
|
-
// Heat storage associated with this core temperature increase during the last minute
|
|
294
|
-
const d_stored_eq = sp_heat * (t_cr_eq - t_cr_eq0) * (1 - t_sk_t_cr_wg0);
|
|
295
|
-
// skin temperature prediction -- clothed model
|
|
296
|
-
let t_sk_eq_cl = 12.165 + 0.02017 * tdb + 0.04361 * tr + 0.19354 * p_a - 0.25315 * v;
|
|
297
|
-
t_sk_eq_cl = t_sk_eq_cl + 0.005346 * met + 0.51274 * t_re;
|
|
298
|
-
// nude model
|
|
299
|
-
let t_sk_eq_nu = 7.191 + 0.064 * tdb + 0.061 * tr + 0.198 * p_a - 0.348 * v;
|
|
300
|
-
t_sk_eq_nu = t_sk_eq_nu + 0.616 * t_re;
|
|
301
|
-
let t_sk_eq = t_sk_eq_nu + 2.5 * (t_sk_eq_cl - t_sk_eq_nu) * (clo - 0.2);
|
|
302
|
-
if (clo >= 0.6) {
|
|
303
|
-
t_sk_eq = t_sk_eq_cl;
|
|
304
|
-
}
|
|
305
|
-
else if (clo <= 0.2) {
|
|
306
|
-
t_sk_eq = t_sk_eq_nu;
|
|
307
|
-
}
|
|
308
|
-
// skin temperature [C]
|
|
309
|
-
t_sk = t_sk0 * const_t_sk + t_sk_eq * (1 - const_t_sk);
|
|
310
|
-
// Saturated water vapour pressure at the surface of the skin
|
|
311
|
-
const p_sk = 0.6105 * Math.exp((17.27 * t_sk) / (t_sk + 237.3));
|
|
312
|
-
t_cl = tr + 0.1; // clothing surface temperature
|
|
313
|
-
while (true) {
|
|
314
|
-
// radiative heat transfer coefficient
|
|
315
|
-
h_r =
|
|
316
|
-
(f_cl_r * aux_r * (Math.pow(t_cl + 273, 4) - Math.pow(tr + 273, 4))) /
|
|
317
|
-
(t_cl - tr);
|
|
318
|
-
let t_cl_new = (fcl * (hc_dyn * tdb + h_r * tr) + t_sk / i_cl_dyn) /
|
|
319
|
-
(fcl * (hc_dyn + h_r) + 1 / i_cl_dyn);
|
|
320
|
-
if (Math.abs(t_cl - t_cl_new) <= 0.001) {
|
|
321
|
-
break;
|
|
322
|
-
}
|
|
323
|
-
t_cl = (t_cl + t_cl_new) / 2;
|
|
324
|
-
}
|
|
325
|
-
let convection = fcl * hc_dyn * (t_cl - tdb);
|
|
326
|
-
let radiation = fcl * h_r * (t_cl - tr);
|
|
327
|
-
// maximum evaporative heat flow at the skin surface [W/m2]
|
|
328
|
-
let e_max = (p_sk - p_a) / r_t_dyn;
|
|
329
|
-
// required evaporative heat flow [W/m2]
|
|
330
|
-
let e_req = met - d_stored_eq - wme - c_res - e_res - convection - radiation;
|
|
331
|
-
// required skin wettedness
|
|
332
|
-
let w_req = e_req / e_max;
|
|
333
|
-
if (e_req <= 0) {
|
|
334
|
-
e_req = 0;
|
|
335
|
-
sw_req = 0; // required sweat rate [W/m2]
|
|
336
|
-
}
|
|
337
|
-
else if (e_max <= 0) {
|
|
338
|
-
e_max = 0;
|
|
339
|
-
sw_req = sw_max;
|
|
340
|
-
}
|
|
341
|
-
else if (w_req >= 1.7) {
|
|
342
|
-
sw_req = sw_max;
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
e_v_eff = 1 - Math.pow(w_req, 2) / 2;
|
|
346
|
-
if (w_req > 1) {
|
|
347
|
-
e_v_eff = Math.pow(2 - w_req, 2) / 2;
|
|
348
|
-
}
|
|
349
|
-
sw_req = e_req / e_v_eff;
|
|
350
|
-
if (sw_req > sw_max) {
|
|
351
|
-
sw_req = sw_max;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
sweat_rate = sweat_rate * const_sw + sw_req * (1 - const_sw);
|
|
355
|
-
if (sweat_rate <= 0) {
|
|
356
|
-
e_p = 0; // predicted evaporative heat flow [W/m2]
|
|
357
|
-
sweat_rate = 0;
|
|
358
|
-
}
|
|
359
|
-
else {
|
|
360
|
-
k = e_max / sweat_rate;
|
|
361
|
-
wp = 1;
|
|
362
|
-
if (k >= 0.5) {
|
|
363
|
-
wp = -k + Math.sqrt(k * k + 2);
|
|
364
|
-
}
|
|
365
|
-
if (wp > w_max) {
|
|
366
|
-
wp = w_max;
|
|
367
|
-
}
|
|
368
|
-
e_p = wp * e_max;
|
|
369
|
-
}
|
|
370
|
-
// body heat storage rate [W/m2]
|
|
371
|
-
let d_storage = e_req - e_p + d_stored_eq;
|
|
372
|
-
let t_cr_new = t_cr0;
|
|
373
|
-
while (true) {
|
|
374
|
-
t_sk_t_cr_wg = 0.3 - 0.09 * (t_cr_new - 36.8);
|
|
375
|
-
if (t_sk_t_cr_wg > 0.3) {
|
|
376
|
-
t_sk_t_cr_wg = 0.3;
|
|
377
|
-
}
|
|
378
|
-
if (t_sk_t_cr_wg < 0.1) {
|
|
379
|
-
t_sk_t_cr_wg = 0.1;
|
|
380
|
-
}
|
|
381
|
-
t_cr =
|
|
382
|
-
d_storage / sp_heat +
|
|
383
|
-
(t_sk0 * t_sk_t_cr_wg0) / 2 -
|
|
384
|
-
(t_sk * t_sk_t_cr_wg) / 2;
|
|
385
|
-
t_cr = (t_cr + t_cr0 * (1 - t_sk_t_cr_wg0 / 2)) / (1 - t_sk_t_cr_wg / 2);
|
|
386
|
-
if (Math.abs(t_cr - t_cr_new) <= 0.001) {
|
|
387
|
-
break;
|
|
388
|
-
}
|
|
389
|
-
t_cr_new = (t_cr_new + t_cr) / 2;
|
|
390
|
-
}
|
|
391
|
-
t_re = t_re0 + (2 * t_cr - 1.962 * t_re0 - 1.31) / 9;
|
|
392
|
-
if (d_lim_t_re == 0 && t_re >= 38) {
|
|
393
|
-
d_lim_t_re = time;
|
|
394
|
-
}
|
|
395
|
-
sw_tot = sw_tot + sweat_rate + e_res;
|
|
396
|
-
sw_tot_g = (sw_tot * 2.67 * a_dubois) / 1.8 / 60;
|
|
397
|
-
if (d_lim_loss_50 == 0 && sw_tot_g >= d_max_50) {
|
|
398
|
-
d_lim_loss_50 = time;
|
|
399
|
-
}
|
|
400
|
-
if (d_lim_loss_95 == 0 && sw_tot_g >= d_max_95) {
|
|
401
|
-
d_lim_loss_95 = time;
|
|
402
|
-
}
|
|
403
|
-
if (drink == 0) {
|
|
404
|
-
d_lim_loss_95 = d_lim_loss_95 * 0.6;
|
|
405
|
-
d_lim_loss_50 = d_lim_loss_95;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
if (d_lim_loss_50 == 0) {
|
|
409
|
-
d_lim_loss_50 = duration;
|
|
410
|
-
}
|
|
411
|
-
if (d_lim_loss_95 == 0) {
|
|
412
|
-
d_lim_loss_95 = duration;
|
|
413
|
-
}
|
|
414
|
-
if (d_lim_t_re == 0) {
|
|
415
|
-
d_lim_t_re = duration;
|
|
416
|
-
}
|
|
417
|
-
return {
|
|
418
|
-
t_re: round ? Math.round(t_re * 10) / 10 : t_re,
|
|
419
|
-
t_sk: round ? Math.round(t_sk * 10) / 10 : t_sk,
|
|
420
|
-
t_cr: round ? Math.round(t_cr * 10) / 10 : t_cr,
|
|
421
|
-
t_cr_eq: round ? Math.round(t_cr_eq * 10) / 10 : t_cr_eq,
|
|
422
|
-
t_sk_t_cr_wg: round ? Math.round(t_sk_t_cr_wg * 100) / 100 : t_sk_t_cr_wg,
|
|
423
|
-
sweat_rate: round ? Math.round(sweat_rate * 10) / 10 : sweat_rate,
|
|
424
|
-
sw_tot_g: round ? Math.round(sw_tot_g * 10) / 10 : sw_tot_g,
|
|
425
|
-
d_lim_loss_50: round ? Math.round(d_lim_loss_50 * 10) / 10 : d_lim_loss_50,
|
|
426
|
-
d_lim_loss_95: round ? Math.round(d_lim_loss_95 * 10) / 10 : d_lim_loss_95,
|
|
427
|
-
d_lim_t_re: round ? Math.round(d_lim_t_re * 10) / 10 : d_lim_t_re,
|
|
428
|
-
wp: round ? Math.round(wp * 100) / 100 : wp,
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
exports.phs = phs;
|
|
432
|
-
exports.default = {
|
|
433
|
-
heatIndex,
|
|
434
|
-
phs,
|
|
435
|
-
p_sat,
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
436
4
|
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const index_js_1 = __importDefault(require("./utilities/index.js"));
|
|
7
|
+
const index_js_2 = __importDefault(require("./psychrometrics/index.js"));
|
|
8
|
+
const index_js_3 = __importDefault(require("./models/index.js"));
|
|
9
|
+
exports.default = { utilities: index_js_1.default, psychrometrics: index_js_2.default, models: index_js_3.default };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.a_pmv_array = exports.a_pmv = void 0;
|
|
4
|
+
const pmv_js_1 = require("./pmv.js");
|
|
5
|
+
const utilities_js_1 = require("../utilities/utilities.js");
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {Object} A_pmvKwargs
|
|
8
|
+
* @property {'SI'|'IP'} units - select the SI (International System of Units) or the IP (Imperial Units) system.
|
|
9
|
+
* @property { boolean } limit_inputs - Default is True. By default, if the inputs are outside the standard applicability
|
|
10
|
+
* limits the function returns NaN. If false, returns pmv and ppd values even if input values are outside
|
|
11
|
+
* the applicability limits of the model.
|
|
12
|
+
*
|
|
13
|
+
* The ISO 7730 2005 limits are 10 < tdb [°C] < 30, 10 < tr [°C] < 40,
|
|
14
|
+
* 0 < vr [m/s] < 1, 0.8 < met [met] < 4, 0 < clo [clo] < 2, and -2 < PMV < 2.
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Returns Adaptive Predicted Mean Vote (aPMV) {@link #ref_25|[25]}.
|
|
19
|
+
* This index was developed by Yao, R. et al. (2009). The model takes into account factors
|
|
20
|
+
* such as culture, climate, social, psychological and behavioral adaptations, which have
|
|
21
|
+
* an impact on the senses used to detect thermal comfort. This model uses an adaptive
|
|
22
|
+
* coefficient (λ) representing the adaptive factors that affect the sense of thermal comfort.
|
|
23
|
+
*
|
|
24
|
+
* This is a version that supports scalar arguments.
|
|
25
|
+
* @see {@link a_pmv_array} for a version that supports arrays.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
* @memberof models
|
|
29
|
+
* @docname Adaptive Predicted Mean Vote (aPMV)
|
|
30
|
+
*
|
|
31
|
+
* @param {number} tdb - Dry bulb air temperature, default in [°C] in [°F] if `units` = 'IP'
|
|
32
|
+
* @param {number} tr - Mean radiant temperature, default in [°C] in [°F] if `units` = 'IP'
|
|
33
|
+
* @param {number} vr - Relative air speed, default in [m/s] in [fps] if `units` = 'IP'
|
|
34
|
+
*
|
|
35
|
+
* Note: vr is the relative air speed caused by body movement and not the air
|
|
36
|
+
* speed measured by the air speed sensor. The relative air speed is the sum of the
|
|
37
|
+
* average air speed measured by the sensor plus the activity-generated air speed
|
|
38
|
+
* (Vag). Where Vag is the activity-generated air speed caused by motion of
|
|
39
|
+
* individual body parts. vr can be calculated using the function v_relative in utilities.js.
|
|
40
|
+
* @param {number} rh - Relative humidity, [%]
|
|
41
|
+
* @param {number} met - Metabolic rate, [met]
|
|
42
|
+
* @param {number} clo - Clothing insulation, [clo]
|
|
43
|
+
*
|
|
44
|
+
* Note: The activity as well as the air speed modify the insulation characteristics
|
|
45
|
+
* of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that
|
|
46
|
+
* the clothing insulation shall be corrected {@link #ref_2|[2]}. The ASHRAE 55 Standard corrects
|
|
47
|
+
* for the effect of the body movement for met equal or higher than 1.2 met using
|
|
48
|
+
* the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo,
|
|
49
|
+
* can be calculated using the function clo_dynamic in utilities.js.
|
|
50
|
+
* @param {number} a_coefficient - Adaptive coefficient
|
|
51
|
+
* @param {number} [wme=0] - External work
|
|
52
|
+
* @param {A_pmvKwargs} kwargs - additional arguments
|
|
53
|
+
*
|
|
54
|
+
* @returns {number} pmv - Predicted Mean Vote
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const tdb = 24,
|
|
58
|
+
* const tr = 30,
|
|
59
|
+
* const vr = 0.22,
|
|
60
|
+
* const rh = 50,
|
|
61
|
+
* const met = 1.4,
|
|
62
|
+
* const clo = 0.5,
|
|
63
|
+
* const a_coefficient = 0.293,
|
|
64
|
+
* const wme = undefined,
|
|
65
|
+
*
|
|
66
|
+
* const result = a_pmv(tdb, tr, vr, rh, met, clo, a_coefficient, wme);
|
|
67
|
+
* console.log(result) //output 0.48
|
|
68
|
+
*/
|
|
69
|
+
function a_pmv(tdb, tr, vr, rh, met, clo, a_coefficient, wme = 0, kwargs = {}) {
|
|
70
|
+
const default_kwargs = {
|
|
71
|
+
units: "SI",
|
|
72
|
+
limit_inputs: true,
|
|
73
|
+
};
|
|
74
|
+
kwargs = Object.assign(default_kwargs, kwargs);
|
|
75
|
+
const _pmv = (0, pmv_js_1.pmv)(tdb, tr, vr, rh, met, clo, wme, "ISO", kwargs);
|
|
76
|
+
return (0, utilities_js_1.round)(_pmv / (1 + a_coefficient * _pmv), 2);
|
|
77
|
+
}
|
|
78
|
+
exports.a_pmv = a_pmv;
|
|
79
|
+
/**
|
|
80
|
+
* Returns Adaptive Predicted Mean Vote (aPMV) {@link #ref_25|[25]}.
|
|
81
|
+
* This index was developed by Yao, R. et al. (2009). The model takes into account factors
|
|
82
|
+
* such as culture, climate, social, psychological and behavioral adaptations, which have
|
|
83
|
+
* an impact on the senses used to detect thermal comfort. This model uses an adaptive
|
|
84
|
+
* coefficient (λ) representing the adaptive factors that affect the sense of thermal comfort.
|
|
85
|
+
*
|
|
86
|
+
* This is a version that supports arrays.
|
|
87
|
+
* @see {@link a_pmv} for a version that supports scalar arguments.
|
|
88
|
+
*
|
|
89
|
+
* @public
|
|
90
|
+
* @memberof models
|
|
91
|
+
* @docname Adaptive Predicted Mean Vote (aPMV) (array version)
|
|
92
|
+
*
|
|
93
|
+
* @param {number[]} tdb - Dry bulb air temperature, default in [°C] in [°F] if `units` = 'IP'
|
|
94
|
+
* @param {number[]} tr - Mean radiant temperature, default in [°C] in [°F] if `units` = 'IP'
|
|
95
|
+
* @param {number[]} vr - Relative air speed, default in [m/s] in [fps] if `units` = 'IP'
|
|
96
|
+
*
|
|
97
|
+
* Note: vr is the relative air speed caused by body movement and not the air
|
|
98
|
+
* speed measured by the air speed sensor. The relative air speed is the sum of the
|
|
99
|
+
* average air speed measured by the sensor plus the activity-generated air speed
|
|
100
|
+
* (Vag). Where Vag is the activity-generated air speed caused by motion of
|
|
101
|
+
* individual body parts. vr can be calculated using the function v_relative_array in utilities.js.
|
|
102
|
+
* @param {number[]} rh - Relative humidity, [%]
|
|
103
|
+
* @param {number[]} met - Metabolic rate, [met]
|
|
104
|
+
* @param {number[]} clo - Clothing insulation, [clo]
|
|
105
|
+
*
|
|
106
|
+
* Note: The activity as well as the air speed modify the insulation characteristics
|
|
107
|
+
* of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that
|
|
108
|
+
* the clothing insulation shall be corrected {@link #ref_2|[2]}. The ASHRAE 55 Standard corrects
|
|
109
|
+
* for the effect of the body movement for met equal or higher than 1.2 met using
|
|
110
|
+
* the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo,
|
|
111
|
+
* can be calculated using the function clo_dynamic_array in utilities.js.
|
|
112
|
+
* @param {number[]} a_coefficient - Adaptive coefficient
|
|
113
|
+
* @param {number[]} wme - External work, default is array of 0
|
|
114
|
+
* @param {A_pmvKwargs} kwargs - additional arguments
|
|
115
|
+
*
|
|
116
|
+
* @returns {number[]} pmv - Predicted Mean Vote
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* const tdb = [24, 30],
|
|
120
|
+
* const tr = [30, 30],
|
|
121
|
+
* const vr = [0.22, 0.22],
|
|
122
|
+
* const rh = [50, 50],
|
|
123
|
+
* const met = [1.4, 1.4],
|
|
124
|
+
* const clo = [0.5, 0.5],
|
|
125
|
+
* const a_coefficient = [0.293, 0.293],
|
|
126
|
+
* const wme = undefined,
|
|
127
|
+
*
|
|
128
|
+
* const result = a_pmv_array(tdb, tr, vr, rh, met, clo, a_coefficient, wme);
|
|
129
|
+
* console.log(result) //output [0.48, 1.09]
|
|
130
|
+
*/
|
|
131
|
+
function a_pmv_array(tdb, tr, vr, rh, met, clo, a_coefficient, wme, kwargs = {}) {
|
|
132
|
+
const default_kwargs = {
|
|
133
|
+
units: "SI",
|
|
134
|
+
limit_inputs: true,
|
|
135
|
+
};
|
|
136
|
+
kwargs = Object.assign(default_kwargs, kwargs);
|
|
137
|
+
const _pmv = (0, pmv_js_1.pmv_array)(tdb, tr, vr, rh, met, clo, wme, "ISO", kwargs);
|
|
138
|
+
return _pmv.map((_pmvValue, i) => (0, utilities_js_1.round)(_pmvValue / (1 + a_coefficient[i] * _pmvValue), 2));
|
|
139
|
+
}
|
|
140
|
+
exports.a_pmv_array = a_pmv_array;
|