formulab 0.1.0 → 0.5.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 (450) hide show
  1. package/CHANGELOG.md +283 -2
  2. package/README.md +147 -48
  3. package/dist/automotive/brakingDistance.d.ts +16 -0
  4. package/dist/automotive/brakingDistance.d.ts.map +1 -0
  5. package/dist/automotive/brakingDistance.js +47 -0
  6. package/dist/automotive/brakingDistance.js.map +1 -0
  7. package/dist/automotive/gearRatio.d.ts +2 -2
  8. package/dist/automotive/gearRatio.d.ts.map +1 -1
  9. package/dist/automotive/gearRatio.js +1 -1
  10. package/dist/automotive/gearRatio.js.map +1 -1
  11. package/dist/automotive/index.d.ts +2 -1
  12. package/dist/automotive/index.d.ts.map +1 -1
  13. package/dist/automotive/index.js +1 -0
  14. package/dist/automotive/index.js.map +1 -1
  15. package/dist/automotive/types.d.ts +18 -2
  16. package/dist/automotive/types.d.ts.map +1 -1
  17. package/dist/battery/batteryPackConfig.d.ts +10 -0
  18. package/dist/battery/batteryPackConfig.d.ts.map +1 -0
  19. package/dist/battery/batteryPackConfig.js +28 -0
  20. package/dist/battery/batteryPackConfig.js.map +1 -0
  21. package/dist/battery/bmsBalancing.d.ts +11 -0
  22. package/dist/battery/bmsBalancing.d.ts.map +1 -0
  23. package/dist/battery/bmsBalancing.js +47 -0
  24. package/dist/battery/bmsBalancing.js.map +1 -0
  25. package/dist/battery/cRate.d.ts +10 -0
  26. package/dist/battery/cRate.d.ts.map +1 -0
  27. package/dist/battery/cRate.js +29 -0
  28. package/dist/battery/cRate.js.map +1 -0
  29. package/dist/battery/chargingProfile.d.ts +11 -0
  30. package/dist/battery/chargingProfile.d.ts.map +1 -0
  31. package/dist/battery/chargingProfile.js +38 -0
  32. package/dist/battery/chargingProfile.js.map +1 -0
  33. package/dist/battery/cycleLife.d.ts +11 -0
  34. package/dist/battery/cycleLife.d.ts.map +1 -0
  35. package/dist/battery/cycleLife.js +70 -0
  36. package/dist/battery/cycleLife.js.map +1 -0
  37. package/dist/battery/energyDensity.d.ts +10 -0
  38. package/dist/battery/energyDensity.d.ts.map +1 -0
  39. package/dist/battery/energyDensity.js +20 -0
  40. package/dist/battery/energyDensity.js.map +1 -0
  41. package/dist/battery/index.d.ts +12 -0
  42. package/dist/battery/index.d.ts.map +1 -0
  43. package/dist/battery/index.js +12 -0
  44. package/dist/battery/index.js.map +1 -0
  45. package/dist/battery/internalResistance.d.ts +11 -0
  46. package/dist/battery/internalResistance.d.ts.map +1 -0
  47. package/dist/battery/internalResistance.js +18 -0
  48. package/dist/battery/internalResistance.js.map +1 -0
  49. package/dist/battery/selfDischarge.d.ts +10 -0
  50. package/dist/battery/selfDischarge.d.ts.map +1 -0
  51. package/dist/battery/selfDischarge.js +17 -0
  52. package/dist/battery/selfDischarge.js.map +1 -0
  53. package/dist/battery/stateOfHealth.d.ts +11 -0
  54. package/dist/battery/stateOfHealth.d.ts.map +1 -0
  55. package/dist/battery/stateOfHealth.js +33 -0
  56. package/dist/battery/stateOfHealth.js.map +1 -0
  57. package/dist/battery/thermalRunaway.d.ts +11 -0
  58. package/dist/battery/thermalRunaway.d.ts.map +1 -0
  59. package/dist/battery/thermalRunaway.js +28 -0
  60. package/dist/battery/thermalRunaway.js.map +1 -0
  61. package/dist/battery/types.d.ts +175 -0
  62. package/dist/battery/types.d.ts.map +1 -0
  63. package/dist/battery/types.js +5 -0
  64. package/dist/battery/types.js.map +1 -0
  65. package/dist/chemical/dilution.d.ts.map +1 -1
  66. package/dist/chemical/dilution.js +21 -24
  67. package/dist/chemical/dilution.js.map +1 -1
  68. package/dist/chemical/heatTransfer.d.ts +16 -0
  69. package/dist/chemical/heatTransfer.d.ts.map +1 -0
  70. package/dist/chemical/heatTransfer.js +85 -0
  71. package/dist/chemical/heatTransfer.js.map +1 -0
  72. package/dist/chemical/index.d.ts +3 -1
  73. package/dist/chemical/index.d.ts.map +1 -1
  74. package/dist/chemical/index.js +2 -0
  75. package/dist/chemical/index.js.map +1 -1
  76. package/dist/chemical/injectionCycle.d.ts +3 -0
  77. package/dist/chemical/injectionCycle.d.ts.map +1 -1
  78. package/dist/chemical/injectionCycle.js +1 -4
  79. package/dist/chemical/injectionCycle.js.map +1 -1
  80. package/dist/chemical/ph.d.ts +3 -0
  81. package/dist/chemical/ph.d.ts.map +1 -1
  82. package/dist/chemical/ph.js +1 -4
  83. package/dist/chemical/ph.js.map +1 -1
  84. package/dist/chemical/pipeFlow.d.ts +17 -0
  85. package/dist/chemical/pipeFlow.d.ts.map +1 -0
  86. package/dist/chemical/pipeFlow.js +112 -0
  87. package/dist/chemical/pipeFlow.js.map +1 -0
  88. package/dist/chemical/reactor.d.ts +3 -0
  89. package/dist/chemical/reactor.d.ts.map +1 -1
  90. package/dist/chemical/reactor.js +3 -6
  91. package/dist/chemical/reactor.js.map +1 -1
  92. package/dist/chemical/shelfLife.d.ts.map +1 -1
  93. package/dist/chemical/shelfLife.js +1 -7
  94. package/dist/chemical/shelfLife.js.map +1 -1
  95. package/dist/chemical/types.d.ts +82 -10
  96. package/dist/chemical/types.d.ts.map +1 -1
  97. package/dist/construction/index.d.ts +2 -1
  98. package/dist/construction/index.d.ts.map +1 -1
  99. package/dist/construction/index.js +1 -0
  100. package/dist/construction/index.js.map +1 -1
  101. package/dist/construction/momentOfInertia.d.ts +17 -0
  102. package/dist/construction/momentOfInertia.d.ts.map +1 -0
  103. package/dist/construction/momentOfInertia.js +204 -0
  104. package/dist/construction/momentOfInertia.js.map +1 -0
  105. package/dist/construction/pert.d.ts.map +1 -1
  106. package/dist/construction/pert.js +1 -17
  107. package/dist/construction/pert.js.map +1 -1
  108. package/dist/construction/types.d.ts +50 -0
  109. package/dist/construction/types.d.ts.map +1 -1
  110. package/dist/electronics/awg.d.ts.map +1 -1
  111. package/dist/electronics/awg.js +1 -4
  112. package/dist/electronics/awg.js.map +1 -1
  113. package/dist/electronics/capacitor.d.ts +3 -0
  114. package/dist/electronics/capacitor.d.ts.map +1 -1
  115. package/dist/electronics/capacitor.js +1 -4
  116. package/dist/electronics/capacitor.js.map +1 -1
  117. package/dist/electronics/index.d.ts +2 -1
  118. package/dist/electronics/index.d.ts.map +1 -1
  119. package/dist/electronics/index.js +1 -0
  120. package/dist/electronics/index.js.map +1 -1
  121. package/dist/electronics/led.d.ts.map +1 -1
  122. package/dist/electronics/led.js +1 -4
  123. package/dist/electronics/led.js.map +1 -1
  124. package/dist/electronics/ohmsLaw.d.ts +12 -0
  125. package/dist/electronics/ohmsLaw.d.ts.map +1 -0
  126. package/dist/electronics/ohmsLaw.js +69 -0
  127. package/dist/electronics/ohmsLaw.js.map +1 -0
  128. package/dist/electronics/smt-takt.d.ts +3 -0
  129. package/dist/electronics/smt-takt.d.ts.map +1 -1
  130. package/dist/electronics/smt-takt.js +1 -4
  131. package/dist/electronics/smt-takt.js.map +1 -1
  132. package/dist/electronics/solder.d.ts +3 -0
  133. package/dist/electronics/solder.d.ts.map +1 -1
  134. package/dist/electronics/solder.js +1 -4
  135. package/dist/electronics/solder.js.map +1 -1
  136. package/dist/electronics/stencil.d.ts.map +1 -1
  137. package/dist/electronics/stencil.js +1 -4
  138. package/dist/electronics/stencil.js.map +1 -1
  139. package/dist/electronics/trace.d.ts.map +1 -1
  140. package/dist/electronics/trace.js +1 -4
  141. package/dist/electronics/trace.js.map +1 -1
  142. package/dist/electronics/types.d.ts +24 -0
  143. package/dist/electronics/types.d.ts.map +1 -1
  144. package/dist/electronics/via.d.ts.map +1 -1
  145. package/dist/electronics/via.js +1 -4
  146. package/dist/electronics/via.js.map +1 -1
  147. package/dist/energy/carbonFootprint.d.ts.map +1 -1
  148. package/dist/energy/carbonFootprint.js +2 -1
  149. package/dist/energy/carbonFootprint.js.map +1 -1
  150. package/dist/energy/index.d.ts +2 -1
  151. package/dist/energy/index.d.ts.map +1 -1
  152. package/dist/energy/index.js +1 -0
  153. package/dist/energy/index.js.map +1 -1
  154. package/dist/energy/powerCost.d.ts.map +1 -1
  155. package/dist/energy/powerCost.js +2 -1
  156. package/dist/energy/powerCost.js.map +1 -1
  157. package/dist/energy/solarOutput.d.ts +14 -0
  158. package/dist/energy/solarOutput.d.ts.map +1 -0
  159. package/dist/energy/solarOutput.js +54 -0
  160. package/dist/energy/solarOutput.js.map +1 -0
  161. package/dist/energy/types.d.ts +20 -0
  162. package/dist/energy/types.d.ts.map +1 -1
  163. package/dist/environmental/emissionsIntensity.d.ts +11 -0
  164. package/dist/environmental/emissionsIntensity.d.ts.map +1 -0
  165. package/dist/environmental/emissionsIntensity.js +26 -0
  166. package/dist/environmental/emissionsIntensity.js.map +1 -0
  167. package/dist/environmental/energyIntensity.d.ts +11 -0
  168. package/dist/environmental/energyIntensity.d.ts.map +1 -0
  169. package/dist/environmental/energyIntensity.js +19 -0
  170. package/dist/environmental/energyIntensity.js.map +1 -0
  171. package/dist/environmental/esgSummary.d.ts +11 -0
  172. package/dist/environmental/esgSummary.d.ts.map +1 -0
  173. package/dist/environmental/esgSummary.js +39 -0
  174. package/dist/environmental/esgSummary.js.map +1 -0
  175. package/dist/environmental/gwpCalculator.d.ts +11 -0
  176. package/dist/environmental/gwpCalculator.d.ts.map +1 -0
  177. package/dist/environmental/gwpCalculator.js +31 -0
  178. package/dist/environmental/gwpCalculator.js.map +1 -0
  179. package/dist/environmental/index.d.ts +12 -0
  180. package/dist/environmental/index.d.ts.map +1 -0
  181. package/dist/environmental/index.js +12 -0
  182. package/dist/environmental/index.js.map +1 -0
  183. package/dist/environmental/productCarbonFootprint.d.ts +11 -0
  184. package/dist/environmental/productCarbonFootprint.d.ts.map +1 -0
  185. package/dist/environmental/productCarbonFootprint.js +29 -0
  186. package/dist/environmental/productCarbonFootprint.js.map +1 -0
  187. package/dist/environmental/scope1Emissions.d.ts +11 -0
  188. package/dist/environmental/scope1Emissions.d.ts.map +1 -0
  189. package/dist/environmental/scope1Emissions.js +35 -0
  190. package/dist/environmental/scope1Emissions.js.map +1 -0
  191. package/dist/environmental/scope2Emissions.d.ts +11 -0
  192. package/dist/environmental/scope2Emissions.d.ts.map +1 -0
  193. package/dist/environmental/scope2Emissions.js +49 -0
  194. package/dist/environmental/scope2Emissions.js.map +1 -0
  195. package/dist/environmental/scope3Emissions.d.ts +11 -0
  196. package/dist/environmental/scope3Emissions.d.ts.map +1 -0
  197. package/dist/environmental/scope3Emissions.js +36 -0
  198. package/dist/environmental/scope3Emissions.js.map +1 -0
  199. package/dist/environmental/types.d.ts +165 -0
  200. package/dist/environmental/types.d.ts.map +1 -0
  201. package/dist/environmental/types.js +5 -0
  202. package/dist/environmental/types.js.map +1 -0
  203. package/dist/environmental/vocEmissions.d.ts +11 -0
  204. package/dist/environmental/vocEmissions.d.ts.map +1 -0
  205. package/dist/environmental/vocEmissions.js +23 -0
  206. package/dist/environmental/vocEmissions.js.map +1 -0
  207. package/dist/environmental/waterFootprint.d.ts +11 -0
  208. package/dist/environmental/waterFootprint.d.ts.map +1 -0
  209. package/dist/environmental/waterFootprint.js +21 -0
  210. package/dist/environmental/waterFootprint.js.map +1 -0
  211. package/dist/index.d.ts +10 -2
  212. package/dist/index.d.ts.map +1 -1
  213. package/dist/index.js +10 -2
  214. package/dist/index.js.map +1 -1
  215. package/dist/logistics/cbm.d.ts +7 -2
  216. package/dist/logistics/cbm.d.ts.map +1 -1
  217. package/dist/logistics/cbm.js +7 -2
  218. package/dist/logistics/cbm.js.map +1 -1
  219. package/dist/logistics/eoq.d.ts.map +1 -1
  220. package/dist/logistics/eoq.js +11 -0
  221. package/dist/logistics/eoq.js.map +1 -1
  222. package/dist/logistics/fillRate.d.ts.map +1 -1
  223. package/dist/logistics/fillRate.js +1 -17
  224. package/dist/logistics/fillRate.js.map +1 -1
  225. package/dist/logistics/safetyStock.d.ts.map +1 -1
  226. package/dist/logistics/safetyStock.js +2 -55
  227. package/dist/logistics/safetyStock.js.map +1 -1
  228. package/dist/machining/boltCircle.d.ts +16 -0
  229. package/dist/machining/boltCircle.d.ts.map +1 -0
  230. package/dist/machining/boltCircle.js +36 -0
  231. package/dist/machining/boltCircle.js.map +1 -0
  232. package/dist/machining/boringBarDeflection.d.ts +17 -0
  233. package/dist/machining/boringBarDeflection.d.ts.map +1 -0
  234. package/dist/machining/boringBarDeflection.js +54 -0
  235. package/dist/machining/boringBarDeflection.js.map +1 -0
  236. package/dist/machining/cuspHeight.d.ts +15 -0
  237. package/dist/machining/cuspHeight.d.ts.map +1 -0
  238. package/dist/machining/cuspHeight.js +23 -0
  239. package/dist/machining/cuspHeight.js.map +1 -0
  240. package/dist/machining/cycleTimeEstimator.d.ts +18 -0
  241. package/dist/machining/cycleTimeEstimator.d.ts.map +1 -0
  242. package/dist/machining/cycleTimeEstimator.js +62 -0
  243. package/dist/machining/cycleTimeEstimator.js.map +1 -0
  244. package/dist/machining/effectiveDiameter.d.ts +17 -0
  245. package/dist/machining/effectiveDiameter.d.ts.map +1 -0
  246. package/dist/machining/effectiveDiameter.js +24 -0
  247. package/dist/machining/effectiveDiameter.js.map +1 -0
  248. package/dist/machining/gaugeBlockStack.d.ts +16 -0
  249. package/dist/machining/gaugeBlockStack.d.ts.map +1 -0
  250. package/dist/machining/gaugeBlockStack.js +138 -0
  251. package/dist/machining/gaugeBlockStack.js.map +1 -0
  252. package/dist/machining/index.d.ts +14 -0
  253. package/dist/machining/index.d.ts.map +1 -0
  254. package/dist/machining/index.js +14 -0
  255. package/dist/machining/index.js.map +1 -0
  256. package/dist/machining/radialChipThinning.d.ts +18 -0
  257. package/dist/machining/radialChipThinning.d.ts.map +1 -0
  258. package/dist/machining/radialChipThinning.js +30 -0
  259. package/dist/machining/radialChipThinning.js.map +1 -0
  260. package/dist/machining/sineBarHeight.d.ts +16 -0
  261. package/dist/machining/sineBarHeight.d.ts.map +1 -0
  262. package/dist/machining/sineBarHeight.js +32 -0
  263. package/dist/machining/sineBarHeight.js.map +1 -0
  264. package/dist/machining/threadOverWires.d.ts +21 -0
  265. package/dist/machining/threadOverWires.d.ts.map +1 -0
  266. package/dist/machining/threadOverWires.js +54 -0
  267. package/dist/machining/threadOverWires.js.map +1 -0
  268. package/dist/machining/toolDeflection.d.ts +16 -0
  269. package/dist/machining/toolDeflection.d.ts.map +1 -0
  270. package/dist/machining/toolDeflection.js +36 -0
  271. package/dist/machining/toolDeflection.js.map +1 -0
  272. package/dist/machining/triangleSolver.d.ts +21 -0
  273. package/dist/machining/triangleSolver.d.ts.map +1 -0
  274. package/dist/machining/triangleSolver.js +120 -0
  275. package/dist/machining/triangleSolver.js.map +1 -0
  276. package/dist/machining/truePosition.d.ts +19 -0
  277. package/dist/machining/truePosition.d.ts.map +1 -0
  278. package/dist/machining/truePosition.js +44 -0
  279. package/dist/machining/truePosition.js.map +1 -0
  280. package/dist/machining/types.d.ts +201 -0
  281. package/dist/machining/types.d.ts.map +1 -0
  282. package/dist/machining/types.js +2 -0
  283. package/dist/machining/types.js.map +1 -0
  284. package/dist/math.d.ts +26 -0
  285. package/dist/math.d.ts.map +1 -0
  286. package/dist/math.js +95 -0
  287. package/dist/math.js.map +1 -0
  288. package/dist/metal/bearing.d.ts.map +1 -1
  289. package/dist/metal/bearing.js +1 -4
  290. package/dist/metal/bearing.js.map +1 -1
  291. package/dist/metal/bendAllowance.d.ts.map +1 -1
  292. package/dist/metal/bendAllowance.js +2 -1
  293. package/dist/metal/bendAllowance.js.map +1 -1
  294. package/dist/metal/bolt.d.ts.map +1 -1
  295. package/dist/metal/bolt.js +4 -7
  296. package/dist/metal/bolt.js.map +1 -1
  297. package/dist/metal/cutting.d.ts.map +1 -1
  298. package/dist/metal/cutting.js +1 -4
  299. package/dist/metal/cutting.js.map +1 -1
  300. package/dist/metal/cuttingStock.d.ts.map +1 -1
  301. package/dist/metal/cuttingStock.js +1 -4
  302. package/dist/metal/cuttingStock.js.map +1 -1
  303. package/dist/metal/flangeSpec.d.ts +10 -0
  304. package/dist/metal/flangeSpec.d.ts.map +1 -0
  305. package/dist/metal/flangeSpec.js +81 -0
  306. package/dist/metal/flangeSpec.js.map +1 -0
  307. package/dist/metal/gear.d.ts.map +1 -1
  308. package/dist/metal/gear.js +1 -4
  309. package/dist/metal/gear.js.map +1 -1
  310. package/dist/metal/hardness.d.ts.map +1 -1
  311. package/dist/metal/hardness.js +1 -4
  312. package/dist/metal/hardness.js.map +1 -1
  313. package/dist/metal/index.d.ts +4 -1
  314. package/dist/metal/index.d.ts.map +1 -1
  315. package/dist/metal/index.js +3 -0
  316. package/dist/metal/index.js.map +1 -1
  317. package/dist/metal/materialGradeConverter.d.ts +10 -0
  318. package/dist/metal/materialGradeConverter.d.ts.map +1 -0
  319. package/dist/metal/materialGradeConverter.js +78 -0
  320. package/dist/metal/materialGradeConverter.js.map +1 -0
  321. package/dist/metal/metalWeight.d.ts +13 -3
  322. package/dist/metal/metalWeight.d.ts.map +1 -1
  323. package/dist/metal/metalWeight.js +24 -35
  324. package/dist/metal/metalWeight.js.map +1 -1
  325. package/dist/metal/pipeSpec.d.ts +10 -0
  326. package/dist/metal/pipeSpec.d.ts.map +1 -0
  327. package/dist/metal/pipeSpec.js +96 -0
  328. package/dist/metal/pipeSpec.js.map +1 -0
  329. package/dist/metal/pressFit.d.ts.map +1 -1
  330. package/dist/metal/pressFit.js +1 -4
  331. package/dist/metal/pressFit.js.map +1 -1
  332. package/dist/metal/pressTonnage.d.ts +10 -4
  333. package/dist/metal/pressTonnage.d.ts.map +1 -1
  334. package/dist/metal/pressTonnage.js +199 -25
  335. package/dist/metal/pressTonnage.js.map +1 -1
  336. package/dist/metal/roughness.d.ts.map +1 -1
  337. package/dist/metal/roughness.js +2 -5
  338. package/dist/metal/roughness.js.map +1 -1
  339. package/dist/metal/screw.d.ts.map +1 -1
  340. package/dist/metal/screw.js +1 -4
  341. package/dist/metal/screw.js.map +1 -1
  342. package/dist/metal/spring.d.ts.map +1 -1
  343. package/dist/metal/spring.js +1 -4
  344. package/dist/metal/spring.js.map +1 -1
  345. package/dist/metal/tap.d.ts.map +1 -1
  346. package/dist/metal/tap.js +1 -4
  347. package/dist/metal/tap.js.map +1 -1
  348. package/dist/metal/thread.d.ts.map +1 -1
  349. package/dist/metal/thread.js +1 -4
  350. package/dist/metal/thread.js.map +1 -1
  351. package/dist/metal/tolerance.d.ts.map +1 -1
  352. package/dist/metal/tolerance.js +1 -4
  353. package/dist/metal/tolerance.js.map +1 -1
  354. package/dist/metal/types.d.ts +100 -13
  355. package/dist/metal/types.d.ts.map +1 -1
  356. package/dist/metal/vibration.d.ts.map +1 -1
  357. package/dist/metal/vibration.js +1 -4
  358. package/dist/metal/vibration.js.map +1 -1
  359. package/dist/metal/weldHeat.d.ts +2 -1
  360. package/dist/metal/weldHeat.d.ts.map +1 -1
  361. package/dist/metal/weldHeat.js +203 -44
  362. package/dist/metal/weldHeat.js.map +1 -1
  363. package/dist/metal/welding.d.ts.map +1 -1
  364. package/dist/metal/welding.js +3 -2
  365. package/dist/metal/welding.js.map +1 -1
  366. package/dist/quality/aql.d.ts.map +1 -1
  367. package/dist/quality/aql.js +1 -4
  368. package/dist/quality/aql.js.map +1 -1
  369. package/dist/quality/controlChart.d.ts +26 -0
  370. package/dist/quality/controlChart.d.ts.map +1 -0
  371. package/dist/quality/controlChart.js +216 -0
  372. package/dist/quality/controlChart.js.map +1 -0
  373. package/dist/quality/cpk.d.ts +16 -4
  374. package/dist/quality/cpk.d.ts.map +1 -1
  375. package/dist/quality/cpk.js +16 -4
  376. package/dist/quality/cpk.js.map +1 -1
  377. package/dist/quality/downtime.d.ts.map +1 -1
  378. package/dist/quality/downtime.js +1 -4
  379. package/dist/quality/downtime.js.map +1 -1
  380. package/dist/quality/dpmo.d.ts.map +1 -1
  381. package/dist/quality/dpmo.js +2 -65
  382. package/dist/quality/dpmo.js.map +1 -1
  383. package/dist/quality/index.d.ts +2 -1
  384. package/dist/quality/index.d.ts.map +1 -1
  385. package/dist/quality/index.js +1 -0
  386. package/dist/quality/index.js.map +1 -1
  387. package/dist/quality/lineBalancing.d.ts.map +1 -1
  388. package/dist/quality/lineBalancing.js +1 -4
  389. package/dist/quality/lineBalancing.js.map +1 -1
  390. package/dist/quality/mtbf.d.ts.map +1 -1
  391. package/dist/quality/mtbf.js +1 -4
  392. package/dist/quality/mtbf.js.map +1 -1
  393. package/dist/quality/oee.d.ts +13 -1
  394. package/dist/quality/oee.d.ts.map +1 -1
  395. package/dist/quality/oee.js +30 -9
  396. package/dist/quality/oee.js.map +1 -1
  397. package/dist/quality/ppk.d.ts.map +1 -1
  398. package/dist/quality/ppk.js +2 -20
  399. package/dist/quality/ppk.js.map +1 -1
  400. package/dist/quality/ppm.d.ts.map +1 -1
  401. package/dist/quality/ppm.js +2 -84
  402. package/dist/quality/ppm.js.map +1 -1
  403. package/dist/quality/rpn.d.ts.map +1 -1
  404. package/dist/quality/rpn.js +1 -4
  405. package/dist/quality/rpn.js.map +1 -1
  406. package/dist/quality/types.d.ts +31 -0
  407. package/dist/quality/types.d.ts.map +1 -1
  408. package/dist/quality/yield.d.ts.map +1 -1
  409. package/dist/quality/yield.js +1 -4
  410. package/dist/quality/yield.js.map +1 -1
  411. package/dist/safety/fallClearance.d.ts +12 -3
  412. package/dist/safety/fallClearance.d.ts.map +1 -1
  413. package/dist/safety/fallClearance.js +73 -17
  414. package/dist/safety/fallClearance.js.map +1 -1
  415. package/dist/safety/index.d.ts +2 -1
  416. package/dist/safety/index.d.ts.map +1 -1
  417. package/dist/safety/index.js +1 -0
  418. package/dist/safety/index.js.map +1 -1
  419. package/dist/safety/nioshLifting.d.ts +19 -10
  420. package/dist/safety/nioshLifting.d.ts.map +1 -1
  421. package/dist/safety/nioshLifting.js +19 -10
  422. package/dist/safety/nioshLifting.js.map +1 -1
  423. package/dist/safety/types.d.ts +25 -0
  424. package/dist/safety/types.d.ts.map +1 -1
  425. package/dist/safety/ventilationRate.d.ts +12 -0
  426. package/dist/safety/ventilationRate.d.ts.map +1 -0
  427. package/dist/safety/ventilationRate.js +71 -0
  428. package/dist/safety/ventilationRate.js.map +1 -0
  429. package/dist/utility/assignment.d.ts.map +1 -1
  430. package/dist/utility/assignment.js +1 -7
  431. package/dist/utility/assignment.js.map +1 -1
  432. package/dist/utility/index.d.ts +2 -2
  433. package/dist/utility/index.d.ts.map +1 -1
  434. package/dist/utility/index.js +1 -1
  435. package/dist/utility/index.js.map +1 -1
  436. package/dist/utility/types.d.ts +0 -16
  437. package/dist/utility/types.d.ts.map +1 -1
  438. package/dist/utility/unit.d.ts +1 -1
  439. package/dist/utility/unit.d.ts.map +1 -1
  440. package/dist/utility/unit.js +2 -8
  441. package/dist/utility/unit.js.map +1 -1
  442. package/dist/utils.d.ts +5 -1
  443. package/dist/utils.d.ts.map +1 -1
  444. package/dist/utils.js +11 -2
  445. package/dist/utils.js.map +1 -1
  446. package/package.json +37 -4
  447. package/dist/utility/qrcode.d.ts +0 -30
  448. package/dist/utility/qrcode.d.ts.map +0 -1
  449. package/dist/utility/qrcode.js +0 -30
  450. package/dist/utility/qrcode.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,7 +5,288 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [0.1.0] - 2025-02-05
