universal-physics-tensor 0.47.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (702) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +405 -383
  3. package/bin/upt.mjs +7 -1
  4. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +108 -0
  5. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -0
  6. package/dist/atlas/benchmark/hybrid-retrieval.js +241 -0
  7. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -0
  8. package/dist/atlas/catalog-formal-ref.d.ts +24 -0
  9. package/dist/atlas/catalog-formal-ref.d.ts.map +1 -0
  10. package/dist/atlas/catalog-formal-ref.js +36 -0
  11. package/dist/atlas/catalog-formal-ref.js.map +1 -0
  12. package/dist/atlas/chain-pipeline.d.ts +52 -0
  13. package/dist/atlas/chain-pipeline.d.ts.map +1 -0
  14. package/dist/atlas/chain-pipeline.js +176 -0
  15. package/dist/atlas/chain-pipeline.js.map +1 -0
  16. package/dist/atlas/composition-table.d.ts +11 -46
  17. package/dist/atlas/composition-table.d.ts.map +1 -1
  18. package/dist/atlas/composition-table.js +7 -124
  19. package/dist/atlas/composition-table.js.map +1 -1
  20. package/dist/atlas/conventions.d.ts +4 -58
  21. package/dist/atlas/conventions.d.ts.map +1 -1
  22. package/dist/atlas/conventions.js +3 -88
  23. package/dist/atlas/conventions.js.map +1 -1
  24. package/dist/atlas/derive-evidence.d.ts +50 -3
  25. package/dist/atlas/derive-evidence.d.ts.map +1 -1
  26. package/dist/atlas/derive-evidence.js +73 -4
  27. package/dist/atlas/derive-evidence.js.map +1 -1
  28. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  29. package/dist/atlas/diffusion/bridges-closure.js +5 -1
  30. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  31. package/dist/atlas/index.d.ts +9 -7
  32. package/dist/atlas/index.d.ts.map +1 -1
  33. package/dist/atlas/index.js +6 -5
  34. package/dist/atlas/index.js.map +1 -1
  35. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  36. package/dist/atlas/oscillators/bridges-exact.js +6 -0
  37. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  38. package/dist/atlas/oscillators/bridges-limits.d.ts +2 -0
  39. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  40. package/dist/atlas/oscillators/bridges-limits.js +11 -19
  41. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  42. package/dist/atlas/oscillators/limit-witnesses.d.ts +93 -0
  43. package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -0
  44. package/dist/atlas/oscillators/limit-witnesses.js +152 -0
  45. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -0
  46. package/dist/atlas/oscillators/models.d.ts +2 -1
  47. package/dist/atlas/oscillators/models.d.ts.map +1 -1
  48. package/dist/atlas/oscillators/models.js +4 -3
  49. package/dist/atlas/oscillators/models.js.map +1 -1
  50. package/dist/atlas/oscillators/norm-transport-witness.d.ts +37 -0
  51. package/dist/atlas/oscillators/norm-transport-witness.d.ts.map +1 -0
  52. package/dist/atlas/oscillators/norm-transport-witness.js +58 -0
  53. package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -0
  54. package/dist/atlas/oscillators/norm-transport.d.ts +44 -0
  55. package/dist/atlas/oscillators/norm-transport.d.ts.map +1 -0
  56. package/dist/atlas/oscillators/norm-transport.js +66 -0
  57. package/dist/atlas/oscillators/norm-transport.js.map +1 -0
  58. package/dist/atlas/oscillators/norms.d.ts +11 -0
  59. package/dist/atlas/oscillators/norms.d.ts.map +1 -0
  60. package/dist/atlas/oscillators/norms.js +11 -0
  61. package/dist/atlas/oscillators/norms.js.map +1 -0
  62. package/dist/atlas/oscillators/pendulum-motion.d.ts +38 -0
  63. package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -0
  64. package/dist/atlas/oscillators/pendulum-motion.js +122 -0
  65. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -0
  66. package/dist/atlas/oscillators/phase-carriage.d.ts +38 -0
  67. package/dist/atlas/oscillators/phase-carriage.d.ts.map +1 -0
  68. package/dist/atlas/oscillators/phase-carriage.js +96 -0
  69. package/dist/atlas/oscillators/phase-carriage.js.map +1 -0
  70. package/dist/atlas/oscillators/phase-translation.d.ts +46 -0
  71. package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -0
  72. package/dist/atlas/oscillators/phase-translation.js +178 -0
  73. package/dist/atlas/oscillators/phase-translation.js.map +1 -0
  74. package/dist/atlas/oscillators/position-translation.d.ts +59 -0
  75. package/dist/atlas/oscillators/position-translation.d.ts.map +1 -0
  76. package/dist/atlas/oscillators/position-translation.js +254 -0
  77. package/dist/atlas/oscillators/position-translation.js.map +1 -0
  78. package/dist/atlas/path-bound.d.ts +126 -9
  79. package/dist/atlas/path-bound.d.ts.map +1 -1
  80. package/dist/atlas/path-bound.js +372 -23
  81. package/dist/atlas/path-bound.js.map +1 -1
  82. package/dist/atlas/physjs-ref.d.ts +141 -0
  83. package/dist/atlas/physjs-ref.d.ts.map +1 -0
  84. package/dist/atlas/physjs-ref.js +878 -0
  85. package/dist/atlas/physjs-ref.js.map +1 -0
  86. package/dist/atlas/proof-target.d.ts +32 -0
  87. package/dist/atlas/proof-target.d.ts.map +1 -0
  88. package/dist/atlas/proof-target.js +140 -0
  89. package/dist/atlas/proof-target.js.map +1 -0
  90. package/dist/atlas/regime.d.ts +12 -136
  91. package/dist/atlas/regime.d.ts.map +1 -1
  92. package/dist/atlas/regime.js +8 -254
  93. package/dist/atlas/regime.js.map +1 -1
  94. package/dist/atlas/serialize.d.ts.map +1 -1
  95. package/dist/atlas/serialize.js +25 -0
  96. package/dist/atlas/serialize.js.map +1 -1
  97. package/dist/atlas/translation-registry.d.ts +22 -0
  98. package/dist/atlas/translation-registry.d.ts.map +1 -0
  99. package/dist/atlas/translation-registry.js +31 -0
  100. package/dist/atlas/translation-registry.js.map +1 -0
  101. package/dist/atlas/translation.d.ts +116 -0
  102. package/dist/atlas/translation.d.ts.map +1 -0
  103. package/dist/atlas/translation.js +34 -0
  104. package/dist/atlas/translation.js.map +1 -0
  105. package/dist/atlas/types.d.ts +74 -240
  106. package/dist/atlas/types.d.ts.map +1 -1
  107. package/dist/atlas/types.js +5 -37
  108. package/dist/atlas/types.js.map +1 -1
  109. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  110. package/dist/atlas/waves/bridges-closure.js +4 -0
  111. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  112. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  113. package/dist/atlas/waves/bridges.js +3 -0
  114. package/dist/atlas/waves/bridges.js.map +1 -1
  115. package/dist/atlas/waves/models.js +1 -1
  116. package/dist/atlas/waves/models.js.map +1 -1
  117. package/dist/atlas/witness-dominance.d.ts +50 -0
  118. package/dist/atlas/witness-dominance.d.ts.map +1 -0
  119. package/dist/atlas/witness-dominance.js +86 -0
  120. package/dist/atlas/witness-dominance.js.map +1 -0
  121. package/dist/atlas/witness-specs.d.ts +30 -0
  122. package/dist/atlas/witness-specs.d.ts.map +1 -1
  123. package/dist/atlas/witness-specs.js +107 -0
  124. package/dist/atlas/witness-specs.js.map +1 -1
  125. package/dist/bridges/be53-yang-mills-confrontation.d.ts +81 -0
  126. package/dist/bridges/be53-yang-mills-confrontation.d.ts.map +1 -0
  127. package/dist/bridges/be53-yang-mills-confrontation.js +110 -0
  128. package/dist/bridges/be53-yang-mills-confrontation.js.map +1 -0
  129. package/dist/bridges/be63-chandrasekhar-mass.d.ts.map +1 -1
  130. package/dist/bridges/be63-chandrasekhar-mass.js +1 -3
  131. package/dist/bridges/be63-chandrasekhar-mass.js.map +1 -1
  132. package/dist/bridges/confrontation-coverage.d.ts +5 -61
  133. package/dist/bridges/confrontation-coverage.d.ts.map +1 -1
  134. package/dist/bridges/confrontation-coverage.js +5 -70
  135. package/dist/bridges/confrontation-coverage.js.map +1 -1
  136. package/dist/bridges/confrontations.d.ts +1 -1
  137. package/dist/bridges/confrontations.d.ts.map +1 -1
  138. package/dist/bridges/confrontations.js +291 -3
  139. package/dist/bridges/confrontations.js.map +1 -1
  140. package/dist/bridges/equations/be-13-einstein-trace.d.ts +2 -3
  141. package/dist/bridges/equations/be-13-einstein-trace.d.ts.map +1 -1
  142. package/dist/bridges/equations/be-13-einstein-trace.js +2 -3
  143. package/dist/bridges/equations/be-13-einstein-trace.js.map +1 -1
  144. package/dist/bridges/equations/be-38-mond.d.ts +7 -5
  145. package/dist/bridges/equations/be-38-mond.d.ts.map +1 -1
  146. package/dist/bridges/equations/be-38-mond.js +7 -5
  147. package/dist/bridges/equations/be-38-mond.js.map +1 -1
  148. package/dist/bridges/equations/be-42-hawking-temperature.d.ts +3 -0
  149. package/dist/bridges/equations/be-42-hawking-temperature.d.ts.map +1 -1
  150. package/dist/bridges/equations/be-42-hawking-temperature.js +8 -1
  151. package/dist/bridges/equations/be-42-hawking-temperature.js.map +1 -1
  152. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts +21 -0
  153. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts.map +1 -1
  154. package/dist/bridges/equations/be-53-yang-mills-beta.js +12 -0
  155. package/dist/bridges/equations/be-53-yang-mills-beta.js.map +1 -1
  156. package/dist/bridges/evaluator-inputs.d.ts +21 -0
  157. package/dist/bridges/evaluator-inputs.d.ts.map +1 -0
  158. package/dist/bridges/evaluator-inputs.js +75 -0
  159. package/dist/bridges/evaluator-inputs.js.map +1 -0
  160. package/dist/bridges/evaluators.d.ts +46 -0
  161. package/dist/bridges/evaluators.d.ts.map +1 -1
  162. package/dist/bridges/evaluators.js +57 -16
  163. package/dist/bridges/evaluators.js.map +1 -1
  164. package/dist/bridges/gravitational-lensing.d.ts +1 -1
  165. package/dist/bridges/gravitational-lensing.js +1 -1
  166. package/dist/bridges/index.d.ts +3 -2
  167. package/dist/bridges/index.d.ts.map +1 -1
  168. package/dist/bridges/index.js +15 -14
  169. package/dist/bridges/index.js.map +1 -1
  170. package/dist/bridges/observations/types.d.ts +110 -2
  171. package/dist/bridges/observations/types.d.ts.map +1 -1
  172. package/dist/bridges/observations/types.js +29 -0
  173. package/dist/bridges/observations/types.js.map +1 -1
  174. package/dist/bridges/perihelion-precession.d.ts +1 -1
  175. package/dist/bridges/perihelion-precession.js +1 -1
  176. package/dist/bridges/tensor-index.d.ts +39 -0
  177. package/dist/bridges/tensor-index.d.ts.map +1 -0
  178. package/dist/bridges/tensor-index.js +66 -0
  179. package/dist/bridges/tensor-index.js.map +1 -0
  180. package/dist/canonical/canonical-equation.d.ts +1 -1
  181. package/dist/canonical/canonical-equation.d.ts.map +1 -1
  182. package/dist/canonical/entries/atomic.d.ts.map +1 -1
  183. package/dist/canonical/entries/atomic.js +32 -10
  184. package/dist/canonical/entries/atomic.js.map +1 -1
  185. package/dist/canonical/entries/dimensional-classics.js +2 -2
  186. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  187. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  188. package/dist/canonical/entries/mechanics.js +10 -6
  189. package/dist/canonical/entries/mechanics.js.map +1 -1
  190. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  191. package/dist/canonical/entries/relativity.js +41 -8
  192. package/dist/canonical/entries/relativity.js.map +1 -1
  193. package/dist/canonical/entries/thermo-nuclear-cosmo.js +5 -5
  194. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  195. package/dist/canonical/linkage.d.ts.map +1 -1
  196. package/dist/canonical/linkage.js +31 -28
  197. package/dist/canonical/linkage.js.map +1 -1
  198. package/dist/canonical/normal-form.d.ts +17 -0
  199. package/dist/canonical/normal-form.d.ts.map +1 -1
  200. package/dist/canonical/normal-form.js +21 -4
  201. package/dist/canonical/normal-form.js.map +1 -1
  202. package/dist/canonical/structural.d.ts +84 -0
  203. package/dist/canonical/structural.d.ts.map +1 -0
  204. package/dist/canonical/structural.js +107 -0
  205. package/dist/canonical/structural.js.map +1 -0
  206. package/dist/cases/brownian-sphere.d.ts +68 -0
  207. package/dist/cases/brownian-sphere.d.ts.map +1 -0
  208. package/dist/cases/brownian-sphere.js +353 -0
  209. package/dist/cases/brownian-sphere.js.map +1 -0
  210. package/dist/cases/damped-resonator.d.ts +23 -0
  211. package/dist/cases/damped-resonator.d.ts.map +1 -0
  212. package/dist/cases/damped-resonator.js +224 -0
  213. package/dist/cases/damped-resonator.js.map +1 -0
  214. package/dist/cases/index.d.ts +11 -0
  215. package/dist/cases/index.d.ts.map +1 -0
  216. package/dist/cases/index.js +29 -0
  217. package/dist/cases/index.js.map +1 -0
  218. package/dist/cases/kepler-rv.d.ts +13 -0
  219. package/dist/cases/kepler-rv.d.ts.map +1 -0
  220. package/dist/cases/kepler-rv.js +168 -0
  221. package/dist/cases/kepler-rv.js.map +1 -0
  222. package/dist/cases/lumped-cooling.d.ts +46 -0
  223. package/dist/cases/lumped-cooling.d.ts.map +1 -0
  224. package/dist/cases/lumped-cooling.js +261 -0
  225. package/dist/cases/lumped-cooling.js.map +1 -0
  226. package/dist/cases/quadrature.d.ts +14 -0
  227. package/dist/cases/quadrature.d.ts.map +1 -0
  228. package/dist/cases/quadrature.js +41 -0
  229. package/dist/cases/quadrature.js.map +1 -0
  230. package/dist/cases/resistor-noise.d.ts +14 -0
  231. package/dist/cases/resistor-noise.d.ts.map +1 -0
  232. package/dist/cases/resistor-noise.js +210 -0
  233. package/dist/cases/resistor-noise.js.map +1 -0
  234. package/dist/cases/skin-depth.d.ts +21 -0
  235. package/dist/cases/skin-depth.d.ts.map +1 -0
  236. package/dist/cases/skin-depth.js +174 -0
  237. package/dist/cases/skin-depth.js.map +1 -0
  238. package/dist/cases/types.d.ts +115 -0
  239. package/dist/cases/types.d.ts.map +1 -0
  240. package/dist/cases/types.js +20 -0
  241. package/dist/cases/types.js.map +1 -0
  242. package/dist/cli/commands/_atlas-map.d.ts +409 -0
  243. package/dist/cli/commands/_atlas-map.d.ts.map +1 -0
  244. package/dist/cli/commands/_atlas-map.js +1014 -0
  245. package/dist/cli/commands/_atlas-map.js.map +1 -0
  246. package/dist/cli/commands/_atlas-route.d.ts +111 -0
  247. package/dist/cli/commands/_atlas-route.d.ts.map +1 -0
  248. package/dist/cli/commands/_atlas-route.js +140 -0
  249. package/dist/cli/commands/_atlas-route.js.map +1 -0
  250. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  251. package/dist/cli/commands/_discovery-opts.js +10 -1
  252. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  253. package/dist/cli/commands/atlas.d.ts +20 -0
  254. package/dist/cli/commands/atlas.d.ts.map +1 -1
  255. package/dist/cli/commands/atlas.js +333 -19
  256. package/dist/cli/commands/atlas.js.map +1 -1
  257. package/dist/cli/commands/audit.d.ts.map +1 -1
  258. package/dist/cli/commands/audit.js +12 -3
  259. package/dist/cli/commands/audit.js.map +1 -1
  260. package/dist/cli/commands/axes.js +4 -4
  261. package/dist/cli/commands/candidates.d.ts.map +1 -1
  262. package/dist/cli/commands/candidates.js +3 -2
  263. package/dist/cli/commands/candidates.js.map +1 -1
  264. package/dist/cli/commands/canonical.d.ts.map +1 -1
  265. package/dist/cli/commands/canonical.js +39 -10
  266. package/dist/cli/commands/canonical.js.map +1 -1
  267. package/dist/cli/commands/confront.d.ts.map +1 -1
  268. package/dist/cli/commands/confront.js +210 -28
  269. package/dist/cli/commands/confront.js.map +1 -1
  270. package/dist/cli/commands/connectors.d.ts.map +1 -1
  271. package/dist/cli/commands/connectors.js +5 -4
  272. package/dist/cli/commands/connectors.js.map +1 -1
  273. package/dist/cli/commands/coverage.js +3 -3
  274. package/dist/cli/commands/derive.d.ts.map +1 -1
  275. package/dist/cli/commands/derive.js +22 -9
  276. package/dist/cli/commands/derive.js.map +1 -1
  277. package/dist/cli/commands/discover.d.ts.map +1 -1
  278. package/dist/cli/commands/discover.js +149 -32
  279. package/dist/cli/commands/discover.js.map +1 -1
  280. package/dist/cli/commands/eval.d.ts.map +1 -1
  281. package/dist/cli/commands/eval.js +87 -17
  282. package/dist/cli/commands/eval.js.map +1 -1
  283. package/dist/cli/commands/evaluate.d.ts +30 -0
  284. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  285. package/dist/cli/commands/evaluate.js +441 -25
  286. package/dist/cli/commands/evaluate.js.map +1 -1
  287. package/dist/cli/commands/explain.d.ts.map +1 -1
  288. package/dist/cli/commands/explain.js +38 -11
  289. package/dist/cli/commands/explain.js.map +1 -1
  290. package/dist/cli/commands/frontier.d.ts +3 -0
  291. package/dist/cli/commands/frontier.d.ts.map +1 -0
  292. package/dist/cli/commands/frontier.js +28 -0
  293. package/dist/cli/commands/frontier.js.map +1 -0
  294. package/dist/cli/commands/ground.d.ts.map +1 -1
  295. package/dist/cli/commands/ground.js +37 -12
  296. package/dist/cli/commands/ground.js.map +1 -1
  297. package/dist/cli/commands/index.d.ts +5 -0
  298. package/dist/cli/commands/index.d.ts.map +1 -1
  299. package/dist/cli/commands/index.js +5 -0
  300. package/dist/cli/commands/index.js.map +1 -1
  301. package/dist/cli/commands/map.d.ts +8 -0
  302. package/dist/cli/commands/map.d.ts.map +1 -1
  303. package/dist/cli/commands/map.js +385 -57
  304. package/dist/cli/commands/map.js.map +1 -1
  305. package/dist/cli/commands/metric.d.ts +3 -0
  306. package/dist/cli/commands/metric.d.ts.map +1 -0
  307. package/dist/cli/commands/metric.js +136 -0
  308. package/dist/cli/commands/metric.js.map +1 -0
  309. package/dist/cli/commands/path.d.ts +109 -1
  310. package/dist/cli/commands/path.d.ts.map +1 -1
  311. package/dist/cli/commands/path.js +1019 -109
  312. package/dist/cli/commands/path.js.map +1 -1
  313. package/dist/cli/commands/predict.d.ts.map +1 -1
  314. package/dist/cli/commands/predict.js +3 -2
  315. package/dist/cli/commands/predict.js.map +1 -1
  316. package/dist/cli/commands/priority.d.ts.map +1 -1
  317. package/dist/cli/commands/priority.js +3 -2
  318. package/dist/cli/commands/priority.js.map +1 -1
  319. package/dist/cli/commands/probe.d.ts +7 -0
  320. package/dist/cli/commands/probe.d.ts.map +1 -1
  321. package/dist/cli/commands/probe.js +234 -52
  322. package/dist/cli/commands/probe.js.map +1 -1
  323. package/dist/cli/commands/recover.d.ts.map +1 -1
  324. package/dist/cli/commands/recover.js +17 -6
  325. package/dist/cli/commands/recover.js.map +1 -1
  326. package/dist/cli/commands/regime.d.ts +1 -1
  327. package/dist/cli/commands/regime.d.ts.map +1 -1
  328. package/dist/cli/commands/regime.js +134 -33
  329. package/dist/cli/commands/regime.js.map +1 -1
  330. package/dist/cli/commands/retrieve.d.ts +3 -0
  331. package/dist/cli/commands/retrieve.d.ts.map +1 -0
  332. package/dist/cli/commands/retrieve.js +65 -0
  333. package/dist/cli/commands/retrieve.js.map +1 -0
  334. package/dist/cli/commands/search.d.ts +3 -0
  335. package/dist/cli/commands/search.d.ts.map +1 -0
  336. package/dist/cli/commands/search.js +70 -0
  337. package/dist/cli/commands/search.js.map +1 -0
  338. package/dist/cli/commands/symbolic.d.ts.map +1 -1
  339. package/dist/cli/commands/symbolic.js +107 -16
  340. package/dist/cli/commands/symbolic.js.map +1 -1
  341. package/dist/cli/commands/testplan.d.ts +3 -0
  342. package/dist/cli/commands/testplan.d.ts.map +1 -0
  343. package/dist/cli/commands/testplan.js +131 -0
  344. package/dist/cli/commands/testplan.js.map +1 -0
  345. package/dist/cli/conventions.d.ts +22 -0
  346. package/dist/cli/conventions.d.ts.map +1 -0
  347. package/dist/cli/conventions.js +48 -0
  348. package/dist/cli/conventions.js.map +1 -0
  349. package/dist/cli/euler-guard.d.ts +9 -0
  350. package/dist/cli/euler-guard.d.ts.map +1 -0
  351. package/dist/cli/euler-guard.js +11 -0
  352. package/dist/cli/euler-guard.js.map +1 -0
  353. package/dist/cli/eval-numbers.d.ts +26 -0
  354. package/dist/cli/eval-numbers.d.ts.map +1 -0
  355. package/dist/cli/eval-numbers.js +48 -0
  356. package/dist/cli/eval-numbers.js.map +1 -0
  357. package/dist/cli/expr-print.d.ts +25 -0
  358. package/dist/cli/expr-print.d.ts.map +1 -0
  359. package/dist/cli/expr-print.js +123 -0
  360. package/dist/cli/expr-print.js.map +1 -0
  361. package/dist/cli/graphs.d.ts +26 -0
  362. package/dist/cli/graphs.d.ts.map +1 -1
  363. package/dist/cli/graphs.js +19 -0
  364. package/dist/cli/graphs.js.map +1 -1
  365. package/dist/cli/main.d.ts +4 -10
  366. package/dist/cli/main.d.ts.map +1 -1
  367. package/dist/cli/main.js +370 -167
  368. package/dist/cli/main.js.map +1 -1
  369. package/dist/cli/map-evidence.d.ts +47 -0
  370. package/dist/cli/map-evidence.d.ts.map +1 -0
  371. package/dist/cli/map-evidence.js +53 -0
  372. package/dist/cli/map-evidence.js.map +1 -0
  373. package/dist/cli/output.d.ts +21 -1
  374. package/dist/cli/output.d.ts.map +1 -1
  375. package/dist/cli/output.js +5 -1
  376. package/dist/cli/output.js.map +1 -1
  377. package/dist/{composition → cli}/poster-source.d.ts +3 -2
  378. package/dist/cli/poster-source.d.ts.map +1 -0
  379. package/dist/{composition → cli}/poster-source.js +2 -1
  380. package/dist/cli/poster-source.js.map +1 -0
  381. package/dist/cli/record-reach.d.ts +44 -0
  382. package/dist/cli/record-reach.d.ts.map +1 -0
  383. package/dist/cli/record-reach.js +228 -0
  384. package/dist/cli/record-reach.js.map +1 -0
  385. package/dist/cli/record-tables.d.ts +38 -0
  386. package/dist/cli/record-tables.d.ts.map +1 -0
  387. package/dist/cli/record-tables.js +110 -0
  388. package/dist/cli/record-tables.js.map +1 -0
  389. package/dist/cli/record.d.ts +141 -0
  390. package/dist/cli/record.d.ts.map +1 -0
  391. package/dist/cli/record.js +612 -0
  392. package/dist/cli/record.js.map +1 -0
  393. package/dist/cli/search-index.d.ts +56 -0
  394. package/dist/cli/search-index.d.ts.map +1 -0
  395. package/dist/cli/search-index.js +190 -0
  396. package/dist/cli/search-index.js.map +1 -0
  397. package/dist/cli/statuses.d.ts +25 -0
  398. package/dist/cli/statuses.d.ts.map +1 -0
  399. package/dist/cli/statuses.js +276 -0
  400. package/dist/cli/statuses.js.map +1 -0
  401. package/dist/cli/version.d.ts +8 -0
  402. package/dist/cli/version.d.ts.map +1 -1
  403. package/dist/cli/version.js +32 -1
  404. package/dist/cli/version.js.map +1 -1
  405. package/dist/cli-api.d.ts +34 -16
  406. package/dist/cli-api.d.ts.map +1 -1
  407. package/dist/cli-api.js +32 -12
  408. package/dist/cli-api.js.map +1 -1
  409. package/dist/composition/audit-coverage.d.ts +70 -0
  410. package/dist/composition/audit-coverage.d.ts.map +1 -0
  411. package/dist/composition/audit-coverage.js +80 -0
  412. package/dist/composition/audit-coverage.js.map +1 -0
  413. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  414. package/dist/composition/bridge-analysis.js +2 -1
  415. package/dist/composition/bridge-analysis.js.map +1 -1
  416. package/dist/composition/buckingham-filter.d.ts +34 -0
  417. package/dist/composition/buckingham-filter.d.ts.map +1 -0
  418. package/dist/composition/buckingham-filter.js +64 -0
  419. package/dist/composition/buckingham-filter.js.map +1 -0
  420. package/dist/composition/canonical-compare.d.ts +29 -16
  421. package/dist/composition/canonical-compare.d.ts.map +1 -1
  422. package/dist/composition/canonical-compare.js +355 -59
  423. package/dist/composition/canonical-compare.js.map +1 -1
  424. package/dist/composition/canonical-graph.d.ts +2 -2
  425. package/dist/composition/canonical-graph.js +3 -3
  426. package/dist/composition/canonical-graph.js.map +1 -1
  427. package/dist/composition/canonical-prefactors.d.ts +24 -1
  428. package/dist/composition/canonical-prefactors.d.ts.map +1 -1
  429. package/dist/composition/canonical-prefactors.js +97 -1
  430. package/dist/composition/canonical-prefactors.js.map +1 -1
  431. package/dist/composition/catalog-graph.d.ts +4 -4
  432. package/dist/composition/catalog-graph.d.ts.map +1 -1
  433. package/dist/composition/catalog-graph.js +6 -4
  434. package/dist/composition/catalog-graph.js.map +1 -1
  435. package/dist/composition/chain-candidate.d.ts +43 -0
  436. package/dist/composition/chain-candidate.d.ts.map +1 -0
  437. package/dist/composition/chain-candidate.js +56 -0
  438. package/dist/composition/chain-candidate.js.map +1 -0
  439. package/dist/composition/chain-match.d.ts +19 -0
  440. package/dist/composition/chain-match.d.ts.map +1 -0
  441. package/dist/composition/chain-match.js +10 -0
  442. package/dist/composition/chain-match.js.map +1 -0
  443. package/dist/composition/chain-regime.d.ts +34 -0
  444. package/dist/composition/chain-regime.d.ts.map +1 -0
  445. package/dist/composition/chain-regime.js +89 -0
  446. package/dist/composition/chain-regime.js.map +1 -0
  447. package/dist/composition/compose-symbolic.js +1 -1
  448. package/dist/composition/compose-symbolic.js.map +1 -1
  449. package/dist/composition/compose.d.ts +11 -0
  450. package/dist/composition/compose.d.ts.map +1 -1
  451. package/dist/composition/compose.js +30 -10
  452. package/dist/composition/compose.js.map +1 -1
  453. package/dist/composition/composition-recovery.d.ts +47 -0
  454. package/dist/composition/composition-recovery.d.ts.map +1 -0
  455. package/dist/composition/composition-recovery.js +77 -0
  456. package/dist/composition/composition-recovery.js.map +1 -0
  457. package/dist/composition/consequence.d.ts +39 -0
  458. package/dist/composition/consequence.d.ts.map +1 -1
  459. package/dist/composition/consequence.js +37 -0
  460. package/dist/composition/consequence.js.map +1 -1
  461. package/dist/{bridges → composition}/descriptor.d.ts +6 -3
  462. package/dist/composition/descriptor.d.ts.map +1 -0
  463. package/dist/{bridges → composition}/descriptor.js +7 -4
  464. package/dist/composition/descriptor.js.map +1 -0
  465. package/dist/composition/discovery.d.ts +20 -0
  466. package/dist/composition/discovery.d.ts.map +1 -1
  467. package/dist/composition/discovery.js +27 -5
  468. package/dist/composition/discovery.js.map +1 -1
  469. package/dist/composition/edge.d.ts +1 -1
  470. package/dist/composition/edge.d.ts.map +1 -1
  471. package/dist/composition/edge.js.map +1 -1
  472. package/dist/composition/edges/_catalog-helpers.d.ts +4 -0
  473. package/dist/composition/edges/_catalog-helpers.d.ts.map +1 -1
  474. package/dist/composition/edges/_catalog-helpers.js +15 -0
  475. package/dist/composition/edges/_catalog-helpers.js.map +1 -1
  476. package/dist/composition/edges/calibration.d.ts +0 -9
  477. package/dist/composition/edges/calibration.d.ts.map +1 -1
  478. package/dist/composition/edges/calibration.js +85 -0
  479. package/dist/composition/edges/calibration.js.map +1 -1
  480. package/dist/composition/edges/catalog-condensed-matter.d.ts +0 -9
  481. package/dist/composition/edges/catalog-condensed-matter.d.ts.map +1 -1
  482. package/dist/composition/edges/catalog-condensed-matter.js +32 -1
  483. package/dist/composition/edges/catalog-condensed-matter.js.map +1 -1
  484. package/dist/composition/edges/catalog-fields.d.ts.map +1 -1
  485. package/dist/composition/edges/catalog-fields.js +2 -1
  486. package/dist/composition/edges/catalog-fields.js.map +1 -1
  487. package/dist/composition/edges/catalog-full.d.ts +4 -2
  488. package/dist/composition/edges/catalog-full.d.ts.map +1 -1
  489. package/dist/composition/edges/catalog-full.js +4 -2
  490. package/dist/composition/edges/catalog-full.js.map +1 -1
  491. package/dist/composition/edges/catalog-gravitation-cosmology.d.ts +0 -10
  492. package/dist/composition/edges/catalog-gravitation-cosmology.d.ts.map +1 -1
  493. package/dist/composition/edges/catalog-gravitation-cosmology.js +31 -1
  494. package/dist/composition/edges/catalog-gravitation-cosmology.js.map +1 -1
  495. package/dist/composition/edges/catalog-quantum.d.ts +0 -10
  496. package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
  497. package/dist/composition/edges/catalog-quantum.js +53 -17
  498. package/dist/composition/edges/catalog-quantum.js.map +1 -1
  499. package/dist/composition/edges/catalog-tranche.d.ts +0 -15
  500. package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
  501. package/dist/composition/edges/catalog-tranche.js +70 -16
  502. package/dist/composition/edges/catalog-tranche.js.map +1 -1
  503. package/dist/composition/edges/proved-seeds.d.ts +39 -0
  504. package/dist/composition/edges/proved-seeds.d.ts.map +1 -0
  505. package/dist/composition/edges/proved-seeds.js +197 -0
  506. package/dist/composition/edges/proved-seeds.js.map +1 -0
  507. package/dist/composition/enumerate.d.ts +20 -0
  508. package/dist/composition/enumerate.d.ts.map +1 -1
  509. package/dist/composition/enumerate.js +23 -0
  510. package/dist/composition/enumerate.js.map +1 -1
  511. package/dist/composition/expr-eval.d.ts +5 -4
  512. package/dist/composition/expr-eval.d.ts.map +1 -1
  513. package/dist/composition/expr-eval.js +40 -6
  514. package/dist/composition/expr-eval.js.map +1 -1
  515. package/dist/composition/expr-simplify.js +1 -1
  516. package/dist/composition/expr-simplify.js.map +1 -1
  517. package/dist/composition/expr-subst.d.ts +2 -1
  518. package/dist/composition/expr-subst.d.ts.map +1 -1
  519. package/dist/composition/expr-subst.js +9 -2
  520. package/dist/composition/expr-subst.js.map +1 -1
  521. package/dist/composition/frontier-account.d.ts +78 -0
  522. package/dist/composition/frontier-account.d.ts.map +1 -0
  523. package/dist/composition/frontier-account.js +127 -0
  524. package/dist/composition/frontier-account.js.map +1 -0
  525. package/dist/composition/graph-viz.d.ts +7 -22
  526. package/dist/composition/graph-viz.d.ts.map +1 -1
  527. package/dist/composition/graph-viz.js +4 -27
  528. package/dist/composition/graph-viz.js.map +1 -1
  529. package/dist/composition/grounding.d.ts +49 -0
  530. package/dist/composition/grounding.d.ts.map +1 -1
  531. package/dist/composition/grounding.js +38 -0
  532. package/dist/composition/grounding.js.map +1 -1
  533. package/dist/composition/index.d.ts +0 -2
  534. package/dist/composition/index.d.ts.map +1 -1
  535. package/dist/composition/index.js +1 -1
  536. package/dist/composition/index.js.map +1 -1
  537. package/dist/composition/not-composable-seeds.d.ts +30 -0
  538. package/dist/composition/not-composable-seeds.d.ts.map +1 -0
  539. package/dist/composition/not-composable-seeds.js +90 -0
  540. package/dist/composition/not-composable-seeds.js.map +1 -0
  541. package/dist/composition/probe/expression-gaps.d.ts +27 -0
  542. package/dist/composition/probe/expression-gaps.d.ts.map +1 -0
  543. package/dist/composition/probe/expression-gaps.js +47 -0
  544. package/dist/composition/probe/expression-gaps.js.map +1 -0
  545. package/dist/composition/probe/frontier.d.ts +2 -1
  546. package/dist/composition/probe/frontier.d.ts.map +1 -1
  547. package/dist/composition/probe/frontier.js +3 -2
  548. package/dist/composition/probe/frontier.js.map +1 -1
  549. package/dist/composition/probe/index.d.ts +4 -1
  550. package/dist/composition/probe/index.d.ts.map +1 -1
  551. package/dist/composition/probe/index.js +3 -1
  552. package/dist/composition/probe/index.js.map +1 -1
  553. package/dist/composition/probe/pipeline.d.ts +2 -0
  554. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  555. package/dist/composition/probe/pipeline.js +6 -2
  556. package/dist/composition/probe/pipeline.js.map +1 -1
  557. package/dist/composition/probe/problem.d.ts +7 -0
  558. package/dist/composition/probe/problem.d.ts.map +1 -1
  559. package/dist/composition/probe/problem.js +15 -5
  560. package/dist/composition/probe/problem.js.map +1 -1
  561. package/dist/composition/probe/search-budget.d.ts.map +1 -1
  562. package/dist/composition/probe/search-budget.js +6 -2
  563. package/dist/composition/probe/search-budget.js.map +1 -1
  564. package/dist/composition/probe/study.d.ts +340 -0
  565. package/dist/composition/probe/study.d.ts.map +1 -0
  566. package/dist/composition/probe/study.js +1519 -0
  567. package/dist/composition/probe/study.js.map +1 -0
  568. package/dist/composition/proposed-bridges.js +1 -1
  569. package/dist/composition/proposed-bridges.js.map +1 -1
  570. package/dist/composition/quantities/_dims.d.ts +6 -0
  571. package/dist/composition/quantities/_dims.d.ts.map +1 -1
  572. package/dist/composition/quantities/_dims.js +6 -0
  573. package/dist/composition/quantities/_dims.js.map +1 -1
  574. package/dist/composition/quantities/condensed-matter.d.ts +16 -0
  575. package/dist/composition/quantities/condensed-matter.d.ts.map +1 -1
  576. package/dist/composition/quantities/condensed-matter.js +43 -2
  577. package/dist/composition/quantities/condensed-matter.js.map +1 -1
  578. package/dist/composition/quantities/fields.d.ts +10 -0
  579. package/dist/composition/quantities/fields.d.ts.map +1 -1
  580. package/dist/composition/quantities/fields.js +37 -2
  581. package/dist/composition/quantities/fields.js.map +1 -1
  582. package/dist/composition/quantities/gravitation-cosmology.d.ts +4 -0
  583. package/dist/composition/quantities/gravitation-cosmology.d.ts.map +1 -1
  584. package/dist/composition/quantities/gravitation-cosmology.js +14 -0
  585. package/dist/composition/quantities/gravitation-cosmology.js.map +1 -1
  586. package/dist/composition/quantities/quantum.d.ts +2 -0
  587. package/dist/composition/quantities/quantum.d.ts.map +1 -1
  588. package/dist/composition/quantities/quantum.js +7 -0
  589. package/dist/composition/quantities/quantum.js.map +1 -1
  590. package/dist/composition/quantities.d.ts +4 -16
  591. package/dist/composition/quantities.d.ts.map +1 -1
  592. package/dist/composition/quantities.js +4 -16
  593. package/dist/composition/quantities.js.map +1 -1
  594. package/dist/composition/retrodiction.d.ts.map +1 -1
  595. package/dist/composition/retrodiction.js +6 -2
  596. package/dist/composition/retrodiction.js.map +1 -1
  597. package/dist/composition/uncertainty.d.ts +1 -1
  598. package/dist/composition/uncertainty.d.ts.map +1 -1
  599. package/dist/composition/user-equation.d.ts +79 -8
  600. package/dist/composition/user-equation.d.ts.map +1 -1
  601. package/dist/composition/user-equation.js +224 -32
  602. package/dist/composition/user-equation.js.map +1 -1
  603. package/dist/core/constants.d.ts +17 -5
  604. package/dist/core/constants.d.ts.map +1 -1
  605. package/dist/core/constants.js +17 -5
  606. package/dist/core/constants.js.map +1 -1
  607. package/dist/core/types.d.ts +1 -1
  608. package/dist/core/types.d.ts.map +1 -1
  609. package/dist/core/types.js +2 -1
  610. package/dist/core/types.js.map +1 -1
  611. package/dist/dimensional/curvature.d.ts +7 -56
  612. package/dist/dimensional/curvature.d.ts.map +1 -1
  613. package/dist/dimensional/curvature.js +7 -76
  614. package/dist/dimensional/curvature.js.map +1 -1
  615. package/dist/dimensional/dimension-spec.d.ts +7 -1
  616. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  617. package/dist/dimensional/dimension-spec.js +131 -3
  618. package/dist/dimensional/dimension-spec.js.map +1 -1
  619. package/dist/dimensional/formula-names.d.ts +30 -0
  620. package/dist/dimensional/formula-names.d.ts.map +1 -0
  621. package/dist/dimensional/formula-names.js +37 -0
  622. package/dist/dimensional/formula-names.js.map +1 -0
  623. package/dist/dimensional/natural-units.d.ts +33 -0
  624. package/dist/dimensional/natural-units.d.ts.map +1 -0
  625. package/dist/dimensional/natural-units.js +58 -0
  626. package/dist/dimensional/natural-units.js.map +1 -0
  627. package/dist/{composition → dimensional}/symbolic-constants.d.ts +21 -2
  628. package/dist/dimensional/symbolic-constants.d.ts.map +1 -0
  629. package/dist/dimensional/symbolic-constants.js +122 -0
  630. package/dist/dimensional/symbolic-constants.js.map +1 -0
  631. package/dist/dimensional/unit-convention.d.ts +30 -0
  632. package/dist/dimensional/unit-convention.d.ts.map +1 -0
  633. package/dist/dimensional/unit-convention.js +60 -0
  634. package/dist/dimensional/unit-convention.js.map +1 -0
  635. package/dist/dimensional/units.d.ts +43 -0
  636. package/dist/dimensional/units.d.ts.map +1 -0
  637. package/dist/dimensional/units.js +197 -0
  638. package/dist/dimensional/units.js.map +1 -0
  639. package/dist/index.d.ts +11 -5
  640. package/dist/index.d.ts.map +1 -1
  641. package/dist/index.js +10 -3
  642. package/dist/index.js.map +1 -1
  643. package/dist/numerical/bianchi-residual.d.ts +55 -0
  644. package/dist/numerical/bianchi-residual.d.ts.map +1 -0
  645. package/dist/numerical/bianchi-residual.js +79 -0
  646. package/dist/numerical/bianchi-residual.js.map +1 -0
  647. package/dist/numerical/binding-value.d.ts +67 -0
  648. package/dist/numerical/binding-value.d.ts.map +1 -0
  649. package/dist/numerical/binding-value.js +349 -0
  650. package/dist/numerical/binding-value.js.map +1 -0
  651. package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
  652. package/dist/numerical/connection-lowering-helpers.js +13 -26
  653. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  654. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  655. package/dist/numerical/curvature-lowering-helpers.js +9 -0
  656. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  657. package/dist/numerical/float64-engine.d.ts.map +1 -1
  658. package/dist/numerical/float64-engine.js +23 -16
  659. package/dist/numerical/float64-engine.js.map +1 -1
  660. package/dist/numerical/formula-dimension.d.ts +14 -0
  661. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  662. package/dist/numerical/formula-dimension.js +56 -9
  663. package/dist/numerical/formula-dimension.js.map +1 -1
  664. package/dist/numerical/formula-mathts.d.ts.map +1 -1
  665. package/dist/numerical/formula-mathts.js +75 -6
  666. package/dist/numerical/formula-mathts.js.map +1 -1
  667. package/dist/numerical/formula.d.ts +33 -0
  668. package/dist/numerical/formula.d.ts.map +1 -1
  669. package/dist/numerical/formula.js +75 -6
  670. package/dist/numerical/formula.js.map +1 -1
  671. package/dist/numerical/spacetime-metrics.d.ts +243 -0
  672. package/dist/numerical/spacetime-metrics.d.ts.map +1 -0
  673. package/dist/numerical/spacetime-metrics.js +1056 -0
  674. package/dist/numerical/spacetime-metrics.js.map +1 -0
  675. package/dist/relations/category.d.ts +38 -0
  676. package/dist/relations/category.d.ts.map +1 -0
  677. package/dist/relations/category.js +23 -0
  678. package/dist/relations/category.js.map +1 -0
  679. package/dist/relations/composition-table.d.ts +61 -0
  680. package/dist/relations/composition-table.d.ts.map +1 -0
  681. package/dist/relations/composition-table.js +140 -0
  682. package/dist/relations/composition-table.js.map +1 -0
  683. package/dist/relations/conventions.d.ts +63 -0
  684. package/dist/relations/conventions.d.ts.map +1 -0
  685. package/dist/relations/conventions.js +93 -0
  686. package/dist/relations/conventions.js.map +1 -0
  687. package/dist/relations/regime.d.ts +159 -0
  688. package/dist/relations/regime.d.ts.map +1 -0
  689. package/dist/relations/regime.js +304 -0
  690. package/dist/relations/regime.js.map +1 -0
  691. package/dist/relations/types.d.ts +257 -0
  692. package/dist/relations/types.d.ts.map +1 -0
  693. package/dist/relations/types.js +35 -0
  694. package/dist/relations/types.js.map +1 -0
  695. package/package.json +166 -163
  696. package/dist/bridges/descriptor.d.ts.map +0 -1
  697. package/dist/bridges/descriptor.js.map +0 -1
  698. package/dist/composition/poster-source.d.ts.map +0 -1
  699. package/dist/composition/poster-source.js.map +0 -1
  700. package/dist/composition/symbolic-constants.d.ts.map +0 -1
  701. package/dist/composition/symbolic-constants.js +0 -65
  702. package/dist/composition/symbolic-constants.js.map +0 -1
