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.
Files changed (228) hide show
  1. package/README.md +196 -6
  2. package/lib/cjs/index.js +7 -434
  3. package/lib/cjs/models/a_pmv.js +140 -0
  4. package/lib/cjs/models/adaptive_ashrae.js +290 -0
  5. package/lib/cjs/models/adaptive_en.js +300 -0
  6. package/lib/cjs/models/ankle_draft.js +82 -0
  7. package/lib/cjs/models/at.js +52 -0
  8. package/lib/cjs/models/athb.js +135 -0
  9. package/lib/cjs/models/clo_tout.js +58 -0
  10. package/lib/cjs/models/cooling_effect.js +164 -0
  11. package/lib/cjs/models/discomfort_index.js +115 -0
  12. package/lib/cjs/models/e_pmv.js +154 -0
  13. package/lib/cjs/models/heat_index.js +60 -0
  14. package/lib/cjs/models/humidex.js +63 -0
  15. package/lib/cjs/models/index.js +71 -0
  16. package/lib/cjs/models/net.js +50 -0
  17. package/lib/cjs/models/pet_steady.js +443 -0
  18. package/lib/cjs/models/phs.js +458 -0
  19. package/lib/cjs/models/pmv.js +200 -0
  20. package/lib/cjs/models/pmv_ppd.js +404 -0
  21. package/lib/cjs/models/set_tmp.js +203 -0
  22. package/lib/cjs/models/solar_gain.js +163 -0
  23. package/lib/cjs/models/two_nodes.js +790 -0
  24. package/lib/cjs/models/use_fans_heatwave.js +203 -0
  25. package/lib/cjs/models/utci.js +609 -0
  26. package/lib/cjs/models/vertical_tmp_grad_ppd.js +95 -0
  27. package/lib/cjs/models/wbgt.js +72 -0
  28. package/lib/cjs/models/wc.js +37 -0
  29. package/lib/cjs/psychrometrics/enthalpy.js +24 -0
  30. package/lib/cjs/psychrometrics/index.js +28 -0
  31. package/lib/cjs/psychrometrics/p_sat.js +46 -0
  32. package/lib/cjs/psychrometrics/p_sat_torr.js +34 -0
  33. package/lib/cjs/psychrometrics/psy_ta_rh.js +51 -0
  34. package/lib/cjs/psychrometrics/t_dp.js +19 -0
  35. package/lib/cjs/psychrometrics/t_mrt.js +117 -0
  36. package/lib/cjs/psychrometrics/t_o.js +82 -0
  37. package/lib/cjs/psychrometrics/t_wb.js +23 -0
  38. package/lib/cjs/types/index.d.ts +7 -79
  39. package/lib/cjs/types/index.d.ts.map +1 -1
  40. package/lib/cjs/types/models/a_pmv.d.ts +133 -0
  41. package/lib/cjs/types/models/a_pmv.d.ts.map +1 -0
  42. package/lib/cjs/types/models/adaptive_ashrae.d.ts +211 -0
  43. package/lib/cjs/types/models/adaptive_ashrae.d.ts.map +1 -0
  44. package/lib/cjs/types/models/adaptive_en.d.ts +217 -0
  45. package/lib/cjs/types/models/adaptive_en.d.ts.map +1 -0
  46. package/lib/cjs/types/models/ankle_draft.d.ts +60 -0
  47. package/lib/cjs/types/models/ankle_draft.d.ts.map +1 -0
  48. package/lib/cjs/types/models/at.d.ts +34 -0
  49. package/lib/cjs/types/models/at.d.ts.map +1 -0
  50. package/lib/cjs/types/models/athb.d.ts +96 -0
  51. package/lib/cjs/types/models/athb.d.ts.map +1 -0
  52. package/lib/cjs/types/models/clo_tout.d.ts +45 -0
  53. package/lib/cjs/types/models/clo_tout.d.ts.map +1 -0
  54. package/lib/cjs/types/models/cooling_effect.d.ts +49 -0
  55. package/lib/cjs/types/models/cooling_effect.d.ts.map +1 -0
  56. package/lib/cjs/types/models/discomfort_index.d.ts +91 -0
  57. package/lib/cjs/types/models/discomfort_index.d.ts.map +1 -0
  58. package/lib/cjs/types/models/e_pmv.d.ts +139 -0
  59. package/lib/cjs/types/models/e_pmv.d.ts.map +1 -0
  60. package/lib/cjs/types/models/heat_index.d.ts +27 -0
  61. package/lib/cjs/types/models/heat_index.d.ts.map +1 -0
  62. package/lib/cjs/types/models/humidex.d.ts +54 -0
  63. package/lib/cjs/types/models/humidex.d.ts.map +1 -0
  64. package/lib/cjs/types/models/index.d.ts +78 -0
  65. package/lib/cjs/types/models/index.d.ts.map +1 -0
  66. package/lib/cjs/types/models/net.d.ts +39 -0
  67. package/lib/cjs/types/models/net.d.ts.map +1 -0
  68. package/lib/cjs/types/models/pet_steady.d.ts +59 -0
  69. package/lib/cjs/types/models/pet_steady.d.ts.map +1 -0
  70. package/lib/cjs/types/models/phs.d.ts +242 -0
  71. package/lib/cjs/types/models/phs.d.ts.map +1 -0
  72. package/lib/cjs/types/models/pmv.d.ts +198 -0
  73. package/lib/cjs/types/models/pmv.d.ts.map +1 -0
  74. package/lib/cjs/types/models/pmv_ppd.d.ts +246 -0
  75. package/lib/cjs/types/models/pmv_ppd.d.ts.map +1 -0
  76. package/lib/cjs/types/models/set_tmp.d.ts +124 -0
  77. package/lib/cjs/types/models/set_tmp.d.ts.map +1 -0
  78. package/lib/cjs/types/models/solar_gain.d.ts +76 -0
  79. package/lib/cjs/types/models/solar_gain.d.ts.map +1 -0
  80. package/lib/cjs/types/models/two_nodes.d.ts +412 -0
  81. package/lib/cjs/types/models/two_nodes.d.ts.map +1 -0
  82. package/lib/cjs/types/models/use_fans_heatwave.d.ts +188 -0
  83. package/lib/cjs/types/models/use_fans_heatwave.d.ts.map +1 -0
  84. package/lib/cjs/types/models/utci.d.ts +79 -0
  85. package/lib/cjs/types/models/utci.d.ts.map +1 -0
  86. package/lib/cjs/types/models/vertical_tmp_grad_ppd.d.ts +58 -0
  87. package/lib/cjs/types/models/vertical_tmp_grad_ppd.d.ts.map +1 -0
  88. package/lib/cjs/types/models/wbgt.d.ts +51 -0
  89. package/lib/cjs/types/models/wbgt.d.ts.map +1 -0
  90. package/lib/cjs/types/models/wc.d.ts +29 -0
  91. package/lib/cjs/types/models/wc.d.ts.map +1 -0
  92. package/lib/cjs/types/psychrometrics/enthalpy.d.ts +12 -0
  93. package/lib/cjs/types/psychrometrics/enthalpy.d.ts.map +1 -0
  94. package/lib/cjs/types/psychrometrics/index.d.ts +26 -0
  95. package/lib/cjs/types/psychrometrics/index.d.ts.map +1 -0
  96. package/lib/cjs/types/psychrometrics/p_sat.d.ts +13 -0
  97. package/lib/cjs/types/psychrometrics/p_sat.d.ts.map +1 -0
  98. package/lib/cjs/types/psychrometrics/p_sat_torr.d.ts +26 -0
  99. package/lib/cjs/types/psychrometrics/p_sat_torr.d.ts.map +1 -0
  100. package/lib/cjs/types/psychrometrics/psy_ta_rh.d.ts +51 -0
  101. package/lib/cjs/types/psychrometrics/psy_ta_rh.d.ts.map +1 -0
  102. package/lib/cjs/types/psychrometrics/t_dp.d.ts +9 -0
  103. package/lib/cjs/types/psychrometrics/t_dp.d.ts.map +1 -0
  104. package/lib/cjs/types/psychrometrics/t_mrt.d.ts +43 -0
  105. package/lib/cjs/types/psychrometrics/t_mrt.d.ts.map +1 -0
  106. package/lib/cjs/types/psychrometrics/t_o.d.ts +31 -0
  107. package/lib/cjs/types/psychrometrics/t_o.d.ts.map +1 -0
  108. package/lib/cjs/types/psychrometrics/t_wb.d.ts +12 -0
  109. package/lib/cjs/types/psychrometrics/t_wb.d.ts.map +1 -0
  110. package/lib/cjs/types/utilities/index.d.ts +28 -0
  111. package/lib/cjs/types/utilities/index.d.ts.map +1 -0
  112. package/lib/cjs/types/utilities/utilities.d.ts +377 -0
  113. package/lib/cjs/types/utilities/utilities.d.ts.map +1 -0
  114. package/lib/cjs/utilities/index.js +27 -0
  115. package/lib/cjs/utilities/utilities.js +903 -0
  116. package/lib/esm/index.js +4 -0
  117. package/lib/esm/models/a_pmv.js +135 -0
  118. package/lib/esm/models/adaptive_ashrae.js +285 -0
  119. package/lib/esm/models/adaptive_en.js +294 -0
  120. package/lib/esm/models/ankle_draft.js +78 -0
  121. package/lib/esm/models/at.js +48 -0
  122. package/lib/esm/models/athb.js +130 -0
  123. package/lib/esm/models/clo_tout.js +53 -0
  124. package/lib/esm/models/cooling_effect.js +159 -0
  125. package/lib/esm/models/discomfort_index.js +110 -0
  126. package/lib/esm/models/e_pmv.js +149 -0
  127. package/lib/esm/models/heat_index.js +56 -0
  128. package/lib/esm/models/humidex.js +59 -0
  129. package/lib/esm/models/index.js +69 -0
  130. package/lib/esm/models/net.js +46 -0
  131. package/lib/esm/models/pet_steady.js +439 -0
  132. package/lib/esm/models/phs.js +454 -0
  133. package/lib/esm/models/pmv.js +195 -0
  134. package/lib/esm/models/pmv_ppd.js +398 -0
  135. package/lib/esm/models/set_tmp.js +198 -0
  136. package/lib/esm/models/solar_gain.js +158 -0
  137. package/lib/esm/models/two_nodes.js +784 -0
  138. package/lib/esm/models/use_fans_heatwave.js +199 -0
  139. package/lib/esm/models/utci.js +604 -0
  140. package/lib/esm/models/wbgt.js +68 -0
  141. package/lib/esm/models/wc.js +33 -0
  142. package/lib/esm/psychrometrics/enthalpy.js +20 -0
  143. package/lib/esm/psychrometrics/index.js +26 -0
  144. package/lib/esm/psychrometrics/p_sat.js +42 -0
  145. package/lib/esm/psychrometrics/p_sat_torr.js +29 -0
  146. package/lib/esm/psychrometrics/psy_ta_rh.js +47 -0
  147. package/lib/esm/psychrometrics/t_dp.js +15 -0
  148. package/lib/esm/psychrometrics/t_mrt.js +112 -0
  149. package/lib/esm/psychrometrics/t_o.js +77 -0
  150. package/lib/esm/psychrometrics/t_wb.js +19 -0
  151. package/lib/esm/types/index.d.ts +7 -79
  152. package/lib/esm/types/index.d.ts.map +1 -1
  153. package/lib/esm/types/models/a_pmv.d.ts +133 -0
  154. package/lib/esm/types/models/a_pmv.d.ts.map +1 -0
  155. package/lib/esm/types/models/adaptive_ashrae.d.ts +211 -0
  156. package/lib/esm/types/models/adaptive_ashrae.d.ts.map +1 -0
  157. package/lib/esm/types/models/adaptive_en.d.ts +217 -0
  158. package/lib/esm/types/models/adaptive_en.d.ts.map +1 -0
  159. package/lib/esm/types/models/ankle_draft.d.ts +60 -0
  160. package/lib/esm/types/models/ankle_draft.d.ts.map +1 -0
  161. package/lib/esm/types/models/at.d.ts +34 -0
  162. package/lib/esm/types/models/at.d.ts.map +1 -0
  163. package/lib/esm/types/models/athb.d.ts +96 -0
  164. package/lib/esm/types/models/athb.d.ts.map +1 -0
  165. package/lib/esm/types/models/clo_tout.d.ts +45 -0
  166. package/lib/esm/types/models/clo_tout.d.ts.map +1 -0
  167. package/lib/esm/types/models/cooling_effect.d.ts +49 -0
  168. package/lib/esm/types/models/cooling_effect.d.ts.map +1 -0
  169. package/lib/esm/types/models/discomfort_index.d.ts +91 -0
  170. package/lib/esm/types/models/discomfort_index.d.ts.map +1 -0
  171. package/lib/esm/types/models/e_pmv.d.ts +139 -0
  172. package/lib/esm/types/models/e_pmv.d.ts.map +1 -0
  173. package/lib/esm/types/models/heat_index.d.ts +27 -0
  174. package/lib/esm/types/models/heat_index.d.ts.map +1 -0
  175. package/lib/esm/types/models/humidex.d.ts +54 -0
  176. package/lib/esm/types/models/humidex.d.ts.map +1 -0
  177. package/lib/esm/types/models/index.d.ts +77 -0
  178. package/lib/esm/types/models/index.d.ts.map +1 -0
  179. package/lib/esm/types/models/net.d.ts +39 -0
  180. package/lib/esm/types/models/net.d.ts.map +1 -0
  181. package/lib/esm/types/models/pet_steady.d.ts +59 -0
  182. package/lib/esm/types/models/pet_steady.d.ts.map +1 -0
  183. package/lib/esm/types/models/phs.d.ts +242 -0
  184. package/lib/esm/types/models/phs.d.ts.map +1 -0
  185. package/lib/esm/types/models/pmv.d.ts +198 -0
  186. package/lib/esm/types/models/pmv.d.ts.map +1 -0
  187. package/lib/esm/types/models/pmv_ppd.d.ts +246 -0
  188. package/lib/esm/types/models/pmv_ppd.d.ts.map +1 -0
  189. package/lib/esm/types/models/set_tmp.d.ts +124 -0
  190. package/lib/esm/types/models/set_tmp.d.ts.map +1 -0
  191. package/lib/esm/types/models/solar_gain.d.ts +76 -0
  192. package/lib/esm/types/models/solar_gain.d.ts.map +1 -0
  193. package/lib/esm/types/models/two_nodes.d.ts +412 -0
  194. package/lib/esm/types/models/two_nodes.d.ts.map +1 -0
  195. package/lib/esm/types/models/use_fans_heatwave.d.ts +188 -0
  196. package/lib/esm/types/models/use_fans_heatwave.d.ts.map +1 -0
  197. package/lib/esm/types/models/utci.d.ts +79 -0
  198. package/lib/esm/types/models/utci.d.ts.map +1 -0
  199. package/lib/esm/types/models/wbgt.d.ts +51 -0
  200. package/lib/esm/types/models/wbgt.d.ts.map +1 -0
  201. package/lib/esm/types/models/wc.d.ts +29 -0
  202. package/lib/esm/types/models/wc.d.ts.map +1 -0
  203. package/lib/esm/types/psychrometrics/enthalpy.d.ts +12 -0
  204. package/lib/esm/types/psychrometrics/enthalpy.d.ts.map +1 -0
  205. package/lib/esm/types/psychrometrics/index.d.ts +26 -0
  206. package/lib/esm/types/psychrometrics/index.d.ts.map +1 -0
  207. package/lib/esm/types/psychrometrics/p_sat.d.ts +13 -0
  208. package/lib/esm/types/psychrometrics/p_sat.d.ts.map +1 -0
  209. package/lib/esm/types/psychrometrics/p_sat_torr.d.ts +26 -0
  210. package/lib/esm/types/psychrometrics/p_sat_torr.d.ts.map +1 -0
  211. package/lib/esm/types/psychrometrics/psy_ta_rh.d.ts +51 -0
  212. package/lib/esm/types/psychrometrics/psy_ta_rh.d.ts.map +1 -0
  213. package/lib/esm/types/psychrometrics/t_dp.d.ts +9 -0
  214. package/lib/esm/types/psychrometrics/t_dp.d.ts.map +1 -0
  215. package/lib/esm/types/psychrometrics/t_mrt.d.ts +43 -0
  216. package/lib/esm/types/psychrometrics/t_mrt.d.ts.map +1 -0
  217. package/lib/esm/types/psychrometrics/t_o.d.ts +31 -0
  218. package/lib/esm/types/psychrometrics/t_o.d.ts.map +1 -0
  219. package/lib/esm/types/psychrometrics/t_wb.d.ts +12 -0
  220. package/lib/esm/types/psychrometrics/t_wb.d.ts.map +1 -0
  221. package/lib/esm/types/utilities/index.d.ts +28 -0
  222. package/lib/esm/types/utilities/index.d.ts.map +1 -0
  223. package/lib/esm/types/utilities/utilities.d.ts +377 -0
  224. package/lib/esm/types/utilities/utilities.d.ts.map +1 -0
  225. package/lib/esm/utilities/index.js +25 -0
  226. package/lib/esm/utilities/utilities.js +885 -0
  227. package/package.json +22 -15
  228. package/lib/esm/index.mjs +0 -430