8
+ ## [0.5.0] - 2026-02-07
9
+
10
+ ### Added
11
+
12
+ - **Machining** (new domain, 12 functions):
13
+ - `truePosition()` — GD&T True Position with MMC bonus tolerance (ASME Y14.5)
14
+ - `boltCircle()` — Bolt hole pattern coordinate calculation
15
+ - `sineBarHeight()` — Sine bar gauge block height with rounding error analysis
16
+ - `radialChipThinning()` — Radial chip thinning compensation for light cuts
17
+ - `toolDeflection()` — End mill cantilever deflection (carbide/HSS)
18
+ - `cuspHeight()` — Ball end mill scallop height and surface roughness
19
+ - `effectiveDiameter()` — Ball end mill effective cutting diameter at depth
20
+ - `boringBarDeflection()` — Boring bar deflection with L/D ratio guidance
21
+ - `threadOverWires()` — 3-wire thread measurement (60°/55°/29°/30° angles)
22
+ - `gaugeBlockStack()` — Gauge block combination using successive subtraction (47/88/81-pc sets)
23
+ - `triangleSolver()` — Triangle solver (SSS/SAS/ASA/AAS/SSA with law of cosines/sines)
24
+ - `cycleTimeEstimator()` — CNC cycle time estimation with operation breakdown
25
+
26
+ ## [0.4.0] - 2026-02-07
27
+
28
+ ### Added
29
+
30
+ - **Battery** (new domain, 10 functions):
31
+ - `energyDensity()` — Wh/kg and Wh/L energy density calculation
32
+ - `cRate()` — C-rate ↔ current/time bidirectional conversion
33
+ - `stateOfHealth()` — SOH % with degradation status thresholds (IEEE 1188)
34
+ - `batteryPackConfig()` — Series/parallel cell configuration calculator
35
+ - `cycleLife()` — Cycle life estimation with chemistry (7 types), DOD, and temperature factors
36
+ - `internalResistance()` — DCIR calculation from OCV and load voltage (IEC 61960)
37
+ - `selfDischarge()` — Self-discharge rate (daily and monthly %)
38
+ - `thermalRunaway()` — Thermal safety margin analysis (SAE J2464)
39
+ - `bmsBalancing()` — BMS passive cell balancing time estimation
40
+ - `chargingProfile()` — CC-CV charging profile timing with phase breakdown
41
+
42
+ - **Environmental** (new domain, 10 functions):
43
+ - `scope1Emissions()` — Direct combustion emissions with 6 fuel types (EPA/IPCC 2006 factors)
44
+ - `scope2Emissions()` — Purchased electricity emissions for 12 grid regions (IEA 2023 factors)
45
+ - `scope3Emissions()` — Supply chain spend-based emissions for 8 Scope 3 categories (EPA EEIO)
46
+ - `vocEmissions()` — VOC emissions with capture/destruction efficiency
47
+ - `productCarbonFootprint()` — Product lifecycle carbon footprint with stage breakdown (ISO 14067)
48
+ - `gwpCalculator()` — GWP conversion for 8 GHG gases × 3 time horizons (IPCC AR6)
49
+ - `energyIntensity()` — Energy intensity per unit/revenue (ISO 50001)
50
+ - `waterFootprint()` — Water footprint blue/green/grey breakdown (ISO 14046)
51
+ - `emissionsIntensity()` — Emissions intensity per unit/revenue/employee
52
+ - `esgSummary()` — ESG reduction tracking with projections (TCFD/CDP/SBTi)
53
+
54
+ - **Metal** (3 new functions, 22 → 25):
55
+ - `materialGradeConverter()` — ASTM/EN/JIS/GB/KS grade cross-reference (20 grades × 5 standards)
56
+ - `pipeSpec()` — ANSI/ASME B36.10 pipe dimensions lookup (15 sizes × 6 schedules)
57
+ - `flangeSpec()` — ASME B16.5 WN flange dimensions lookup (8 sizes × 3 pressure classes)
58
+
59
+ ### Changed
60
+
61
+ - Total domains: 11 → 13
62
+ - Total function count: 111 → 134 (+23)
63
+ - Total test count: 1705 → 1887 (+182)
64
+
65
+ ## [0.3.0] - 2026-02-06
66
+
67
+ ### Added
68
+
69
+ - **Quality**: `controlChart()` — SPC X-bar/R and X-bar/S control charts with AIAG/ASTM E2587 constants (n=2..25)
70
+ - **Chemical**: `pipeFlow()` — Darcy-Weisbach pipe flow calculator with Swamee-Jain friction factor (laminar/transitional/turbulent)
71
+ - **Chemical**: `heatTransfer()` — Three modes: conduction (Fourier), convection (Newton), radiation (Stefan-Boltzmann)
72
+ - **Construction**: `momentOfInertia()` — Section properties (A, Ix, Iy, Sx, Sy, rx, ry) for 7 cross-section shapes (rectangle, circle, hollow rectangle, hollow circle, I-beam, T-section, C-channel)
73
+ - **Electronics**: `ohmsLaw()` — V/I/R/P calculator with discriminated union input
74
+ - **Energy**: `solarOutput()` — Solar panel output estimation based on PVWatts methodology
75
+ - **Safety**: `ventilationRate()` — Required ventilation rate (ACH/CFM/L/s) per ASHRAE 62.1 / OSHA guidelines
76
+ - **Automotive**: `brakingDistance()` — Stopping distance calculator per AASHTO method with grade adjustment
77
+
78
+ ### Changed
79
+
80
+ - Total function count: 103 → 111
81
+ - Total test count: 1630 → 1705
82
+
83
+ ## [0.2.0] - 2026-02-06
84
+
85
+ ### Breaking Changes
86
+ - **`MetalWeightInput`**: Now a discriminated union by `shape`. Each shape variant requires its specific fields (e.g., `shape: 'plate'` requires `width` and `thickness`). The `materialName` field is now a `MaterialName` literal union type instead of `string`.
87
+ - **`DilutionInput`**: Now a discriminated union by `solveFor`. Each variant provides exactly the three known values, eliminating optional fields and `!` assertions.
88
+ - **`ReactorInput`**: Now a discriminated union by `shape`. `shape: 'cylindrical'` requires `height`; `shape: 'spherical'` does not accept `height`.
89
+ - **`BoltInput`**: Now a discriminated union by `mode`. `mode: 'torqueToPreload'` requires `torque`; `mode: 'preloadToTorque'` requires `preload`.
90
+ - **QR code types removed**: `QrcodeInput`, `QrcodeResult`, `ErrorCorrectionLevel` types and `qrcode.ts` module removed from `formulab/utility` (was empty shell with no implementation).
91
+
92
+ ### Enhanced
93
+ - **`roundTo()`**: Fixed negative number rounding (`-2.555` now correctly rounds to `-2.56` instead of `-2.55`). Uses sign-aware epsilon correction.
94
+ - **`oee()`**: Results now consistently rounded via `roundTo()` (factors to 4 decimals, percentages to 1 decimal).
95
+
96
+ ### Fixed
97
+ - **Duplicate code removal**: Consolidated `normalCDF()`, `normalInvCDF()`, and `clamp()` from 6 files into shared `math.ts` module.
98
+ - **`Math.round` inconsistency**: Replaced manual `Math.round(x * N) / N` patterns with `roundTo()` in 8 files (`metalWeight`, `fallClearance`, `welding`, `carbonFootprint`, `powerCost`, `bendAllowance`, `weldHeat`, `roughness`).
99
+ - **Duplicate test file**: Removed `src/metal/pressTonnage.test.ts` (14 duplicate tests); canonical version at `src/metal/__tests__/pressTonnage.test.ts` (19 tests) retained.
100
+
101
+ ### Changed
102
+ - **Coverage thresholds**: Raised from baseline (5% lines) to realistic levels (90% lines, 95% functions, 85% branches, 90% statements).
103
+ - Total test count: 1630 tests across 102 test files.
104
+
105
+ ## [0.1.11] - 2026-02-06
106
+
107
+ ### Enhanced
108
+ - **`fallClearance()`**: Complete rewrite with ANSI Z359.1/Z359.4 compliance
109
+ - Added `rescueClearance` parameter (default 0.9m per ANSI Z359.4)
110
+ - Added `obstacleHeight` parameter for elevated obstacle detection
111
+ - Added `freeSpaceRequired` and `clearanceAboveObstacle` outputs
112
+ - Added `warnings` array with validation against OSHA/ANSI limits
113
+ - Separated physical fall distance from safety factor (correct per standards)
114
+
115
+ - **`weldHeat()`**: Major enhancement with industry standards
116
+ - Added AWS D1.1:2020 Table 5.8 preheat requirements with CE×thickness interaction
117
+ - Added Rosenthal cooling time equations (t8/5) for thick and thin plate heat flow
118
+ - Added Yurioka HAZ hardness formula with cooling rate factor
119
+ - Added Carbon Equivalent Pcm formula for low-alloy steels (C < 0.18%)
120
+ - Added hydrogen control level determination
121
+ - Added source attribution for preheat recommendations
122
+
123
+ - **`pressTonnage()`**: Deep drawing enhancements with DIN 8584 basis
124
+ - Added Siebel formula for drawing force with friction and bending effects
125
+ - Added blank holder force calculation: F_bh = π/4 × (D² - d²) × p_bh
126
+ - Added multi-draw detection and estimation for deep draws (d/D < 0.55)
127
+ - Added `frictionCoefficient`, `blankHolderPressure`, `dieRadius` parameters
128
+ - Added `warnings` array for process risk assessment
129
+
130
+ ### Added
131
+ - **Test suite**: `pressTonnage` (19 test cases covering blanking, bending, enhanced drawing)
132
+ - Total test count: 1648 tests across 103 test files
133
+
134
+ ### Changed
135
+ - Formula review completed for high-risk domains (safety, metal)
136
+ - Three functions upgraded from 70-85% to 95%+ theoretical completeness
137
+
138
+ ## [0.1.10] - 2026-02-06
139
+
140
+ ### Added
141
+ - **Test suites (Cycle 14)**: 28개 함수 완전 테스트 추가 (437 test cases)
142
+ - metal: `bendAllowance`, `bolt`, `cuttingStock`, `flatPattern`, `gear`, `kFactorReverse`, `material`, `pressFit`, `pressTonnage`, `roughness`, `screw`, `spring`, `tap`, `thread`, `tolerance`, `vibration`, `weldHeat`, `welding`
143
+ - logistics: `containerFit`, `fillRate`, `freightClass`, `pallet3d`, `palletStack`, `pickTime`, `shipping`, `tsp`
144
+ - construction: `roof`, `stair`
145
+ - Total test count: 1622 tests across 102 test files
146
+
147
+ ### Changed
148
+ - Coverage dramatically improved: 62.09% → 98.11% lines (+36.02%)
149
+ - Branch coverage: 88.72% → 90.55%
150
+ - Function coverage: 89.63% → 100%
151
+ - All domains now have 95%+ line coverage
152
+ - **Milestone**: 100% function coverage achieved, 98%+ line coverage, library fully tested
153
+
154
+ ## [0.1.9] - 2026-02-05
155
+
156
+ ### Added
157
+ - **Test suites (Cycle 13)**: 25개 함수 대규모 테스트 추가 (488 test cases)
158
+ - quality: `aql`, `cycle`, `downtime`, `lineBalancing`, `ppk`
159
+ - chemical: `concentration`, `ph`, `reactor`, `shelfLife`, `injectionCycle`
160
+ - electronics: `reflow`, `resistor`, `smt-takt`, `solder`, `trace`, `capacitor`, `stencil`, `via`
161
+ - construction: `beamLoad`, `concreteMix`, `formwork`, `rebar`, `aggregate`, `brick`, `pert`
162
+ - Total test count: 1185 tests across 74 test files
163
+
164
+ ### Changed
165
+ - Coverage improved: 36.46% → 62.09% lines (+25.63%)
166
+ - quality 도메인: 98.68% lines
167
+ - chemical 도메인: 99.40% lines
168
+ - electronics 도메인: 98.37% lines
169
+ - construction 도메인: 83.30% lines
170
+ - **Milestone**: Line coverage 60% 돌파, 6개 도메인 90%+ 커버리지 달성
171
+
172
+ ## [0.1.8] - 2026-02-05
173
+
174
+ ### Added
175
+ - **Test suites (Cycle 11)**: `yieldCalc`, `rpn`, `ppm` (quality), `safetyStock`, `kanban` (logistics)
176
+ - **Test suites (Cycle 12)**: 17개 함수 대규모 테스트 추가
177
+ - safety: `fallClearance`, `noiseExposure`, `wbgtCalculate`, `havsCalculate`, `respiratorCalculate`
178
+ - food: `haccp`, `expiry`
179
+ - automotive: `batteryRuntime`, `evCharging`, `fuelEconomy`, `tireCompare`, `torque`, `power`
180
+ - energy: `compressedAirCost`, `motorEfficiency`, `pfCorrection`, `vfdSavings`
181
+ - Total test count: 697 tests across 49 test files
182
+
183
+ ### Changed
184
+ - Coverage improved: 20.74% → 36.46% lines (+15.72%)
185
+ - safety 도메인: 39.63% → 100% lines
186
+ - food 도메인: 45.45% → 100% lines
187
+ - automotive 도메인: 11.89% → 68.96% lines
188
+ - energy 도메인: 26.45% → 100% lines
189
+ - **Milestone**: Line coverage 35% 돌파, 4개 도메인 100% 커버리지 달성
190
+
191
+ ## [0.1.7] - 2026-02-05
192
+
193
+ ### Added
194
+ - **Test suites**: `cutting`, `bearing`, `hardness` (metal domain, 45 test cases)
195
+ - Total test count: 371 tests across 27 test files
196
+
197
+ ### Changed
198
+ - Coverage improved: 18.71% → 20.74% lines (+2.03%)
199
+ - metal 도메인: 4.78% → 11.54% lines
200
+ - **Milestone**: Line coverage 20% 돌파
201
+
202
+ ## [0.1.6] - 2026-02-05
203
+
204
+ ### Added
205
+ - **Test suites**: `calculateUnit`, `getUnitCategories`, `getUnitsForCategory` (unit conversion, 29 test cases)
206
+ - **Test suites**: `solveAssignment` (Hungarian algorithm, 12 test cases)
207
+ - Total test count: 326 tests across 24 test files
208
+
209
+ ### Changed
210
+ - Coverage improved: 15.21% → 18.71% lines (+3.5%)
211
+ - utility 도메인: 0% → 78.83% lines
212
+ - Branches coverage: 76.89% → 80.96%
213
+
214
+ ## [0.1.5] - 2026-02-05
215
+
216
+ ### Added
217
+ - **Test suites**: `ledResistor`, `awgProperties` (electronics domain, 33 test cases)
218
+ - **Test suites**: `calorie`, `nutrition` (food domain, 23 test cases)
219
+ - Total test count: 285 tests across 22 test files
220
+
221
+ ### Changed
222
+ - Coverage improved: 12.08% → 15.21% lines
223
+ - electronics 도메인: 0% → 18.77% lines
224
+ - food 도메인: 0% → 45.45% lines
225
+
226
+ ## [0.1.4] - 2026-02-05
227
+
228
+ ### Added
229
+ - **Test suites**: `slope`, `earthwork` (construction domain, 27 test cases)
230
+ - **Test suites**: `powerCost`, `carbonFootprint` (energy domain, 24 test cases)
231
+ - Total test count: 229 tests across 18 test files
232
+
233
+ ### Changed
234
+ - Coverage improved: 10.38% → 12.08% lines
235
+ - construction 도메인: 0% → 7.73% lines
236
+ - energy 도메인: 0% → 26.45% lines
237
+
238
+ ## [0.1.3] - 2026-02-05
239
+
240
+ ### Added
241
+ - **Test suites**: `dilution`, `batch` (chemical domain, 25 test cases)
242
+ - **Input validation tests**: `eoq` validation edge cases (5 test cases)
243
+ - Total test count: 178 tests across 14 test files
244
+
245
+ ### Fixed
246
+ - **`eoq()` input validation**: Returns zeros for invalid inputs (negative/zero demand, cost)
247
+ - **`gearRatio()` NaN bug**: `mechanicalAdvantage` now returns 0 when `inputTorque` is 0
248
+
249
+ ### Changed
250
+ - Coverage improved: 8.8% → 10.38% lines
251
+
252
+ ## [0.1.2] - 2026-02-05
253
+
254
+ ### Added
255
+ - **Test suites**: `eoq`, `dimWeight`, `gearRatio` (40 additional test cases)
256
+ - Total test count: 148 tests across 12 test files
257
+ - Coverage measurement infrastructure fully operational
258
+
259
+ ### Fixed
260
+ - **Coverage tool version mismatch**: Downgraded `@vitest/coverage-v8` from 4.x to 3.x to match vitest 3.x
261
+
262
+ ### Changed
263
+ - **Coverage thresholds**: Adjusted to realistic baseline (lines: 5%, functions: 50%, branches: 50%)
264
+ - Current coverage metrics: 8.8% lines, 62.38% functions, 72.25% branches
265
+
266
+ ## [0.1.1] - 2026-02-05
267
+
268
+ ### Fixed
269
+ - **Main entry point**: Added missing exports for 5 domains (metal, chemical, electronics, construction, energy)
270
+ - **`roundTo()` precision bug**: Fixed IEEE 754 floating-point rounding issues (e.g., `roundTo(0.615, 2)` now correctly returns `0.62`)
271
+ - **Massive duplicate code removal**: Consolidated `roundTo()` from 36 files to single source in `utils.ts`
272
+ - Removed from: quality (8 files), metal (15 files), electronics (8 files), chemical (3 files)
273
+ - **README documentation**: Updated all API examples to match actual implementation
274
+
275
+ ### Changed
276
+ - **BREAKING**: `GearInput` → `GearRatioInput` (automotive domain) to avoid collision with metal domain
277
+ - **BREAKING**: `GearResult` → `GearRatioResult` (automotive domain)
278
+ - **BREAKING**: `getCategories()` → `getUnitCategories()` (utility domain) to avoid collision with metal domain
279
+ - Removed `--passWithNoTests` flag from test script (tests are now mandatory)
280
+
281
+ ### Added
282
+ - Input validation for `oee()`: throws error when `goodCount > totalCount`
283
+ - Input validation for `oee()`: throws error when `goodCount < 0`
284
+ - Test suites: `oee`, `cpk`, `taktTime`, `dpmo`, `mtbf`, `metalWeight`, `cbm`, `nioshLifting`, `roundTo` (108 test cases)
285
+ - NaN/Infinity handling in `roundTo()`
286
+ - Vitest coverage configuration with thresholds
287
+ - `test:coverage` npm script
288
+
289
+ ## [0.1.0] - 2026-02-05
9
290
 