@@ -0,0 +1,353 @@
1
+ /**
2
+ * Applied case: a Brownian sphere tracked in a fluid — the diffusion
3
+ * coefficient and mean-square displacement from the particle's radius and the
4
+ * fluid's viscosity and temperature, with the regime checks that make the
5
+ * Stokes–Einstein scalar applicable.
6
+ *
7
+ * The atlas bridge `ab-stokes-einstein` derives D = k_BT/(6πηa) from the
8
+ * Langevin model and Stokes drag, with Re ≤ 0.1 and m/(γt) ≤ 0.01. This case
9
+ * evaluates it for a named geometry (radius, or diameter through an exact
10
+ * alternate) and fluid, computes Re from the particle's own velocity scales,
11
+ * includes the displaced-fluid added mass in the momentum relaxation time, and
12
+ * evaluates the hydrodynamic memory (the Basset force) that the bridge does not
13
+ * check: the full MSD with fluid inertia, and the correction it makes at t.
14
+ * Given a distance to a plane wall, it applies the wall's drag corrections to D.
15
+ *
16
+ * `CE-stokes-einstein` is encoded only up to its 6π (scalar-up-to-constant);
17
+ * the 6π here comes from Stokes drag, not from that entry.
18
+ *
19
+ * @module cases/brownian-sphere
20
+ */
21
+ import { K_B_SI } from '../core/constants.js';
22
+ import { adaptiveSimpson } from './quadrature.js';
23
+ import { check, requirePositive } from './types.js';
24
+ const ID = 'case-brownian-sphere';
25
+ /** Standard gravity (CGPM 1901), for the sedimentation speed. @internal */
26
+ export const G_STANDARD = 9.80665;
27
+ /** The thresholds `ab-stokes-einstein` states: Re ≤ 0.1 and τ_p/t ≤ 0.01. @internal */
28
+ export const MAX_RE = 0.1;
29
+ export const MAX_TAU_P_RATIO = 0.01;
30
+ /** Ceiling on the memory term's own share of the MSD, |MSD_H/MSD_OU − 1|. @internal */
31
+ export const MAX_MEMORY_CORRECTION = 0.01;
32
+ /** (v_s t)²/(2Dt) ceiling along gravity when the vertical axis is tracked. @internal */
33
+ export const MAX_DRIFT_RATIO = 0.01;
34
+ /** Ceiling on |MSD/MSD_wall − 1|: the wall's correction to the tracked MSD is negligible. @internal */
35
+ export const MAX_WALL_CORRECTION = 0.01;
36
+ /** Ceiling on the last retained Faxén term (a/h)⁵/16 over the series' value. @internal */
37
+ export const MAX_FAXEN_LAST_TERM = 0.01;
38
+ /** Ceiling on √(2 D_⊥ t)/(h − a): the height, and so D_∥ and D_⊥, barely change over t. @internal */
39
+ export const MAX_WALL_EXCURSION = 0.1;
40
+ /** t − τ(1 − e^{−t/τ}) in units of τ, i.e. x − (1 − e^{−x}), without its cancellation at small x. @internal */
41
+ export function ballisticDeficit(x) {
42
+ return x < 1e-3 ? x * x * (1 / 2 - x / 6 + (x * x) / 24 - (x * x * x) / 120) : x + Math.expm1(-x);
43
+ }
44
+ /**
45
+ * MSD/(2Dt) per axis for a sphere with fluid inertia: added mass and the Basset
46
+ * memory force, in an unbounded incompressible fluid, velocities in equilibrium.
47
+ *
48
+ * The velocity autocorrelation has the Laplace transform
49
+ * Ĉ(s) = k_BT/(M s + γ(1 + √(s τ_f))), M = m + m_f/2, from the frequency-dependent
50
+ * Stokes drag γ(1 + √(sτ_f)) + s m_f/2 (Stokes 1851; the Basset 1888 term is its
51
+ * √s part; Hinch 1975, J. Fluid Mech. 72, 499; Clercx & Schram 1992, Phys. Rev.
52
+ * A 46, 1942). Its poles in √s both have negative real part, so Ĉ has none on the
53
+ * principal sheet and C(t) is the branch-cut integral
54
+ * C(t) = (k_BT/πγ) ∫₀^∞ e^{−ut} √(τ_f u)/((1 − τ_p u)² + τ_f u) du, τ_p = M/γ.
55
+ * Then ⟨Δx²⟩ = 2∫₀ᵗ (t − s) C(s) ds, and with v = ut,
56
+ * MSD/(2Dt) = (1/π) ∫₀^∞ √(βv) (v − 1 + e^{−v}) / (v² ((1 − αv)² + βv)) dv, α = τ_p/t, β = τ_f/t,
57
+ * integrated here over ln v by adaptive Simpson, split at v = 1, 1/β and around
58
+ * the near-resonance at v = 1/α (width √(β/α) in ln v; β/α ≤ 9 for any densities).
59
+ *
60
+ * Limits: → 1 − 2√(τ_f/(πt)) + (τ_f − τ_p)/t for t ≫ τ_p, τ_f (expanding Ĉ in √s),
61
+ * whose second derivative is the VACF tail k_BT/(12 ρ_f (πνt)^{3/2}); → t/(2τ_p)
62
+ * for t ≪ τ_p, i.e. ⟨Δx²⟩ → (k_BT/M) t². Requires β > 0: without memory the
63
+ * poles reach the principal sheet and this integral no longer holds them.
64
+ * @internal
65
+ */
66
+ export function hydrodynamicMsdRatio(alpha, beta) {
67
+ const f = (y) => {
68
+ const v = Math.exp(y);
69
+ const lag = 1 - alpha * v;
70
+ return (Math.sqrt(beta * v) * (ballisticDeficit(v) / v)) / (lag * lag + beta * v);
71
+ };
72
+ const peak = -Math.log(alpha);
73
+ const w = Math.min(1, Math.sqrt(beta / alpha));
74
+ const points = [0, -Math.log(beta), peak, ...[1, 2, 4].flatMap((k) => [peak - k * w, peak + k * w])].sort((x, y) => x - y);
75
+ // The integrand falls as v^{3/2} below and v^{−3/2} above the breakpoints: e^{−75} at ±50 in ln v.
76
+ const edges = [points[0] - 50, ...points, points[points.length - 1] + 50];
77
+ let sum = 0;
78
+ for (let k = 1; k < edges.length; k++)
79
+ if (edges[k] > edges[k - 1])
80
+ sum += adaptiveSimpson(f, edges[k - 1], edges[k], 1e-12);
81
+ return sum / Math.PI;
82
+ }
83
+ /**
84
+ * D_∥/D₀ for a sphere translating parallel to a plane wall, centre at h:
85
+ * 1 − (9/16)ξ + (1/8)ξ³ − (45/256)ξ⁴ − (1/16)ξ⁵, ξ = a/h (Faxén 1923, method of
86
+ * reflections, as quoted in Happel & Brenner 1965, Low Reynolds Number
87
+ * Hydrodynamics, ch. 7). A series in a/h, truncated:
88
+ * its error is not bounded here, and near contact it misses the logarithmic
89
+ * lubrication divergence of the drag.
90
+ * @internal
91
+ */
92
+ export function faxenParallel(aOverH) {
93
+ const x = aOverH;
94
+ return 1 - (9 / 16) * x + (1 / 8) * x ** 3 - (45 / 256) * x ** 4 - (1 / 16) * x ** 5;
95
+ }
96
+ /**
97
+ * λ = F/(6πηaU) for a sphere approaching a plane wall head-on, centre at h > a,
98
+ * exact in Stokes flow (Brenner 1961, Chem. Eng. Sci. 16, 242, bispherical coordinates):
99
+ * λ = (4/3) sinh α Σₙ n(n+1)/((2n−1)(2n+3)) · [(2 sinh(2n+1)α + (2n+1) sinh 2α) /
100
+ * (4 sinh²(n+½)α − (2n+1)² sinh²α) − 1], cosh α = h/a. D_⊥ = D₀/λ.
101
+ *
102
+ * The bracket is rewritten over 4 sinh²(n+½)α so that no sinh overflows; its
103
+ * terms fall as e^{−(2n+1)α}, so near contact (α → 0) the sum needs ~40/α terms,
104
+ * and the low-n denominators lose ~α⁻² of relative precision to cancellation.
105
+ * Limits: λ → 1 + (9/8)(a/h) far away (Lorentz 1907); λ → a/δ + (1/5) ln(a/δ) +
106
+ * 0.971 as the gap δ = h − a → 0 (Cox & Brenner 1967, Chem. Eng. Sci. 22, 1753).
107
+ * @throws Error if h/a ≤ 1.
108
+ * @internal
109
+ */
110
+ export function brennerPerpendicular(hOverA) {
111
+ if (!(hOverA > 1))
112
+ throw new Error(`brennerPerpendicular: need h/a > 1 (got ${hOverA})`);
113
+ const al = Math.acosh(hOverA);
114
+ const s = Math.sinh(al);
115
+ const s2a = Math.sinh(2 * al);
116
+ let sum = 0;
117
+ for (let n = 1;; n++) {
118
+ const x = (n + 0.5) * al;
119
+ const k = 2 * n + 1;
120
+ const inv4Sinh2 = Math.exp(-2 * x) / Math.expm1(-2 * x) ** 2;
121
+ const cothMinus1 = 2 / Math.expm1(2 * x);
122
+ const bracket = (cothMinus1 + k * s2a * inv4Sinh2 + k * k * s * s * inv4Sinh2) / (1 - k * k * s * s * inv4Sinh2);
123
+ const term = ((n * (n + 1)) / ((2 * n - 1) * (2 * n + 3))) * bracket;
124
+ sum += term;
125
+ if (term < 1e-17 * sum)
126
+ break;
127
+ if (n > 1e7)
128
+ throw new Error(`brennerPerpendicular: no convergence at h/a = ${hOverA}`);
129
+ }
130
+ return (4 / 3) * s * sum;
131
+ }
132
+ export const BROWNIAN_SPHERE_CASE = {
133
+ id: ID,
134
+ title: 'Brownian sphere in a fluid (particle geometry, fluid conditions)',
135
+ parameters: [
136
+ { key: 'T_K', quantity: 'temperature', symbol: 'T', unit: 'K', meaning: 'absolute temperature of the fluid, > 0 K', temperature: 'absolute' },
137
+ { key: 'eta_Pa_s', quantity: 'dynamic viscosity', symbol: 'η', unit: 'Pa*s', meaning: 'viscosity of the fluid at T (water at 20 °C ≈ 1.0e-3 Pa·s), > 0' },
138
+ {
139
+ key: 'a_m',
140
+ quantity: 'particle radius',
141
+ symbol: 'a',
142
+ unit: 'm',
143
+ meaning: 'hydrodynamic radius of the sphere, > 0',
144
+ geometry: 'radius',
145
+ alternates: [{ key: 'diameter_m', meaning: 'the diameter 2a of the sphere', toKey: 0.5 }],
146
+ },
147
+ { key: 'rho_p_kg_per_m3', quantity: 'particle density', symbol: 'ρ_p', unit: 'kg/m^3', meaning: 'mass density of the sphere (silica ≈ 2000), > 0' },
148
+ { key: 'rho_f_kg_per_m3', quantity: 'fluid density', symbol: 'ρ_f', unit: 'kg/m^3', meaning: 'mass density of the fluid (water ≈ 998), > 0' },
149
+ { key: 't_s', quantity: 'lag time', symbol: 't', unit: 's', meaning: 'the time over which the displacement is measured, > 0' },
150
+ { key: 'd', quantity: 'tracked dimensions', symbol: 'd', unit: '', meaning: 'number of Cartesian axes tracked: 1, 2 (a microscope image plane, horizontal) or 3' },
151
+ {
152
+ key: 'h_m',
153
+ quantity: 'distance to a wall',
154
+ symbol: 'h',
155
+ unit: 'm',
156
+ meaning: "distance from the sphere's centre to one plane horizontal wall (a coverslip), > a; leave out when no wall is within many radii",
157
+ geometry: 'separation',
158
+ optional: true,
159
+ },
160
+ ],
161
+ governing: {
162
+ parent: [
163
+ 'm dv/dt = −γ v + ξ(t), ⟨ξ_i(t) ξ_j(t′)⟩ = 2γ k_BT δ_ij δ(t − t′) (Langevin, a 3-vector equation; model-langevin)',
164
+ 'η ∇²u = ∇p, ∇·u = 0, u = v on the sphere (no slip), u → 0 far away (Stokes creeping flow, a field; model-stokes-drag) ⇒ γ = 6πηa',
165
+ 'm dv/dt = −γ v − (m_f/2) dv/dt − 6a²√(πηρ_f) ∫_{−∞}^t v′(s)/√(t − s) ds + ξ(t), ξ coloured by the same kernel ' +
166
+ '(unsteady Stokes flow: added mass and the Basset memory force; Hinch 1975)',
167
+ ],
168
+ scalar: [
169
+ 'D = k_BT/(6πηa) (Stokes–Einstein; ab-stokes-einstein)',
170
+ '⟨|Δr|²⟩ = 2 d D t over the d tracked axes',
171
+ ],
172
+ distinction: 'The parents are a vector stochastic equation for the velocity and a field equation for the flow around the sphere; ' +
173
+ 'the scalar keeps one isotropic number D and a mean-square displacement linear in t. Dropped: the velocity as a ' +
174
+ 'state (the ballistic regime t ≲ τ_p), the flow field (and with it the hydrodynamic memory for t ≲ τ_f), the shape ' +
175
+ 'beyond the radius, and every anisotropy.',
176
+ },
177
+ observable: 'MSD_m2',
178
+ outputs: [
179
+ { key: 'gamma_kg_per_s', symbol: 'γ', unit: 'kg/s', meaning: 'Stokes drag coefficient 6πηa' },
180
+ { key: 'D_m2_per_s', symbol: 'D', unit: 'm^2/s', meaning: 'diffusion coefficient k_BT/(6πηa)' },
181
+ { key: 'MSD_m2', symbol: '⟨|Δr|²⟩', unit: 'm^2', meaning: 'mean-square displacement 2dDt over the tracked axes' },
182
+ { key: 'rms_displacement_m', symbol: '√⟨|Δr|²⟩', unit: 'm', meaning: 'root-mean-square displacement over the tracked axes' },
183
+ { key: 'm_kg', symbol: 'm', unit: 'kg', meaning: 'particle mass (4/3)πa³ρ_p' },
184
+ { key: 'tau_p_s', symbol: 'τ_p', unit: 's', meaning: 'momentum relaxation time (m + m_f/2)/γ, with the displaced-fluid added mass m_f/2' },
185
+ { key: 'tau_f_s', symbol: 'τ_f', unit: 's', meaning: 'vorticity diffusion time ρ_f a²/η over one radius (hydrodynamic memory)' },
186
+ { key: 'v_sed_m_per_s', symbol: 'v_s', unit: 'm/s', meaning: 'Stokes sedimentation speed (2/9)(ρ_p − ρ_f) g a²/η; negative means the sphere rises' },
187
+ { key: 'Re', symbol: 'Re', unit: '', meaning: 'ρ_f a max(√(k_BT/m), |v_s|)/η — radius-based; a diameter-based Re is twice this' },
188
+ { key: 'MSD_langevin_m2', symbol: '⟨|Δr|²⟩_L', unit: 'm^2', meaning: 'the Langevin parent: 2dD[t − τ(1 − e^{−t/τ})], τ = m/γ (bare mass)' },
189
+ { key: 'langevin_deviation', symbol: 'MSD/MSD_L − 1', unit: '', meaning: 'relative excess of the diffusive MSD over the Langevin one' },
190
+ {
191
+ key: 'MSD_hydro_m2',
192
+ symbol: '⟨|Δr|²⟩_H',
193
+ unit: 'm^2',
194
+ meaning: 'the Langevin–Basset parent: added mass and hydrodynamic memory, unbounded incompressible fluid (branch-cut integral of its Laplace-domain VACF)',
195
+ },
196
+ { key: 'hydro_correction_m2', symbol: '⟨|Δr|²⟩_H − ⟨|Δr|²⟩', unit: 'm^2', meaning: 'what inertia and memory change in the MSD at t; ≈ −4dD√(τ_f t/π) at t ≫ τ_f' },
197
+ { key: 'hydro_deviation', symbol: 'MSD/MSD_H − 1', unit: '', meaning: 'relative excess of the diffusive MSD over the Langevin–Basset one' },
198
+ {
199
+ key: 'memory_correction',
200
+ symbol: 'MSD_H/MSD_OU − 1',
201
+ unit: '',
202
+ meaning: "the memory force's own share: MSD_H against the Ornstein–Uhlenbeck MSD with the same τ_p (added mass, no memory)",
203
+ },
204
+ { key: 'D_parallel_m2_per_s', symbol: 'D_∥', unit: 'm^2/s', meaning: 'D beside the wall, parallel to it: D·(Faxén series in a/h); null without h_m' },
205
+ { key: 'D_perp_m2_per_s', symbol: 'D_⊥', unit: 'm^2/s', meaning: 'D normal to the wall: D/λ, λ from Brenner\'s exact series; null without h_m' },
206
+ { key: 'MSD_wall_m2', symbol: '⟨|Δr|²⟩_w', unit: 'm^2', meaning: '2t(d_∥ D_∥ + d_⊥ D_⊥): the tracked horizontal axes parallel to the wall, a third one normal to it; null without h_m' },
207
+ { key: 'wall_deviation', symbol: 'MSD/MSD_w − 1', unit: '', meaning: 'relative excess of the unbounded-fluid MSD over the wall-corrected one; null without h_m' },
208
+ ],
209
+ comparison: {
210
+ reference: 'the parent Langevin model (bare mass, white noise; it has neither added mass nor hydrodynamic memory)',
211
+ valueKey: 'MSD_m2',
212
+ referenceKey: 'MSD_langevin_m2',
213
+ deviationKey: 'langevin_deviation',
214
+ method: 'closed form of the Ornstein–Uhlenbeck MSD, velocities starting in equilibrium',
215
+ },
216
+ conditions: [
217
+ 'a rigid sphere released at r = 0; its displacement density starts as δ(r) and spreads as a Gaussian of variance 2Dt per axis',
218
+ 'no-slip boundary on the sphere; the fluid is at rest far from it (no imposed flow; no wall within many radii, or with h_m one plane no-slip wall)',
219
+ 'fluid in thermal equilibrium at T; one isolated particle (dilute: no hydrodynamic interaction with others)',
220
+ ],
221
+ notIncluded: [
222
+ 'walls other than one plane: a second wall, a channel or a curved surface; and, with h_m, the spread of heights the sphere samples (D_∥, D_⊥ are taken at h)',
223
+ 'localization error and camera motion blur of the tracking, which offset and bias the measured MSD',
224
+ 'fluid compressibility: the incompressible memory kernel gives ⟨v²⟩ = k_BT/(m + m_f/2) at t = 0; sound restores k_BT/m over a/c_s (Zwanzig & Bixon 1970)',
225
+ 'the memory force near a wall: MSD_hydro is the unbounded-fluid result, and a wall within √(νt) changes the memory tail',
226
+ 'the rotational diffusion of the sphere, and any non-spherical shape',
227
+ ],
228
+ measurement: [
229
+ 'single-particle tracking: fit ⟨|Δr|²⟩(t) over the d tracked axes, slope 2dD; compare D and MSD_m2 at the chosen lag ' +
230
+ '(with N independent displacements the relative scatter of the MSD is ≈ √(2/(dN)))',
231
+ 'subtract the static localization offset 2dσ_loc² (measured on an immobilized particle) before comparing',
232
+ 'dynamic light scattering: the field autocorrelation decays at Γ = D q², an independent route to the same D',
233
+ ],
234
+ links: [
235
+ { id: 'ab-stokes-einstein', role: 'the derivation D = k_BT/(6πηa) with its regime Re ≤ 0.1, m/(γt) ≤ 0.01 (`upt atlas ab-stokes-einstein`)' },
236
+ { id: 'ab-langevin-diffusion', role: 'the overdamped coarse-graining D = k_BT/γ and its ballistic counterexample' },
237
+ { id: 'model-stokes-drag', role: 'the creeping-flow drag γ = 6πηa' },
238
+ { id: 'CE-stokes-einstein', role: 'encoded only up to its dimensionless 6π (scalar-up-to-constant); the 6π here is from Stokes drag' },
239
+ ],
240
+ examples: {
241
+ valid: {
242
+ args: ['T_K=293.15', 'eta_Pa_s=1e-3', 'a_m=1um', 'rho_p_kg_per_m3=2000', 'rho_f_kg_per_m3=998', 't_s=1', 'd=2', 'h_m=100um'],
243
+ note: 'a 1 µm-radius silica sphere in water at 20 °C, 100 µm above the coverslip, tracked in the image plane over 1 s',
244
+ fails: [],
245
+ },
246
+ failures: [
247
+ {
248
+ args: ['T_K=293.15', 'eta_Pa_s=1e-3', 'a_m=1um', 'rho_p_kg_per_m3=2000', 'rho_f_kg_per_m3=998', 't_s=1us', 'd=2'],
249
+ note: 'the same sphere over 1 µs: still ballistic (t ≈ 2τ_p) and inside the hydrodynamic memory time',
250
+ fails: ['overdamped', 'memory'],
251
+ },
252
+ {
253
+ args: ['T_K=293.15', 'eta_Pa_s=1e-3', 'a_m=50um', 'rho_p_kg_per_m3=7800', 'rho_f_kg_per_m3=998', 't_s=100', 'd=3'],
254
+ note: 'a 50 µm-radius steel sphere tracked in 3-D: it sinks at ≈ 3.7 cm/s, Re ≈ 1.9, and the drift swamps diffusion',
255
+ fails: ['creeping-flow', 'drift'],
256
+ },
257
+ {
258
+ args: ['T_K=293.15', 'eta_Pa_s=1e-3', 'a_m=1um', 'rho_p_kg_per_m3=1050', 'rho_f_kg_per_m3=998', 't_s=50ms', 'd=2', 'h_m=3um'],
259
+ note: 'a 1 µm-radius polystyrene sphere 3 µm (centre) above the coverslip: the wall slows D_∥ by ≈ 19%',
260
+ fails: ['wall'],
261
+ },
262
+ {
263
+ args: ['T_K=293.15', 'eta_Pa_s=1e-3', 'a_m=1um', 'rho_p_kg_per_m3=1050', 'rho_f_kg_per_m3=998', 't_s=50ms', 'd=2', 'h_m=1.2um'],
264
+ note: 'the same sphere with a 0.2 µm gap: past the range of the Faxén series, and its height changes by more than the gap allows over t',
265
+ fails: ['faxen-range', 'wall', 'wall-static'],
266
+ },
267
+ ],
268
+ },
269
+ /** Evaluate the Stokes-Einstein MSD and regime checks for the supplied Brownian-sphere inputs. */
270
+ regimeAt(inputs, outputs) {
271
+ const re = outputs.Re;
272
+ const m = outputs.m_kg;
273
+ const gamma = outputs.gamma_kg_per_s;
274
+ const t = inputs.t_s;
275
+ if (re == null || m == null || gamma == null || t == null)
276
+ return '';
277
+ return `upt regime diffusion --at Re=${re} m=${m} gamma=${gamma} t=${t}`;
278
+ },
279
+ run(i) {
280
+ requirePositive(ID, i, ['T_K', 'eta_Pa_s', 'a_m', 'rho_p_kg_per_m3', 'rho_f_kg_per_m3', 't_s']);
281
+ const { T_K: T, eta_Pa_s: eta, a_m: a, rho_p_kg_per_m3: rhoP, rho_f_kg_per_m3: rhoF, t_s: t, d } = i;
282
+ if (d !== 1 && d !== 2 && d !== 3)
283
+ throw new Error(`${ID}: d must be 1, 2 or 3 (got ${d})`);
284
+ const kT = K_B_SI * T;
285
+ const gamma = 6 * Math.PI * eta * a;
286
+ const D = kT / gamma;
287
+ const msd = 2 * d * D * t;
288
+ const volume = (4 / 3) * Math.PI * a ** 3;
289
+ const m = volume * rhoP;
290
+ const tauP = (m + 0.5 * volume * rhoF) / gamma;
291
+ const tauF = (rhoF * a * a) / eta;
292
+ const vSed = ((2 / 9) * (rhoP - rhoF) * G_STANDARD * a * a) / eta;
293
+ const re = (rhoF * a * Math.max(Math.sqrt(kT / m), Math.abs(vSed))) / eta;
294
+ const tauBare = m / gamma;
295
+ const msdLangevin = 2 * d * D * tauBare * ballisticDeficit(t / tauBare);
296
+ const msdHydro = msd * hydrodynamicMsdRatio(tauP / t, tauF / t);
297
+ const msdAddedMass = 2 * d * D * tauP * ballisticDeficit(t / tauP);
298
+ const memory = msdHydro / msdAddedMass - 1;
299
+ const checks = [
300
+ check('creeping-flow', 'creeping flow around the sphere, Re ≪ 1', 'ρ_f a max(√(k_BT/m), |v_s|)/η', re, '<=', MAX_RE, "the threshold ab-stokes-einstein states: a chosen machine form of Re ≪ 1"),
301
+ check('overdamped', 'overdamped times t ≫ τ_p', '(m + m_f/2)/(γ t)', tauP / t, '<=', MAX_TAU_P_RATIO, "ab-stokes-einstein's m/(γt) ≤ 0.01, with the added mass m_f/2 included (stricter)"),
302
+ check('memory', 'past the hydrodynamic memory, t ≫ τ_f = ρ_f a²/η', '|MSD_H/MSD_OU − 1|', Math.abs(memory), '<=', MAX_MEMORY_CORRECTION, 'chosen threshold: the Basset memory changes the MSD by ≤ 1% at t (computed, not estimated; ≈ 2√(τ_f/(πt)) at t ≫ τ_f)'),
303
+ ];
304
+ const unchecked = ['the particle is a rigid sphere and a is its hydrodynamic radius (a coating or a shell changes it)'];
305
+ let wall = null;
306
+ if (i.h_m !== undefined) {
307
+ const h = i.h_m;
308
+ if (!Number.isFinite(h) || !(h > a))
309
+ throw new Error(`${ID}: h_m must be a finite distance > a_m, centre to wall (got ${h})`);
310
+ const faxen = faxenParallel(a / h);
311
+ const lambda = brennerPerpendicular(h / a);
312
+ const dPar = D * faxen;
313
+ const dPerp = D / lambda;
314
+ const msdWall = 2 * t * (Math.min(d, 2) * dPar + (d === 3 ? dPerp : 0));
315
+ wall = { dPar, dPerp, msdWall };
316
+ const excursion = Math.sqrt(2 * dPerp * t) + (Math.abs(vSed) * t) / lambda;
317
+ checks.push(check('faxen-range', 'the Faxén series in a/h holds for D_∥', '(a/h)⁵/16 ÷ (D_∥/D)', (a / h) ** 5 / 16 / faxen, '<=', MAX_FAXEN_LAST_TERM, 'chosen threshold: the last retained term is ≤ 1% of the series — a size estimate of the truncation, not a bound; D_⊥ (Brenner) is exact at any h > a'), check('wall', 'the wall correction to the tracked MSD is negligible', '|MSD/MSD_w − 1|', Math.abs(msd / msdWall - 1), '<=', MAX_WALL_CORRECTION, 'chosen threshold: the unbounded-fluid D is then within 1% for the tracked axes; otherwise read MSD_wall_m2'), check('wall-static', 'the height barely changes over t', '(√(2 D_⊥ t) + |v_s| t/λ)/(h − a)', excursion / (h - a), '<=', MAX_WALL_EXCURSION, 'chosen threshold: diffusion plus wall-slowed sedimentation normal to the wall move the sphere by ≤ 10% of the gap, so D_∥, D_⊥ taken at h hold over t'));
318
+ unchecked.push('the wall is plane, rigid, no-slip and horizontal, and the gap h − a is many molecular sizes and roughness heights (no surface forces, no lubrication-scale slip)');
319
+ }
320
+ if (d === 3) {
321
+ checks.push(check('drift', 'sedimentation drift negligible along gravity over t', '(v_s t)²/(2 D t)', (vSed * t) ** 2 / (2 * D * t), '<=', MAX_DRIFT_RATIO, 'chosen threshold: the vertical MSD then carries ≤ 1% from the deterministic drift'));
322
+ }
323
+ else {
324
+ unchecked.push(`the ${d === 1 ? 'tracked axis is' : 'tracked axes are'} horizontal, so sedimentation (${Number(Math.abs(vSed * t).toPrecision(3))} m over t) moves the sphere out of the plane but not along ${d === 1 ? 'it' : 'them'}`);
325
+ }
326
+ return {
327
+ outputs: {
328
+ gamma_kg_per_s: gamma,
329
+ D_m2_per_s: D,
330
+ MSD_m2: msd,
331
+ rms_displacement_m: Math.sqrt(msd),
332
+ m_kg: m,
333
+ tau_p_s: tauP,
334
+ tau_f_s: tauF,
335
+ v_sed_m_per_s: vSed,
336
+ Re: re,
337
+ MSD_langevin_m2: msdLangevin,
338
+ langevin_deviation: msd / msdLangevin - 1,
339
+ MSD_hydro_m2: msdHydro,
340
+ hydro_correction_m2: msdHydro - msd,
341
+ hydro_deviation: msd / msdHydro - 1,
342
+ memory_correction: memory,
343
+ D_parallel_m2_per_s: wall?.dPar ?? null,
344
+ D_perp_m2_per_s: wall?.dPerp ?? null,
345
+ MSD_wall_m2: wall?.msdWall ?? null,
346
+ wall_deviation: wall === null ? null : msd / wall.msdWall - 1,
347
+ },
348
+ checks,
349
+ unchecked,
350
+ };
351
+ },
352
+ };
353
+ //# sourceMappingURL=brownian-sphere.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brownian-sphere.js","sourceRoot":"","sources":["../../src/cases/brownian-sphere.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,eAAe,EAAoB,MAAM,YAAY,CAAC;AAEtE,MAAM,EAAE,GAAG,sBAAsB,CAAC;AAElC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,CAAC;AAElC,uFAAuF;AACvF,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;AAC1B,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,uFAAuF;AACvF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAE1C,wFAAwF;AACxF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,uGAAuG;AACvG,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAExC,0FAA0F;AAC1F,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAExC,qGAAqG;AACrG,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,+GAA+G;AAC/G,MAAM,UAAU,gBAAgB,CAAC,CAAS;IACxC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAA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I,EAAE,IAAI,IAAI,IAAI;gBACvC,eAAe,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI;gBACpC,WAAW,EAAE,IAAI,EAAE,OAAO,IAAI,IAAI;gBAClC,cAAc,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,CAAC;aAC9D;YACD,MAAM;YACN,SAAS;SACV,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { type AppliedCase } from './types.js';
2
+ /** Q floor for the single-Lorentzian (near-resonance) form of the spectrum. @internal */
3
+ export declare const MIN_Q_LORENTZIAN = 10;
4
+ /** (1/t_obs)/linewidth ceiling: the record resolves the line. @internal */
5
+ export declare const MAX_RESOLUTION_RATIO = 0.1;
6
+ /**
7
+ * √(k_BT/k)/A ceiling. Thermal motion of one mode is x = X cos ω_d t + Y sin ω_d t
8
+ * with ⟨X²⟩ = ⟨Y²⟩ = k_BT/k (equipartition), so the envelope of the ring-down
9
+ * plus it is Rician with ⟨A_obs²⟩ = A² + 2k_BT/k (Rice 1944); at the ceiling
10
+ * √(1 + 2·0.01) − 1 ≈ 0.0100.
11
+ * @internal
12
+ */
13
+ export declare const MAX_THERMAL_RATIO = 0.1;
14
+ /**
15
+ * FWHM in Hz of |∫₀ᵀ e^{−(α + iΔω)t} dt|², the near-resonance power spectrum of
16
+ * a ring-down x0 e^{−αt} cos(ω_d t) recorded for T. The negative-frequency
17
+ * pole is dropped, which is the Q ≫ 1 approximation. The peak is at Δω = 0:
18
+ * the integrand is positive, so |X(Δω)| ≤ X(0).
19
+ * @internal
20
+ */
21
+ export declare function windowedLinewidthHz(alpha: number, T: number): number;
22
+ export declare const DAMPED_RESONATOR_CASE: AppliedCase;
23
+ //# sourceMappingURL=damped-resonator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"damped-resonator.d.ts","sourceRoot":"","sources":["../../src/cases/damped-resonator.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAItE,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAoBpE;AAED,eAAO,MAAM,qBAAqB,EAAE,WAqKnC,CAAC"}
@@ -0,0 +1,224 @@
1
+ /**
2
+ * Applied case: the free ring-down of a damped resonator, read out over a
3
+ * finite record — the envelope and displacement at a chosen time, the
4
+ * linewidth, and what a record of length t_obs can resolve of it.
5
+ *
6
+ * The atlas holds the damped spring (`model-damped-spring`), its exact RLC
7
+ * equivalent (`ab-damped-rlc`) and its overdamped reduction
8
+ * (`ab-damped-massless`). This case evaluates the underdamped solution for a
9
+ * given f0 and Q, refuses it when the resonator is not underdamped, and checks
10
+ * the record length against the linewidth it is meant to resolve. The
11
+ * rectangular-window spectrum of the truncated ring-down is computed in
12
+ * closed form, near resonance, for comparison. Given the temperature and the
13
+ * mode's stiffness, it checks the envelope against the thermal motion.
14
+ *
15
+ * @module cases/damped-resonator
16
+ */
17
+ import { K_B_SI } from '../core/constants.js';
18
+ import { check, requirePositive } from './types.js';
19
+ const ID = 'case-damped-resonator';
20
+ /** Q floor for the single-Lorentzian (near-resonance) form of the spectrum. @internal */
21
+ export const MIN_Q_LORENTZIAN = 10;
22
+ /** (1/t_obs)/linewidth ceiling: the record resolves the line. @internal */
23
+ export const MAX_RESOLUTION_RATIO = 0.1;
24
+ /**
25
+ * √(k_BT/k)/A ceiling. Thermal motion of one mode is x = X cos ω_d t + Y sin ω_d t
26
+ * with ⟨X²⟩ = ⟨Y²⟩ = k_BT/k (equipartition), so the envelope of the ring-down
27
+ * plus it is Rician with ⟨A_obs²⟩ = A² + 2k_BT/k (Rice 1944); at the ceiling
28
+ * √(1 + 2·0.01) − 1 ≈ 0.0100.
29
+ * @internal
30
+ */
31
+ export const MAX_THERMAL_RATIO = 0.1;
32
+ /**
33
+ * FWHM in Hz of |∫₀ᵀ e^{−(α + iΔω)t} dt|², the near-resonance power spectrum of
34
+ * a ring-down x0 e^{−αt} cos(ω_d t) recorded for T. The negative-frequency
35
+ * pole is dropped, which is the Q ≫ 1 approximation. The peak is at Δω = 0:
36
+ * the integrand is positive, so |X(Δω)| ≤ X(0).
37
+ * @internal
38
+ */
39
+ export function windowedLinewidthHz(alpha, T) {
40
+ const oneMinusE = -Math.expm1(-alpha * T);
41
+ const E = 1 - oneMinusE;
42
+ // (1 − E)² + 4E sin²(ΔωT/2) is 1 − 2E cos(ΔωT) + E² without its cancellation near Δω = 0.
43
+ const power = (dw) => (oneMinusE ** 2 + 4 * E * Math.sin((dw * T) / 2) ** 2) / (alpha * alpha + dw * dw);
44
+ const half = power(0) / 2;
45
+ const h = (alpha + 1 / T) / 200;
46
+ let lo = 0;
47
+ let hi = h;
48
+ for (let k = 1; power(hi) > half; k++) {
49
+ if (k > 1e6)
50
+ throw new Error(`${ID}: no half-power point found (α = ${alpha}, T = ${T})`);
51
+ lo = hi;
52
+ hi += h;
53
+ }
54
+ for (let k = 0; k < 80; k++) {
55
+ const mid = (lo + hi) / 2;
56
+ if (power(mid) > half)
57
+ lo = mid;
58
+ else
59
+ hi = mid;
60
+ }
61
+ return (lo + hi) / 2 / Math.PI;
62
+ }
63
+ export const DAMPED_RESONATOR_CASE = {
64
+ id: ID,
65
+ title: 'Damped resonator ring-down (damping, finite observation time)',
66
+ parameters: [
67
+ { key: 'f0_Hz', quantity: 'natural frequency', symbol: 'f0', unit: 'Hz', meaning: 'undamped natural frequency ω0/2π = √(k/m)/2π, > 0' },
68
+ { key: 'Q', quantity: 'quality factor', symbol: 'Q', unit: '', meaning: 'Q = ω0 m/b (for an RLC: √(L/C)/R), > 0' },
69
+ { key: 'x0_m', quantity: 'initial displacement', symbol: 'x0', unit: 'm', meaning: 'displacement at release, from rest' },
70
+ { key: 't_s', quantity: 'read-out time', symbol: 't', unit: 's', meaning: 'time after release at which x and the envelope are read, ≥ 0' },
71
+ { key: 't_obs_s', quantity: 'record length', symbol: 't_obs', unit: 's', meaning: 'length of the recorded ring-down, starting at release, > 0' },
72
+ { key: 'T_K', quantity: 'temperature', symbol: 'T', unit: 'K', meaning: 'temperature of the damping bath, > 0 K; give with k_N_per_m for the thermal floor', temperature: 'absolute', optional: true },
73
+ {
74
+ key: 'k_N_per_m',
75
+ quantity: 'mode stiffness',
76
+ symbol: 'k',
77
+ unit: 'N/m',
78
+ meaning: 'effective stiffness of the mode at the read-out point, > 0 (for an RLC read as charge: 1/C in 1/F, not N/m); give with T_K',
79
+ optional: true,
80
+ },
81
+ ],
82
+ governing: {
83
+ parent: [
84
+ 'ρA ∂²w/∂t² + c ∂w/∂t + EI ∂⁴w/∂z⁴ = 0 with the structure\'s boundary conditions (e.g. a cantilever: a field w(z, t) with many modes)',
85
+ 'one mode, w = φ(z) x(t), read at one point: m x″ + b x′ + k x = 0 (model-damped-spring; for a circuit L q″ + R q′ + q/C = 0, ab-damped-rlc)',
86
+ ],
87
+ scalar: [
88
+ 'x(t) = x0 e^{−αt} [cos ω_d t + (α/ω_d) sin ω_d t], α = ω0/(2Q), ω_d = ω0 √(1 − 1/(4Q²)) (Q > 1/2)',
89
+ 'envelope x0 e^{−αt}/√(1 − 1/(4Q²)); linewidth Δf = f0/Q; resolution of a record 1/t_obs',
90
+ ],
91
+ distinction: 'The parent is a field w(z, t) with infinitely many modes and a mode shape; the scalar keeps one mode\'s amplitude ' +
92
+ 'x(t) at the read-out point, with all loss lumped into a viscous (velocity-proportional) Q. Dropped: the other modes ' +
93
+ 'and their coupling, the mode shape, and any frequency or amplitude dependence of the damping (structural damping ' +
94
+ 'gives a different Q(f)).',
95
+ },
96
+ observable: 'envelope_m',
97
+ outputs: [
98
+ { key: 'alpha_per_s', symbol: 'α', unit: 's^-1', meaning: 'amplitude decay rate ω0/(2Q) = b/(2m)' },
99
+ { key: 'tau_s', symbol: 'τ', unit: 's', meaning: 'amplitude ring-down time 1/α = Q/(πf0)' },
100
+ { key: 'linewidth_Hz', symbol: 'Δf', unit: 'Hz', meaning: 'f0/Q: FWHM of the velocity (absorbed-power) response, exact at any Q; the displacement response approaches it for Q ≫ 1' },
101
+ { key: 'f_d_Hz', symbol: 'f_d', unit: 'Hz', meaning: 'damped oscillation frequency f0 √(1 − 1/(4Q²))' },
102
+ { key: 'x_m', symbol: 'x(t)', unit: 'm', meaning: 'displacement at t, released from rest at x0' },
103
+ { key: 'envelope_m', symbol: 'A(t)', unit: 'm', meaning: 'ring-down envelope at t: the amplitude a peak-detecting read-out sees' },
104
+ { key: 'resolution_Hz', symbol: '1/t_obs', unit: 'Hz', meaning: 'frequency resolution of the record' },
105
+ { key: 'linewidth_windowed_Hz', symbol: 'Δf_T', unit: 'Hz', meaning: 'FWHM of the power spectrum of the truncated ring-down (rectangular window, near resonance)' },
106
+ { key: 'windowed_excess', symbol: 'Δf_T/Δf − 1', unit: '', meaning: 'how much the finite record broadens the measured line' },
107
+ { key: 'x_th_rms_m', symbol: '√⟨x²⟩_th', unit: 'm', meaning: 'thermal RMS displacement √(k_BT/k) of the mode (equipartition); null without T_K and k_N_per_m' },
108
+ {
109
+ key: 'envelope_rms_m',
110
+ symbol: '√⟨A²⟩',
111
+ unit: 'm',
112
+ meaning: 'RMS envelope with the thermal motion added: √(A² + 2k_BT/k), the Rice second moment; null without T_K and k_N_per_m',
113
+ },
114
+ ],
115
+ conditions: [
116
+ 'released from rest: x(0) = x0, x′(0) = 0; free ring-down, no drive after release',
117
+ 'linear restoring force: the amplitude is small enough that f0 does not depend on it (ax-cubic-spring-lc records why a hardening spring is not this model)',
118
+ 'the record starts at release and lasts t_obs; its spectrum is that of a rectangular window',
119
+ ],
120
+ comparison: {
121
+ reference: 'the linewidth an infinitely long record would show, f0/Q',
122
+ valueKey: 'linewidth_windowed_Hz',
123
+ referenceKey: 'linewidth_Hz',
124
+ deviationKey: 'windowed_excess',
125
+ method: 'closed-form transform of the truncated ring-down, half-power point by bisection',
126
+ },
127
+ notIncluded: [
128
+ 'the detector noise floor; and the thermal drive of the resonator unless T_K and k_N_per_m are given (its equilibrium amplitude √(k_BT/k) is the fluctuation–dissipation partner of its damping; compare case-resistor-noise)',
129
+ 'frequency drift of f0 over the record',
130
+ 'window shapes other than rectangular, and the negative-frequency image of the line (the Q ≫ 1 approximation)',
131
+ 'the other modes of the structure',
132
+ ],
133
+ measurement: [
134
+ 'ring-down: fit ln A(t) against t; the slope −α gives Q = πf0/α; compare the measured envelope at t with envelope_m',
135
+ 'spectrum: the FWHM of the recorded line is linewidth_windowed_Hz, which approaches linewidth_Hz only when the record resolves it',
136
+ 'for an RLC circuit read the capacitor voltage: f0 = 1/(2π√(LC)), Q = √(L/C)/R (ab-damped-rlc)',
137
+ ],
138
+ links: [
139
+ { id: 'model-damped-spring', role: 'm x″ + b x′ + k x = 0, the single-mode equation evaluated here' },
140
+ { id: 'ab-damped-rlc', role: 'the same equation for an RLC circuit, an exact equivalence' },
141
+ { id: 'ab-damped-massless', role: 'the overdamped reduction, for the regime where this case refuses (Q ≤ 1/2)' },
142
+ { id: 'ax-cubic-spring-lc', role: 'the refuted claim that a nonlinear (cubic) spring maps onto the linear circuit' },
143
+ ],
144
+ examples: {
145
+ valid: {
146
+ args: ['f0_Hz=1kHz', 'Q=1000', 'x0_m=1um', 't_s=0.1', 't_obs_s=20', 'T_K=300', 'k_N_per_m=1'],
147
+ note: 'a 1 kHz, Q = 1000 resonator (1 Hz line), 1 N/m at 300 K, read 0.1 s after release, recorded for 20 s',
148
+ fails: [],
149
+ },
150
+ failures: [
151
+ {
152
+ args: ['f0_Hz=1kHz', 'Q=1000', 'x0_m=1um', 't_s=0.1', 't_obs_s=1'],
153
+ note: 'the same resonator recorded for 1 s: the 1 Hz resolution cannot resolve the 1 Hz line',
154
+ fails: ['resolved'],
155
+ },
156
+ {
157
+ args: ['f0_Hz=1kHz', 'Q=0.3', 'x0_m=1um', 't_s=0.1', 't_obs_s=20'],
158
+ note: 'Q = 0.3 is overdamped: there is no ring-down, and the underdamped formulas are refused',
159
+ fails: ['underdamped', 'single-lorentzian'],
160
+ },
161
+ {
162
+ args: ['f0_Hz=1kHz', 'Q=1000', 'x0_m=100pm', 't_s=1', 't_obs_s=20', 'T_K=300', 'k_N_per_m=1'],
163
+ note: 'released from 100 pm and read after 1 s (≈ 3 ring-down times): the envelope, ≈ 4 pm, sits below the 64 pm thermal motion',
164
+ fails: ['above-thermal'],
165
+ },
166
+ ],
167
+ },
168
+ /** Evaluate the underdamped ring-down outputs and checks for the supplied resonator inputs. */
169
+ run(i) {
170
+ requirePositive(ID, i, ['f0_Hz', 'Q', 't_obs_s']);
171
+ const { f0_Hz: f0, Q, x0_m: x0, t_s: t, t_obs_s: tObs } = i;
172
+ if (!Number.isFinite(x0))
173
+ throw new Error(`${ID}: x0_m must be finite (got ${x0})`);
174
+ if (!Number.isFinite(t) || t < 0)
175
+ throw new Error(`${ID}: t_s must be a finite number ≥ 0 (got ${t})`);
176
+ const w0 = 2 * Math.PI * f0;
177
+ const alpha = w0 / (2 * Q);
178
+ const linewidth = f0 / Q;
179
+ const underdamped = Q > 0.5;
180
+ const root = underdamped ? Math.sqrt(1 - 1 / (4 * Q * Q)) : NaN;
181
+ const wd = w0 * root;
182
+ const decay = Math.exp(-alpha * t);
183
+ const windowed = underdamped ? windowedLinewidthHz(alpha, tObs) : null;
184
+ const envelope = underdamped ? (Math.abs(x0) * decay) / root : null;
185
+ const checks = [
186
+ check('underdamped', 'underdamped: the solution rings (Q > 1/2)', 'Q', Q, '>', 0.5, 'exact: at Q ≤ 1/2 the solution is a sum of real exponentials, with no ring-down, f_d or envelope'),
187
+ check('single-lorentzian', 'high Q: the line near f0 is one Lorentzian', 'Q', Q, '>=', MIN_Q_LORENTZIAN, 'chosen threshold for Q ≫ 1: the windowed spectrum drops the negative-frequency pole'),
188
+ check('resolved', 'the record resolves the line: 1/t_obs ≪ f0/Q', '(1/t_obs)/(f0/Q)', 1 / tObs / linewidth, '<=', MAX_RESOLUTION_RATIO, 'chosen threshold for ≪ 1; see windowed_excess for the broadening it allows'),
189
+ check('in-record', 'the read-out time lies inside the record', 't/t_obs', t / tObs, '<=', 1, 'exact: an envelope read after the record ends was not measured'),
190
+ ];
191
+ const unchecked = underdamped
192
+ ? ['the damping is viscous (velocity-proportional) and the same over the whole ring-down']
193
+ : ['for Q ≤ 1/2 the displacement is x0 (r₂e^{r₁t} − r₁e^{r₂t})/(r₂ − r₁) with real r₁, r₂; this case does not evaluate it'];
194
+ if ((i.T_K === undefined) !== (i.k_N_per_m === undefined))
195
+ throw new Error(`${ID}: give T_K and k_N_per_m together, or neither`);
196
+ let xTh = null;
197
+ if (i.T_K !== undefined) {
198
+ requirePositive(ID, i, ['T_K', 'k_N_per_m']);
199
+ xTh = Math.sqrt((K_B_SI * i.T_K) / i.k_N_per_m);
200
+ if (envelope !== null) {
201
+ checks.push(check('above-thermal', 'the ring-down stands above the thermal motion at t', '√(k_BT/k)/A(t)', xTh / envelope, '<=', MAX_THERMAL_RATIO, 'chosen threshold: the RMS envelope √(A² + 2k_BT/k) then exceeds A by ≤ 1%'));
202
+ }
203
+ unchecked.push('the thermal motion is in equilibrium with the damping bath at T and uncorrelated with the release; the read-out adds no noise of its own');
204
+ }
205
+ return {
206
+ outputs: {
207
+ alpha_per_s: alpha,
208
+ tau_s: 1 / alpha,
209
+ linewidth_Hz: linewidth,
210
+ f_d_Hz: underdamped ? f0 * root : null,
211
+ x_m: underdamped ? x0 * decay * (Math.cos(wd * t) + (alpha / wd) * Math.sin(wd * t)) : null,
212
+ envelope_m: envelope,
213
+ resolution_Hz: 1 / tObs,
214
+ linewidth_windowed_Hz: windowed,
215
+ windowed_excess: windowed === null ? null : windowed / linewidth - 1,
216
+ x_th_rms_m: xTh,
217
+ envelope_rms_m: xTh === null || envelope === null ? null : Math.sqrt(envelope * envelope + 2 * xTh * xTh),
218
+ },
219
+ checks,
220
+ unchecked,
221
+ };
222
+ },
223
+ };
224
+ //# sourceMappingURL=damped-resonator.js.map