jsthermalcomfort 0.1.4 → 0.2.0

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 (200) hide show
  1. package/README.md +64 -28
  2. package/lib/cjs/jos3_functions/JOS3Defaults.js +34 -0
  3. package/lib/cjs/jos3_functions/bfb_rate.js +66 -0
  4. package/lib/cjs/jos3_functions/bsa_rate.js +28 -0
  5. package/lib/cjs/jos3_functions/capacity.js +103 -0
  6. package/lib/cjs/jos3_functions/conductance.js +171 -0
  7. package/lib/cjs/jos3_functions/local_bsa.js +55 -0
  8. package/lib/cjs/jos3_functions/matrix.js +341 -0
  9. package/lib/cjs/jos3_functions/thermoregulation/ava_blood_flow.js +75 -0
  10. package/lib/cjs/jos3_functions/thermoregulation/basal_met.js +55 -0
  11. package/lib/cjs/jos3_functions/thermoregulation/clo_area_factor.js +14 -0
  12. package/lib/cjs/jos3_functions/thermoregulation/conv_coef.js +127 -0
  13. package/lib/cjs/jos3_functions/thermoregulation/cr_ms_fat_blood_flow.js +86 -0
  14. package/lib/cjs/jos3_functions/thermoregulation/dry_r.js +47 -0
  15. package/lib/cjs/jos3_functions/thermoregulation/error_signals.js +55 -0
  16. package/lib/cjs/jos3_functions/thermoregulation/evaporation.js +94 -0
  17. package/lib/cjs/jos3_functions/thermoregulation/fixed_hc.js +42 -0
  18. package/lib/cjs/jos3_functions/thermoregulation/fixed_hr.js +43 -0
  19. package/lib/cjs/jos3_functions/thermoregulation/local_mbase.js +70 -0
  20. package/lib/cjs/jos3_functions/thermoregulation/local_q_work.js +48 -0
  21. package/lib/cjs/jos3_functions/thermoregulation/nonshivering.js +95 -0
  22. package/lib/cjs/jos3_functions/thermoregulation/operative_temp.js +42 -0
  23. package/lib/cjs/jos3_functions/thermoregulation/rad_coef.js +74 -0
  24. package/lib/cjs/jos3_functions/thermoregulation/resp_heat_loss.js +24 -0
  25. package/lib/cjs/jos3_functions/thermoregulation/shivering.js +133 -0
  26. package/lib/cjs/jos3_functions/thermoregulation/skin_blood_flow.js +75 -0
  27. package/lib/cjs/jos3_functions/thermoregulation/sum_bf.js +50 -0
  28. package/lib/cjs/jos3_functions/thermoregulation/sum_m.js +66 -0
  29. package/lib/cjs/jos3_functions/thermoregulation/wet_r.js +53 -0
  30. package/lib/cjs/jos3_functions/validate_body_parameters.js +32 -0
  31. package/lib/cjs/jos3_functions/weight_rate.js +31 -0
  32. package/lib/cjs/models/JOS3.js +953 -0
  33. package/lib/cjs/models/index.js +29 -27
  34. package/lib/cjs/supa.js +74 -0
  35. package/lib/cjs/types/jos3_functions/JOS3Defaults.d.ts +27 -0
  36. package/lib/cjs/types/jos3_functions/JOS3Defaults.d.ts.map +1 -0
  37. package/lib/cjs/types/jos3_functions/bfb_rate.d.ts +13 -0
  38. package/lib/cjs/types/jos3_functions/bfb_rate.d.ts.map +1 -0
  39. package/lib/cjs/types/jos3_functions/bsa_rate.d.ts +15 -0
  40. package/lib/cjs/types/jos3_functions/bsa_rate.d.ts.map +1 -0
  41. package/lib/cjs/types/jos3_functions/capacity.d.ts +19 -0
  42. package/lib/cjs/types/jos3_functions/capacity.d.ts.map +1 -0
  43. package/lib/cjs/types/jos3_functions/conductance.d.ts +13 -0
  44. package/lib/cjs/types/jos3_functions/conductance.d.ts.map +1 -0
  45. package/lib/cjs/types/jos3_functions/local_bsa.d.ts +19 -0
  46. package/lib/cjs/types/jos3_functions/local_bsa.d.ts.map +1 -0
  47. package/lib/cjs/types/jos3_functions/matrix.d.ts +63 -0
  48. package/lib/cjs/types/jos3_functions/matrix.d.ts.map +1 -0
  49. package/lib/cjs/types/jos3_functions/thermoregulation/ava_blood_flow.d.ts +33 -0
  50. package/lib/cjs/types/jos3_functions/thermoregulation/ava_blood_flow.d.ts.map +1 -0
  51. package/lib/cjs/types/jos3_functions/thermoregulation/basal_met.d.ts +13 -0
  52. package/lib/cjs/types/jos3_functions/thermoregulation/basal_met.d.ts.map +1 -0
  53. package/lib/cjs/types/jos3_functions/thermoregulation/clo_area_factor.d.ts +9 -0
  54. package/lib/cjs/types/jos3_functions/thermoregulation/clo_area_factor.d.ts.map +1 -0
  55. package/lib/cjs/types/jos3_functions/thermoregulation/conv_coef.d.ts +16 -0
  56. package/lib/cjs/types/jos3_functions/thermoregulation/conv_coef.d.ts.map +1 -0
  57. package/lib/cjs/types/jos3_functions/thermoregulation/cr_ms_fat_blood_flow.d.ts +37 -0
  58. package/lib/cjs/types/jos3_functions/thermoregulation/cr_ms_fat_blood_flow.d.ts.map +1 -0
  59. package/lib/cjs/types/jos3_functions/thermoregulation/dry_r.d.ts +12 -0
  60. package/lib/cjs/types/jos3_functions/thermoregulation/dry_r.d.ts.map +1 -0
  61. package/lib/cjs/types/jos3_functions/thermoregulation/error_signals.d.ts +27 -0
  62. package/lib/cjs/types/jos3_functions/thermoregulation/error_signals.d.ts.map +1 -0
  63. package/lib/cjs/types/jos3_functions/thermoregulation/evaporation.d.ts +46 -0
  64. package/lib/cjs/types/jos3_functions/thermoregulation/evaporation.d.ts.map +1 -0
  65. package/lib/cjs/types/jos3_functions/thermoregulation/fixed_hc.d.ts +5 -0
  66. package/lib/cjs/types/jos3_functions/thermoregulation/fixed_hc.d.ts.map +1 -0
  67. package/lib/cjs/types/jos3_functions/thermoregulation/fixed_hr.d.ts +9 -0
  68. package/lib/cjs/types/jos3_functions/thermoregulation/fixed_hr.d.ts.map +1 -0
  69. package/lib/cjs/types/jos3_functions/thermoregulation/local_mbase.d.ts +14 -0
  70. package/lib/cjs/types/jos3_functions/thermoregulation/local_mbase.d.ts.map +1 -0
  71. package/lib/cjs/types/jos3_functions/thermoregulation/local_q_work.d.ts +12 -0
  72. package/lib/cjs/types/jos3_functions/thermoregulation/local_q_work.d.ts.map +1 -0
  73. package/lib/cjs/types/jos3_functions/thermoregulation/nonshivering.d.ts +16 -0
  74. package/lib/cjs/types/jos3_functions/thermoregulation/nonshivering.d.ts.map +1 -0
  75. package/lib/cjs/types/jos3_functions/thermoregulation/operative_temp.d.ts +13 -0
  76. package/lib/cjs/types/jos3_functions/thermoregulation/operative_temp.d.ts.map +1 -0
  77. package/lib/cjs/types/jos3_functions/thermoregulation/rad_coef.d.ts +10 -0
  78. package/lib/cjs/types/jos3_functions/thermoregulation/rad_coef.d.ts.map +1 -0
  79. package/lib/cjs/types/jos3_functions/thermoregulation/resp_heat_loss.d.ts +27 -0
  80. package/lib/cjs/types/jos3_functions/thermoregulation/resp_heat_loss.d.ts.map +1 -0
  81. package/lib/cjs/types/jos3_functions/thermoregulation/shivering.d.ts +27 -0
  82. package/lib/cjs/types/jos3_functions/thermoregulation/shivering.d.ts.map +1 -0
  83. package/lib/cjs/types/jos3_functions/thermoregulation/skin_blood_flow.d.ts +15 -0
  84. package/lib/cjs/types/jos3_functions/thermoregulation/skin_blood_flow.d.ts.map +1 -0
  85. package/lib/cjs/types/jos3_functions/thermoregulation/sum_bf.d.ts +15 -0
  86. package/lib/cjs/types/jos3_functions/thermoregulation/sum_bf.d.ts.map +1 -0
  87. package/lib/cjs/types/jos3_functions/thermoregulation/sum_m.d.ts +39 -0
  88. package/lib/cjs/types/jos3_functions/thermoregulation/sum_m.d.ts.map +1 -0
  89. package/lib/cjs/types/jos3_functions/thermoregulation/wet_r.d.ts +13 -0
  90. package/lib/cjs/types/jos3_functions/thermoregulation/wet_r.d.ts.map +1 -0
  91. package/lib/cjs/types/jos3_functions/validate_body_parameters.d.ts +12 -0
  92. package/lib/cjs/types/jos3_functions/validate_body_parameters.d.ts.map +1 -0
  93. package/lib/cjs/types/jos3_functions/weight_rate.d.ts +20 -0
  94. package/lib/cjs/types/jos3_functions/weight_rate.d.ts.map +1 -0
  95. package/lib/cjs/types/models/JOS3.d.ts +385 -0
  96. package/lib/cjs/types/models/JOS3.d.ts.map +1 -0
  97. package/lib/cjs/types/models/index.d.ts +56 -54
  98. package/lib/cjs/types/models/index.d.ts.map +1 -1
  99. package/lib/cjs/types/supa.d.ts +25 -0
  100. package/lib/cjs/types/supa.d.ts.map +1 -0
  101. package/lib/esm/jos3_functions/JOS3Defaults.js +32 -0
  102. package/lib/esm/jos3_functions/bfb_rate.js +36 -0
  103. package/lib/esm/jos3_functions/bsa_rate.js +21 -0
  104. package/lib/esm/jos3_functions/capacity.js +96 -0
  105. package/lib/esm/jos3_functions/conductance.js +141 -0
  106. package/lib/esm/jos3_functions/local_bsa.js +25 -0
  107. package/lib/esm/jos3_functions/matrix.js +311 -0
  108. package/lib/esm/jos3_functions/thermoregulation/ava_blood_flow.js +45 -0
  109. package/lib/esm/jos3_functions/thermoregulation/basal_met.js +48 -0
  110. package/lib/esm/jos3_functions/thermoregulation/clo_area_factor.js +10 -0
  111. package/lib/esm/jos3_functions/thermoregulation/conv_coef.js +97 -0
  112. package/lib/esm/jos3_functions/thermoregulation/cr_ms_fat_blood_flow.js +56 -0
  113. package/lib/esm/jos3_functions/thermoregulation/dry_r.js +20 -0
  114. package/lib/esm/jos3_functions/thermoregulation/error_signals.js +28 -0
  115. package/lib/esm/jos3_functions/thermoregulation/evaporation.js +63 -0
  116. package/lib/esm/jos3_functions/thermoregulation/fixed_hc.js +12 -0
  117. package/lib/esm/jos3_functions/thermoregulation/fixed_hr.js +13 -0
  118. package/lib/esm/jos3_functions/thermoregulation/local_mbase.js +40 -0
  119. package/lib/esm/jos3_functions/thermoregulation/local_q_work.js +21 -0
  120. package/lib/esm/jos3_functions/thermoregulation/nonshivering.js +65 -0
  121. package/lib/esm/jos3_functions/thermoregulation/operative_temp.js +15 -0
  122. package/lib/esm/jos3_functions/thermoregulation/rad_coef.js +44 -0
  123. package/lib/esm/jos3_functions/thermoregulation/resp_heat_loss.js +20 -0
  124. package/lib/esm/jos3_functions/thermoregulation/shivering.js +102 -0
  125. package/lib/esm/jos3_functions/thermoregulation/skin_blood_flow.js +45 -0
  126. package/lib/esm/jos3_functions/thermoregulation/sum_bf.js +23 -0
  127. package/lib/esm/jos3_functions/thermoregulation/sum_m.js +39 -0
  128. package/lib/esm/jos3_functions/thermoregulation/wet_r.js +23 -0
  129. package/lib/esm/jos3_functions/validate_body_parameters.js +25 -0
  130. package/lib/esm/jos3_functions/weight_rate.js +24 -0
  131. package/lib/esm/models/JOS3.js +923 -0
  132. package/lib/esm/models/index.js +29 -27
  133. package/lib/esm/supa.js +62 -0
  134. package/lib/esm/types/jos3_functions/JOS3Defaults.d.ts +27 -0
  135. package/lib/esm/types/jos3_functions/JOS3Defaults.d.ts.map +1 -0
  136. package/lib/esm/types/jos3_functions/bfb_rate.d.ts +13 -0
  137. package/lib/esm/types/jos3_functions/bfb_rate.d.ts.map +1 -0
  138. package/lib/esm/types/jos3_functions/bsa_rate.d.ts +15 -0
  139. package/lib/esm/types/jos3_functions/bsa_rate.d.ts.map +1 -0
  140. package/lib/esm/types/jos3_functions/capacity.d.ts +19 -0
  141. package/lib/esm/types/jos3_functions/capacity.d.ts.map +1 -0
  142. package/lib/esm/types/jos3_functions/conductance.d.ts +13 -0
  143. package/lib/esm/types/jos3_functions/conductance.d.ts.map +1 -0
  144. package/lib/esm/types/jos3_functions/local_bsa.d.ts +19 -0
  145. package/lib/esm/types/jos3_functions/local_bsa.d.ts.map +1 -0
  146. package/lib/esm/types/jos3_functions/matrix.d.ts +63 -0
  147. package/lib/esm/types/jos3_functions/matrix.d.ts.map +1 -0
  148. package/lib/esm/types/jos3_functions/thermoregulation/ava_blood_flow.d.ts +33 -0
  149. package/lib/esm/types/jos3_functions/thermoregulation/ava_blood_flow.d.ts.map +1 -0
  150. package/lib/esm/types/jos3_functions/thermoregulation/basal_met.d.ts +13 -0
  151. package/lib/esm/types/jos3_functions/thermoregulation/basal_met.d.ts.map +1 -0
  152. package/lib/esm/types/jos3_functions/thermoregulation/clo_area_factor.d.ts +9 -0
  153. package/lib/esm/types/jos3_functions/thermoregulation/clo_area_factor.d.ts.map +1 -0
  154. package/lib/esm/types/jos3_functions/thermoregulation/conv_coef.d.ts +16 -0
  155. package/lib/esm/types/jos3_functions/thermoregulation/conv_coef.d.ts.map +1 -0
  156. package/lib/esm/types/jos3_functions/thermoregulation/cr_ms_fat_blood_flow.d.ts +37 -0
  157. package/lib/esm/types/jos3_functions/thermoregulation/cr_ms_fat_blood_flow.d.ts.map +1 -0
  158. package/lib/esm/types/jos3_functions/thermoregulation/dry_r.d.ts +12 -0
  159. package/lib/esm/types/jos3_functions/thermoregulation/dry_r.d.ts.map +1 -0
  160. package/lib/esm/types/jos3_functions/thermoregulation/error_signals.d.ts +27 -0
  161. package/lib/esm/types/jos3_functions/thermoregulation/error_signals.d.ts.map +1 -0
  162. package/lib/esm/types/jos3_functions/thermoregulation/evaporation.d.ts +46 -0
  163. package/lib/esm/types/jos3_functions/thermoregulation/evaporation.d.ts.map +1 -0
  164. package/lib/esm/types/jos3_functions/thermoregulation/fixed_hc.d.ts +5 -0
  165. package/lib/esm/types/jos3_functions/thermoregulation/fixed_hc.d.ts.map +1 -0
  166. package/lib/esm/types/jos3_functions/thermoregulation/fixed_hr.d.ts +9 -0
  167. package/lib/esm/types/jos3_functions/thermoregulation/fixed_hr.d.ts.map +1 -0
  168. package/lib/esm/types/jos3_functions/thermoregulation/local_mbase.d.ts +14 -0
  169. package/lib/esm/types/jos3_functions/thermoregulation/local_mbase.d.ts.map +1 -0
  170. package/lib/esm/types/jos3_functions/thermoregulation/local_q_work.d.ts +12 -0
  171. package/lib/esm/types/jos3_functions/thermoregulation/local_q_work.d.ts.map +1 -0
  172. package/lib/esm/types/jos3_functions/thermoregulation/nonshivering.d.ts +16 -0
  173. package/lib/esm/types/jos3_functions/thermoregulation/nonshivering.d.ts.map +1 -0
  174. package/lib/esm/types/jos3_functions/thermoregulation/operative_temp.d.ts +13 -0
  175. package/lib/esm/types/jos3_functions/thermoregulation/operative_temp.d.ts.map +1 -0
  176. package/lib/esm/types/jos3_functions/thermoregulation/rad_coef.d.ts +10 -0
  177. package/lib/esm/types/jos3_functions/thermoregulation/rad_coef.d.ts.map +1 -0
  178. package/lib/esm/types/jos3_functions/thermoregulation/resp_heat_loss.d.ts +27 -0
  179. package/lib/esm/types/jos3_functions/thermoregulation/resp_heat_loss.d.ts.map +1 -0
  180. package/lib/esm/types/jos3_functions/thermoregulation/shivering.d.ts +27 -0
  181. package/lib/esm/types/jos3_functions/thermoregulation/shivering.d.ts.map +1 -0
  182. package/lib/esm/types/jos3_functions/thermoregulation/skin_blood_flow.d.ts +15 -0
  183. package/lib/esm/types/jos3_functions/thermoregulation/skin_blood_flow.d.ts.map +1 -0
  184. package/lib/esm/types/jos3_functions/thermoregulation/sum_bf.d.ts +15 -0
  185. package/lib/esm/types/jos3_functions/thermoregulation/sum_bf.d.ts.map +1 -0
  186. package/lib/esm/types/jos3_functions/thermoregulation/sum_m.d.ts +39 -0
  187. package/lib/esm/types/jos3_functions/thermoregulation/sum_m.d.ts.map +1 -0
  188. package/lib/esm/types/jos3_functions/thermoregulation/wet_r.d.ts +13 -0
  189. package/lib/esm/types/jos3_functions/thermoregulation/wet_r.d.ts.map +1 -0
  190. package/lib/esm/types/jos3_functions/validate_body_parameters.d.ts +12 -0
  191. package/lib/esm/types/jos3_functions/validate_body_parameters.d.ts.map +1 -0
  192. package/lib/esm/types/jos3_functions/weight_rate.d.ts +20 -0
  193. package/lib/esm/types/jos3_functions/weight_rate.d.ts.map +1 -0
  194. package/lib/esm/types/models/JOS3.d.ts +385 -0
  195. package/lib/esm/types/models/JOS3.d.ts.map +1 -0
  196. package/lib/esm/types/models/index.d.ts +56 -54
  197. package/lib/esm/types/models/index.d.ts.map +1 -1
  198. package/lib/esm/types/supa.d.ts +25 -0
  199. package/lib/esm/types/supa.d.ts.map +1 -0
  200. package/package.json +5 -4
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.rad_coef = void 0;
30
+ const JOS3Defaults_js_1 = __importDefault(require("../JOS3Defaults.js"));
31
+ const math = __importStar(require("mathjs"));
32
+ /**
33
+ * Calculate radiative heat transfer coefficient (hr) [W/(m2*K)]
34
+ *
35
+ * @param {string} posture - Select posture from standing, sitting, lying, sedentary or supine. Default is "standing".
36
+ *
37
+ * @returns {math.Matrix} hr - Radiative heat transfer coefficient (hr) [W/(m2*K)].
38
+ */
39
+ function rad_coef(posture = JOS3Defaults_js_1.default.posture) {
40
+ const valid_postures = [
41
+ "standing",
42
+ "sitting",
43
+ "lying",
44
+ "sedentary",
45
+ "supine",
46
+ ];
47
+ if (!valid_postures.includes(posture)) {
48
+ let postures = valid_postures.join(", ");
49
+ throw new Error(`Invalid posture ${posture}. Must be one of ${postures}.`);
50
+ }
51
+ switch (posture) {
52
+ case "standing":
53
+ // Ichihara et al., 1997, https://doi.org/10.3130/aija.62.45_5
54
+ return math.matrix([
55
+ 4.89, 4.89, 4.32, 4.09, 4.32, 4.55, 4.43, 4.21, 4.55, 4.43, 4.21, 4.77,
56
+ 5.34, 6.14, 4.77, 5.34, 6.14,
57
+ ]);
58
+ case "sitting":
59
+ case "sedentary":
60
+ // Ichihara et al., 1997, https://doi.org/10.3130/aija.62.45_5
61
+ return math.matrix([
62
+ 4.96, 4.96, 3.99, 4.64, 4.21, 4.96, 4.21, 4.74, 4.96, 4.21, 4.74, 4.1,
63
+ 4.74, 6.36, 4.1, 4.74, 6.36,
64
+ ]);
65
+ case "lying":
66
+ case "supine":
67
+ // Kurazumi et al., 2008, https://doi.org/10.20718/jjpa.13.1_17
68
+ return math.matrix([
69
+ 5.475, 5.475, 3.463, 3.463, 3.463, 4.249, 4.835, 4.119, 4.249, 4.835,
70
+ 4.119, 4.44, 5.547, 6.085, 4.44, 5.547, 6.085,
71
+ ]);
72
+ }
73
+ }
74
+ exports.rad_coef = rad_coef;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * @typedef RespHeatLossResult
4
+ * @type {object}
5
+ * @property {number} res_sh - Sensible heat loss by respiration [W].
6
+ * @property {number} res_lh - Latent heat loss by respiration [W].
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.resp_heat_loss = void 0;
10
+ /**
11
+ * Calculate heat loss by respiration [W].
12
+ *
13
+ * @param {number} tdb - Dry bulb air temperature [oC].
14
+ * @param {number} p_a - Water vapor pressure in the ambient air [kPa].
15
+ * @param {number} q_thermogenesis_total - Total thermogenesis [W].
16
+
17
+ * @return {RespHeatLossResult} res_sh, res_lh - Sensible and latent heat loss by respiration [W].
18
+ */
19
+ function resp_heat_loss(tdb, p_a, q_thermogenesis_total) {
20
+ let res_sh = 0.0014 * q_thermogenesis_total * (34 - tdb); // sensible heat loss
21
+ let res_lh = 0.0173 * q_thermogenesis_total * (5.87 - p_a); // latent heat loss
22
+ return { res_sh, res_lh };
23
+ }
24
+ exports.resp_heat_loss = resp_heat_loss;
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.shivering = exports.set_pre_shiv = exports.PRE_SHIV = void 0;
30
+ const JOS3Defaults_js_1 = __importDefault(require("../JOS3Defaults.js"));
31
+ const error_signals_js_1 = require("./error_signals.js");
32
+ const bsa_rate_js_1 = require("../bsa_rate.js");
33
+ const math = __importStar(require("mathjs"));
34
+ exports.PRE_SHIV = 0;
35
+ /**
36
+ * Sets the value of PRE_SHIV.
37
+ *
38
+ * @param {number} value - the value to set PRE_SHIV to
39
+ */
40
+ function set_pre_shiv(value) {
41
+ exports.PRE_SHIV = value;
42
+ }
43
+ exports.set_pre_shiv = set_pre_shiv;
44
+ /**
45
+ * Calculate local thermogenesis by shivering [W].
46
+ *
47
+ * @param {math.MathCollection} err_cr - Difference between set-point and body temperatures [°C].
48
+ * @param {math.MathCollection} err_sk - Difference between set-point and body temperatures [°C].
49
+ * @param {math.MathCollection} t_core - Core and skin temperatures [°C].
50
+ * @param {math.MathCollection} t_skin - Core and skin temperatures [°C].
51
+ * @param {number} [height=1.72] - Body height [m].
52
+ * @param {number} [weight=74.43] - Body weight [kg].
53
+ * @param {string} [bsa_equation="dubois"] - The equation name (str) of bsa calculation. Choose a name from "dubois", "takahira", "fujimoto", or "kurazumi".
54
+ * @param {number} [age=20] - age [years].
55
+ * @param {string} [sex="male"] - Choose male or female.
56
+ * @param {number} [dtime=60] - Interval of analysis time.
57
+ * @param {object} options - Additional options.
58
+ *
59
+ * @returns {math.MathCollection} q_shiv - Local thermogenesis by shivering [W].
60
+ */
61
+ function shivering(err_cr, err_sk, t_core, t_skin, height = JOS3Defaults_js_1.default.height, weight = JOS3Defaults_js_1.default.weight, bsa_equation = JOS3Defaults_js_1.default.bsa_equation, age = JOS3Defaults_js_1.default.age, sex = JOS3Defaults_js_1.default.sex, dtime = 60, options = {}) {
62
+ // Integrated error signal in the warm and cold receptors
63
+ let { clds } = (0, error_signals_js_1.error_signals)(err_sk);
64
+ // Distribution coefficient of thermogenesis by shivering
65
+ let shivf = math.matrix([
66
+ 0.0339, 0.0436, 0.27394, 0.24102, 0.38754, 0.00243, 0.00137, 0.0002,
67
+ 0.00243, 0.00137, 0.0002, 0.0039, 0.00175, 0.00035, 0.0039, 0.00175,
68
+ 0.00035,
69
+ ]);
70
+ // Integrated error signal of shivering
71
+ let sig_shiv = 24.36 * clds * -err_cr.get([0]);
72
+ sig_shiv = Math.max(sig_shiv, 0);
73
+ if (options["shivering_threshold"]) {
74
+ // Asaka, 2016
75
+ // Threshold of starting shivering
76
+ let tskm = math.sum(math.dotMultiply(t_skin, JOS3Defaults_js_1.default.local_bsa)) /
77
+ math.sum(JOS3Defaults_js_1.default.local_bsa);
78
+ let thres;
79
+ if (tskm < 31) {
80
+ thres = 36.6;
81
+ }
82
+ else {
83
+ thres = sex === "male" ? -0.2436 * tskm + 44.1 : -0.225 * tskm + 43.05;
84
+ }
85
+ // Second threshold of starting shivering
86
+ if (thres < t_core.get([0])) {
87
+ sig_shiv = 0;
88
+ }
89
+ }
90
+ if (options["limit_dshiv/dt"]) {
91
+ let dshiv = sig_shiv - exports.PRE_SHIV;
92
+ let limit_dshiv = options["limit_dshiv/dt"] === true
93
+ ? 0.0077 * dtime
94
+ : options["limit_dshiv/dt"] * dtime;
95
+ if (dshiv > limit_dshiv) {
96
+ sig_shiv = limit_dshiv + exports.PRE_SHIV;
97
+ }
98
+ else if (dshiv < -limit_dshiv) {
99
+ sig_shiv = -limit_dshiv + exports.PRE_SHIV;
100
+ }
101
+ }
102
+ exports.PRE_SHIV = sig_shiv;
103
+ // Signal sd_shiv by aging
104
+ let sd_shiv;
105
+ if (age < 30) {
106
+ sd_shiv = math.ones(17);
107
+ }
108
+ else if (age < 40) {
109
+ sd_shiv = math.multiply(math.ones(17), 0.97514);
110
+ }
111
+ else if (age < 50) {
112
+ sd_shiv = math.multiply(math.ones(17), 0.95028);
113
+ }
114
+ else if (age < 60) {
115
+ sd_shiv = math.multiply(math.ones(17), 0.92818);
116
+ }
117
+ else if (age < 70) {
118
+ sd_shiv = math.multiply(math.ones(17), 0.90055);
119
+ }
120
+ else if (age < 80) {
121
+ sd_shiv = math.multiply(math.ones(17), 0.86188);
122
+ }
123
+ else {
124
+ sd_shiv = math.multiply(math.ones(17), 0.82597);
125
+ }
126
+ // Ratio of body surface area to the standard body [-]
127
+ let bsar = (0, bsa_rate_js_1.bsa_rate)(height, weight, bsa_equation);
128
+ // Local thermogenesis by shivering [W]
129
+ let q_shiv = math.dotMultiply(math.dotMultiply(math.dotMultiply(shivf, bsar), sd_shiv), sig_shiv);
130
+ let x = q_shiv + 1;
131
+ return q_shiv;
132
+ }
133
+ exports.shivering = shivering;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.skin_blood_flow = void 0;
30
+ const JOS3Defaults_js_1 = __importDefault(require("../JOS3Defaults.js"));
31
+ const error_signals_js_1 = require("./error_signals.js");
32
+ const bfb_rate_js_1 = require("../bfb_rate.js");
33
+ const math = __importStar(require("mathjs"));
34
+ /**
35
+ * Calculate skin blood flow rate (bf_skin) [L/h].
36
+ * @param {math.MathCollection} err_cr - Difference between set-point and body temperatures [°C].
37
+ * @param {math.MathCollection} err_sk - Difference between set-point and body temperatures [°C].
38
+ * @param {number} [height=1.72] - Body height [m].
39
+ * @param {number} [weight=74.43] - Body weight [kg].
40
+ * @param {string} [bsa_equation="dubois"] - The equation name of bsa calculation. Choose a name from "dubois", "takahira", "fujimoto", or "kurazumi".
41
+ * @param {number} [age=20] - age [years].
42
+ * @param {number} [ci=2.59] - Cardiac index [L/min/㎡].
43
+ *
44
+ * @returns {math.MathCollection} bf_skin - Skin blood flow rate [L/h].
45
+ */
46
+ function skin_blood_flow(err_cr, err_sk, height = JOS3Defaults_js_1.default.height, weight = JOS3Defaults_js_1.default.weight, bsa_equation = JOS3Defaults_js_1.default.bsa_equation, age = JOS3Defaults_js_1.default.age, ci = JOS3Defaults_js_1.default.cardiac_index) {
47
+ let { wrms, clds } = (0, error_signals_js_1.error_signals)(err_sk);
48
+ let bfb_sk = math.matrix([
49
+ 1.754, 0.325, 1.967, 1.475, 2.272, 0.91, 0.508, 1.114, 0.91, 0.508, 1.114,
50
+ 1.456, 0.651, 0.934, 1.456, 0.651, 0.934,
51
+ ]);
52
+ let skin_dilat = math.matrix([
53
+ 0.0692, 0.0992, 0.058, 0.0679, 0.0707, 0.04, 0.0373, 0.0632, 0.04, 0.0373,
54
+ 0.0632, 0.0736, 0.0411, 0.0623, 0.0736, 0.0411, 0.0623,
55
+ ]);
56
+ let skin_stric = math.matrix([
57
+ 0.0213, 0.0213, 0.0638, 0.0638, 0.0638, 0.0213, 0.0213, 0.1489, 0.0213,
58
+ 0.0213, 0.1489, 0.0213, 0.0213, 0.1489, 0.0213, 0.0213, 0.1489,
59
+ ]);
60
+ let sig_dilat = 100.5 * err_cr.get([0]) + 6.4 * (wrms - clds);
61
+ sig_dilat = sig_dilat > 0 ? sig_dilat : 0;
62
+ let sig_stric = -10.8 * err_cr.get([0]) + -10.8 * (wrms - clds);
63
+ sig_stric = sig_stric > 0 ? sig_stric : 0;
64
+ let sd_stric = math.ones(17);
65
+ let sd_dilat = age < 60
66
+ ? math.ones(17)
67
+ : math.matrix([
68
+ 0.91, 0.91, 0.47, 0.47, 0.31, 0.47, 0.47, 0.47, 0.47, 0.47, 0.47,
69
+ 0.31, 0.31, 0.31, 0.31, 0.31, 0.31,
70
+ ]);
71
+ let bf_skin = math.dotMultiply(math.dotMultiply(math.dotDivide(math.add(1, math.multiply(math.dotMultiply(skin_dilat, sd_dilat), sig_dilat)), math.add(1, math.multiply(math.dotMultiply(skin_stric, sd_stric), sig_stric))), bfb_sk), math.dotPow(2, math.divide(err_sk, 6)));
72
+ let bfb = (0, bfb_rate_js_1.bfb_rate)(height, weight, bsa_equation, age, ci);
73
+ return math.dotMultiply(bf_skin, bfb);
74
+ }
75
+ exports.skin_blood_flow = skin_blood_flow;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.sum_bf = void 0;
27
+ const math = __importStar(require("mathjs"));
28
+ /**
29
+ * Sum the total blood flow in various body parts.
30
+ *
31
+ * @param {math.MathCollection} bf_core - Blood flow rate in the core region [L/h].
32
+ * @param {math.MathCollection} bf_muscle - Blood flow rate in the muscle region [L/h].
33
+ * @param {math.MathCollection} bf_fat - Blood flow rate in the fat region [L/h].
34
+ * @param {math.MathCollection} bf_skin - Blood flow rate in the skin region [L/h].
35
+ * @param {number} bf_ava_hand - AVA blood flow rate in one hand [L/h].
36
+ * @param {number} bf_ava_foot - AVA blood flow rate in one foot [L/h].
37
+ *
38
+ * @returns {number} co - Cardiac output (the sum of the whole blood flow rate) [L/h].
39
+ */
40
+ function sum_bf(bf_core, bf_muscle, bf_fat, bf_skin, bf_ava_hand, bf_ava_foot) {
41
+ let co = 0;
42
+ co += math.sum(bf_core);
43
+ co += math.sum(bf_muscle);
44
+ co += math.sum(bf_fat);
45
+ co += math.sum(bf_skin);
46
+ co += 2 * bf_ava_hand;
47
+ co += 2 * bf_ava_foot;
48
+ return co;
49
+ }
50
+ exports.sum_bf = sum_bf;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.sum_m = void 0;
27
+ const matrix_js_1 = require("../matrix.js");
28
+ const math = __importStar(require("mathjs"));
29
+ /**
30
+ * @typedef SumMResult
31
+ * @type {object}
32
+ * @property {math.MathCollection} q_thermogenesis_core - Total thermogenesis in core layer [W].
33
+ * @property {math.MathCollection} q_thermogenesis_muscle - Total thermogenesis in muscle layer [W].
34
+ * @property {math.MathCollection} q_thermogenesis_fat - Total thermogenesis in fat layer [W].
35
+ * @property {math.MathCollection} q_thermogenesis_skin - Total thermogenesis in skin layer [W].
36
+ */
37
+ /**
38
+ * Calculate total thermogenesis in each layer [W].
39
+ *
40
+ * @param {[math.MathCollection, math.MathCollection, math.MathCollection, math.MathCollection]} mbase - Local basal metabolic rate (Mbase) [W].
41
+ * @param {math.MathCollection} q_work - Local thermogenesis by work [W].
42
+ * @param {math.MathCollection} q_shiv - Local thermogenesis by shivering [W].
43
+ * @param {math.MathCollection} q_nst - Local thermogenesis by non-shivering [W].
44
+ *
45
+ * @return {SumMResult} Total thermogenesis in core, muscle, fat, skin layers [W].
46
+ */
47
+ function sum_m(mbase, q_work, q_shiv, q_nst) {
48
+ let [q_thermogenesis_core, q_thermogenesis_muscle, q_thermogenesis_fat, q_thermogenesis_skin,] = mbase;
49
+ for (let i = 0; i < matrix_js_1.BODY_NAMES.length; i++) {
50
+ let bn = matrix_js_1.BODY_NAMES[i];
51
+ if (matrix_js_1.IDICT[bn]["muscle"] !== null) {
52
+ q_thermogenesis_muscle.set([i], q_thermogenesis_muscle.get([i]) + q_work.get([i]) + q_shiv.get([i]));
53
+ }
54
+ else {
55
+ q_thermogenesis_core.set([i], q_thermogenesis_core.get([i]) + q_work.get([i]) + q_shiv.get([i]));
56
+ }
57
+ }
58
+ q_thermogenesis_core = math.add(q_thermogenesis_core, q_nst);
59
+ return {
60
+ q_thermogenesis_core,
61
+ q_thermogenesis_muscle,
62
+ q_thermogenesis_fat,
63
+ q_thermogenesis_skin,
64
+ };
65
+ }
66
+ exports.sum_m = sum_m;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.wet_r = void 0;
30
+ const JOS3Defaults_js_1 = __importDefault(require("../JOS3Defaults.js"));
31
+ const clo_area_factor_js_1 = require("./clo_area_factor.js");
32
+ const math = __importStar(require("mathjs"));
33
+ /**
34
+ * Calculate total evaporative thermal resistance (between the skin and ambient air).
35
+ *
36
+ * @param {math.Matrix} hc - Convective heat transfer coefficient (hc) [W/(m2*K)].
37
+ * @param {math.Matrix} clo - Clothing insulation [clo].
38
+ * @param {number | math.Matrix} [i_clo=0.45] - Clothing vapor permeation efficiency [-].
39
+ * @param {number} [lewis_rate=16.5] - Lewis rate [K/kPa].
40
+ *
41
+ * @returns {math.Matrix} r_et - Total evaporative thermal resistance.
42
+ */
43
+ function wet_r(hc, clo, i_clo = JOS3Defaults_js_1.default.clothing_vapor_permeation_efficiency, lewis_rate = JOS3Defaults_js_1.default.lewis_rate) {
44
+ if (hc.toArray().some((hc) => hc < 0)) {
45
+ throw new Error("Input parameter hc must be non-negative.");
46
+ }
47
+ let fcl = (0, clo_area_factor_js_1.clo_area_factor)(clo);
48
+ let r_cl = math.dotMultiply(0.155, clo);
49
+ let r_ea = math.dotDivide(1, math.dotMultiply(lewis_rate, hc));
50
+ let r_ecl = math.dotDivide(r_cl, math.multiply(i_clo, lewis_rate));
51
+ return math.add(math.dotDivide(r_ea, fcl), r_ecl);
52
+ }
53
+ exports.wet_r = wet_r;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.validate_body_parameters = void 0;
7
+ const JOS3Defaults_js_1 = __importDefault(require("./JOS3Defaults.js"));
8
+ /**
9
+ * Validate the parameters: height, weight, age, and body fat percentage.
10
+ *
11
+ * @param {number} height - The height of the person in meters.
12
+ * @param {number} weight - The weight of the person in kilograms.
13
+ * @param {number} age - The age of the person in years.
14
+ * @param {number} body_fat - The body fat percentage as a fraction of total body mass.
15
+
16
+ * @throws {Error} If any of the parameters are out of the specified range.
17
+ */
18
+ function validate_body_parameters(height = JOS3Defaults_js_1.default.height, weight = JOS3Defaults_js_1.default.weight, age = JOS3Defaults_js_1.default.age, body_fat = JOS3Defaults_js_1.default.body_fat) {
19
+ if (height < 0.5 || height > 3.0) {
20
+ throw new Error("Height must be in the range [0.5, 3.0] meters.");
21
+ }
22
+ if (weight < 20 || weight > 200) {
23
+ throw new Error("Weight must be in the range [20, 200] kilograms.");
24
+ }
25
+ if (age < 5 || age > 100) {
26
+ throw new Error("Age must be in the range [5, 100] years.");
27
+ }
28
+ if (body_fat < 1 || body_fat > 90) {
29
+ throw new Error("Body Fat must be in the range [1, 90] (1% to 90%).");
30
+ }
31
+ }
32
+ exports.validate_body_parameters = validate_body_parameters;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.weight_rate = void 0;
7
+ const JOS3Defaults_js_1 = __importDefault(require("./JOS3Defaults.js"));
8
+ const validate_body_parameters_js_1 = require("./validate_body_parameters.js");
9
+ /**
10
+ * Calculate the ratio of the body weight to the standard body (74.43 kg).
11
+ *
12
+ * The standard values of local body weights are as as follows:
13
+ * weight_local = [
14
+ * 3.18, 0.84, 12.4, 11.03, 17.57,
15
+ * 2.16, 1.37, 0.34, 2.16, 1.37, 0.34,
16
+ * 7.01, 3.34, 0.48, 7.01, 3.34, 0.48
17
+ * ]
18
+ *
19
+ * The data have been derived from 65MN.
20
+ * The weight of neck is extracted from the weight of 65MN's head based on
21
+ * the local body surface area of Smith's model.
22
+ *
23
+ * @param {number} [weight=JOS3Defaults.weight] - The body weight [kg].
24
+ *
25
+ * @returns {number} the ratio of the body weight to the standard body (74.43 kg).
26
+ */
27
+ function weight_rate(weight = JOS3Defaults_js_1.default.weight) {
28
+ (0, validate_body_parameters_js_1.validate_body_parameters)(undefined, weight);
29
+ return weight / JOS3Defaults_js_1.default.weight;
30
+ }
31
+ exports.weight_rate = weight_rate;