10
291
  ### Added
11
292
 
@@ -134,7 +415,7 @@ Initial release with 103 calculation functions across 11 domains.
134
415
  #### Utility (3 functions)
135
416
  - `solveAssignment()` - Hungarian algorithm optimization
136
417
  - `calculateUnit()` - Unit conversion
137
- - `getCategories()` - Get unit categories
418
+ - `getUnitCategories()` - Get unit categories
138
419
 
139
420
  ### Technical Features
140
421
  - Zero dependencies
package/README.md CHANGED
@@ -10,14 +10,36 @@ A comprehensive collection of engineering formulas and calculations for manufact
10
10
 
11
11
  ## Features
12
12
 
13
- - **100+ industrial calculations** — OEE, Cpk, metal weight, CBM, NIOSH lifting, and more
14
- - **11 specialized domains** — Quality, Metal, Chemical, Electronics, Construction, Automotive, Logistics, Energy, Safety, Food, Utility
13
+ - **146 industrial calculations** — OEE, Cpk, SPC control charts, metal weight, CNC machining, GD&T, pipe flow, CBM, NIOSH lifting, battery SOH, GHG emissions, and more
14
+ - **14 specialized domains** — Quality, Metal, Chemical, Electronics, Construction, Automotive, Logistics, Energy, Safety, Food, Utility, Battery, Environmental, Machining
15
15
  - **Zero dependencies** — Lightweight and fast
