jsthermalcomfort 1.1.2 → 1.3.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/lib/cjs/models/adaptive_ashrae.js +3 -10
- package/lib/cjs/models/heat_index.js +25 -2
- package/lib/cjs/models/humidex.js +8 -0
- package/lib/cjs/models/phs.js +24 -6
- package/lib/cjs/models/pmv_ppd.js +9 -16
- package/lib/cjs/models/set_tmp.js +7 -11
- package/lib/cjs/models/two_nodes.js +10 -4
- package/lib/cjs/models/use_fans_heatwave.js +7 -11
- package/lib/cjs/psychrometrics/t_o.js +0 -25
- package/lib/cjs/types/models/adaptive_ashrae.d.ts.map +1 -1
- package/lib/cjs/types/models/heat_index.d.ts.map +1 -1
- package/lib/cjs/types/models/humidex.d.ts.map +1 -1
- package/lib/cjs/types/models/phs.d.ts +13 -1
- package/lib/cjs/types/models/phs.d.ts.map +1 -1
- package/lib/cjs/types/models/pmv_ppd.d.ts.map +1 -1
- package/lib/cjs/types/models/set_tmp.d.ts.map +1 -1
- package/lib/cjs/types/models/two_nodes.d.ts.map +1 -1
- package/lib/cjs/types/models/use_fans_heatwave.d.ts.map +1 -1
- package/lib/cjs/types/psychrometrics/t_o.d.ts +0 -15
- package/lib/cjs/types/psychrometrics/t_o.d.ts.map +1 -1
- package/lib/cjs/types/utilities/index.d.ts +1 -2
- package/lib/cjs/types/utilities/index.d.ts.map +1 -1
- package/lib/cjs/types/utilities/utilities.d.ts +17 -35
- package/lib/cjs/types/utilities/utilities.d.ts.map +1 -1
- package/lib/cjs/utilities/index.js +1 -2
- package/lib/cjs/utilities/utilities.js +89 -114
- package/lib/esm/models/adaptive_ashrae.js +4 -11
- package/lib/esm/models/heat_index.js +24 -2
- package/lib/esm/models/humidex.js +8 -0
- package/lib/esm/models/phs.js +24 -6
- package/lib/esm/models/pmv_ppd.js +10 -17
- package/lib/esm/models/set_tmp.js +8 -12
- package/lib/esm/models/two_nodes.js +10 -4
- package/lib/esm/models/use_fans_heatwave.js +8 -12
- package/lib/esm/psychrometrics/t_o.js +0 -24
- package/lib/esm/types/models/adaptive_ashrae.d.ts.map +1 -1
- package/lib/esm/types/models/heat_index.d.ts.map +1 -1
- package/lib/esm/types/models/humidex.d.ts.map +1 -1
- package/lib/esm/types/models/phs.d.ts +13 -1
- package/lib/esm/types/models/phs.d.ts.map +1 -1
- package/lib/esm/types/models/pmv_ppd.d.ts.map +1 -1
- package/lib/esm/types/models/set_tmp.d.ts.map +1 -1
- package/lib/esm/types/models/two_nodes.d.ts.map +1 -1
- package/lib/esm/types/models/use_fans_heatwave.d.ts.map +1 -1
- package/lib/esm/types/psychrometrics/t_o.d.ts +0 -15
- package/lib/esm/types/psychrometrics/t_o.d.ts.map +1 -1
- package/lib/esm/types/utilities/index.d.ts +1 -2
- package/lib/esm/types/utilities/index.d.ts.map +1 -1
- package/lib/esm/types/utilities/utilities.d.ts +17 -35
- package/lib/esm/types/utilities/utilities.d.ts.map +1 -1
- package/lib/esm/utilities/index.js +2 -2
- package/lib/esm/utilities/utilities.js +90 -114
- package/package.json +1 -1
|
@@ -107,16 +107,9 @@ function adaptive_ashrae(tdb, tr, t_running_mean, v, units = "SI", limit_inputs
|
|
|
107
107
|
// Relation between comfort and outdoor temperature
|
|
108
108
|
let t_cmf = 0.31 * t_running_mean + 17.8;
|
|
109
109
|
if (limit_inputs) {
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
v: [v],
|
|
114
|
-
});
|
|
115
|
-
const trm_valid = t_running_mean >= 10.0 && t_running_mean <= 33.5 ? t_running_mean : NaN;
|
|
116
|
-
if (isNaN(tdb_valid[0]) ||
|
|
117
|
-
isNaN(tr_valid[0]) ||
|
|
118
|
-
isNaN(v_valid[0]) ||
|
|
119
|
-
isNaN(trm_valid))
|
|
110
|
+
const warnings = (0, utilities_js_1.check_standard_compliance)(standard, { tdb, tr, v });
|
|
111
|
+
const trm_valid = t_running_mean >= 10.0 && t_running_mean <= 33.5;
|
|
112
|
+
if (warnings.length > 0 || !trm_valid)
|
|
120
113
|
t_cmf = NaN;
|
|
121
114
|
}
|
|
122
115
|
t_cmf = (0, utilities_js_1.round)(t_cmf, 1);
|
|
@@ -12,6 +12,11 @@ const utilities_js_1 = require("../utilities/utilities.js");
|
|
|
12
12
|
* The HI equation {@link #ref_12|[12]} is derived by multiple regression analysis in temperature and relative humidity from the first version
|
|
13
13
|
* of Steadman’s (1979) apparent temperature (AT) {@link #ref_13|[13]}.
|
|
14
14
|
*
|
|
15
|
+
* The Rothfusz regression is only valid above 27 °C (80.6 °F). Under the
|
|
16
|
+
* default `limit_inputs=true` the function returns `{ hi: NaN }` when `tdb`
|
|
17
|
+
* is below this threshold; pass `limit_inputs=false` to compute regardless.
|
|
18
|
+
* Matches pythermalcomfort 3.9.3 `heat_index_rothfusz`.
|
|
19
|
+
*
|
|
15
20
|
* @public
|
|
16
21
|
* @memberof models
|
|
17
22
|
* @docname Heat Index
|
|
@@ -21,11 +26,14 @@ const utilities_js_1 = require("../utilities/utilities.js");
|
|
|
21
26
|
* @param {Object} [options] (Optional) Other parameters.
|
|
22
27
|
* @param {boolean} [options.round=true] - If True rounds output value, if False it does not round it.
|
|
23
28
|
* @param {"SI" | "IP"} [options.units="SI"] - Select the SI (International System of Units) or the IP (Imperial Units) system.
|
|
29
|
+
* @param {boolean} [options.limit_inputs=true] - If True (default), `tdb` below the Rothfusz applicability threshold (27 °C / 80.6 °F) returns `NaN`. If False, the regression is evaluated regardless of input range.
|
|
24
30
|
*
|
|
25
31
|
* @returns {HeatIndexResult} set containing results for the model
|
|
26
32
|
*
|
|
27
33
|
* @example
|
|
28
|
-
* const hi = heat_index(25, 50); // returns {hi:
|
|
34
|
+
* const hi = heat_index(25, 50); // returns {hi: NaN} (below 27 °C threshold)
|
|
35
|
+
* const hi2 = heat_index(25, 50, { limit_inputs: false }); // returns {hi: 25.9}
|
|
36
|
+
* const hi3 = heat_index(30, 80); // returns {hi: 37.7}
|
|
29
37
|
*
|
|
30
38
|
* @category Thermophysiological models
|
|
31
39
|
*/
|
|
@@ -34,11 +42,26 @@ const HEAT_INDEX_SCHEMA = {
|
|
|
34
42
|
rh: { type: "number" },
|
|
35
43
|
round: { type: "boolean", required: false },
|
|
36
44
|
units: { enum: ["SI", "IP"], required: false },
|
|
45
|
+
limit_inputs: { type: "boolean", required: false },
|
|
37
46
|
};
|
|
38
47
|
function heat_index(tdb, rh, options = { round: true, units: "SI" }) {
|
|
48
|
+
var _a;
|
|
39
49
|
if (options.units)
|
|
40
50
|
options.units = options.units.toUpperCase();
|
|
41
|
-
(0, utilities_js_1.validateInputs)({
|
|
51
|
+
(0, utilities_js_1.validateInputs)({
|
|
52
|
+
tdb,
|
|
53
|
+
rh,
|
|
54
|
+
round: options.round,
|
|
55
|
+
units: options.units,
|
|
56
|
+
limit_inputs: options.limit_inputs,
|
|
57
|
+
}, HEAT_INDEX_SCHEMA);
|
|
58
|
+
const limit_inputs = (_a = options.limit_inputs) !== null && _a !== void 0 ? _a : true;
|
|
59
|
+
if (limit_inputs) {
|
|
60
|
+
const threshold = options.units === "IP" ? 80.6 : 27;
|
|
61
|
+
if (tdb < threshold) {
|
|
62
|
+
return { hi: NaN };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
42
65
|
let hi;
|
|
43
66
|
let tdb_squared = Math.pow(tdb, 2);
|
|
44
67
|
let rh_squared = Math.pow(rh, 2);
|
|
@@ -19,6 +19,9 @@ const utilities_js_1 = require("../utilities/utilities.js");
|
|
|
19
19
|
* Humidex differs from the heat index in being related to the dew point
|
|
20
20
|
* rather than relative humidity {@link #ref_15|[15]}.
|
|
21
21
|
*
|
|
22
|
+
* Relative humidity outside [0, 100] is physically invalid and throws a
|
|
23
|
+
* `RangeError`.
|
|
24
|
+
*
|
|
22
25
|
* @public
|
|
23
26
|
* @memberof models
|
|
24
27
|
* @docname Humidex
|
|
@@ -29,6 +32,8 @@ const utilities_js_1 = require("../utilities/utilities.js");
|
|
|
29
32
|
* @param {boolean} [options.round = true] - If true, rounds output value. If
|
|
30
33
|
* false, it does not.
|
|
31
34
|
*
|
|
35
|
+
* @throws {RangeError} when `rh` is outside `[0, 100]`.
|
|
36
|
+
*
|
|
32
37
|
* @returns {HumidexResult} the result given the provided temperature and
|
|
33
38
|
* relative humidity.
|
|
34
39
|
*
|
|
@@ -43,6 +48,9 @@ const HUMIDEX_SCHEMA = {
|
|
|
43
48
|
};
|
|
44
49
|
function humidex(tdb, rh, options = { round: true }) {
|
|
45
50
|
(0, utilities_js_1.validateInputs)({ tdb, rh, round: options.round }, HUMIDEX_SCHEMA);
|
|
51
|
+
if (rh < 0 || rh > 100) {
|
|
52
|
+
throw new RangeError("Relative humidity must be between 0 and 100%");
|
|
53
|
+
}
|
|
46
54
|
let hi = tdb +
|
|
47
55
|
(5 / 9) * ((6.112 * Math.pow(10, ((7.5 * tdb) / (237.7 + tdb))) * rh) / 100 - 10);
|
|
48
56
|
if (options.round) {
|
package/lib/cjs/models/phs.js
CHANGED
|
@@ -110,21 +110,22 @@ const PHS_SCHEMA = {
|
|
|
110
110
|
i_mst: { type: "number" },
|
|
111
111
|
a_p: { type: "number" },
|
|
112
112
|
drink: { enum: [0, 1] },
|
|
113
|
-
weight: { type: "number" },
|
|
113
|
+
weight: { type: "number", exclusiveMin: 0, max: 1000 },
|
|
114
114
|
height: { type: "number" },
|
|
115
115
|
walk_sp: { type: "number" },
|
|
116
116
|
theta: { type: "number" },
|
|
117
|
-
acclimatized: { type: "number" },
|
|
117
|
+
acclimatized: { type: "number", enum: [0, 100] },
|
|
118
118
|
duration: { type: "number" },
|
|
119
119
|
f_r: { type: "number" },
|
|
120
120
|
t_sk: { type: "number" },
|
|
121
121
|
t_cr: { type: "number" },
|
|
122
122
|
t_re: { type: "number" },
|
|
123
123
|
t_cr_eq: { type: "number" },
|
|
124
|
-
t_sk_t_cr_wg: { type: "number" },
|
|
125
|
-
sweat_rate_watt: { type: "number" },
|
|
126
|
-
evap_load_wm2_min: { type: "number" },
|
|
124
|
+
t_sk_t_cr_wg: { type: "number", min: 0, max: 1 },
|
|
125
|
+
sweat_rate_watt: { type: "number", min: 0 },
|
|
126
|
+
evap_load_wm2_min: { type: "number", min: 0 },
|
|
127
127
|
round: { type: "boolean", required: false },
|
|
128
|
+
limit_inputs: { type: "boolean", required: false },
|
|
128
129
|
};
|
|
129
130
|
function phs(tdb, tr, v, rh, met, clo, posture, wme = 0, model = "7933-2023", kwargs = {}) {
|
|
130
131
|
const defaults_kwargs = {
|
|
@@ -146,6 +147,7 @@ function phs(tdb, tr, v, rh, met, clo, posture, wme = 0, model = "7933-2023", kw
|
|
|
146
147
|
sweat_rate_watt: 0,
|
|
147
148
|
evap_load_wm2_min: 0,
|
|
148
149
|
round: true,
|
|
150
|
+
limit_inputs: true,
|
|
149
151
|
};
|
|
150
152
|
let joint_kwargs = Object.assign(defaults_kwargs, kwargs);
|
|
151
153
|
joint_kwargs.t_re = joint_kwargs.t_re || joint_kwargs.t_cr;
|
|
@@ -188,6 +190,7 @@ function phs(tdb, tr, v, rh, met, clo, posture, wme = 0, model = "7933-2023", kw
|
|
|
188
190
|
sweat_rate_watt: joint_kwargs.sweat_rate_watt,
|
|
189
191
|
evap_load_wm2_min: joint_kwargs.evap_load_wm2_min,
|
|
190
192
|
round: joint_kwargs.round,
|
|
193
|
+
limit_inputs: joint_kwargs.limit_inputs,
|
|
191
194
|
}, PHS_SCHEMA);
|
|
192
195
|
const met_watt = met * MET_WATT_PER_MET;
|
|
193
196
|
const wme_watt = wme * MET_WATT_PER_MET;
|
|
@@ -199,7 +202,22 @@ function phs(tdb, tr, v, rh, met, clo, posture, wme = 0, model = "7933-2023", kw
|
|
|
199
202
|
met: met_watt * (0, utilities_js_1.body_surface_area)(joint_kwargs.weight, joint_kwargs.height),
|
|
200
203
|
clo,
|
|
201
204
|
});
|
|
202
|
-
warnings.
|
|
205
|
+
if (warnings.length > 0 && joint_kwargs.limit_inputs) {
|
|
206
|
+
warnings.forEach((warning) => console.warn(warning));
|
|
207
|
+
return {
|
|
208
|
+
t_re: NaN,
|
|
209
|
+
t_sk: NaN,
|
|
210
|
+
t_cr: NaN,
|
|
211
|
+
t_cr_eq: NaN,
|
|
212
|
+
t_sk_t_cr_wg: NaN,
|
|
213
|
+
d_lim_loss_50: NaN,
|
|
214
|
+
d_lim_loss_95: NaN,
|
|
215
|
+
d_lim_t_re: NaN,
|
|
216
|
+
sweat_rate_watt: NaN,
|
|
217
|
+
sweat_loss_g: NaN,
|
|
218
|
+
evap_load_wm2_min: NaN,
|
|
219
|
+
};
|
|
220
|
+
}
|
|
203
221
|
let p_a;
|
|
204
222
|
if (model === "7933-2023") {
|
|
205
223
|
p_a = 0.6105 * Math.exp((17.27 * tdb) / (tdb + 237.3)) * (rh / 100);
|
|
@@ -147,12 +147,12 @@ function pmv_ppd(tdb, tr, vr, rh, met, clo, wme = 0, standard = "ISO", kwargs =
|
|
|
147
147
|
// Conversion from IP to SI units
|
|
148
148
|
({ tdb, tr, vr } = (0, utilities_js_1.units_converter)({ tdb, tr, vr }, "IP"));
|
|
149
149
|
}
|
|
150
|
-
const
|
|
151
|
-
tdb
|
|
152
|
-
tr
|
|
153
|
-
v:
|
|
154
|
-
met
|
|
155
|
-
clo
|
|
150
|
+
const compliance_warnings = (0, utilities_js_1.check_standard_compliance)(standard, {
|
|
151
|
+
tdb,
|
|
152
|
+
tr,
|
|
153
|
+
v: vr,
|
|
154
|
+
met,
|
|
155
|
+
clo,
|
|
156
156
|
airspeed_control: kwargs.airspeed_control,
|
|
157
157
|
});
|
|
158
158
|
let ce = 0;
|
|
@@ -169,16 +169,9 @@ function pmv_ppd(tdb, tr, vr, rh, met, clo, wme = 0, standard = "ISO", kwargs =
|
|
|
169
169
|
Math.exp(-0.03353 * Math.pow(pmv, 4.0) - 0.2179 * Math.pow(pmv, 2.0));
|
|
170
170
|
// Checks that inputs are within the bounds accepted by the model if not return NaN
|
|
171
171
|
if (kwargs.limit_inputs) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (isNaN(pmv) ||
|
|
176
|
-
tdb_valid.includes(NaN) ||
|
|
177
|
-
tr_valid.includes(NaN) ||
|
|
178
|
-
v_valid.includes(NaN) ||
|
|
179
|
-
met_valid.includes(NaN) ||
|
|
180
|
-
clo_valid.includes(NaN) ||
|
|
181
|
-
pmv_valid.includes(NaN)) {
|
|
172
|
+
// ISO 7730 limits PMV applicability to [-2, 2]; ASHRAE 55 has no equivalent output bound
|
|
173
|
+
const pmv_outside_iso_range = standard === "ISO" && (0, utilities_js_1.valid_range)([pmv], [-2, 2]).includes(NaN);
|
|
174
|
+
if (isNaN(pmv) || compliance_warnings.length > 0 || pmv_outside_iso_range) {
|
|
182
175
|
pmv = NaN;
|
|
183
176
|
ppd = NaN;
|
|
184
177
|
}
|
|
@@ -112,18 +112,14 @@ function set_tmp(tdb, tr, v, rh, met, clo, wme = 0, body_surface_area, p_atm, bo
|
|
|
112
112
|
({ tmp: set_tmp } = (0, utilities_js_1.units_converter)({ tmp: set_tmp }, "SI"));
|
|
113
113
|
}
|
|
114
114
|
if (limit_inputs) {
|
|
115
|
-
const
|
|
116
|
-
tdb
|
|
117
|
-
tr
|
|
118
|
-
v
|
|
119
|
-
met
|
|
120
|
-
clo
|
|
115
|
+
const warnings = (0, utilities_js_1.check_standard_compliance)("ASHRAE", {
|
|
116
|
+
tdb,
|
|
117
|
+
tr,
|
|
118
|
+
v,
|
|
119
|
+
met,
|
|
120
|
+
clo,
|
|
121
121
|
});
|
|
122
|
-
if (
|
|
123
|
-
isNaN(tr_valid[0]) ||
|
|
124
|
-
isNaN(v_valid[0]) ||
|
|
125
|
-
isNaN(met_valid[0]) ||
|
|
126
|
-
isNaN(clo_valid[0])) {
|
|
122
|
+
if (warnings.length > 0) {
|
|
127
123
|
set_tmp = NaN;
|
|
128
124
|
}
|
|
129
125
|
}
|
|
@@ -66,9 +66,6 @@ const utilities_js_1 = require("../utilities/utilities.js");
|
|
|
66
66
|
* - The Predicted Percent Dissatisfied Due to Draft (PD)
|
|
67
67
|
* - Predicted Percent Satisfied With the Level of Air Movement” (PS)
|
|
68
68
|
*
|
|
69
|
-
* **Warning:** Some tests are currently failing for this function. Please refer to the test
|
|
70
|
-
* suite or the project's issue tracker for more details.
|
|
71
|
-
*
|
|
72
69
|
* @public
|
|
73
70
|
* @memberof models
|
|
74
71
|
* @docname Gagge et al. two-node model
|
|
@@ -344,10 +341,19 @@ function calculate_et(tSkin, qSkin, pSSk, w, rA, rClo, rEa, rEcl) {
|
|
|
344
341
|
* @returns {number} Thermal discomfort
|
|
345
342
|
*/
|
|
346
343
|
function calculate_discomfort(eRsw, eComfort, eMax, wMax, eDiff, tSens) {
|
|
347
|
-
let disc
|
|
344
|
+
let disc;
|
|
345
|
+
if (tSens > 0 && eMax * wMax - eComfort - eDiff < 0) {
|
|
346
|
+
disc = 6.0;
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
disc = (4.7 * (eRsw - eComfort)) / (eMax * wMax - eComfort - eDiff);
|
|
350
|
+
}
|
|
348
351
|
if (disc <= 0) {
|
|
349
352
|
disc = tSens;
|
|
350
353
|
}
|
|
354
|
+
if (disc > 6) {
|
|
355
|
+
disc = 6.0;
|
|
356
|
+
}
|
|
351
357
|
return disc;
|
|
352
358
|
}
|
|
353
359
|
/**
|
|
@@ -165,18 +165,14 @@ function use_fans_heatwaves(tdb, tr, v, rh, met, clo, wme = 0, body_surface_area
|
|
|
165
165
|
}
|
|
166
166
|
Object.assign(joint_output, heatwave_output);
|
|
167
167
|
if (joint_kwargs.limit_inputs) {
|
|
168
|
-
const
|
|
169
|
-
tdb
|
|
170
|
-
tr
|
|
171
|
-
v
|
|
172
|
-
met
|
|
173
|
-
clo
|
|
168
|
+
const warnings = (0, utilities_js_1.check_standard_compliance)("FAN_HEATWAVES", {
|
|
169
|
+
tdb,
|
|
170
|
+
tr,
|
|
171
|
+
v,
|
|
172
|
+
met,
|
|
173
|
+
clo,
|
|
174
174
|
});
|
|
175
|
-
if (
|
|
176
|
-
isNaN(tr_valid[0]) ||
|
|
177
|
-
isNaN(v_valid[0]) ||
|
|
178
|
-
isNaN(met_valid[0]) ||
|
|
179
|
-
isNaN(clo_valid[0])) {
|
|
175
|
+
if (warnings.length > 0) {
|
|
180
176
|
for (let key in joint_output) {
|
|
181
177
|
if (key === "heat_strain" ||
|
|
182
178
|
key === "heat_strain_blood_flow" ||
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.t_o = t_o;
|
|
4
|
-
exports.t_o_array = t_o_array;
|
|
5
4
|
/**
|
|
6
5
|
* Calculates operative temperature in accordance with ISO 7726:1998 {@link #ref_5|[5]}.
|
|
7
6
|
*
|
|
@@ -28,30 +27,6 @@ function t_o(tdb, tr, v, standard = "ISO") {
|
|
|
28
27
|
throw new Error("standard must be one of ISO or ASHRAE");
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Calculates operative temperature in accordance with ISO 7726:1998 {@link #ref_5|[5]}.
|
|
33
|
-
*
|
|
34
|
-
* @public
|
|
35
|
-
* @memberof psychrometrics
|
|
36
|
-
*
|
|
37
|
-
* @see {@link t_o} for a version that supports scalar arguments
|
|
38
|
-
*
|
|
39
|
-
* @param {number[]} tdb - air temperature [C]
|
|
40
|
-
* @param {number[]} tr - mean radiant temperature [C]
|
|
41
|
-
* @param {number[]} v - air speed [m/s]
|
|
42
|
-
* @param {("ISO" | "ASHRAE")} standard - the standard to use
|
|
43
|
-
* @returns {number[]} operative temperature [C]
|
|
44
|
-
*/
|
|
45
|
-
function t_o_array(tdb, tr, v, standard = "ISO") {
|
|
46
|
-
if (tdb.length !== tr.length || tr.length !== v.length) {
|
|
47
|
-
throw new Error("Provided arrays are not the same lengths");
|
|
48
|
-
}
|
|
49
|
-
if (standard === "ISO")
|
|
50
|
-
return tdb.map((_tdb, index) => _t_o_calculation_iso(_tdb, tr[index], v[index]));
|
|
51
|
-
if (standard === "ASHRAE")
|
|
52
|
-
return tdb.map((_tdb, index) => _t_o_calculation_ashrae(_tdb, tr[index], v[index]));
|
|
53
|
-
throw new Error("standard must be one of ISO or ASHRAE");
|
|
54
|
-
}
|
|
55
30
|
/**
|
|
56
31
|
* Runs the ISO t_o calculation for scalar values
|
|
57
32
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adaptive_ashrae.d.ts","sourceRoot":"","sources":["../../../../src/models/adaptive_ashrae.js"],"names":[],"mappings":"AA4FA;;;;;;;;
|
|
1
|
+
{"version":3,"file":"adaptive_ashrae.d.ts","sourceRoot":"","sources":["../../../../src/models/adaptive_ashrae.js"],"names":[],"mappings":"AA4FA;;;;;;;;EA6EC;;;;;aA9Ja,MAAM;;;;oBACN,MAAM;;;;mBACN,MAAM;;;;oBACN,MAAM;;;;mBACN,MAAM;;;;sBACN,OAAO;;;;sBACP,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heat_index.d.ts","sourceRoot":"","sources":["../../../../src/models/heat_index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"heat_index.d.ts","sourceRoot":"","sources":["../../../../src/models/heat_index.js"],"names":[],"mappings":"AA6CA;;;;;EAoDC;;;;;QA7Fa,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"humidex.d.ts","sourceRoot":"","sources":["../../../../src/models/humidex.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"humidex.d.ts","sourceRoot":"","sources":["../../../../src/models/humidex.js"],"names":[],"mappings":"AAgDA;;;;;EA8BC;;;;;;;;;;aAzEa,MAAM;;;;;gBAEN,MAAM"}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
export function phs(tdb: any, tr: any, v: any, rh: any, met: any, clo: any, posture: any, wme?: number, model?: string, kwargs?: {}):
|
|
1
|
+
export function phs(tdb: any, tr: any, v: any, rh: any, met: any, clo: any, posture: any, wme?: number, model?: string, kwargs?: {}): {
|
|
2
|
+
t_re: number;
|
|
3
|
+
t_sk: number;
|
|
4
|
+
t_cr: number;
|
|
5
|
+
t_cr_eq: number;
|
|
6
|
+
t_sk_t_cr_wg: number;
|
|
7
|
+
d_lim_loss_50: number;
|
|
8
|
+
d_lim_loss_95: number;
|
|
9
|
+
d_lim_t_re: number;
|
|
10
|
+
sweat_rate_watt: number;
|
|
11
|
+
sweat_loss_g: number;
|
|
12
|
+
evap_load_wm2_min: number;
|
|
13
|
+
};
|
|
2
14
|
export type Speeds = {
|
|
3
15
|
v: number;
|
|
4
16
|
walk_speed: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phs.d.ts","sourceRoot":"","sources":["../../../../src/models/phs.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"phs.d.ts","sourceRoot":"","sources":["../../../../src/models/phs.js"],"names":[],"mappings":"AAyIA;;;;;;;;;;;;EAwJC;;OA2Ba,MAAM;gBACN,MAAM;;;YA0BN,MAAM;WACN,MAAM;SACN,MAAM;cACN,MAAM;aACN,MAAM;WACN,MAAM;WACN,MAAM;YACN,MAAM;OACN,MAAM;WACN,MAAM;YACN,MAAM;cACN,MAAM;aACN,MAAM;gBACN,MAAM;mBACN,MAAM;mBACN,MAAM;cACN,MAAM;cACN,MAAM;gBACN,MAAM;gBACN,MAAM;cACN,MAAM;;;;;;UA/VN,MAAM;;;;UACN,MAAM;;;;UACN,MAAM;;;;aACN,MAAM;;;;kBACN,MAAM;;;;mBACN,MAAM;;;;mBACN,MAAM;;;;gBACN,MAAM;;;;qBACN,MAAM;;;;kBACN,MAAM;;;;uBACN,MAAM;;;;;;YAMN,MAAM;;;;UACN,MAAM;;;;YACN,CAAC,GAAG,CAAC;;;;aACL,MAAM;;;;aACN,MAAM;;;;cACN,MAAM;;;;YACN,MAAM;;;;mBACN,MAAM;;;;eACN,MAAM;;;;UACN,MAAM;;;;WACN,MAAM;;;;WACN,MAAM;;;;WACN,MAAM;;;;cACN,MAAM;;;;iBACN,MAAM;;;;YACN,OAAO;;;WAMP,MAAM;SACN,MAAM;WACN,CAAC,GAAG,CAAC;YACL,MAAM;YACN,MAAM;aACN,MAAM;WACN,MAAM;kBACN,MAAM;cACN,MAAM;SACN,MAAM;UACN,MAAM;UACN,MAAM;UACN,MAAM;aACN,MAAM;kBACN,MAAM;qBACN,MAAM;uBACN,MAAM;WACN,OAAO;WACP,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pmv_ppd.d.ts","sourceRoot":"","sources":["../../../../src/models/pmv_ppd.js"],"names":[],"mappings":"AAgIA;;;
|
|
1
|
+
{"version":3,"file":"pmv_ppd.d.ts","sourceRoot":"","sources":["../../../../src/models/pmv_ppd.js"],"names":[],"mappings":"AAgIA;;;EAoFC;AAED;;;;;;;;;;GAUG;AACH,qCAVW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,GAEJ,MAAM,CA0ElB;;;;;WA9Ra,IAAI,GAAC,IAAI;;;;;;;;;;;kBACR,OAAO;;;;;;;;;;sBAQP,OAAO;;;;kBAOP,OAAO;;;;;;SAMP,MAAM;;;;SACN,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set_tmp.d.ts","sourceRoot":"","sources":["../../../../src/models/set_tmp.js"],"names":[],"mappings":"AA0EA;;
|
|
1
|
+
{"version":3,"file":"set_tmp.d.ts","sourceRoot":"","sources":["../../../../src/models/set_tmp.js"],"names":[],"mappings":"AA0EA;;EAsGC;;;;;SAtKa,MAAM;;;;;;;;;YAMN,OAAO;;;;mBACP,OAAO;;;WAMP,OAAO;kBACP,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"two_nodes.d.ts","sourceRoot":"","sources":["../../../../src/models/two_nodes.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"two_nodes.d.ts","sourceRoot":"","sources":["../../../../src/models/two_nodes.js"],"names":[],"mappings":"AAkIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyGC;AAaD;;;;;;GAMG;AACH,kCAJW,MAAM,EAAE,aACR,MAAM,YAQhB;;;;;YA/Pa,MAAM;;;;WACN,MAAM;;;;WACN,MAAM;;;;gBACN,MAAM;;;;YACN,MAAM;;;;WACN,MAAM;;;;YACN,MAAM;;;;YACN,MAAM;;;;UACN,MAAM;;;;WACN,MAAM;;;;OACN,MAAM;;;;WACN,MAAM;;;;SACN,MAAM;;;;QACN,MAAM;;;;eACN,MAAM;;;;aACN,MAAM;;;;UACN,MAAM;;;;YACN,MAAM;;;;;;;;;YAMN,OAAO;;;;mBACP,OAAO;;;;mBACP,MAAM;;;;YACN,MAAM;;;WAMN,OAAO;kBACP,OAAO;kBACP,MAAM;WACN,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_fans_heatwave.d.ts","sourceRoot":"","sources":["../../../../src/models/use_fans_heatwave.js"],"names":[],"mappings":"AAwHA,
|
|
1
|
+
{"version":3,"file":"use_fans_heatwave.d.ts","sourceRoot":"","sources":["../../../../src/models/use_fans_heatwave.js"],"names":[],"mappings":"AAwHA,mOA4IC;;;;;YA1Pa,MAAM;;;;WACN,MAAM;;;;YACN,MAAM;;;;WACN,MAAM;;;;gBACN,MAAM;;;;YACN,MAAM;;;;WACN,MAAM;;;;YACN,MAAM;;;;YACN,MAAM;;;;UACN,MAAM;;;;WACN,MAAM;;;;OACN,MAAM;;;;WACN,MAAM;;;;iBACN,OAAO,GAAG,SAAS;;;;4BACnB,OAAO,GAAG,SAAS;;;;mBACnB,OAAO,GAAG,SAAS;;;;0BACnB,OAAO,GAAG,SAAS;;;;;;;;;mBAMnB,MAAM;;;;YACN,OAAO;;;;;;;mBACP,OAAO;;;WASP,OAAO;kBACP,MAAM;kBACN,OAAO"}
|
|
@@ -12,19 +12,4 @@
|
|
|
12
12
|
* @returns {number} operative temperature [C]
|
|
13
13
|
*/
|
|
14
14
|
export function t_o(tdb: number, tr: number, v: number, standard?: ("ISO" | "ASHRAE")): number;
|
|
15
|
-
/**
|
|
16
|
-
* Calculates operative temperature in accordance with ISO 7726:1998 {@link #ref_5|[5]}.
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
* @memberof psychrometrics
|
|
20
|
-
*
|
|
21
|
-
* @see {@link t_o} for a version that supports scalar arguments
|
|
22
|
-
*
|
|
23
|
-
* @param {number[]} tdb - air temperature [C]
|
|
24
|
-
* @param {number[]} tr - mean radiant temperature [C]
|
|
25
|
-
* @param {number[]} v - air speed [m/s]
|
|
26
|
-
* @param {("ISO" | "ASHRAE")} standard - the standard to use
|
|
27
|
-
* @returns {number[]} operative temperature [C]
|
|
28
|
-
*/
|
|
29
|
-
export function t_o_array(tdb: number[], tr: number[], v: number[], standard?: ("ISO" | "ASHRAE")): number[];
|
|
30
15
|
//# sourceMappingURL=t_o.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"t_o.d.ts","sourceRoot":"","sources":["../../../../src/psychrometrics/t_o.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,yBANW,MAAM,MACN,MAAM,KACN,MAAM,aACN,CAAC,KAAK,GAAG,QAAQ,CAAC,GAChB,MAAM,CAelB
|
|
1
|
+
{"version":3,"file":"t_o.d.ts","sourceRoot":"","sources":["../../../../src/psychrometrics/t_o.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,yBANW,MAAM,MACN,MAAM,KACN,MAAM,aACN,CAAC,KAAK,GAAG,QAAQ,CAAC,GAChB,MAAM,CAelB"}
|
|
@@ -19,6 +19,5 @@ import { f_svv } from "./utilities.js";
|
|
|
19
19
|
import { met_typical_tasks } from "./utilities.js";
|
|
20
20
|
import { clo_typical_ensembles } from "./utilities.js";
|
|
21
21
|
import { clo_individual_garments } from "./utilities.js";
|
|
22
|
-
|
|
23
|
-
export { body_surface_area, v_relative, clo_dynamic, units_converter, running_mean_outdoor_temperature, f_svv, met_typical_tasks, clo_typical_ensembles, clo_individual_garments, check_standard_compliance_array };
|
|
22
|
+
export { body_surface_area, v_relative, clo_dynamic, units_converter, running_mean_outdoor_temperature, f_svv, met_typical_tasks, clo_typical_ensembles, clo_individual_garments };
|
|
24
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utilities/index.js"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utilities/index.js"],"names":[],"mappings":";;;;;;;;;;;;kCAUO,gBAAgB;2BAAhB,gBAAgB;4BAAhB,gBAAgB;gCAAhB,gBAAgB;iDAAhB,gBAAgB;sBAAhB,gBAAgB;kCAAhB,gBAAgB;sCAAhB,gBAAgB;wCAAhB,gBAAgB"}
|
|
@@ -13,6 +13,21 @@ export function round(number: number, precision: number): number;
|
|
|
13
13
|
* @returns {[number, number]}
|
|
14
14
|
*/
|
|
15
15
|
export function transpose_sharp_altitude(sharp: number, altitude: number): [number, number];
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {Object} ComplianceKwargs
|
|
18
|
+
* @property {number} [met]
|
|
19
|
+
* @property {number} [clo]
|
|
20
|
+
* @property {number} [tdb]
|
|
21
|
+
* @property {number} [tr]
|
|
22
|
+
* @property {number} [v]
|
|
23
|
+
* @property {number} [vr]
|
|
24
|
+
* @property {number} [v_limited]
|
|
25
|
+
* @property {number} [rh]
|
|
26
|
+
* @property {boolean} [airspeed_control]
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* @typedef {"ANKLE_DRAFT" | "ASHRAE" | "FAN_HEATWAVES" | "ISO" | "ISO7933"} Standard
|
|
30
|
+
*/
|
|
16
31
|
/**
|
|
17
32
|
* Check that the values comply with the standard provided
|
|
18
33
|
*
|
|
@@ -22,28 +37,6 @@ export function transpose_sharp_altitude(sharp: number, altitude: number): [numb
|
|
|
22
37
|
* @returns {string[]} strings with warnings emitted
|
|
23
38
|
*/
|
|
24
39
|
export function check_standard_compliance(standard: Standard, kwargs: ComplianceKwargs): string[];
|
|
25
|
-
/**
|
|
26
|
-
* @typedef {Object.<string, number[]>} CheckStandardComplianceResult
|
|
27
|
-
* @property {number[]} tdb
|
|
28
|
-
* @property {number[]} tr
|
|
29
|
-
* @property {number[]} v
|
|
30
|
-
* @property {number[]} [met]
|
|
31
|
-
* @property {number[]} [clo]
|
|
32
|
-
* @property {number[]} [rh]
|
|
33
|
-
*/
|
|
34
|
-
/**
|
|
35
|
-
* Check that the values as an array comply with the standard provided and returns arrays where
|
|
36
|
-
* the values that do not comply are NaN
|
|
37
|
-
* @see {@link check_standard_compliance} for scalar variant that returns warnings
|
|
38
|
-
*
|
|
39
|
-
* @param {Standard | "FAN_HEATWAVES"} standard - standard to check compliance with
|
|
40
|
-
* @param {ComplianceKwargsArray & {airspeed_control?: boolean}} kwargs - values to check compliance against
|
|
41
|
-
*
|
|
42
|
-
* @returns {CheckStandardComplianceResult} filtered arrays based on compliance limits
|
|
43
|
-
*/
|
|
44
|
-
export function check_standard_compliance_array(standard: Standard | "FAN_HEATWAVES", kwargs: ComplianceKwargsArray & {
|
|
45
|
-
airspeed_control?: boolean;
|
|
46
|
-
}): CheckStandardComplianceResult;
|
|
47
40
|
/**
|
|
48
41
|
* Returns the body surface area in square meters
|
|
49
42
|
*
|
|
@@ -303,18 +296,7 @@ export type ComplianceKwargs = {
|
|
|
303
296
|
vr?: number;
|
|
304
297
|
v_limited?: number;
|
|
305
298
|
rh?: number;
|
|
299
|
+
airspeed_control?: boolean;
|
|
306
300
|
};
|
|
307
|
-
export type
|
|
308
|
-
met?: number[];
|
|
309
|
-
clo?: number[];
|
|
310
|
-
tdb?: number[];
|
|
311
|
-
tr?: number[];
|
|
312
|
-
v?: number[];
|
|
313
|
-
v_limited?: number[];
|
|
314
|
-
rh?: number[];
|
|
315
|
-
};
|
|
316
|
-
export type Standard = "ANKLE_DRAFT" | "ASHRAE" | "ISO" | "ISO7933";
|
|
317
|
-
export type CheckStandardComplianceResult = {
|
|
318
|
-
[x: string]: number[];
|
|
319
|
-
};
|
|
301
|
+
export type Standard = "ANKLE_DRAFT" | "ASHRAE" | "FAN_HEATWAVES" | "ISO" | "ISO7933";
|
|
320
302
|
//# sourceMappingURL=utilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../../src/utilities/utilities.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,8BAJW,MAAM,aACN,MAAM,GACJ,MAAM,CAKlB;
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../../src/utilities/utilities.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,8BAJW,MAAM,aACN,MAAM,GACJ,MAAM,CAKlB;AAwBD;;;;;GAKG;AACH,gDAJW,MAAM,YACN,MAAM,GACJ,CAAC,MAAM,EAAE,MAAM,CAAC,CAgB5B;AAED;;;;;;;;;;;GAWG;AAEH;;GAEG;AAEH;;;;;;;GAOG;AACH,oDALW,QAAQ,UACR,gBAAgB,GAEd,MAAM,EAAE,CAiBpB;AA+ND;;;;;;;;;;;;;GAaG;AACH,0CAPW,MAAM,UACN,MAAM,YACN,CAAC,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC,GAC/C,MAAM,CAiBlB;AAED;;;;;;;;;;;;;GAaG;AACH,8BAJW,MAAM,OACN,MAAM,GACJ,MAAM,CAKlB;AAWD;;;;;;;;;;;;;;;;GAgBG;AACH,iCALW,MAAM,OACN,MAAM,aACN,CAAC,QAAQ,GAAG,KAAK,CAAC,GAChB,MAAM,CAUlB;AAWD;;;;;;;;;;;;GAYG;AACH,gCANuC,CAAC,SAA3B;QAAS,MAAM,GAAE,MAAM;CAAE,UAC3B,CAAC,eACD,IAAI,GAAG,IAAI,GACT,CAAC,CA4Bb;AAoED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,6DAhBW,MAAM,EAAE,UAKR,MAAM,UAON,IAAI,GAAG,IAAI,GAET,MAAM,CAmBlB;AAED;;;;;;;;;;;;GAYG;AACH,yBANW,MAAM,KACN,MAAM,KACN,MAAM,GAEJ,MAAM,CAMlB;AAED;;;;;;GAMG;AACH,oCAJW,MAAM,EAAE,cACR,CAAC,MAAM,EAAE,MAAM,CAAC,GACd,MAAM,EAAE,CAKpB;AA+ED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,iDAnBW,oCAAoC,GAAG,gCAAgC,GACjF,2DAA6D,GAAG,6BAA6B,GAC7F,iDAAmD,GAAG,qCAAqC,GAC3F,qCAAuC,GAAG,gCAAgC,GAW9D,MAAM,CA4BlB;AA7HD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,oCAgCE;AAoDF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,0CAyDE;AAUK,oCAJI,GAAC,QACD,MAAM,QAOhB;AAwBM,uCAnBI,MAAM,UACN,MAAM,QAqDhB;;UA11Ba,MAAM;UACN,MAAM;UACN,MAAM;SACN,MAAM;QACN,MAAM;SACN,MAAM;gBACN,MAAM;SACN,MAAM;uBACN,OAAO;;uBAIR,aAAa,GAAG,QAAQ,GAAG,eAAe,GAAG,KAAK,GAAG,SAAS"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.clo_individual_garments = exports.clo_typical_ensembles = exports.met_typical_tasks = exports.f_svv = exports.running_mean_outdoor_temperature = exports.units_converter = exports.clo_dynamic = exports.v_relative = exports.body_surface_area = void 0;
|
|
4
4
|
const utilities_js_1 = require("./utilities.js");
|
|
5
5
|
Object.defineProperty(exports, "body_surface_area", { enumerable: true, get: function () { return utilities_js_1.body_surface_area; } });
|
|
6
6
|
Object.defineProperty(exports, "v_relative", { enumerable: true, get: function () { return utilities_js_1.v_relative; } });
|
|
@@ -11,7 +11,6 @@ Object.defineProperty(exports, "f_svv", { enumerable: true, get: function () { r
|
|
|
11
11
|
Object.defineProperty(exports, "met_typical_tasks", { enumerable: true, get: function () { return utilities_js_1.met_typical_tasks; } });
|
|
12
12
|
Object.defineProperty(exports, "clo_typical_ensembles", { enumerable: true, get: function () { return utilities_js_1.clo_typical_ensembles; } });
|
|
13
13
|
Object.defineProperty(exports, "clo_individual_garments", { enumerable: true, get: function () { return utilities_js_1.clo_individual_garments; } });
|
|
14
|
-
Object.defineProperty(exports, "check_standard_compliance_array", { enumerable: true, get: function () { return utilities_js_1.check_standard_compliance_array; } });
|
|
15
14
|
exports.default = {
|
|
16
15
|
body_surface_area: utilities_js_1.body_surface_area,
|
|
17
16
|
v_relative: utilities_js_1.v_relative,
|