jsthermalcomfort 0.0.2 → 0.1.2
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 +196 -6
- 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 +22 -15
- package/lib/esm/index.mjs +0 -430
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rounds a number to the given precision.
|
|
3
|
+
*
|
|
4
|
+
* @param {number} number - the number to round
|
|
5
|
+
* @param {number} precision - the number of decimal places to round to
|
|
6
|
+
* @returns {number} the rounded result
|
|
7
|
+
*/
|
|
8
|
+
export function round(number: number, precision: number): number;
|
|
9
|
+
/**
|
|
10
|
+
* Converts sharp and altittude from radians to degree unit
|
|
11
|
+
* @param {number} sharp
|
|
12
|
+
* @param {number} altitude
|
|
13
|
+
* @returns {[number, number]}
|
|
14
|
+
*/
|
|
15
|
+
export function transpose_sharp_altitude(sharp: number, altitude: number): [number, number];
|
|
16
|
+
/**
|
|
17
|
+
* Check that the values comply with the standard provided
|
|
18
|
+
*
|
|
19
|
+
* @param {Standard} standard
|
|
20
|
+
* @param {ComplianceKwargs} kwargs
|
|
21
|
+
*
|
|
22
|
+
* @returns {string[]} strings with warnings emitted
|
|
23
|
+
*/
|
|
24
|
+
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
|
+
/**
|
|
48
|
+
* Returns the body surface area in square meters
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
* @memberof utilities
|
|
52
|
+
* @docname Body Surface Area
|
|
53
|
+
*
|
|
54
|
+
* @param {number} weight - body weight, [kg]
|
|
55
|
+
* @param {number} height - height, [m]
|
|
56
|
+
* @param {("dubois" | "takahira" | "fujimoto" | "kurazumi")} [formula="dubois"] - formula used to calculate the body surface area. default="dubois"
|
|
57
|
+
* @returns {number} body surface area, [m2]
|
|
58
|
+
*
|
|
59
|
+
* @category Utilities
|
|
60
|
+
*/
|
|
61
|
+
export function body_surface_area(weight: number, height: number, formula?: ("dubois" | "takahira" | "fujimoto" | "kurazumi")): number;
|
|
62
|
+
/**
|
|
63
|
+
* Estimates the relative air speed which combines the average air speed of the
|
|
64
|
+
* space plus the relative air speed caused by the body movement. Vag is assumed
|
|
65
|
+
* to be 0 for metabolic rates equal and lower than 1 met and otherwise equal to
|
|
66
|
+
* Vag = 0.3 (M - 1) (m/s)
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
* @memberof utilities
|
|
70
|
+
* @docname Relative air speed
|
|
71
|
+
*
|
|
72
|
+
* @see {@link v_relative_array} for a version that supports array arguments
|
|
73
|
+
*
|
|
74
|
+
* @param {number} v - air spped measured by the sensor, [m/s]
|
|
75
|
+
* @param {number} met - metabolic rate, [met]
|
|
76
|
+
* @returns {number} relative air speed, [m/s]
|
|
77
|
+
*/
|
|
78
|
+
export function v_relative(v: number, met: number): number;
|
|
79
|
+
/**
|
|
80
|
+
* Estimates the relative air speed which combines the average air speed of the
|
|
81
|
+
* space plus the relative air speed caused by the body movement. Vag is assumed
|
|
82
|
+
* to be 0 for metabolic rates equal and lower than 1 met and otherwise equal to
|
|
83
|
+
* Vag = 0.3 (M - 1) (m/s)
|
|
84
|
+
*
|
|
85
|
+
* @public
|
|
86
|
+
* @memberof utilities
|
|
87
|
+
* @docname Relative air speed (array version)
|
|
88
|
+
*
|
|
89
|
+
* @see {@link v_relative} for a version that supports scalar arguments
|
|
90
|
+
*
|
|
91
|
+
* @param {number[]} v - air spped measured by the sensor, [m/s]
|
|
92
|
+
* @param {number[]} met - metabolic rate, [met]
|
|
93
|
+
* @returns {number[]} relative air speed, [m/s]
|
|
94
|
+
*/
|
|
95
|
+
export function v_relative_array(v: number[], met: number[]): number[];
|
|
96
|
+
/**
|
|
97
|
+
* Estimates the dynamic clothing insulation of a moving occupant. The activity as
|
|
98
|
+
* well as the air speed modify the insulation characteristics of the clothing and the
|
|
99
|
+
* adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation
|
|
100
|
+
* shall be corrected {@link #ref_2|[2]}. The ASHRAE 55 Standard corrects for the effect
|
|
101
|
+
* of the body movement for met equal or higher than 1.2 met using the equation
|
|
102
|
+
* clo = Icl × (0.6 + 0.4/met)
|
|
103
|
+
*
|
|
104
|
+
* @public
|
|
105
|
+
* @memberof utilities
|
|
106
|
+
* @docname Dynamic clothing
|
|
107
|
+
*
|
|
108
|
+
* @see {@link clo_dynamic_array} for a version that supports array arguments
|
|
109
|
+
*
|
|
110
|
+
* @param {number} clo - clothing insulation, [clo]
|
|
111
|
+
* @param {number} met - metabolic rate, [met]
|
|
112
|
+
* @param {("ASHRAE" | "ISO")} [standard="ASHRAE"] - If "ASHRAE", uses Equation provided in Section 5.2.2.2 of ASHRAE 55 2020
|
|
113
|
+
* @returns {number} dunamic clothing insulation, [clo]
|
|
114
|
+
*/
|
|
115
|
+
export function clo_dynamic(clo: number, met: number, standard?: ("ASHRAE" | "ISO")): number;
|
|
116
|
+
/**
|
|
117
|
+
* Estimates the dynamic clothing insulation of a moving occupant. The activity as
|
|
118
|
+
* well as the air speed modify the insulation characteristics of the clothing and the
|
|
119
|
+
* adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation
|
|
120
|
+
* shall be corrected {@link #ref_2|[2]}. The ASHRAE 55 Standard corrects for the effect
|
|
121
|
+
* of the body movement for met equal or higher than 1.2 met using the equation
|
|
122
|
+
* clo = Icl × (0.6 + 0.4/met)
|
|
123
|
+
*
|
|
124
|
+
* @public
|
|
125
|
+
* @memberof utilities
|
|
126
|
+
* @docname Dynamic clothing (array version)
|
|
127
|
+
*
|
|
128
|
+
* @see {@link clo_dynamic} for a version that supports scalar arguments
|
|
129
|
+
*
|
|
130
|
+
* @param {number[]} clo - clothing insulation, [clo]
|
|
131
|
+
* @param {number[]} met - metabolic rate, [met]
|
|
132
|
+
* @param {("ASHRAE" | "ISO")} [standard="ASHRAE"] - If "ASHRAE", uses Equation provided in Section 5.2.2.2 of ASHRAE 55 2020
|
|
133
|
+
* @returns {number[]} dunamic clothing insulation, [clo]
|
|
134
|
+
*/
|
|
135
|
+
export function clo_dynamic_array(clo: number[], met: number[], standard?: ("ASHRAE" | "ISO")): number[];
|
|
136
|
+
/**
|
|
137
|
+
* Converts IP values to SI units
|
|
138
|
+
*
|
|
139
|
+
* @memberof utilities
|
|
140
|
+
* @docname Units converter
|
|
141
|
+
* @public
|
|
142
|
+
*
|
|
143
|
+
* @template {Object.<string, number>} T
|
|
144
|
+
* @param {T} kwargs - [t, v] units to convert
|
|
145
|
+
* @param {"IP" | "SI"} [from_units="IP"] - specify system to convert from
|
|
146
|
+
* @returns {T} converted values in SI units
|
|
147
|
+
*
|
|
148
|
+
* @see {@link units_converter_array} for a version that supports array parameters
|
|
149
|
+
*/
|
|
150
|
+
export function units_converter<T extends {
|
|
151
|
+
[x: string]: number;
|
|
152
|
+
}>(kwargs: T, from_units?: "IP" | "SI"): T;
|
|
153
|
+
/**
|
|
154
|
+
* Converts IP values to SI units
|
|
155
|
+
*
|
|
156
|
+
* @memberof utilities
|
|
157
|
+
* @docname Units converter (array version)
|
|
158
|
+
* @public
|
|
159
|
+
*
|
|
160
|
+
* @template {Object.<string, number[]>} T
|
|
161
|
+
* @param {T} kwargs - [t, v] units to convert
|
|
162
|
+
* @param {"IP" | "SI"} [from_units="IP"] - specify system to convert from
|
|
163
|
+
* @returns {T} converted values in SI units
|
|
164
|
+
*
|
|
165
|
+
* @see {@link units_converter} for a version that supports scalar parameters
|
|
166
|
+
*/
|
|
167
|
+
export function units_converter_array<T extends {
|
|
168
|
+
[x: string]: number[];
|
|
169
|
+
}>(kwargs: T, from_units?: "IP" | "SI"): T;
|
|
170
|
+
/**
|
|
171
|
+
* Estimates the running mean temperature also known as prevailing mean outdoor temperature
|
|
172
|
+
*
|
|
173
|
+
* @public
|
|
174
|
+
* @memberof utilities
|
|
175
|
+
* @docname Running mean outdoor temperature
|
|
176
|
+
*
|
|
177
|
+
* @param {number[]} temp_array - array containing the mean daily temperature in descending order (i.e. from
|
|
178
|
+
* newest/yestedayr to oldest) :math:`[t_{day-1}, t_{day-2}, ... , t_{day-n}]`,
|
|
179
|
+
* Where :math:`t_{day-1}` is yesterday's daily mean temperature. The EN
|
|
180
|
+
* 16798-1 2019 {@link #ref_3|[3]} states that n should be equal to 7
|
|
181
|
+
*
|
|
182
|
+
* @param {number} [alpha=0.8] - constant between 0 and 1. The EN 16798-1 2019 {@link #ref_3|[3]} recommends a value of 0.8,
|
|
183
|
+
* while the ASHRAE 55 2020 recommends to choose values between 0.9 and 0.6,
|
|
184
|
+
* corresponding to a slow- and fast- response running mean, respectively.
|
|
185
|
+
* Adaptive comfort theory suggest that a slow-response running mean (alpha = 0.9)
|
|
186
|
+
* could be more appropriate for climates in which synoptic-scale (day-to-day)
|
|
187
|
+
* temperature dynamics are relatively minor, sich as the humid tropics.
|
|
188
|
+
*
|
|
189
|
+
* @param {"IP" | "SI"} [units="SI"] - select the SI (International System of Units) or the IP (Imperial Units) system.
|
|
190
|
+
*
|
|
191
|
+
* @returns {number} running mean outdoor temperature
|
|
192
|
+
*/
|
|
193
|
+
export function running_mean_outdoor_temperature(temp_array: number[], alpha?: number, units?: "IP" | "SI"): number;
|
|
194
|
+
/**
|
|
195
|
+
* Calculates the sky-vault view fraction
|
|
196
|
+
*
|
|
197
|
+
* @public
|
|
198
|
+
* @memberof utilities
|
|
199
|
+
* @docname Sky-vault view fraction
|
|
200
|
+
*
|
|
201
|
+
* @param {number} w - width of the window, [m]
|
|
202
|
+
* @param {number} h - height of the window, [m]
|
|
203
|
+
* @param {number} d - distance between the occupant and the window, [m]
|
|
204
|
+
*
|
|
205
|
+
* @returns {number} sky-vault view faction ranges between 0 and 1
|
|
206
|
+
*/
|
|
207
|
+
export function f_svv(w: number, h: number, d: number): number;
|
|
208
|
+
/**
|
|
209
|
+
* Filter values based on a valid range (It turns the filtered values to NaNs)
|
|
210
|
+
*
|
|
211
|
+
* @param {number[]} [range] - the range to limit
|
|
212
|
+
* @param {[number, number]} valid - the [min, max] to constrian the range to
|
|
213
|
+
* @returns {number[]} the constrained range with NaNs for values that are outside the min, max range
|
|
214
|
+
*/
|
|
215
|
+
export function valid_range(range?: number[], [min, max]: [number, number]): number[];
|
|
216
|
+
/**
|
|
217
|
+
* Total Clothing insulation of typical ensembles
|
|
218
|
+
* @public
|
|
219
|
+
* @memberof reference_values
|
|
220
|
+
* @docname Typical ensembles insulation, [clo]
|
|
221
|
+
*
|
|
222
|
+
* @param {"Walking shorts, short-sleeve shirt" | "Typical summer indoor clothing" |
|
|
223
|
+
* "Knee-length skirt, short-sleeve shirt, sandals, underwear" | "Trousers, long-sleeve shirt" |
|
|
224
|
+
* "Knee-length skirt, long-sleeve shirt, full slip" | "Sweat pants, long-sleeve sweatshirt" |
|
|
225
|
+
* "Jacket, Trousers, long-sleeve shirt" | "Typical winter indoor clothing"} ensembles - Typical ensembles. One of:
|
|
226
|
+
* - "Walking shorts, short-sleeve shirt"
|
|
227
|
+
* - "Typical summer indoor clothing"
|
|
228
|
+
* - "Knee-length skirt, short-sleeve shirt, sandals, underwear"
|
|
229
|
+
* - "Trousers, short-sleeve shirt, socks, shoes, underwear"
|
|
230
|
+
* - "Trousers, long-sleeve shirt"
|
|
231
|
+
* - "Knee-length skirt, long-sleeve shirt, full slip"
|
|
232
|
+
* - "Sweat pants, long-sleeve sweatshirt"
|
|
233
|
+
* - "Jacket, Trousers, long-sleeve shirt"
|
|
234
|
+
* - "Typical winter indoor clothing"
|
|
235
|
+
*
|
|
236
|
+
* @returns {number} - Clothing insulation of the given ensembles
|
|
237
|
+
* @example
|
|
238
|
+
* const result = clo_typical_ensembles("Trousers, long-sleeve shirt"); // returns 0.61
|
|
239
|
+
*/
|
|
240
|
+
export function clo_typical_ensembles(ensembles: "Walking shorts, short-sleeve shirt" | "Typical summer indoor clothing" | "Knee-length skirt, short-sleeve shirt, sandals, underwear" | "Trousers, long-sleeve shirt" | "Knee-length skirt, long-sleeve shirt, full slip" | "Sweat pants, long-sleeve sweatshirt" | "Jacket, Trousers, long-sleeve shirt" | "Typical winter indoor clothing"): number;
|
|
241
|
+
/**
|
|
242
|
+
* Met values of typical tasks.
|
|
243
|
+
* @public
|
|
244
|
+
* @memberof reference_values
|
|
245
|
+
* @docname Met typical tasks, [met]
|
|
246
|
+
* @constant
|
|
247
|
+
* @type {Object}
|
|
248
|
+
* @property {number} Sleeping - 0.7
|
|
249
|
+
* @property {number} Reclining - 0.8
|
|
250
|
+
* @property {number} Seated_Cquiet - 1.0
|
|
251
|
+
* @property {number} Reading_seated - 1.0
|
|
252
|
+
* @property {number} Writing - 1.0
|
|
253
|
+
* @property {number} Reading_seatedTyping - 1.1
|
|
254
|
+
* @property {number} Standing_relaxed - 1.2
|
|
255
|
+
* @property {number} Filing_seated - 1.2
|
|
256
|
+
* @property {number} Flying_aircraft_routine - 1.2
|
|
257
|
+
* @property {number} Filing_standing - 1.4
|
|
258
|
+
* @property {number} Driving_a_car - 1.5
|
|
259
|
+
* @property {number} Walking_about - 1.7
|
|
260
|
+
* @property {number} Cooking - 1.8
|
|
261
|
+
* @property {number} Table_sawing - 1.8
|
|
262
|
+
* @property {number} Walking_2mph_3_2kmh - 2.0
|
|
263
|
+
* @property {number} Lifting_packing - 2.1
|
|
264
|
+
* @property {number} Seated_heavy_limb_movement - 2.2
|
|
265
|
+
* @property {number} Light_machine_work - 2.2
|
|
266
|
+
* @property {number} Flying_aircraft_combat - 2.4
|
|
267
|
+
* @property {number} Walking_3mph_4_8kmh - 2.6
|
|
268
|
+
* @property {number} House_cleaning - 2.7
|
|
269
|
+
* @property {number} Driving_heavy_vehicle - 3.2
|
|
270
|
+
* @property {number} Dancing - 3.4
|
|
271
|
+
* @property {number} Calisthenics - 3.5
|
|
272
|
+
* @property {number} Walking_4mph_6_4kmh - 3.8
|
|
273
|
+
* @property {number} Tennis - 3.8
|
|
274
|
+
* @property {number} Heavy_machine_work - 4.0
|
|
275
|
+
* @property {number} Handling_100lb_45_kg_bags - 4.0
|
|
276
|
+
* @property {number} Pick_and_shovel_work - 4.4
|
|
277
|
+
* @property {number} Basketball - 6.3
|
|
278
|
+
* @property {number} Wrestling - 7.8
|
|
279
|
+
* @example
|
|
280
|
+
* import { met_typical_tasks } from "jsthermalcomfort/utilities"; //The path to utilities
|
|
281
|
+
* console.log(met_typical_tasks['Seated_Cquiet']);
|
|
282
|
+
* // output 1.0
|
|
283
|
+
*/
|
|
284
|
+
export const met_typical_tasks: any;
|
|
285
|
+
/**
|
|
286
|
+
* Clo values of individual clothing elements. To calculate the total clothing insulation you need to add these values together.
|
|
287
|
+
* @public
|
|
288
|
+
* @memberof reference_values
|
|
289
|
+
* @docname Insulation of individual garments, [clo]
|
|
290
|
+
* @constant
|
|
291
|
+
* @type {Object}
|
|
292
|
+
* @property {number} Metal_chair - 0.0
|
|
293
|
+
* @property {number} Bra - 0.01
|
|
294
|
+
* @property {number} Wooden_stool - 0.01
|
|
295
|
+
* @property {number} Ankle_socks - 0.02
|
|
296
|
+
* @property {number} Shoes_or_sandals - 0.02
|
|
297
|
+
* @property {number} Slippers - 0.03
|
|
298
|
+
* @property {number} Panty_hose - 0.02
|
|
299
|
+
* @property {number} Calf_length_socks - 0.03
|
|
300
|
+
* @property {number} Women_underwear - 0.03
|
|
301
|
+
* @property {number} Men_underwear - 0.04
|
|
302
|
+
* @property {number} Knee_socks_thick - 0.06
|
|
303
|
+
* @property {number} Short_shorts - 0.06
|
|
304
|
+
* @property {number} Walking_shorts: 0.08,
|
|
305
|
+
* @property {number} T_shirt - 0.08
|
|
306
|
+
* @property {number} Standard_office_chair - 0.1
|
|
307
|
+
* @property {number} Executive_chair - 0.15
|
|
308
|
+
* @property {number} Boots - 0.1
|
|
309
|
+
* @property {number} Sleeveless_scoop_neck_blouse - 0.12
|
|
310
|
+
* @property {number} Half_slip - 0.14
|
|
311
|
+
* @property {number} Long_underwear_bottoms - 0.15
|
|
312
|
+
* @property {number} Full_slip - 0.16
|
|
313
|
+
* @property {number} Short_sleeve_knit_shirt - 0.17
|
|
314
|
+
* @property {number} Sleeveless_vest_thin - 0.1
|
|
315
|
+
* @property {number} Sleeveless_vest_thick - 0.17
|
|
316
|
+
* @property {number} Sleeveless_short_gown_thin - 0.18
|
|
317
|
+
* @property {number} Short_sleeve_dress_shirt - 0.19
|
|
318
|
+
* @property {number} Sleeveless_long_gown_thin - 0.2
|
|
319
|
+
* @property {number} Long_underwear_top - 0.2
|
|
320
|
+
* @property {number} Thick_skirt - 0.23
|
|
321
|
+
* @property {number} Long_sleeve_dress_shirt - 0.25
|
|
322
|
+
* @property {number} Long_sleeve_flannel_shirt - 0.34
|
|
323
|
+
* @property {number} Long_sleeve_sweat_shirt - 0.34
|
|
324
|
+
* @property {number} Short_sleeve_hospital_gown - 0.31
|
|
325
|
+
* @property {number} Short_sleeve_short_robe_thin - 0.34
|
|
326
|
+
* @property {number} Short_sleeve_pajamas - 0.42
|
|
327
|
+
* @property {number} Long_sleeve_long_gown - 0.46
|
|
328
|
+
* @property {number} Long_sleeve_short_wrap_robe_thick - 0.48
|
|
329
|
+
* @property {number} Long_sleeve_pajamas_thick - 0.57
|
|
330
|
+
* @property {number} Long_sleeve_long_wrap_robe_thick - 0.69
|
|
331
|
+
* @property {number} Thin_trousers - 0.15
|
|
332
|
+
* @property {number} Thick_trousers - 0.24
|
|
333
|
+
* @property {number} Sweatpants - 0.28
|
|
334
|
+
* @property {number} Overalls - 0.3
|
|
335
|
+
* @property {number} Coveralls - 0.49
|
|
336
|
+
* @property {number} Thin_skirt - 0.14
|
|
337
|
+
* @property {number} Long_sleeve_shirt_dress_thin - 0.33
|
|
338
|
+
* @property {number} Long_sleeve_shirt_dress_thick - 0.47
|
|
339
|
+
* @property {number} Short_sleeve_shirt_dress - 0.29
|
|
340
|
+
* @property {number} Sleeveless_scoop_neck_shirt_thin - 0.23
|
|
341
|
+
* @property {number} Sleeveless_scoop_neck_shirt_thick - 0.27
|
|
342
|
+
* @property {number} Long_sleeve_shirt_thin - 0.25
|
|
343
|
+
* @property {number} Long_sleeve_shirt_thick - 0.36
|
|
344
|
+
* @property {number} Single_breasted_coat_thin - 0.36
|
|
345
|
+
* @property {number} Single_breasted_coat_thick - 0.44
|
|
346
|
+
* @property {number} Double_breasted_coat_thin - 0.42
|
|
347
|
+
* @property {number} Double_breasted_coat_thick - 0.48
|
|
348
|
+
* @example
|
|
349
|
+
* import { clo_individual_garments } from "jsthermalcomfort/utilities"; //The path to utilities
|
|
350
|
+
* console.log(clo_individual_garments['Metal_chair']);
|
|
351
|
+
* // output 0.0
|
|
352
|
+
*/
|
|
353
|
+
export const clo_individual_garments: any;
|
|
354
|
+
export type ComplianceKwargs = {
|
|
355
|
+
met?: number;
|
|
356
|
+
clo?: number;
|
|
357
|
+
tdb?: number;
|
|
358
|
+
tr?: number;
|
|
359
|
+
v?: number;
|
|
360
|
+
vr?: number;
|
|
361
|
+
v_limited?: number;
|
|
362
|
+
rh?: number;
|
|
363
|
+
};
|
|
364
|
+
export type ComplianceKwargsArray = {
|
|
365
|
+
met?: number[];
|
|
366
|
+
clo?: number[];
|
|
367
|
+
tdb?: number[];
|
|
368
|
+
tr?: number[];
|
|
369
|
+
v?: number[];
|
|
370
|
+
v_limited?: number[];
|
|
371
|
+
rh?: number[];
|
|
372
|
+
};
|
|
373
|
+
export type Standard = "ANKLE_DRAFT" | "ASHRAE" | "ISO" | "ISO7933";
|
|
374
|
+
export type CheckStandardComplianceResult = {
|
|
375
|
+
[x: string]: number[];
|
|
376
|
+
};
|
|
377
|
+
//# sourceMappingURL=utilities.d.ts.map
|
|
@@ -0,0 +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;AAmDD;;;;;GAKG;AACH,gDAJW,MAAM,YACN,MAAM,GACJ,CAAC,MAAM,EAAE,MAAM,CAAC,CAgB5B;AAED;;;;;;;GAOG;AACH,oDALW,QAAQ,UACR,gBAAgB,GAEd,MAAM,EAAE,CAepB;AAED;;;;;;;;GAQG;AAEH;;;;;;;;;GASG;AACH,0DALW,QAAQ,GAAG,eAAe,UAC1B,qBAAqB,GAAG;IAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAC,GAElD,6BAA6B,CAqEzC;AAuJD;;;;;;;;;;;;;GAaG;AACH,0CAPW,MAAM,UACN,MAAM,YACN,CAAC,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC,GAC/C,MAAM,CAiBlB;AAED;;;;;;;;;;;;;;;GAeG;AACH,8BAJW,MAAM,OACN,MAAM,GACJ,MAAM,CAKlB;AAED;;;;;;;;;;;;;;;GAeG;AACH,oCAJW,MAAM,EAAE,OACR,MAAM,EAAE,GACN,MAAM,EAAE,CAKpB;AAWD;;;;;;;;;;;;;;;;;;GAkBG;AACH,iCALW,MAAM,OACN,MAAM,aACN,CAAC,QAAQ,GAAG,KAAK,CAAC,GAChB,MAAM,CAUlB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,uCALW,MAAM,EAAE,OACR,MAAM,EAAE,aACR,CAAC,QAAQ,GAAG,KAAK,CAAC,GAChB,MAAM,EAAE,CAcpB;AAWD;;;;;;;;;;;;;GAaG;AACH;;2BALW,IAAI,GAAG,IAAI,KA8BrB;AAED;;;;;;;;;;;;;GAaG;AACH;;2BALW,IAAI,GAAG,IAAI,KA8BrB;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;;UA17BY,MAAM;UACN,MAAM;UACN,MAAM;SACN,MAAM;QACN,MAAM;SACN,MAAM;gBACN,MAAM;SACN,MAAM;;;UAKN,MAAM,EAAE;UACR,MAAM,EAAE;UACR,MAAM,EAAE;SACR,MAAM,EAAE;QACR,MAAM,EAAE;gBACR,MAAM,EAAE;SACR,MAAM,EAAE;;uBAIT,aAAa,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS;;QAuEpC,MAAM,GAAE,MAAM,EAAE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { body_surface_area, v_relative, v_relative_array, clo_dynamic, clo_dynamic_array, units_converter, units_converter_array, running_mean_outdoor_temperature, f_svv, met_typical_tasks, clo_typical_ensembles, clo_individual_garments, } from "./utilities.js";
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
* @name utilities
|
|
5
|
+
* @docname Utilities
|
|
6
|
+
*/
|
|
7
|
+
export default {
|
|
8
|
+
body_surface_area,
|
|
9
|
+
v_relative,
|
|
10
|
+
v_relative_array,
|
|
11
|
+
clo_dynamic,
|
|
12
|
+
clo_dynamic_array,
|
|
13
|
+
units_converter,
|
|
14
|
+
units_converter_array,
|
|
15
|
+
running_mean_outdoor_temperature,
|
|
16
|
+
f_svv,
|
|
17
|
+
met_typical_tasks,
|
|
18
|
+
clo_typical_ensembles,
|
|
19
|
+
clo_individual_garments,
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @public
|
|
23
|
+
* @name reference_values
|
|
24
|
+
* @docname Reference values clo and met
|
|
25
|
+
*/
|