16
16
  - **TypeScript first** — Full type definitions included
17
17
  - **Tree-shakeable** — Import only what you need
18
18
  - **Well tested** — Comprehensive test coverage
19
19
  - **Research-based** — Built on industry standards (ISO, OSHA, NIOSH, IPC)
20
20
 
21
+ ## Verification Status
22
+
23
+ | Domain | Functions | Golden Tests | Key References |
24
+ |--------|-----------|-------------|----------------|
25
+ | Quality | 14 | oee, cpk, controlChart | ISO 22400-2, AIAG/ASTM E2587, JIPM |
26
+ | Metal | 25 | metalWeight | Machinery's Handbook, ASME B36.10/B16.5 |
27
+ | Logistics | 14 | cbm | Physical formula |
28
+ | Safety | 7 | nioshLifting | NIOSH 94-110 |
29
+ | Chemical | 9 | — | Darcy-Weisbach, Fourier |
30
+ | Electronics | 11 | — | IPC-2221 |
31
+ | Construction | 12 | — | AISC, Timoshenko |
32
+ | Automotive | 8 | — | AASHTO |
33
+ | Energy | 7 | — | NREL PVWatts |
34
+ | Food | 4 | — | HACCP |
35
+ | Utility | 3 | — | — |
36
+ | Battery | 10 | — | IEEE 1188, IEC 62620, Battery University |
37
+ | Environmental | 10 | — | GHG Protocol, IPCC AR6, IEA 2023 |
38
+ | Machining | 12 | — | Machinery's Handbook, ASME Y14.5, Sandvik Coromant |
39
+
40
+ > Functions with golden reference tests have been verified against authoritative engineering sources.
41
+ > See each function's JSDoc for specific references.
42
+
21
43
  ## Installation
