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,246 @@
1
+ /**
2
+ * @typedef {Object} Pmv_ppdKwargs
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
+ * @typedef {Object} Pmv_ppdReturns
23
+ * @property { number } pmv - Predicted Mean Vote
24
+ * @property { number } ppd - Predicted Percentage of Dissatisfied occupants, [%]
25
+ * @public
26
+ */
27
+ /**
28
+ * Returns Predicted Mean Vote ( {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV} ) and
29
+ * Predicted Percentage of Dissatisfied ( {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PPD} )
30
+ * calculated in accordance with main thermal comfort Standards. The PMV is an index that predicts the mean
31
+ * value of the thermal sensation votes (self-reported perceptions) of a large group of people on a
32
+ * sensation scale expressed from –3 to +3 corresponding to the categories:
33
+ * cold, cool, slightly cool, neutral, slightly warm, warm, and hot. {@link #ref_1|[1]}
34
+ *
35
+ * While the PMV equation is the same for both the ISO and ASHRAE standards, in the
36
+ * ASHRAE 55 PMV equation, the SET is used to calculate the cooling effect first,
37
+ * this is then subtracted from both the air and mean radiant temperatures, and the
38
+ * differences are used as input to the PMV model, while the airspeed is set to 0.1m/s.
39
+ * Please read more in the Note below.
40
+ *
41
+ * Notes:
42
+ *
43
+ * You can use this function to calculate the {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV}
44
+ * and {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PPD} in accordance with
45
+ * either the ASHRAE 55 2020 Standard {@link #ref_1|[1]} or the ISO 7730 Standard {@link #ref_2|[2]}.
46
+ *
47
+ * This is a version that supports scalar arguments.
48
+ * @see {@link pmv_ppd_array} for a version that supports arrays.
49
+ *
50
+ * @public
51
+ * @memberof models
52
+ * @docname Predicted Mean Vote (PMV) and Predicted Percentage of Dissatisfied (PPD)
53
+ *
54
+ * @param { number } tdb - dry bulb air temperature, default in [°C] in [°F] if `units` = 'IP'
55
+ * @param { number } tr - mean radiant temperature, default in [°C] in [°F] if `units` = 'IP'
56
+ * @param { number } vr - relative air speed, default in [m/s] in [fps] if `units` = 'IP'
57
+ *
58
+ * Note: vr is the relative air speed caused by body movement and not the air
59
+ * speed measured by the air speed sensor. The relative air speed is the sum of the
60
+ * average air speed measured by the sensor plus the activity-generated air speed
61
+ * (Vag). Where Vag is the activity-generated air speed caused by motion of
62
+ * individual body parts. vr can be calculated using the function `v_relative` which is in .utilities.js.
63
+ * @param { number } rh - relative humidity, [%]
64
+ * @param { number } met - metabolic rate
65
+ * @param { number } clo - clothing insulation
66
+ *
67
+ * Note: The activity as well as the air speed modify the insulation characteristics
68
+ * of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that
69
+ * the clothing insulation shall be corrected {@link #ref_2|[2]}. The ASHRAE 55 Standard corrects
70
+ * for the effect of the body movement for met equal or higher than 1.2 met using
71
+ * the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo,
72
+ * can be calculated using the function `clo_dynamic` which is in .utilities.js.
73
+ * @param { number } [wme=0] - external work
74
+ * @param { "ISO"|"ASHRAE" } [standard="ISO"] - comfort standard used for calculation
75
+ *
76
+ * · If "ISO", then the ISO Equation is used
77
+ *
78
+ * · If "ASHRAE", then the ASHRAE Equation is used
79
+ *
80
+ * Note: While the PMV equation is the same for both the ISO and ASHRAE standards, the ASHRAE Standard Use of
81
+ * the 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
82
+ * zone boundaries are adjusted based on the SET model. This change was introduced by the
83
+ * {@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}
84
+ * @param { Pmv_ppdKwargs }kwargs - additional arguments
85
+ *
86
+ * @returns { Pmv_ppdReturns } - Result of pmv and ppd
87
+ *
88
+ * @example
89
+ * const tdb = 25;
90
+ * const tr = 25;
91
+ * const rh = 50;
92
+ * const v = 0.1;
93
+ * const met = 1.4;
94
+ * const clo = 0.5;
95
+ * // Calculate relative air speed
96
+ * const v_r = v_relative(v, met);
97
+ * // Calculate dynamic clothing
98
+ * const clo_d = clo_dynamic(clo, met);
99
+ * const results = pmv_ppd(tdb, tr, v_r, rh, met, clo_d);
100
+ * console.log(results); // Output: { pmv: 0.06, ppd: 5.1 }
101
+ * console.log(results.pmv); // Output: -0.06
102
+ */
103
+ export function pmv_ppd(tdb: number, tr: number, vr: number, rh: number, met: number, clo: number, wme?: number, standard?: "ISO" | "ASHRAE", kwargs?: Pmv_ppdKwargs): Pmv_ppdReturns;
104
+ /**
105
+ * @typedef {Object} Pmv_ppd_arrayReturns
106
+ * @property { number[] } pmv - Predicted Mean Vote
107
+ * @property { number[] } ppd - Predicted Percentage of Dissatisfied occupants, [%]
108
+ * @public
109
+ */
110
+ /**
111
+ * Returns Predicted Mean Vote ( {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV} ) and
112
+ * Predicted Percentage of Dissatisfied ( {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PPD} )
113
+ * calculated in accordance with main thermal comfort Standards. The PMV is an index that predicts the mean
114
+ * value of the thermal sensation votes (self-reported perceptions) of a large group of people on a
115
+ * sensation scale expressed from –3 to +3 corresponding to the categories:
116
+ * cold, cool, slightly cool, neutral, slightly warm, warm, and hot. {@link #ref_1|[1]}
117
+ *
118
+ * While the PMV equation is the same for both the ISO and ASHRAE standards, in the
119
+ * ASHRAE 55 PMV equation, the SET is used to calculate the cooling effect first,
120
+ * this is then subtracted from both the air and mean radiant temperatures, and the
121
+ * differences are used as input to the PMV model, while the airspeed is set to 0.1m/s.
122
+ * Please read more in the Note below.
123
+ *
124
+ * Notes:
125
+ *
126
+ * You can use this function to calculate the {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PMV}
127
+ * and {@link https://en.wikipedia.org/wiki/Thermal_comfort#PMV/PPD_method|PPD} in accordance with
128
+ * either the ASHRAE 55 2020 Standard {@link #ref_1|[1]} or the ISO 7730 Standard {@link #ref_2|[2]}.
129
+ *
130
+ * This is a version that supports arrays.
131
+ * @see {@link pmv_ppd} for a version that supports scalar arguments.
132
+ *
133
+ * @public
134
+ * @memberof models
135
+ * @docname Predicted Mean Vote (PMV) and Predicted Percentage of Dissatisfied (PPD) (array version)
136
+ *
137
+ * @param { number[] } tdb - dry bulb air temperature, default in [°C] in [°F] if `units` = 'IP'
138
+ * @param { number[] } tr - mean radiant temperature, default in [°C] in [°F] if `units` = 'IP'
139
+ * @param { number[] } vr - relative air speed, default in [m/s] in [fps] if `units` = 'IP'
140
+ *
141
+ * Note: vr is the relative air speed caused by body movement and not the air
142
+ * speed measured by the air speed sensor. The relative air speed is the sum of the
143
+ * average air speed measured by the sensor plus the activity-generated air speed
144
+ * (Vag). Where Vag is the activity-generated air speed caused by motion of
145
+ * individual body parts. vr can be calculated using the function `v_relative_array` which is in .utilities.js.
146
+ * @param { number[] } rh - relative humidity, [%]
147
+ * @param { number[] } met - metabolic rate, [met]
148
+ * @param { number[] } clo - clothing insulation, [clo]
149
+ *
150
+ * Note: The activity as well as the air speed modify the insulation characteristics
151
+ * of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that
152
+ * the clothing insulation shall be corrected {@link #ref_2|[2]}. The ASHRAE 55 Standard corrects
153
+ * for the effect of the body movement for met equal or higher than 1.2 met using
154
+ * the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo,
155
+ * can be calculated using the function `clo_dynamic_array` which is in .utilities.js.
156
+ * @param { number[] } wme - external work, default is array of 0
157
+ * @param { "ISO"|"ASHRAE" } [standard="ISO"] - comfort standard used for calculation
158
+ *
159
+ * · If "ISO", then the ISO Equation is used
160
+ *
161
+ * · If "ASHRAE", then the ASHRAE Equation is used
162
+ *
163
+ * Note: While the PMV equation is the same for both the ISO and ASHRAE standards, the ASHRAE Standard Use of
164
+ * the 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
165
+ * zone boundaries are adjusted based on the SET model. This change was introduced by the
166
+ * {@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}
167
+ * @param { Pmv_ppdKwargs }kwargs - additional arguments
168
+ *
169
+ * @returns {Pmv_ppd_arrayReturns} - Result of pmv and ppd
170
+ *
171
+ * @example
172
+ * const tdb = [22, 25];
173
+ * const tr = [25, 25];
174
+ * const rh = [50, 50];
175
+ * const v = [0.1, 0.1];
176
+ * const met = [1.4, 1.4];
177
+ * const clo = [0.5, 0.5];
178
+ * // Calculate relative air speed
179
+ * const v_r = v_relative_array(v, met);
180
+ * // Calculate dynamic clothing
181
+ * const clo_d = clo_dynamic_array(clo, met);
182
+ * const arrayResults = pmv_ppd_array(tdb, tr, v_r, rh, met, clo_d);
183
+ * console.log(arrayResults); // Output: { pmv: [-0.47, 0.06], ppd: [9.6, 5.1] }
184
+ * console.log(results.pmv); // Output: [-0.47, 0.06]
185
+ */
186
+ export function pmv_ppd_array(tdb: number[], tr: number[], vr: number[], rh: number[], met: number[], clo: number[], wme: number[], standard?: "ISO" | "ASHRAE", kwargs?: Pmv_ppdKwargs): Pmv_ppd_arrayReturns;
187
+ /**
188
+ * @param {number} tdb
189
+ * @param {number} tr
190
+ * @param {number} vr
191
+ * @param {number} rh
192
+ * @param {number} met
193
+ * @param {number} clo
194
+ * @param {number} wme
195
+ *
196
+ * @returns {number} _pmv
197
+ */
198
+ export function pmv_calculation(tdb: number, tr: number, vr: number, rh: number, met: number, clo: number, wme: number): number;
199
+ export type Pmv_ppdKwargs = {
200
+ /**
201
+ * - select the SI (International System of Units) or the IP (Imperial Units) system.
202
+ */
203
+ units: 'SI' | 'IP';
204
+ /**
205
+ * - Default is True. By default, if the inputs are outside the standard applicability
206
+ * limits the function returns NaN. If false, returns pmv and ppd values even if input values are outside
207
+ * the applicability limits of the model.
208
+ *
209
+ * The ASHRAE 55 2020 limits are 10 < tdb [°C] < 40, 10 < tr [°C] < 40,
210
+ * 0 < vr [m/s] < 2, 1 < met [met] < 4, and 0 < clo [clo] < 1.5.
211
+ * The ISO 7730 2005 limits are 10 < tdb [°C] < 30, 10 < tr [°C] < 40,
212
+ * 0 < vr [m/s] < 1, 0.8 < met [met] < 4, 0 < clo [clo] < 2, and -2 < PMV < 2.
213
+ */
214
+ limit_inputs: boolean;
215
+ /**
216
+ * - This only applies if standard = "ASHRAE".
217
+ *
218
+ * Default is True. By default, it is assumed that the occupant has control over the airspeed.
219
+ * In this case, the ASHRAE 55 Standard does not impose any airspeed limits.
220
+ * On the other hand, if the occupant has no control over the airspeed,
221
+ * the ASHRAE 55 imposes an upper limit for v which varies as a function of
222
+ * the operative temperature, for more information please consult the Standard.
223
+ */
224
+ airspeed_control: boolean;
225
+ };
226
+ export type Pmv_ppdReturns = {
227
+ /**
228
+ * - Predicted Mean Vote
229
+ */
230
+ pmv: number;
231
+ /**
232
+ * - Predicted Percentage of Dissatisfied occupants, [%]
233
+ */
234
+ ppd: number;
235
+ };
236
+ export type Pmv_ppd_arrayReturns = {
237
+ /**
238
+ * - Predicted Mean Vote
239
+ */
240
+ pmv: number[];
241
+ /**
242
+ * - Predicted Percentage of Dissatisfied occupants, [%]
243
+ */
244
+ ppd: number[];
245
+ };
246
+ //# sourceMappingURL=pmv_ppd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pmv_ppd.d.ts","sourceRoot":"","sources":["../../../../src/models/pmv_ppd.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,6BAjDY,MAAM,MACN,MAAM,MACN,MAAM,MAON,MAAM,OACN,MAAM,OACN,MAAM,QAQN,MAAM,aACN,KAAK,GAAC,QAAQ,WAUd,aAAa,GAEX,cAAc,CAsG3B;AAED;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,mCAjDY,MAAM,EAAE,MACR,MAAM,EAAE,MACR,MAAM,EAAE,MAOR,MAAM,EAAE,OACR,MAAM,EAAE,OACR,MAAM,EAAE,OAQR,MAAM,EAAE,aACR,KAAK,GAAC,QAAQ,WAUd,aAAa,GAEZ,oBAAoB,CAwIhC;AAED;;;;;;;;;;GAUG;AACH,qCAVW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,GAEJ,MAAM,CA0ElB;;;;;WA5da,IAAI,GAAC,IAAI;;;;;;;;;;;kBACR,OAAO;;;;;;;;;;sBAQP,OAAO;;;;;;SAYP,MAAM;;;;SACN,MAAM;;;;;;SAyKN,MAAM,EAAE;;;;SACR,MAAM,EAAE"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * @typedef {Object} SetTmpKwargs - a keywords argument set containing the additional arguments for Standard Effective Temperature calculation
3
+ * @property {boolean} [round=true] - round the result of the SET
4
+ * @property {boolean} [calculate_ce=false] - select if SET is used to calculate Cooling Effect
5
+ * @public
6
+ */
7
+ /**
8
+ * @typedef {Object} SetTmpKwargsRequired
9
+ * @property {boolean} round
10
+ * @property {boolean} calculate_ce
11
+ */
12
+ /**
13
+ * Calculates the Standard Effective Temperature (SET). The SET is the
14
+ * temperature of a hypothetical isothermal environment at 50% (rh),
15
+ * <0.1 m/s (20 fpm) average air speed (v), and tr = tdb, in which the
16
+ * total heat loss from the skin of an imaginary occupant wearing
17
+ * clothing, standardized for the activity concerned is the same as
18
+ * that from a person in the actual environment with actual clothing
19
+ * and activity level {@link #ref_10|[10]}.
20
+ * @public
21
+ * @memberof models
22
+ * @docname Standard Effective Temperature (SET)
23
+ *
24
+ * @see {@link set_tmp_array} for a version that supports arrays
25
+ *
26
+ * @param {number} tdb Dry bulb air temperature, default in [°C] in [°F] if `units` = 'IP'.
27
+ * @param {number} tr Mean radiant temperature, default in [°C]
28
+ * @param {number} v Air speed, default in [m/s]
29
+ * @param {number} rh Relative humidity, [%].
30
+ * @param {number} met Metabolic rate, [W/(m2)]
31
+ * @param {number} clo Clothing insulation, [clo]
32
+ * @param {number} [wme=0] External work, [W/(m2)] default 0
33
+ * @param {number} [body_surface_area] Body surface area, default value 1.8258 [m2] in [ft2] if units = ‘IP’
34
+ * @param {number} [p_atm] Atmospheric pressure, default value 101325 [Pa] in [atm] if units = ‘IP’
35
+ * @param {"standing" | "sitting"} [body_position="standing"] Select either “sitting” or “standing”
36
+ * @param {"SI" | "IP"} [units="SI"] Select the SI (International System of Units) or the IP (Imperial Units) system.
37
+ * @param {boolean} [limit_inputs=true] By default, if the inputs are outsude the following limits the function returns nan. If False returns values regardless of the input values.
38
+ * @param {SetTmpKwargs} [kwargs]
39
+ * @returns {number} SET – Standard effective temperature in array, [°C]
40
+ *
41
+ * @example
42
+ * const set = set_tmp(25, 25, 0.1, 50, 1.2, 0.5); // returns 24.3
43
+ */
44
+ export function set_tmp(tdb: number, tr: number, v: number, rh: number, met: number, clo: number, wme?: number, body_surface_area?: number, p_atm?: number, body_position?: "standing" | "sitting", units?: "SI" | "IP", limit_inputs?: boolean, kwargs?: SetTmpKwargs): number;
45
+ /**
46
+ * @typedef {Object} SetTmpArrayKwargs - a keywords argument set containing the additional arguments for SET array calculation
47
+ * @property {boolean} [round=true] - round the result of the SET
48
+ * @property {boolean} [calculate_ce=false] - select if SET array is used to calculate Cooling Effect
49
+ * @public
50
+ */
51
+ /**
52
+ * @typedef {Object} SetTmpArrayKwargsRequired
53
+ * @property {boolean} round
54
+ * @property {boolean} calculate_ce
55
+ */
56
+ /**
57
+ *
58
+ * Calculates the SET when the input parameters are arrays. The SET is the
59
+ * temperature of a hypothetical isothermal environment at 50% (rh),
60
+ * <0.1 m/s (20 fpm) average air speed (v), and tr = tdb, in which the
61
+ * total heat loss from the skin of an imaginary occupant wearing
62
+ * clothing, standardized for the activity concerned is the same as
63
+ * that from a person in the actual environment with actual clothing
64
+ * and activity level {@link #ref_10|[10]}.
65
+ * @public
66
+ * @memberof models
67
+ * @docname Standard Effective Temperature (SET) (array version)
68
+ *
69
+ * @see {@link set_tmp} for a version that supports scalar arguments
70
+ *
71
+ * @param {number[]} tdbArray Dry bulb air temperature, default in [°C] in [°F] if `units` = 'IP'.
72
+ * @param {number[]} trArray Mean radiant temperature, default in [°C]
73
+ * @param {number[]} vArray Air speed, default in [m/s]
74
+ * @param {number[]} rhArray Relative humidity, [%].
75
+ * @param {number[]} metArray Metabolic rate, [W/(m2)]
76
+ * @param {number[]} cloArray Clothing insulation, [clo]
77
+ * @param {number[]} [wmeArray] External work, [W/(m2)] default 0
78
+ * @param {number[]} [bodySurfaceArray] Body surface area, default value 1.8258 [m2] in [ft2] if units = ‘IP’
79
+ * @param {number[]} [pAtmArray] Atmospheric pressure, default value 101325 [Pa] in [atm] if units = ‘IP’
80
+ * @param {"standing" | "sitting"} bodyPositionArray Select either “sitting” or “standing”
81
+ * @param {"SI" | "IP"} [units="SI"] Select the SI (International System of Units) or the IP (Imperial Units) system.
82
+ * @param {boolean} [limit_inputs=true] By default, if the inputs are outsude the following limits the function returns nan. If False returns values regardless of the input values.
83
+ * @param {SetTmpKwargs} [kwargs]
84
+ * @returns {number[]} SET Array – Standard effective temperature in array, [°C]
85
+ *
86
+ * @example
87
+ * const set = set_tmp_array([25, 25], [25, 25], [0.1, 0.1], [50, 50], [1.2, 1.2], [0.5, 0.5]); // returns [24.3, 24.3]
88
+ */
89
+ export function set_tmp_array(tdbArray: number[], trArray: number[], vArray: number[], rhArray: number[], metArray: number[], cloArray: number[], wmeArray?: number[], bodySurfaceArray?: number[], pAtmArray?: number[], bodyPositionArray: "standing" | "sitting", units?: "SI" | "IP", limit_inputs?: boolean, kwargs?: SetTmpKwargs): number[];
90
+ /**
91
+ * - a keywords argument set containing the additional arguments for Standard Effective Temperature calculation
92
+ */
93
+ export type SetTmpKwargs = {
94
+ /**
95
+ * - round the result of the SET
96
+ */
97
+ round?: boolean;
98
+ /**
99
+ * - select if SET is used to calculate Cooling Effect
100
+ */
101
+ calculate_ce?: boolean;
102
+ };
103
+ export type SetTmpKwargsRequired = {
104
+ round: boolean;
105
+ calculate_ce: boolean;
106
+ };
107
+ /**
108
+ * - a keywords argument set containing the additional arguments for SET array calculation
109
+ */
110
+ export type SetTmpArrayKwargs = {
111
+ /**
112
+ * - round the result of the SET
113
+ */
114
+ round?: boolean;
115
+ /**
116
+ * - select if SET array is used to calculate Cooling Effect
117
+ */
118
+ calculate_ce?: boolean;
119
+ };
120
+ export type SetTmpArrayKwargsRequired = {
121
+ round: boolean;
122
+ calculate_ce: boolean;
123
+ };
124
+ //# sourceMappingURL=set_tmp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set_tmp.d.ts","sourceRoot":"","sources":["../../../../src/models/set_tmp.js"],"names":[],"mappings":"AAQA;;;;;GAKG;AAEH;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,6BAlBW,MAAM,MACN,MAAM,KACN,MAAM,MACN,MAAM,OACN,MAAM,OACN,MAAM,QACN,MAAM,sBACN,MAAM,UACN,MAAM,kBACN,UAAU,GAAG,SAAS,UACtB,IAAI,GAAG,IAAI,iBACX,OAAO,WACP,YAAY,GACV,MAAM,CAkGlB;AAED;;;;;GAKG;AAEH;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wCAlBW,MAAM,EAAE,WACR,MAAM,EAAE,UACR,MAAM,EAAE,WACR,MAAM,EAAE,YACR,MAAM,EAAE,YACR,MAAM,EAAE,aACR,MAAM,EAAE,qBACR,MAAM,EAAE,cACR,MAAM,EAAE,qBACR,UAAU,GAAG,SAAS,UACtB,IAAI,GAAG,IAAI,iBACX,OAAO,WACP,YAAY,GACV,MAAM,EAAE,CAmHpB;;;;;;;;YApSa,OAAO;;;;mBACP,OAAO;;;WAMP,OAAO;kBACP,OAAO;;;;;;;;;YAmIP,OAAO;;;;mBACP,OAAO;;;WAMP,OAAO;kBACP,OAAO"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @typedef {object} SolarGainReturnType
3
+ * @property {number} erf - Solar gain to the human body using the Effective Radiant Field [W/m2]
4
+ * @property {number} delta_mrt - Delta mean radiant temperature. The amount by which the mean radiant
5
+ * temperature of the space should be increased if no solar radiation is present.
6
+ * @public
7
+ */
8
+ /**
9
+ * Calculates the solar gain to the human body using the Effective Radiant
10
+ * Field ( ERF) {@link #ref_1|[1]}. The ERF is a measure of the net energy flux to or from
11
+ * the human body. ERF is expressed in W over human body surface area [w/m2].
12
+ *
13
+ * In addition, it calculates the delta mean radiant temperature. Which is the
14
+ * amount by which the mean radiant temperature of the space should be
15
+ * increased if no solar radiation is present.
16
+ *
17
+ * More information on the calculation procedure can be found in Appendix C of {@link #ref_1|[1]}.
18
+ *
19
+ * @memberof models
20
+ * @public
21
+ * @docname Solar gain on people
22
+ *
23
+ * @param {number} sol_altitude - Solar altitude, degrees from horizontal [deg]. Ranges between 0 and 90.
24
+ * @param {number} sharp - Solar horizontal angle relative to the front of the person (SHARP) [deg].
25
+ * Ranges between 0 and 180 and is symmetrical on either side. Zero (0) degrees
26
+ * represents direct-beam radiation from the front, 90 degrees represents
27
+ * direct-beam radiation from the side, and 180 degrees rep- resent direct-beam
28
+ * radiation from the back. SHARP is the angle between the sun and the person
29
+ * only. Orientation relative to compass or to room is not included in SHARP.
30
+ * @param {number} sol_radiation_dir - Direct-beam solar radiation, [W/m2]. Ranges between 200 and 1000. See Table C2-3 of ASHRAE 55 2020 {@link #ref_1|[1]}.
31
+ * @param {number} sol_transmittance - Total solar transmittance, ranges from 0 to 1. The total solar
32
+ * transmittance of window systems, including glazing unit, blinds, and other
33
+ * façade treatments, shall be determined using one of the following methods:
34
+ * - i) Provided by manufacturer or from the National Fenestration Rating Council approved Lawrence Berkeley National Lab International Glazing Database.
35
+ * - ii) Glazing unit plus venetian blinds or other complex or unique shades shall be calculated using National Fenestration Rating Council approved software or Lawrence Berkeley National Lab Complex Glazing Database.
36
+ * @param {number} f_svv - Fraction of sky-vault view fraction exposed to body, ranges from 0 to 1. It can be calculated using the function {@link #f_svv|f_svv} in utilities.
37
+ * @param {number} f_bes - Fraction of the possible body surface exposed to sun, ranges from 0 to 1. See Table C2-2 and equation C-7 ASHRAE 55 2020 {@link #ref_1|[1]}.
38
+ * @param {number} [asw=0.7] - The average short-wave absorptivity of the occupant. It will range widely,
39
+ * depending on the color of the occupant’s skin as well as the color and
40
+ * amount of clothing covering the body.
41
+ *
42
+ * A value of 0.7 shall be used unless more specific information about the
43
+ * clothing or skin color of the occupants is available.
44
+ * Note: Short-wave absorptivity typically ranges from 0.57 to 0.84, depending
45
+ * on skin and clothing color. More information is available in Blum (1945).
46
+ * @param {"standing" | "supine" | "seated"} [posture="seated"] - Default 'seated' list of available options 'standing', 'supine' or 'seated'
47
+ * @param {number} [floor_reflectance=0.7] - Floor refectance. It is assumed to be constant and equal to 0.6.
48
+ *
49
+ * @returns {SolarGainReturnType}
50
+ *
51
+ * @example
52
+ * import {solar_gain} from "jsthermalcomfort/models";
53
+ * const results = solar_gain(0, 120, 800, 0.5, 0.7, "seated");
54
+ * console.log(results); // {erf: 42.9, delta_mrt: 10.3}
55
+ */
56
+ export function solar_gain(sol_altitude: number, sharp: number, sol_radiation_dir: number, sol_transmittance: number, f_svv: number, f_bes: number, asw?: number, posture?: "standing" | "supine" | "seated", floor_reflectance?: number): SolarGainReturnType;
57
+ /**
58
+ *
59
+ * @param {number[]} arr
60
+ * @param {number} x
61
+ *
62
+ * @returns {number}
63
+ */
64
+ export function find_span(arr: number[], x: number): number;
65
+ export type SolarGainReturnType = {
66
+ /**
67
+ * - Solar gain to the human body using the Effective Radiant Field [W/m2]
68
+ */
69
+ erf: number;
70
+ /**
71
+ * - Delta mean radiant temperature. The amount by which the mean radiant
72
+ * temperature of the space should be increased if no solar radiation is present.
73
+ */
74
+ delta_mrt: number;
75
+ };
76
+ //# sourceMappingURL=solar_gain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solar_gain.d.ts","sourceRoot":"","sources":["../../../../src/models/solar_gain.js"],"names":[],"mappings":"AAwCA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,yCAjCW,MAAM,SACN,MAAM,qBAMN,MAAM,qBACN,MAAM,SAKN,MAAM,SACN,MAAM,QACN,MAAM,YAQN,UAAU,GAAG,QAAQ,GAAG,QAAQ,sBAChC,MAAM,GAEJ,mBAAmB,CAqE/B;AAED;;;;;;GAMG;AACH,+BALW,MAAM,EAAE,KACR,MAAM,GAEJ,MAAM,CAiBlB;;;;;SA5Ia,MAAM;;;;;eACN,MAAM"}