@@ -0,0 +1,242 @@
1
+ /**
2
+ * @typedef {Object} PhsReturnType
3
+ * @property {number} t_re - rectal temperature, [°C]
4
+ * @property {number} t_sk - skin temperature, [°C]
5
+ * @property {number} t_cr - core temperature, [°C]
6
+ * @property {number} t_cr_eq - core temperature as a function of the metabolic rate, [°C]
7
+ * @property {number} t_sk_t_cr_wg - fraction of the body mass at the skin temperature
8
+ * @property {number} d_lim_loss_50 - maximum allowable exposure time for water loss, mean subject, [minutes]
9
+ * @property {number} d_lim_loss_95 - maximum allowable exposure time for water loss, 95% of the working population, [minutes]
10
+ * @property {number} d_lim_t_re - maximum allowable exposure time for heat storage, [minutes]
11
+ * @property {number} water_loss_watt - maximum water loss in watts, [W]
12
+ * @property {number} water_loss - maximum water loss, [g]
13
+ * @public
14
+ */
15
+ /**
16
+ * @typedef {Object} PhsKwargs
17
+ * @property {number} [i_mst=0.38] - static moisture permeability index, [dimensionless]
18
+ * @property {number} [a_p=0.54] - fraction of the body surface covered by the reflective clothing, [dimensionless]
19
+ * @property {0 | 1} [drink=1] - 1 if workers can drink freely, 0 otherwise
20
+ * @property {number} [weight=75] - body weight, [kg]
21
+ * @property {number} [height=1.8] - height, [m]
22
+ * @property {number} [walk_sp=0] - walking speed, [m/s]
23
+ * @property {number} [theta=0] - angle between walking direction and wind direction [degrees]
24
+ * @property {number} [acclimatized=100] - 100 if acclimatized subject, 0 otherwise
25
+ * @property {number} [duration=480] - duration of the work sequence, [minutes]
26
+ * @property {number} [f_r=0.97] - emissivity of the reflective clothing, [dimensionless]
27
+ * @property {number} [t_sk=34.1] - mean skin temperature when worker starts working, [°C]
28
+ * @property {number} [t_cr=36.8] - mean core temperature when worker starts working, [°C]
29
+ * @property {number} [t_re] - mean rectal temperature when worker starts working, [°C]
30
+ * @property {number} [t_cr_eq] - mean core temperature as a function of met when worker starts working, [°C]
31
+ * @property {number} [sweat_rate=0] - sweat rate
32
+ * @property {boolean} [round=true] - round the result of the PHS model
33
+ * @public
34
+ */
35
+ /**
36
+ * @typedef {Object} PhsKwargsRequired
37
+ * @property {number} i_mst
38
+ * @property {number} a_p
39
+ * @property {0 | 1} drink
40
+ * @property {number} weight
41
+ * @property {number} height
42
+ * @property {number} walk_sp
43
+ * @property {number} theta
44
+ * @property {number} acclimatized
45
+ * @property {number} duration
46
+ * @property {number} f_r
47
+ * @property {number} t_sk
48
+ * @property {number} t_cr
49
+ * @property {number} t_re
50
+ * @property {number} t_cr_eq
51
+ * @property {number} sweat_rate
52
+ * @property {boolean} round
53
+ */
54
+ /**
55
+ * Calculates the Predicted Heat Strain (PHS) index based in compliace with
56
+ * the ISO 7933:2004 Standard {@link #ref_8|[8]}. The ISO 7933 provides a method for the
57
+ * analytical evaluation and interpretation of the thermal stress experienced
58
+ * by a subject in a hot environment. It describes a method for predicting the
59
+ * sweat rate and the internal core temperature that the human body will
60
+ * develop in response to the working conditions.
61
+ *
62
+ * The PHS model can be used to predict the: heat by respiratory convection, heat flow
63
+ * by respiratory evaporation, steady state mean skin temperature, instantaneous value
64
+ * of skin temperature, heat accumulation associated with the metabolic rate, maximum
65
+ * evaporative heat flow at the skin surface, predicted sweat rate, predicted evaporative
66
+ * heat flow, and rectal temperature.
67
+ *
68
+ * @public
69
+ * @memberof models
70
+ * @docname Predicted Heat Strain (PHS) Index
71
+ *
72
+ * @param {number} tdb - dry bulb air temperature, default in [°C]
73
+ * @param {number} tr - mean radiant temperature, default in [°C]
74
+ * @param {number} v - air speed, default in [m/s]
75
+ * @param {number} rh - relative humidity, [%]
76
+ * @param {number} met - metabolic rate, [W/(m2)]
77
+ * @param {number} clo - clothing insulation, [clo]
78
+ * @param {1 | 2 | 3} posture - a numeric value presenting posture of person [sitting=1, standing=2, crouching=3]
79
+ * @param {number} [wme=0] - external work, [W/(m2)] default 0
80
+ * @param {PhsKwargs} [kwargs] - additional arguments
81
+ *
82
+ * @returns {PhsReturnType} object with results of phs
83
+ *
84
+ * @example
85
+ * import { phs } from "jsthermalcomfort";
86
+ * const results = phs(40, 40, 33.85, 0.3, 150, 0.5, 2);
87
+ * console.log(results); // {t_re: 37.5, d_lim_loss_50: 440, d_lim_loss_95: 298, d_lim_t_re: 480, water_loss: 6166.0}
88
+ */
89
+ export function phs(tdb: number, tr: number, v: number, rh: number, met: number, clo: number, posture: 1 | 2 | 3, wme?: number, kwargs?: PhsKwargs): PhsReturnType;
90
+ export type PhsReturnType = {
91
+ /**
92
+ * - rectal temperature, [°C]
93
+ */
94
+ t_re: number;
95
+ /**
96
+ * - skin temperature, [°C]
97
+ */
98
+ t_sk: number;
99
+ /**
100
+ * - core temperature, [°C]
101
+ */
102
+ t_cr: number;
103
+ /**
104
+ * - core temperature as a function of the metabolic rate, [°C]
105
+ */
106
+ t_cr_eq: number;
107
+ /**
108
+ * - fraction of the body mass at the skin temperature
109
+ */
110
+ t_sk_t_cr_wg: number;
111
+ /**
112
+ * - maximum allowable exposure time for water loss, mean subject, [minutes]
113
+ */
114
+ d_lim_loss_50: number;
115
+ /**
116
+ * - maximum allowable exposure time for water loss, 95% of the working population, [minutes]
117
+ */
118
+ d_lim_loss_95: number;
119
+ /**
120
+ * - maximum allowable exposure time for heat storage, [minutes]
121
+ */
122
+ d_lim_t_re: number;
123
+ /**
124
+ * - maximum water loss in watts, [W]
125
+ */
126
+ water_loss_watt: number;
127
+ /**
128
+ * - maximum water loss, [g]
129
+ */
130
+ water_loss: number;
131
+ };
132
+ export type PhsKwargs = {
133
+ /**
134
+ * - static moisture permeability index, [dimensionless]
135
+ */
136
+ i_mst?: number;
137
+ /**
138
+ * - fraction of the body surface covered by the reflective clothing, [dimensionless]
139
+ */
140
+ a_p?: number;
141
+ /**
142
+ * - 1 if workers can drink freely, 0 otherwise
143
+ */
144
+ drink?: 0 | 1;
145
+ /**
146
+ * - body weight, [kg]
147
+ */
148
+ weight?: number;
149
+ /**
150
+ * - height, [m]
151
+ */
152
+ height?: number;
153
+ /**
154
+ * - walking speed, [m/s]
155
+ */
156
+ walk_sp?: number;
157
+ /**
158
+ * - angle between walking direction and wind direction [degrees]
159
+ */
160
+ theta?: number;
161
+ /**
162
+ * - 100 if acclimatized subject, 0 otherwise
163
+ */
164
+ acclimatized?: number;
165
+ /**
166
+ * - duration of the work sequence, [minutes]
167
+ */
168
+ duration?: number;
169
+ /**
170
+ * - emissivity of the reflective clothing, [dimensionless]
171
+ */
172
+ f_r?: number;
173
+ /**
174
+ * - mean skin temperature when worker starts working, [°C]
175
+ */
176
+ t_sk?: number;
177
+ /**
178
+ * - mean core temperature when worker starts working, [°C]
179
+ */
180
+ t_cr?: number;
181
+ /**
182
+ * - mean rectal temperature when worker starts working, [°C]
183
+ */
184
+ t_re?: number;
185
+ /**
186
+ * - mean core temperature as a function of met when worker starts working, [°C]
187
+ */
188
+ t_cr_eq?: number;
189
+ /**
190
+ * - sweat rate
191
+ */
192
+ sweat_rate?: number;
193
+ /**
194
+ * - round the result of the PHS model
195
+ */
196
+ round?: boolean;
197
+ };
198
+ export type PhsKwargsRequired = {
199
+ i_mst: number;
200
+ a_p: number;
201
+ drink: 0 | 1;
202
+ weight: number;
203
+ height: number;
204
+ walk_sp: number;
205
+ theta: number;
206
+ acclimatized: number;
207
+ duration: number;
208
+ f_r: number;
209
+ t_sk: number;
210
+ t_cr: number;
211
+ t_re: number;
212
+ t_cr_eq: number;
213
+ sweat_rate: number;
214
+ round: boolean;
215
+ };
216
+ export type Speeds = {
217
+ v: number;
218
+ walk_speed: number;
219
+ };
220
+ export type VariablesForLoop = {
221
+ sw_max: number;
222
+ w_max: number;
223
+ fcl: number;
224
+ i_cl_dyn: number;
225
+ r_t_dyn: number;
226
+ c_res: number;
227
+ e_res: number;
228
+ hc_dyn: number;
229
+ aux_r: number;
230
+ f_cl_r: number;
231
+ a_dubois: number;
232
+ sp_heat: number;
233
+ d_lim_t_re: number;
234
+ d_lim_loss_50: number;
235
+ d_lim_loss_95: number;
236
+ d_max_50: number;
237
+ d_max_95: number;
238
+ const_t_eq: number;
239
+ const_t_sk: number;
240
+ const_sw: number;
241
+ };
242
+ //# sourceMappingURL=phs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phs.d.ts","sourceRoot":"","sources":["../../../../src/models/phs.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,yBAjBW,MAAM,MACN,MAAM,KACN,MAAM,MACN,MAAM,OACN,MAAM,OACN,MAAM,WACN,CAAC,GAAG,CAAC,GAAG,CAAC,QACT,MAAM,WACN,SAAS,GAEP,aAAa,CA+EzB;;;;;UAjKa,MAAM;;;;UACN,MAAM;;;;UACN,MAAM;;;;aACN,MAAM;;;;kBACN,MAAM;;;;mBACN,MAAM;;;;mBACN,MAAM;;;;gBACN,MAAM;;;;qBACN,MAAM;;;;gBACN,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;gBACN,MAAM;WACN,OAAO;;;OAqIP,MAAM;gBACN,MAAM;;;YA0BN,MAAM;WACN,MAAM;SACN,MAAM;cACN,MAAM;aACN,MAAM;WACN,MAAM;WACN,MAAM;YACN,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"}
@@ -0,0 +1,198 @@
1
+ /**
2
+ * @typedef {Object} PmvKwargs
3
+ * @property {'SI'|'IP'} units - select the SI (International System of Units) or the IP (Imperial Units) system.
4
+ * @property {boolean} limit_inputs - Default is True. By default, if the inputs are outside the standard applicability
5
+ * limits the function returns NaN. If false, returns pmv and ppd values even if input values are outside
6
+ * the applicability limits of the model.
7
+ *
8
+ * The ASHRAE 55 2020 limits are 10 < tdb [°C] < 40, 10 < tr [°C] < 40,
9
+ * 0 < vr [m/s] < 2, 1 < met [met] < 4, and 0 < clo [clo] < 1.5.
10
+ * The ISO 7730 2005 limits are 10 < tdb [°C] < 30, 10 < tr [°C] < 40,
11
+ * 0 < vr [m/s] < 1, 0.8 < met [met] < 4, 0 < clo [clo] < 2, and -2 < PMV < 2.
12
+ * @property {boolean} airspeed_control - This only applies if standard = "ASHRAE".
13
+ *
14
+ * Default is True. By default, it is assumed that the occupant has control over the airspeed.
15
+ * In this case, the ASHRAE 55 Standard does not impose any airspeed limits.
16
+ * On the other hand, if the occupant has no control over the airspeed,
17
+ * the ASHRAE 55 imposes an upper limit for v which varies as a function of
18
+ * the operative temperature, for more information please consult the Standard.
19
+ * @public
20
+ */
21
+ /**
22
+ * Returns Predicted Mean Vote ( {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV} ) calculated
23
+ * in accordance with main thermal comfort Standards.
24
+ *
25
+ * The {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV} is an index that predicts the
26
+ * mean value of the thermal sensation votes (self-reported perceptions) of a large group of people on a sensation
27
+ * scale expressed from –3 to +3 corresponding to the categories: cold, cool, slightly cool, neutral, slightly warm,
28
+ * warm, and hot. {@link #ref_1|[1]}
29
+ *
30
+ * While the PMV equation is the same for both the ISO and ASHRAE standards, in the ASHRAE 55 PMV equation, the SET is
31
+ * used to calculate the cooling effect first, this is then subtracted from both the air and mean radiant temperatures,
32
+ * and the differences are used as input to the PMV model, while the airspeed is set to 0.1m/s. Please read more in the
33
+ * Note below.
34
+ *
35
+ * Notes:
36
+ *
37
+ * You can use this function to calculate the {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV}
38
+ * {@link #ref_1|[1]} {@link #ref_2|[2]}
39
+ *
40
+ * This is a version that supports scalar arguments.
41
+ * @see {@link pmv_array} for a version that supports arrays.
42
+ *
43
+ * @public
44
+ * @memberof models
45
+ * @docname Predicted Mean Vote (PMV)
46
+ *
47
+ * @param {number} tdb - dry bulb air temperature, default in [°C] in [°F] if `units` = 'IP'
48
+ * @param {number} tr - mean radiant temperature, default in [°C] in [°F] if `units` = 'IP'
49
+ * @param {number} vr - relative air speed, default in [m/s] in [fps] if `units` = 'IP'
50
+ *
51
+ * Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor.
52
+ * The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air
53
+ * speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be
54
+ * calculated using the function 'v_relative' in utilities.
55
+ * @param {number} rh - relative humidity, [%]
56
+ * @param {number} met - metabolic rate
57
+ *
58
+ * Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent
59
+ * air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55
60
+ * Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation
61
+ * clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function 'clo_dynamic'
62
+ * in utilities.
63
+ * @param {number} clo - clothing insulation
64
+ * @param {number} [wme=0] - external work
65
+ * @param {"ISO"|"ASHRAE"} [standard="ISO"] - comfort standard used for calculation
66
+ *
67
+ * · If "ISO", then the ISO Equation is used
68
+ *
69
+ * · If "ASHRAE", then the ASHRAE Equation is used
70
+ *
71
+ * Note: While the PMV equation is the same for both the ISO and ASHRAE standards, the ASHRAE Standard Use of the
72
+ * PMV model is limited to air speeds below 0.10m/s (20 fpm). When air speeds exceed 0.10 m/s (20 fpm), the comfort zone
73
+ * boundaries are adjusted based on the SET model. This change was introduced by the
74
+ * {@link https://www.ashrae.org/file%20library/technical%20resources/standards%20and%20guidelines/standards%20addenda/55_2020_c_20210430.pdf|Addendum_C to Standard 55-2020}
75
+ * @param {PmvKwargs} kwargs - additional arguments
76
+ *
77
+ * @returns {number} pmv - Predicted Mean Vote
78
+ *
79
+ * @example
80
+ * const tdb = 25;
81
+ * const tr = 25;
82
+ * const rh = 50;
83
+ * const v = 0.1;
84
+ * const met = 1.4;
85
+ * const clo = 0.5;
86
+ *
87
+ * // calculate relative air speed
88
+ * const v_r = v_relative(v, met);
89
+ * // calculate dynamic clothing
90
+ * const clo_d = clo_dynamic(clo, met);
91
+ *
92
+ * const results = pmv(tdb, tr, v_r, rh, met, clo_d);
93
+ * console.log(results); // 0.06
94
+ */
95
+ export function pmv(tdb: number, tr: number, vr: number, rh: number, met: number, clo: number, wme?: number, standard?: "ISO" | "ASHRAE", kwargs?: PmvKwargs): number;
96
+ /**
97
+ * Returns Predicted Mean Vote ( {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV} ) calculated
98
+ * in accordance with main thermal comfort Standards.
99
+ *
100
+ * The {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV} is an index that predicts the
101
+ * mean value of the thermal sensation votes (self-reported perceptions) of a large group of people on a sensation
102
+ * scale expressed from –3 to +3 corresponding to the categories: cold, cool, slightly cool, neutral, slightly warm,
103
+ * warm, and hot. {@link #ref_1|[1]}
104
+ *
105
+ * While the PMV equation is the same for both the ISO and ASHRAE standards, in the ASHRAE 55 PMV equation, the SET is
106
+ * used to calculate the cooling effect first, this is then subtracted from both the air and mean radiant temperatures,
107
+ * and the differences are used as input to the PMV model, while the airspeed is set to 0.1m/s. Please read more in the
108
+ * Note below.
109
+ *
110
+ * Notes:
111
+ *
112
+ * You can use this function to calculate the {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV}
113
+ * {@link #ref_1|[1]} {@link #ref_2|[2]}
114
+ *
115
+ * This is a version that supports arrays.
116
+ * @see {@link pmv} for a version that supports scalar arguments.
117
+ *
118
+ * @public
119
+ * @memberof models
120
+ * @docname Predicted Mean Vote (PMV) (array version)
121
+ *
122
+ * @param {number[]} tdb - dry bulb air temperature, default in [°C] in [°F] if `units` = 'IP'
123
+ * @param {number[]} tr - mean radiant temperature, default in [°C] in [°F] if `units` = 'IP'
124
+ * @param {number[]} vr - relative air speed, default in [m/s] in [fps] if `units` = 'IP'
125
+ *
126
+ * Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor.
127
+ * The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air
128
+ * speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be
129
+ * calculated using the function 'v_relative_array' in utilities.
130
+ * @param {number[]} rh - relative humidity, [%]
131
+ * @param {number[]} met - metabolic rate, [met]
132
+ * @param {number[]} clo - clothing insulation, [clo]
133
+ *
134
+ * Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent
135
+ * air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55
136
+ * Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation
137
+ * clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function 'clo_dynamic_array'
138
+ * in utilities.
139
+ * @param {number[]} wme - external work, default is array of 0
140
+ * @param {"ISO"|"ASHRAE"} [standard="ISO"] - comfort standard used for calculation
141
+ *
142
+ * · If "ISO", then the ISO Equation is used
143
+ *
144
+ * · If "ASHRAE", then the ASHRAE Equation is used
145
+ *
146
+ * Note: While the PMV equation is the same for both the ISO and ASHRAE standards, the ASHRAE Standard Use of the
147
+ * PMV model is limited to air speeds below 0.10m/s (20 fpm). When air speeds exceed 0.10 m/s (20 fpm), the comfort zone
148
+ * boundaries are adjusted based on the SET model. This change was introduced by the
149
+ * {@link https://www.ashrae.org/file%20library/technical%20resources/standards%20and%20guidelines/standards%20addenda/55_2020_c_20210430.pdf|Addendum_C to Standard 55-2020}
150
+ * @param {PmvKwargs} kwargs - additional arguments
151
+ *
152
+ * @returns {number[]} pmv - Predicted Mean Vote
153
+ *
154
+ * @example
155
+ * const tdb = [22, 25];
156
+ * const tr = [25, 25];
157
+ * const rh = [50, 50];
158
+ * const v = [0.1, 0.1];
159
+ * const met = [1.4, 1.4];
160
+ * const clo = [0.5, 0.5];
161
+ *
162
+ * // calculate relative air speed
163
+ * const v_r = v_relative_array(v, met);
164
+ * // calculate dynamic clothing
165
+ * const clo_d = clo_dynamic_array(clo, met);
166
+ *
167
+ * const results = pmv_array(tdb, tr, v_r, rh, met, clo_d);
168
+ * console.log(results); // [-0.47, 0.06]
169
+ */
170
+ export function pmv_array(tdb: number[], tr: number[], vr: number[], rh: number[], met: number[], clo: number[], wme: number[], standard?: "ISO" | "ASHRAE", kwargs?: PmvKwargs): number[];
171
+ export type PmvKwargs = {
172
+ /**
173
+ * - select the SI (International System of Units) or the IP (Imperial Units) system.
174
+ */
175
+ units: 'SI' | 'IP';
176
+ /**
177
+ * - Default is True. By default, if the inputs are outside the standard applicability
178
+ * limits the function returns NaN. If false, returns pmv and ppd values even if input values are outside
179
+ * the applicability limits of the model.
180
+ *
181
+ * The ASHRAE 55 2020 limits are 10 < tdb [°C] < 40, 10 < tr [°C] < 40,
182
+ * 0 < vr [m/s] < 2, 1 < met [met] < 4, and 0 < clo [clo] < 1.5.
183
+ * The ISO 7730 2005 limits are 10 < tdb [°C] < 30, 10 < tr [°C] < 40,
184
+ * 0 < vr [m/s] < 1, 0.8 < met [met] < 4, 0 < clo [clo] < 2, and -2 < PMV < 2.
185
+ */
186
+ limit_inputs: boolean;
187
+ /**
188
+ * - This only applies if standard = "ASHRAE".
189
+ *
190
+ * Default is True. By default, it is assumed that the occupant has control over the airspeed.
191
+ * In this case, the ASHRAE 55 Standard does not impose any airspeed limits.
192
+ * On the other hand, if the occupant has no control over the airspeed,
193
+ * the ASHRAE 55 imposes an upper limit for v which varies as a function of
194
+ * the operative temperature, for more information please consult the Standard.
195
+ */
196
+ airspeed_control: boolean;
197
+ };
198
+ //# sourceMappingURL=pmv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pmv.d.ts","sourceRoot":"","sources":["../../../../src/models/pmv.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,yBAhDW,MAAM,MACN,MAAM,MACN,MAAM,MAMN,MAAM,OACN,MAAM,OAON,MAAM,QACN,MAAM,aACN,KAAK,GAAC,QAAQ,WAUd,SAAS,GAEP,MAAM,CAqDlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,+BAhDW,MAAM,EAAE,MACR,MAAM,EAAE,MACR,MAAM,EAAE,MAMR,MAAM,EAAE,OACR,MAAM,EAAE,OACR,MAAM,EAAE,OAOR,MAAM,EAAE,aACR,KAAK,GAAC,QAAQ,WAUd,SAAS,GAEP,MAAM,EAAE,CAqDpB;;;;;WA/Oa,IAAI,GAAC,IAAI;;;;;;;;;;;kBACT,OAAO;;;;;;;;;;sBAQP,OAAO"}