22
44
 
23
45
  ```bash
@@ -35,42 +57,50 @@ import { oee, metalWeight, cbm } from 'formulab';
35
57
 
36
58
  // Calculate OEE (Overall Equipment Effectiveness)
37
59
  const result = oee({
38
- availability: 0.90,
39
- performance: 0.95,
40
- quality: 0.99
60
+ rawData: {
61
+ plannedTime: 480, // minutes (8 hours)
62
+ runTime: 432, // minutes (90% availability)
63
+ totalCount: 1000,
64
+ goodCount: 990, // 99% quality
65
+ idealCycleTime: 0.456, // minutes per piece (95% performance)
66
+ },
41
67
  });
42
- console.log(result.oee); // 0.846 (84.6%)
68
+ console.log(result.percentages.oee); // 84.6%
43
69
 
44
70
  // Calculate metal weight
45
71
  const weight = metalWeight({
46
- material: 'steel',
47
72
  shape: 'plate',
48
- dimensions: { length: 1000, width: 500, thickness: 10 },
73
+ materialName: 'steel',
74
+ length: 1000, // mm
75
+ width: 500, // mm
76
+ thickness: 10, // mm
49
77
  });
50
78
  console.log(weight.weight); // 39.25 kg
51
79
 
52
- // Calculate CBM
80
+ // Calculate CBM (Cubic Meter)
53
81
  const volume = cbm({
54
82
  length: 120,
55
83
  width: 80,
56
84
  height: 100,
57
- unit: 'cm'
85
+ quantity: 1,
86
+ unit: 'cm',
58
87
  });
59
- console.log(volume.cbm); // 0.96 m³
88
+ console.log(volume.totalCbm); // 0.96 m³
60
89
  ```
61
90
 
62
91
  ## Domains
63
92
 
64
- ### Quality & Production (13 functions)
93
+ ### Quality & Production (14 functions)
65
94
 
66
95
  ```typescript
67
- import { oee, cpk, taktTime, dpmo } from 'formulab/quality';
96
+ import { oee, cpk, taktTime, dpmo, controlChart } from 'formulab/quality';
68
97
  ```
69
98
 
70
99
  | Function | Description |
71
100
  |----------|-------------|
72
101
  | `oee()` | Overall Equipment Effectiveness |
73
102
  | `cpk()` | Process Capability Index |
103
+ | `controlChart()` | SPC X-bar/R and X-bar/S charts |
74
104
  | `cycleTime()` | Cycle Time analysis |
75
105
  | `taktTime()` | Takt Time calculation |
76
106
  | `aql()` | AQL sampling inspection |
@@ -83,7 +113,7 @@ import { oee, cpk, taktTime, dpmo } from 'formulab/quality';
83
113
  | `rpn()` | Risk Priority Number (FMEA) |
84
114
  | `yieldCalc()` | First Pass Yield / RTY |
85
115
 
86
- ### Metal & Machining (22 functions)
116
+ ### Metal & Machining (25 functions)
87
117
 
88
118
  ```typescript
89
119
  import { metalWeight, bendAllowance, cutting, bearing } from 'formulab/metal';
@@ -113,11 +143,14 @@ import { metalWeight, bendAllowance, cutting, bearing } from 'formulab/metal';
113
143
  | `vibration()` | Natural frequency analysis |
114
144
  | `weldHeat()` | Weld heat input calculation |
115
145
  | `welding()` | Welding parameters |
146
+ | `materialGradeConverter()` | ASTM/EN/JIS/GB/KS grade cross-reference |
147
+ | `pipeSpec()` | ANSI/ASME pipe dimensions lookup |
148
+ | `flangeSpec()` | ASME B16.5 flange dimensions lookup |
116
149
 
117
- ### Chemical & Process (7 functions)
150
+ ### Chemical & Process (9 functions)
118
151
 
119
152
  ```typescript
120
- import { dilution, concentration, ph, reactor } from 'formulab/chemical';
153
+ import { dilution, concentration, ph, reactor, pipeFlow, heatTransfer } from 'formulab/chemical';
121
154
  ```
122
155
 
123
156
  | Function | Description |
@@ -125,19 +158,22 @@ import { dilution, concentration, ph, reactor } from 'formulab/chemical';
125
158
  | `batch()` | Batch scaling calculation |
126
159
  | `concentration()` | Concentration conversion |
127
160
  | `dilution()` | Dilution (C1V1 = C2V2) |
161
+ | `heatTransfer()` | Conduction/convection/radiation heat transfer |
128
162
  | `ph()` | pH and buffer calculations |
163
+ | `pipeFlow()` | Darcy-Weisbach pipe flow pressure drop |
129
164
  | `reactor()` | Reactor sizing |
130
165
  | `shelfLife()` | Shelf life prediction (Arrhenius) |
131
166
  | `injectionCycle()` | Injection molding cycle time |
132
167
 
133
- ### Electronics & SMT (10 functions)
168
+ ### Electronics & SMT (11 functions)
134
169
 
135
170
  ```typescript
136
- import { traceWidth, solderPaste, resistorDecode } from 'formulab/electronics';
171
+ import { traceWidth, solderPaste, resistorDecode, ohmsLaw } from 'formulab/electronics';
137
172
  ```
138
173
 
139
174
  | Function | Description |
140
175
  |----------|-------------|
176
+ | `ohmsLaw()` | Ohm's Law V/I/R/P calculator |
141
177
  | `reflowProfile()` | Reflow temperature profile |
142
178
  | `resistorDecode()` | Resistor color code decoder |
143
179
  | `smtTakt()` | SMT line takt time |
@@ -149,14 +185,15 @@ import { traceWidth, solderPaste, resistorDecode } from 'formulab/electronics';
149
185
  | `stencilAperture()` | Stencil aperture design |
150
186
  | `viaCurrent()` | Via current capacity |
151
187
 
152
- ### Construction (11 functions)
188
+ ### Construction (12 functions)
153
189
 
154
190
  ```typescript
155
- import { concreteMix, rebarWeight, slope, stair } from 'formulab/construction';
191
+ import { concreteMix, rebarWeight, slope, stair, momentOfInertia } from 'formulab/construction';
156
192
  ```
157
193
 
158
194
  | Function | Description |
159
195
  |----------|-------------|
196
+ | `momentOfInertia()` | Section properties (Ix, Sx, rx) for 7 shapes |
160
197
  | `beamLoad()` | Beam load calculation |
161
198
  | `concreteMix()` | Concrete mix ratio |
162
199
  | `earthwork()` | Earthwork volume |
@@ -169,14 +206,15 @@ import { concreteMix, rebarWeight, slope, stair } from 'formulab/construction';
169
206
  | `roof()` | Roof calculation |
170
207
  | `stair()` | Stair dimension calculation |
171
208
 
172
- ### Automotive (7 functions)
209
+ ### Automotive (8 functions)
173
210
 
174
211
  ```typescript
175
- import { batteryRuntime, evCharging, torque } from 'formulab/automotive';
212
+ import { batteryRuntime, evCharging, torque, brakingDistance } from 'formulab/automotive';
176
213
  ```
177
214
 
178
215
  | Function | Description |
179
216
  |----------|-------------|
217
+ | `brakingDistance()` | Stopping distance (AASHTO method) |
180
218
  | `batteryRuntime()` | Battery capacity/runtime |
181
219
  | `evCharging()` | EV charging time estimation |
182
220
  | `fuelEconomy()` | Fuel economy conversion |
@@ -208,14 +246,15 @@ import { cbm, eoq, safetyStock, kanban } from 'formulab/logistics';
208
246
  | `shipping()` | Shipping cost estimation |
209
247
  | `tsp()` | Traveling salesman problem |
210
248
 
211
- ### Energy & Utilities (6 functions)
249
+ ### Energy & Utilities (7 functions)
212
250
 
213
251
  ```typescript
214
- import { powerCost, motorEfficiency, carbonFootprint } from 'formulab/energy';
252
+ import { powerCost, motorEfficiency, carbonFootprint, solarOutput } from 'formulab/energy';
215
253
  ```
216
254
 
217
255
  | Function | Description |
218
256
  |----------|-------------|
257
+ | `solarOutput()` | Solar panel output estimation (PVWatts-based) |
219
258
  | `carbonFootprint()` | Scope 2 emissions |
220
259
  | `compressedAirCost()` | Compressed air cost |
221
260
  | `motorEfficiency()` | Motor upgrade ROI |
@@ -223,14 +262,15 @@ import { powerCost, motorEfficiency, carbonFootprint } from 'formulab/energy';
223
262
  | `powerCost()` | Electricity cost with demand |
224
263
  | `vfdSavings()` | VFD energy savings |
225
264
 
226
- ### Safety & Ergonomics (6 functions)
265
+ ### Safety & Ergonomics (7 functions)
227
266
 
228
267
  ```typescript
229
- import { nioshLifting, noiseExposure, wbgtCalculate } from 'formulab/safety';
268
+ import { nioshLifting, noiseExposure, wbgtCalculate, ventilationRate } from 'formulab/safety';
230
269
  ```
231
270
 
232
271
  | Function | Description |
233
272
  |----------|-------------|
273
+ | `ventilationRate()` | Required ventilation ACH/CFM (ASHRAE/OSHA) |
234
274
  | `fallClearance()` | Fall protection clearance |
235
275
  | `nioshLifting()` | NIOSH lifting equation |
236
276
  | `noiseExposure()` | TWA/Dose calculation |
@@ -261,7 +301,66 @@ import { solveAssignment, calculateUnit } from 'formulab/utility';
261
301
  |----------|-------------|
262
302
  | `solveAssignment()` | Hungarian algorithm optimization |
263
303
  | `calculateUnit()` | Unit conversion |
264
- | `getCategories()` | Get unit categories |
304
+ | `getUnitCategories()` | Get unit categories |
305
+
306
+ ### Battery (10 functions)
307
+
308
+ ```typescript
309
+ import { energyDensity, cRate, stateOfHealth, cycleLife } from 'formulab/battery';
310
+ ```
311
+
312
+ | Function | Description |
313
+ |----------|-------------|
314
+ | `energyDensity()` | Wh/kg and Wh/L energy density |
315
+ | `cRate()` | C-rate ↔ current/time conversion |
316
+ | `stateOfHealth()` | SOH % with degradation status |
317
+ | `batteryPackConfig()` | Series/parallel cell configuration |
318
+ | `cycleLife()` | Cycle life estimation (chemistry/DOD/temp) |
319
+ | `internalResistance()` | DCIR from OCV and load voltage |
320
+ | `selfDischarge()` | Self-discharge rate calculation |
321
+ | `thermalRunaway()` | Thermal safety margin analysis |
322
+ | `bmsBalancing()` | BMS cell balancing time estimation |
323
+ | `chargingProfile()` | CC-CV charging profile timing |
324
+
325
+ ### Environmental (10 functions)
326
+
327
+ ```typescript
328
+ import { scope1Emissions, scope2Emissions, gwpCalculator, esgSummary } from 'formulab/environmental';
329
+ ```
330
+
331
+ | Function | Description |
332
+ |----------|-------------|
333
+ | `scope1Emissions()` | Fuel combustion direct emissions (6 fuels) |
334
+ | `scope2Emissions()` | Purchased electricity emissions (12 regions) |
335
+ | `scope3Emissions()` | Supply chain spend-based emissions (8 categories) |
336
+ | `vocEmissions()` | VOC emissions with capture/destruction |
337
+ | `productCarbonFootprint()` | Product lifecycle carbon footprint |
338
+ | `gwpCalculator()` | GWP conversion (8 gases × 3 time horizons) |
339
+ | `energyIntensity()` | Energy intensity (MJ/unit, kWh/unit) |
340
+ | `waterFootprint()` | Water footprint (blue/green/grey) |
341
+ | `emissionsIntensity()` | Emissions intensity per unit/revenue/employee |
342
+ | `esgSummary()` | ESG reduction tracking and projections |
343
+
344
+ ### Machining & CNC (12 functions)
345
+
346
+ ```typescript
347
+ import { truePosition, boltCircle, toolDeflection, threadOverWires } from 'formulab/machining';
348
+ ```
349
+
350
+ | Function | Description |
351
+ |----------|-------------|
352
+ | `truePosition()` | GD&T True Position (diametral, MMC bonus) |
353
+ | `boltCircle()` | Bolt hole pattern coordinates |
354
+ | `sineBarHeight()` | Sine bar gauge block height |
355
+ | `radialChipThinning()` | Chip load compensation for light radial cuts |
356
+ | `toolDeflection()` | End mill cantilever deflection |
357
+ | `cuspHeight()` | Ball mill scallop height |
358
+ | `effectiveDiameter()` | Ball mill effective cutting diameter |
359
+ | `boringBarDeflection()` | Boring bar deflection with L/D guidance |
360
+ | `threadOverWires()` | 3-wire thread measurement |
361
+ | `gaugeBlockStack()` | Gauge block combination (47/88/81-pc sets) |
362
+ | `triangleSolver()` | Triangle solver (SSS/SAS/ASA/SSA) |
363
+ | `cycleTimeEstimator()` | CNC cycle time estimation |
265
364
 
266
365
  ## API Examples
267
366
 
@@ -271,19 +370,19 @@ import { solveAssignment, calculateUnit } from 'formulab/utility';
271
370
  import { oee } from 'formulab/quality';
272
371
 
273
372
  const result = oee({
274
- plannedTime: 480, // minutes
275
- operatingTime: 420,
276
- totalPieces: 1000,
277
- goodPieces: 990,
278
- idealCycleTime: 0.5,
373
+ rawData: {
374
+ plannedTime: 480, // minutes
375
+ runTime: 420, // actual running time
376
+ totalCount: 1000, // total pieces produced
377
+ goodCount: 990, // good pieces
378
+ idealCycleTime: 0.4, // minutes per piece
379
+ },
279
380
  });
280
381
 
281
382
  console.log(result);
282
383
  // {
283
- // oee: 0.846,
284
- // availability: 0.875,
285
- // performance: 0.952,
286
- // quality: 0.99,
384
+ // factors: { availability: 0.875, performance: 0.952, quality: 0.99, oee: 0.825 },
385
+ // percentages: { availability: 87.5, performance: 95.2, quality: 99, oee: 82.5 }
287
386
  // }
288
387
  ```
289
388
 
@@ -293,22 +392,22 @@ console.log(result);
293
392
  import { nioshLifting } from 'formulab/safety';
294
393
 
295
394
  const result = nioshLifting({
296
- loadWeight: 23,
297
- horizontalDistance: 25,
298
- verticalLocation: 75,
299
- verticalTravel: 25,
300
- asymmetryAngle: 0,
301
- couplingQuality: 'good',
302
- frequency: 1,
303
- duration: 'moderate',
395
+ loadWeight: 23, // kg
396
+ horizontalDistance: 25, // cm
397
+ verticalDistance: 75, // cm (height at lift origin)
398
+ verticalTravel: 25, // cm (vertical travel distance)
399
+ asymmetryAngle: 0, // degrees
400
+ coupling: 'good', // 'good' | 'fair' | 'poor'
401
+ frequency: 1, // lifts per minute
402
+ duration: 'short', // 'short' | 'medium' | 'long'
304
403
  });
305
404
 
306
405
  console.log(result);
307
406
  // {
308
- // rwl: 23.0, // Recommended Weight Limit (kg)
309
- // liftingIndex: 1.0, // LI = Load / RWL
310
- // riskLevel: 'low',
311
- // multipliers: { hm: 1.0, vm: 1.0, dm: 0.93, am: 1.0, fm: 0.94, cm: 1.0 }
407
+ // rwl: 21.62, // Recommended Weight Limit (kg)
408
+ // liftingIndex: 1.06, // LI = Load / RWL
409
+ // riskLevel: 'moderate',
410
+ // hm: 1.0, vm: 1.0, dm: 1.0, am: 1.0, fm: 0.94, cm: 1.0
312
411
  // }
313
412
  ```
314
413
 
@@ -0,0 +1,16 @@
1
+ import type { BrakingDistanceInput, BrakingDistanceResult } from './types.js';
2
+ /**
3
+ * Braking Distance Calculator (AASHTO method)
4
+ *
5
+ * Calculates stopping distance based on:
6
+ * - Reaction distance: d_r = v × t_reaction
7
+ * - Braking distance: d_b = v² / (2 × g × (f ± G))
8
+ * where G = grade/100 (positive uphill, negative downhill)
9
+ *
10
+ * Reference: AASHTO "A Policy on Geometric Design of Highways and Streets"
11
+ *
12
+ * @param input - speed, friction, reaction time, grade
13
+ * @returns stopping distance components
14
+ */
15
+ export declare function brakingDistance(input: BrakingDistanceInput): BrakingDistanceResult;
16
+ //# sourceMappingURL=brakingDistance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brakingDistance.d.ts","sourceRoot":"","sources":["../../src/automotive/brakingDistance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,qBAAqB,CAqClF"}