universal-physics-tensor 11.0.0 → 12.0.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 (287) hide show
  1. package/README.md +36 -34
  2. package/data/applied-cases.json +1892 -0
  3. package/data/applied-cases.schema.json +194 -0
  4. package/data/atlas/atlas.json +21 -21
  5. package/data/atlas/atlas.jsonld +1 -1
  6. package/data/atlas/diffusion.json +5 -5
  7. package/data/atlas/oscillators.json +7 -7
  8. package/data/atlas/waves.json +11 -11
  9. package/data/bridge-catalog.json +20 -4
  10. package/data/units.json +6 -25
  11. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  12. package/dist/atlas/benchmark/stats.js +6 -20
  13. package/dist/atlas/benchmark/stats.js.map +1 -1
  14. package/dist/atlas/physjs-entries.generated.d.ts +13 -4
  15. package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
  16. package/dist/atlas/physjs-entries.generated.js +15 -4
  17. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  18. package/dist/atlas/physjs-reviewed.js +2 -2
  19. package/dist/atlas/physjs-reviewed.js.map +1 -1
  20. package/dist/cases/catalog-checks.d.ts +10 -0
  21. package/dist/cases/catalog-checks.d.ts.map +1 -0
  22. package/dist/cases/catalog-checks.js +241 -0
  23. package/dist/cases/catalog-checks.js.map +1 -0
  24. package/dist/cases/catalog.d.ts +83 -0
  25. package/dist/cases/catalog.d.ts.map +1 -0
  26. package/dist/cases/catalog.js +118 -0
  27. package/dist/cases/catalog.js.map +1 -0
  28. package/dist/cases/engine.d.ts +13 -0
  29. package/dist/cases/engine.d.ts.map +1 -0
  30. package/dist/cases/engine.js +179 -0
  31. package/dist/cases/engine.js.map +1 -0
  32. package/dist/cases/index.d.ts.map +1 -1
  33. package/dist/cases/index.js +5 -7
  34. package/dist/cases/index.js.map +1 -1
  35. package/dist/cases/methods.d.ts +215 -0
  36. package/dist/cases/methods.d.ts.map +1 -0
  37. package/dist/cases/methods.js +743 -0
  38. package/dist/cases/methods.js.map +1 -0
  39. package/dist/cases/types.d.ts +12 -0
  40. package/dist/cases/types.d.ts.map +1 -1
  41. package/dist/cases/types.js.map +1 -1
  42. package/dist/cli/args.d.ts +2 -0
  43. package/dist/cli/args.d.ts.map +1 -1
  44. package/dist/cli/args.js.map +1 -1
  45. package/dist/cli/command.d.ts +3 -0
  46. package/dist/cli/command.d.ts.map +1 -1
  47. package/dist/cli/command.js.map +1 -1
  48. package/dist/cli/commands/_discovery-opts.d.ts +1 -0
  49. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  50. package/dist/cli/commands/_discovery-opts.js +1 -0
  51. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  52. package/dist/cli/commands/discover.d.ts.map +1 -1
  53. package/dist/cli/commands/discover.js +116 -71
  54. package/dist/cli/commands/discover.js.map +1 -1
  55. package/dist/cli/commands/evaluate.js +2 -2
  56. package/dist/cli/commands/evaluate.js.map +1 -1
  57. package/dist/cli/commands/explain.d.ts.map +1 -1
  58. package/dist/cli/commands/explain.js +22 -2
  59. package/dist/cli/commands/explain.js.map +1 -1
  60. package/dist/cli/commands/ground.d.ts.map +1 -1
  61. package/dist/cli/commands/ground.js +6 -1
  62. package/dist/cli/commands/ground.js.map +1 -1
  63. package/dist/cli/commands/map.d.ts.map +1 -1
  64. package/dist/cli/commands/map.js +9 -6
  65. package/dist/cli/commands/map.js.map +1 -1
  66. package/dist/cli/determination.d.ts +1 -0
  67. package/dist/cli/determination.d.ts.map +1 -1
  68. package/dist/cli/determination.js.map +1 -1
  69. package/dist/cli/flag-help.d.ts +1 -0
  70. package/dist/cli/flag-help.d.ts.map +1 -1
  71. package/dist/cli/flag-help.js +1 -0
  72. package/dist/cli/flag-help.js.map +1 -1
  73. package/dist/cli/graphs.d.ts +2 -0
  74. package/dist/cli/graphs.d.ts.map +1 -1
  75. package/dist/cli/graphs.js +1 -0
  76. package/dist/cli/graphs.js.map +1 -1
  77. package/dist/cli/main.d.ts +1 -0
  78. package/dist/cli/main.d.ts.map +1 -1
  79. package/dist/cli/main.js +1 -0
  80. package/dist/cli/main.js.map +1 -1
  81. package/dist/cli/output.d.ts +8 -0
  82. package/dist/cli/output.d.ts.map +1 -1
  83. package/dist/cli/output.js +8 -0
  84. package/dist/cli/output.js.map +1 -1
  85. package/dist/cli/statuses.d.ts.map +1 -1
  86. package/dist/cli/statuses.js +12 -2
  87. package/dist/cli/statuses.js.map +1 -1
  88. package/dist/cli/version.d.ts +1 -0
  89. package/dist/cli/version.d.ts.map +1 -1
  90. package/dist/cli/version.js +1 -0
  91. package/dist/cli/version.js.map +1 -1
  92. package/dist/cli-api.d.ts +2 -0
  93. package/dist/cli-api.d.ts.map +1 -1
  94. package/dist/cli-api.js +2 -0
  95. package/dist/cli-api.js.map +1 -1
  96. package/dist/composition/canonical-graph.d.ts +2 -2
  97. package/dist/composition/canonical-graph.js +2 -2
  98. package/dist/composition/canonical-graph.js.map +1 -1
  99. package/dist/composition/consequence.d.ts +15 -5
  100. package/dist/composition/consequence.d.ts.map +1 -1
  101. package/dist/composition/consequence.js +6 -4
  102. package/dist/composition/consequence.js.map +1 -1
  103. package/dist/composition/discovery.d.ts +78 -14
  104. package/dist/composition/discovery.d.ts.map +1 -1
  105. package/dist/composition/discovery.js +73 -23
  106. package/dist/composition/discovery.js.map +1 -1
  107. package/dist/composition/expr-eval.d.ts +1 -1
  108. package/dist/composition/expr-eval.d.ts.map +1 -1
  109. package/dist/composition/expr-eval.js +4 -4
  110. package/dist/composition/expr-eval.js.map +1 -1
  111. package/dist/composition/expr-simplify.d.ts +10 -14
  112. package/dist/composition/expr-simplify.d.ts.map +1 -1
  113. package/dist/composition/expr-simplify.js +49 -52
  114. package/dist/composition/expr-simplify.js.map +1 -1
  115. package/dist/composition/grounding.d.ts.map +1 -1
  116. package/dist/composition/grounding.js +19 -7
  117. package/dist/composition/grounding.js.map +1 -1
  118. package/dist/composition/mathts-quiet.d.ts +4 -6
  119. package/dist/composition/mathts-quiet.d.ts.map +1 -1
  120. package/dist/composition/mathts-quiet.js +4 -14
  121. package/dist/composition/mathts-quiet.js.map +1 -1
  122. package/dist/composition/own-equation-magnitude.d.ts +95 -0
  123. package/dist/composition/own-equation-magnitude.d.ts.map +1 -0
  124. package/dist/composition/own-equation-magnitude.js +270 -0
  125. package/dist/composition/own-equation-magnitude.js.map +1 -0
  126. package/dist/composition/probe/backend-protocol.d.ts +3 -0
  127. package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
  128. package/dist/composition/probe/backend-protocol.js.map +1 -1
  129. package/dist/composition/probe/candidate-store.d.ts +1 -0
  130. package/dist/composition/probe/candidate-store.d.ts.map +1 -1
  131. package/dist/composition/probe/candidate-store.js +1 -0
  132. package/dist/composition/probe/candidate-store.js.map +1 -1
  133. package/dist/composition/probe/corpus.d.ts +4 -2
  134. package/dist/composition/probe/corpus.d.ts.map +1 -1
  135. package/dist/composition/probe/corpus.js +3 -3
  136. package/dist/composition/probe/corpus.js.map +1 -1
  137. package/dist/composition/probe/dataset.d.ts +1 -0
  138. package/dist/composition/probe/dataset.d.ts.map +1 -1
  139. package/dist/composition/probe/dataset.js.map +1 -1
  140. package/dist/composition/probe/experiment-design.d.ts +2 -0
  141. package/dist/composition/probe/experiment-design.d.ts.map +1 -1
  142. package/dist/composition/probe/experiment-design.js.map +1 -1
  143. package/dist/composition/probe/falsify.d.ts +2 -0
  144. package/dist/composition/probe/falsify.d.ts.map +1 -1
  145. package/dist/composition/probe/falsify.js.map +1 -1
  146. package/dist/composition/probe/fit.d.ts +1 -0
  147. package/dist/composition/probe/fit.d.ts.map +1 -1
  148. package/dist/composition/probe/fit.js.map +1 -1
  149. package/dist/composition/probe/generator.d.ts +3 -0
  150. package/dist/composition/probe/generator.d.ts.map +1 -1
  151. package/dist/composition/probe/generator.js +5 -6
  152. package/dist/composition/probe/generator.js.map +1 -1
  153. package/dist/composition/probe/limits.d.ts +1 -0
  154. package/dist/composition/probe/limits.d.ts.map +1 -1
  155. package/dist/composition/probe/limits.js.map +1 -1
  156. package/dist/composition/probe/pipeline.d.ts +5 -0
  157. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  158. package/dist/composition/probe/pipeline.js +64 -21
  159. package/dist/composition/probe/pipeline.js.map +1 -1
  160. package/dist/composition/probe/power-law.d.ts.map +1 -1
  161. package/dist/composition/probe/power-law.js +3 -7
  162. package/dist/composition/probe/power-law.js.map +1 -1
  163. package/dist/composition/probe/problem.d.ts +1 -0
  164. package/dist/composition/probe/problem.d.ts.map +1 -1
  165. package/dist/composition/probe/problem.js.map +1 -1
  166. package/dist/composition/probe/residual.d.ts +1 -0
  167. package/dist/composition/probe/residual.d.ts.map +1 -1
  168. package/dist/composition/probe/residual.js +1 -0
  169. package/dist/composition/probe/residual.js.map +1 -1
  170. package/dist/composition/probe/run-manifest.d.ts +1 -0
  171. package/dist/composition/probe/run-manifest.d.ts.map +1 -1
  172. package/dist/composition/probe/run-manifest.js.map +1 -1
  173. package/dist/composition/probe/scalar-search.d.ts +50 -0
  174. package/dist/composition/probe/scalar-search.d.ts.map +1 -0
  175. package/dist/composition/probe/scalar-search.js +169 -0
  176. package/dist/composition/probe/scalar-search.js.map +1 -0
  177. package/dist/composition/probe/scoring.d.ts +1 -0
  178. package/dist/composition/probe/scoring.d.ts.map +1 -1
  179. package/dist/composition/probe/scoring.js.map +1 -1
  180. package/dist/composition/probe/study.d.ts +2 -2
  181. package/dist/composition/probe/study.d.ts.map +1 -1
  182. package/dist/composition/probe/study.js +6 -10
  183. package/dist/composition/probe/study.js.map +1 -1
  184. package/dist/composition/probe/t-tail.d.ts +3 -4
  185. package/dist/composition/probe/t-tail.d.ts.map +1 -1
  186. package/dist/composition/probe/t-tail.js +7 -10
  187. package/dist/composition/probe/t-tail.js.map +1 -1
  188. package/dist/composition/proposed-bridges.d.ts +11 -2
  189. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  190. package/dist/composition/proposed-bridges.js +7 -5
  191. package/dist/composition/proposed-bridges.js.map +1 -1
  192. package/dist/composition/rational-exponent.d.ts +2 -2
  193. package/dist/composition/rational-exponent.d.ts.map +1 -1
  194. package/dist/composition/rational-exponent.js +4 -4
  195. package/dist/composition/rational-exponent.js.map +1 -1
  196. package/dist/composition/representative-values.d.ts.map +1 -1
  197. package/dist/composition/representative-values.js +6 -0
  198. package/dist/composition/representative-values.js.map +1 -1
  199. package/dist/composition/retrodiction.d.ts +15 -0
  200. package/dist/composition/retrodiction.d.ts.map +1 -1
  201. package/dist/composition/retrodiction.js +10 -3
  202. package/dist/composition/retrodiction.js.map +1 -1
  203. package/dist/composition/user-equation.d.ts +1 -0
  204. package/dist/composition/user-equation.d.ts.map +1 -1
  205. package/dist/composition/user-equation.js +1 -0
  206. package/dist/composition/user-equation.js.map +1 -1
  207. package/dist/core/constants.d.ts +12 -11
  208. package/dist/core/constants.d.ts.map +1 -1
  209. package/dist/core/constants.js +24 -21
  210. package/dist/core/constants.js.map +1 -1
  211. package/dist/diff/bridge-ast-gradient.d.ts +27 -23
  212. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  213. package/dist/diff/bridge-ast-gradient.js +75 -173
  214. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  215. package/dist/dimensional/ast-types.d.ts +15 -0
  216. package/dist/dimensional/ast-types.d.ts.map +1 -1
  217. package/dist/dimensional/ast-types.js.map +1 -1
  218. package/dist/dimensional/curvature-composite.d.ts +1 -1
  219. package/dist/dimensional/curvature-composite.js.map +1 -1
  220. package/dist/dimensional/exact-scale.d.ts +41 -11
  221. package/dist/dimensional/exact-scale.d.ts.map +1 -1
  222. package/dist/dimensional/exact-scale.js +115 -123
  223. package/dist/dimensional/exact-scale.js.map +1 -1
  224. package/dist/dimensional/mathts-unit-delegation.d.ts +29 -0
  225. package/dist/dimensional/mathts-unit-delegation.d.ts.map +1 -0
  226. package/dist/dimensional/mathts-unit-delegation.js +187 -0
  227. package/dist/dimensional/mathts-unit-delegation.js.map +1 -0
  228. package/dist/dimensional/mathts-unit-wrapper.d.ts +33 -0
  229. package/dist/dimensional/mathts-unit-wrapper.d.ts.map +1 -0
  230. package/dist/dimensional/mathts-unit-wrapper.js +190 -0
  231. package/dist/dimensional/mathts-unit-wrapper.js.map +1 -0
  232. package/dist/dimensional/scalar-lowering.d.ts +21 -0
  233. package/dist/dimensional/scalar-lowering.d.ts.map +1 -0
  234. package/dist/dimensional/scalar-lowering.js +45 -0
  235. package/dist/dimensional/scalar-lowering.js.map +1 -0
  236. package/dist/dimensional/unit-data.d.ts +5 -1
  237. package/dist/dimensional/unit-data.d.ts.map +1 -1
  238. package/dist/dimensional/unit-data.js +28 -4
  239. package/dist/dimensional/unit-data.js.map +1 -1
  240. package/dist/dimensional/units.d.ts +2 -0
  241. package/dist/dimensional/units.d.ts.map +1 -1
  242. package/dist/dimensional/units.js +59 -3
  243. package/dist/dimensional/units.js.map +1 -1
  244. package/dist/dimensional/validator.d.ts +2 -0
  245. package/dist/dimensional/validator.d.ts.map +1 -1
  246. package/dist/dimensional/validator.js.map +1 -1
  247. package/dist/index.js.map +1 -1
  248. package/dist/numerical/connection-lowering-helpers.d.ts +3 -1
  249. package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
  250. package/dist/numerical/connection-lowering-helpers.js +11 -15
  251. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  252. package/dist/numerical/pderiv.d.ts.map +1 -1
  253. package/dist/numerical/pderiv.js +2 -6
  254. package/dist/numerical/pderiv.js.map +1 -1
  255. package/dist/numerical/quadrature.js +3 -3
  256. package/dist/numerical/quadrature.js.map +1 -1
  257. package/dist/numerical/statistics.js +1 -1
  258. package/dist/numerical/statistics.js.map +1 -1
  259. package/dist/numerical/strides.d.ts +3 -2
  260. package/dist/numerical/strides.d.ts.map +1 -1
  261. package/dist/numerical/strides.js +3 -10
  262. package/dist/numerical/strides.js.map +1 -1
  263. package/package.json +9 -12
  264. package/dist/cases/brownian-sphere.d.ts +0 -68
  265. package/dist/cases/brownian-sphere.d.ts.map +0 -1
  266. package/dist/cases/brownian-sphere.js +0 -355
  267. package/dist/cases/brownian-sphere.js.map +0 -1
  268. package/dist/cases/damped-resonator.d.ts +0 -23
  269. package/dist/cases/damped-resonator.d.ts.map +0 -1
  270. package/dist/cases/damped-resonator.js +0 -221
  271. package/dist/cases/damped-resonator.js.map +0 -1
  272. package/dist/cases/kepler-rv.d.ts +0 -13
  273. package/dist/cases/kepler-rv.d.ts.map +0 -1
  274. package/dist/cases/kepler-rv.js +0 -173
  275. package/dist/cases/kepler-rv.js.map +0 -1
  276. package/dist/cases/lumped-cooling.d.ts +0 -51
  277. package/dist/cases/lumped-cooling.d.ts.map +0 -1
  278. package/dist/cases/lumped-cooling.js +0 -259
  279. package/dist/cases/lumped-cooling.js.map +0 -1
  280. package/dist/cases/resistor-noise.d.ts +0 -14
  281. package/dist/cases/resistor-noise.d.ts.map +0 -1
  282. package/dist/cases/resistor-noise.js +0 -215
  283. package/dist/cases/resistor-noise.js.map +0 -1
  284. package/dist/cases/skin-depth.d.ts +0 -17
  285. package/dist/cases/skin-depth.d.ts.map +0 -1
  286. package/dist/cases/skin-depth.js +0 -170
  287. package/dist/cases/skin-depth.js.map +0 -1
@@ -1,221 +0,0 @@
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 { findRoot } from '@danielsimonjr/mathts-functions';
18
- import { K_B_SI } from '../core/constants.js';
19
- import { check, requirePositive } from './types.js';
20
- const ID = 'case-damped-resonator';
21
- /** Q floor for the single-Lorentzian (near-resonance) form of the spectrum. @internal */
22
- export const MIN_Q_LORENTZIAN = 10;
23
- /** (1/t_obs)/linewidth ceiling: the record resolves the line. @internal */
24
- export const MAX_RESOLUTION_RATIO = 0.1;
25
- /**
26
- * √(k_BT/k)/A ceiling. Thermal motion of one mode is x = X cos ω_d t + Y sin ω_d t
27
- * with ⟨X²⟩ = ⟨Y²⟩ = k_BT/k (equipartition), so the envelope of the ring-down
28
- * plus it is Rician with ⟨A_obs²⟩ = A² + 2k_BT/k (Rice 1944); at the ceiling
29
- * √(1 + 2·0.01) − 1 ≈ 0.0100.
30
- * @internal
31
- */
32
- export const MAX_THERMAL_RATIO = 0.1;
33
- /**
34
- * FWHM in Hz of |∫₀ᵀ e^{−(α + iΔω)t} dt|², the near-resonance power spectrum of
35
- * a ring-down x0 e^{−αt} cos(ω_d t) recorded for T. The negative-frequency
36
- * pole is dropped, which is the Q ≫ 1 approximation. The peak is at Δω = 0:
37
- * the integrand is positive, so |X(Δω)| ≤ X(0).
38
- * @internal
39
- */
40
- export function windowedLinewidthHz(alpha, T) {
41
- const oneMinusE = -Math.expm1(-alpha * T);
42
- const E = 1 - oneMinusE;
43
- // (1 − E)² + 4E sin²(ΔωT/2) is 1 − 2E cos(ΔωT) + E² without its cancellation near Δω = 0.
44
- const power = (dw) => (oneMinusE ** 2 + 4 * E * Math.sin((dw * T) / 2) ** 2) / (alpha * alpha + dw * dw);
45
- const half = power(0) / 2;
46
- const h = (alpha + 1 / T) / 200;
47
- let lo = 0;
48
- let hi = h;
49
- for (let k = 1; power(hi) > half; k++) {
50
- if (k > 1e6)
51
- throw new Error(`${ID}: no half-power point found (α = ${alpha}, T = ${T})`);
52
- lo = hi;
53
- hi += h;
54
- }
55
- // The crossing inside the first step past half power, by MathTS `findRoot` (Brent) on the
56
- // order-one residual power/half − 1, to the bracket's floating-point resolution.
57
- const crossing = findRoot((dw) => power(dw) / half - 1, lo, hi, { tol: 4 * Number.EPSILON * hi, maxIter: 200 });
58
- return crossing / Math.PI;
59
- }
60
- export const DAMPED_RESONATOR_CASE = {
61
- id: ID,
62
- title: 'Damped resonator ring-down (damping, finite observation time)',
63
- parameters: [
64
- { key: 'f0_Hz', quantity: 'natural frequency', symbol: 'f0', unit: 'Hz', meaning: 'undamped natural frequency ω0/2π = √(k/m)/2π, > 0' },
65
- { key: 'Q', quantity: 'quality factor', symbol: 'Q', unit: '', meaning: 'Q = ω0 m/b (for an RLC: √(L/C)/R), > 0' },
66
- { key: 'x0_m', quantity: 'initial displacement', symbol: 'x0', unit: 'm', meaning: 'displacement at release, from rest' },
67
- { key: 't_s', quantity: 'read-out time', symbol: 't', unit: 's', meaning: 'time after release at which x and the envelope are read, ≥ 0' },
68
- { key: 't_obs_s', quantity: 'record length', symbol: 't_obs', unit: 's', meaning: 'length of the recorded ring-down, starting at release, > 0' },
69
- { 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 },
70
- {
71
- key: 'k_N_per_m',
72
- quantity: 'mode stiffness',
73
- symbol: 'k',
74
- unit: 'N/m',
75
- 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',
76
- optional: true,
77
- },
78
- ],
79
- governing: {
80
- parent: [
81
- 'ρ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)',
82
- '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)',
83
- ],
84
- scalar: [
85
- 'x(t) = x0 e^{−αt} [cos ω_d t + (α/ω_d) sin ω_d t], α = ω0/(2Q), ω_d = ω0 √(1 − 1/(4Q²)) (Q > 1/2)',
86
- 'envelope x0 e^{−αt}/√(1 − 1/(4Q²)); linewidth Δf = f0/Q; resolution of a record 1/t_obs',
87
- ],
88
- distinction: 'The parent is a field w(z, t) with infinitely many modes and a mode shape; the scalar keeps one mode\'s amplitude ' +
89
- 'x(t) at the read-out point, with all loss lumped into a viscous (velocity-proportional) Q. Dropped: the other modes ' +
90
- 'and their coupling, the mode shape, and any frequency or amplitude dependence of the damping (structural damping ' +
91
- 'gives a different Q(f)).',
92
- },
93
- observable: 'envelope_m',
94
- outputs: [
95
- { key: 'alpha_per_s', symbol: 'α', unit: 's^-1', meaning: 'amplitude decay rate ω0/(2Q) = b/(2m)' },
96
- { key: 'tau_s', symbol: 'τ', unit: 's', meaning: 'amplitude ring-down time 1/α = Q/(πf0)' },
97
- { 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' },
98
- { key: 'f_d_Hz', symbol: 'f_d', unit: 'Hz', meaning: 'damped oscillation frequency f0 √(1 − 1/(4Q²))' },
99
- { key: 'x_m', symbol: 'x(t)', unit: 'm', meaning: 'displacement at t, released from rest at x0' },
100
- { key: 'envelope_m', symbol: 'A(t)', unit: 'm', meaning: 'ring-down envelope at t: the amplitude a peak-detecting read-out sees' },
101
- { key: 'resolution_Hz', symbol: '1/t_obs', unit: 'Hz', meaning: 'frequency resolution of the record' },
102
- { key: 'linewidth_windowed_Hz', symbol: 'Δf_T', unit: 'Hz', meaning: 'FWHM of the power spectrum of the truncated ring-down (rectangular window, near resonance)' },
103
- { key: 'windowed_excess', symbol: 'Δf_T/Δf − 1', unit: '', meaning: 'how much the finite record broadens the measured line' },
104
- { key: 'x_th_rms_m', symbol: '√⟨x²⟩_th', unit: 'm', meaning: 'thermal RMS displacement √(k_BT/k) of the mode (equipartition); not defined without T_K and k_N_per_m' },
105
- {
106
- key: 'envelope_rms_m',
107
- symbol: '√⟨A²⟩',
108
- unit: 'm',
109
- meaning: 'RMS envelope with the thermal motion added: √(A² + 2k_BT/k), the Rice second moment; not defined without T_K and k_N_per_m',
110
- },
111
- ],
112
- conditions: [
113
- 'released from rest: x(0) = x0, x′(0) = 0; free ring-down, no drive after release',
114
- '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)',
115
- 'the record starts at release and lasts t_obs; its spectrum is that of a rectangular window',
116
- ],
117
- comparison: {
118
- reference: 'the linewidth an infinitely long record would show, f0/Q',
119
- valueKey: 'linewidth_windowed_Hz',
120
- referenceKey: 'linewidth_Hz',
121
- deviationKey: 'windowed_excess',
122
- method: 'closed-form transform of the truncated ring-down, half-power point by MathTS findRoot (Brent) inside the first step past half power',
123
- },
124
- notIncluded: [
125
- '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)',
126
- 'frequency drift of f0 over the record',
127
- 'window shapes other than rectangular, and the negative-frequency image of the line (the Q ≫ 1 approximation)',
128
- 'the other modes of the structure',
129
- ],
130
- measurement: [
131
- 'ring-down: fit ln A(t) against t; the slope −α gives Q = πf0/α; compare the measured envelope at t with envelope_m',
132
- 'spectrum: the FWHM of the recorded line is linewidth_windowed_Hz, which approaches linewidth_Hz only when the record resolves it',
133
- 'for an RLC circuit read the capacitor voltage: f0 = 1/(2π√(LC)), Q = √(L/C)/R (ab-damped-rlc)',
134
- ],
135
- links: [
136
- { id: 'model-damped-spring', role: 'm x″ + b x′ + k x = 0, the single-mode equation evaluated here' },
137
- { id: 'ab-damped-rlc', role: 'the same equation for an RLC circuit, an exact equivalence' },
138
- { id: 'ab-damped-massless', role: 'the overdamped reduction, for the regime where this case refuses (Q ≤ 1/2)' },
139
- { id: 'ax-cubic-spring-lc', role: 'the refuted claim that a nonlinear (cubic) spring maps onto the linear circuit' },
140
- ],
141
- examples: {
142
- valid: {
143
- 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'],
144
- 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',
145
- fails: [],
146
- },
147
- failures: [
148
- {
149
- args: ['f0_Hz=1kHz', 'Q=1000', 'x0_m=1um', 't_s=0.1', 't_obs_s=1'],
150
- note: 'the same resonator recorded for 1 s: the 1 Hz resolution cannot resolve the 1 Hz line',
151
- fails: ['resolved'],
152
- },
153
- {
154
- args: ['f0_Hz=1kHz', 'Q=0.3', 'x0_m=1um', 't_s=0.1', 't_obs_s=20'],
155
- note: 'Q = 0.3 is overdamped: there is no ring-down, and the underdamped formulas are refused',
156
- fails: ['underdamped', 'single-lorentzian'],
157
- },
158
- {
159
- args: ['f0_Hz=1kHz', 'Q=1000', 'x0_m=100pm', 't_s=1', 't_obs_s=20', 'T_K=300', 'k_N_per_m=1'],
160
- 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',
161
- fails: ['above-thermal'],
162
- },
163
- ],
164
- },
165
- /** Evaluate the underdamped ring-down outputs and checks for the supplied resonator inputs. */
166
- run(i) {
167
- requirePositive(ID, i, ['f0_Hz', 'Q', 't_obs_s']);
168
- const { f0_Hz: f0, Q, x0_m: x0, t_s: t, t_obs_s: tObs } = i;
169
- if (!Number.isFinite(x0))
170
- throw new Error(`${ID}: x0_m must be finite (got ${x0})`);
171
- if (!Number.isFinite(t) || t < 0)
172
- throw new Error(`${ID}: t_s must be a finite number ≥ 0 (got ${t})`);
173
- const w0 = 2 * Math.PI * f0;
174
- const alpha = w0 / (2 * Q);
175
- const linewidth = f0 / Q;
176
- const underdamped = Q > 0.5;
177
- const root = underdamped ? Math.sqrt(1 - 1 / (4 * Q * Q)) : NaN;
178
- const wd = w0 * root;
179
- const decay = Math.exp(-alpha * t);
180
- const windowed = underdamped ? windowedLinewidthHz(alpha, tObs) : null;
181
- const envelope = underdamped ? (Math.abs(x0) * decay) / root : null;
182
- const checks = [
183
- 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'),
184
- 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'),
185
- 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'),
186
- 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'),
187
- ];
188
- const unchecked = underdamped
189
- ? ['the damping is viscous (velocity-proportional) and the same over the whole ring-down']
190
- : ['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'];
191
- if ((i.T_K === undefined) !== (i.k_N_per_m === undefined))
192
- throw new Error(`${ID}: give T_K and k_N_per_m together, or neither`);
193
- let xTh = null;
194
- if (i.T_K !== undefined) {
195
- requirePositive(ID, i, ['T_K', 'k_N_per_m']);
196
- xTh = Math.sqrt((K_B_SI * i.T_K) / i.k_N_per_m);
197
- if (envelope !== null) {
198
- 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%'));
199
- }
200
- 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');
201
- }
202
- return {
203
- outputs: {
204
- alpha_per_s: alpha,
205
- tau_s: 1 / alpha,
206
- linewidth_Hz: linewidth,
207
- f_d_Hz: underdamped ? f0 * root : null,
208
- x_m: underdamped ? x0 * decay * (Math.cos(wd * t) + (alpha / wd) * Math.sin(wd * t)) : null,
209
- envelope_m: envelope,
210
- resolution_Hz: 1 / tObs,
211
- linewidth_windowed_Hz: windowed,
212
- windowed_excess: windowed === null ? null : windowed / linewidth - 1,
213
- x_th_rms_m: xTh,
214
- envelope_rms_m: xTh === null || envelope === null ? null : Math.sqrt(envelope * envelope + 2 * xTh * xTh),
215
- },
216
- checks,
217
- unchecked,
218
- };
219
- },
220
- };
221
- //# sourceMappingURL=damped-resonator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"damped-resonator.js","sourceRoot":"","sources":["../../src/cases/damped-resonator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,eAAe,EAAoB,MAAM,YAAY,CAAC;AAEtE,MAAM,EAAE,GAAG,uBAAuB,CAAC;AAEnC,yFAAyF;AACzF,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa,EAAE,CAAS;IAC1D,MAAM,SAAS,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAC1C,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACxB,0FAA0F;IAC1F,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EA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,MAAM;YACN,SAAS;SACV,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["/**\n * Applied case: the free ring-down of a damped resonator, read out over a\n * finite record — the envelope and displacement at a chosen time, the\n * linewidth, and what a record of length t_obs can resolve of it.\n *\n * The atlas holds the damped spring (`model-damped-spring`), its exact RLC\n * equivalent (`ab-damped-rlc`) and its overdamped reduction\n * (`ab-damped-massless`). This case evaluates the underdamped solution for a\n * given f0 and Q, refuses it when the resonator is not underdamped, and checks\n * the record length against the linewidth it is meant to resolve. The\n * rectangular-window spectrum of the truncated ring-down is computed in\n * closed form, near resonance, for comparison. Given the temperature and the\n * mode's stiffness, it checks the envelope against the thermal motion.\n *\n * @module cases/damped-resonator\n */\nimport { findRoot } from '@danielsimonjr/mathts-functions';\nimport { K_B_SI } from '../core/constants.js';\nimport { check, requirePositive, type AppliedCase } from './types.js';\n\nconst ID = 'case-damped-resonator';\n\n/** Q floor for the single-Lorentzian (near-resonance) form of the spectrum. @internal */\nexport const MIN_Q_LORENTZIAN = 10;\n\n/** (1/t_obs)/linewidth ceiling: the record resolves the line. @internal */\nexport const MAX_RESOLUTION_RATIO = 0.1;\n\n/**\n * √(k_BT/k)/A ceiling. Thermal motion of one mode is x = X cos ω_d t + Y sin ω_d t\n * with ⟨X²⟩ = ⟨Y²⟩ = k_BT/k (equipartition), so the envelope of the ring-down\n * plus it is Rician with ⟨A_obs²⟩ = A² + 2k_BT/k (Rice 1944); at the ceiling\n * √(1 + 2·0.01) − 1 ≈ 0.0100.\n * @internal\n */\nexport const MAX_THERMAL_RATIO = 0.1;\n\n/**\n * FWHM in Hz of |∫₀ᵀ e^{−(α + iΔω)t} dt|², the near-resonance power spectrum of\n * a ring-down x0 e^{−αt} cos(ω_d t) recorded for T. The negative-frequency\n * pole is dropped, which is the Q ≫ 1 approximation. The peak is at Δω = 0:\n * the integrand is positive, so |X(Δω)| ≤ X(0).\n * @internal\n */\nexport function windowedLinewidthHz(alpha: number, T: number): number {\n const oneMinusE = -Math.expm1(-alpha * T);\n const E = 1 - oneMinusE;\n // (1 − E)² + 4E sin²(ΔωT/2) is 1 − 2E cos(ΔωT) + E² without its cancellation near Δω = 0.\n const power = (dw: number) => (oneMinusE ** 2 + 4 * E * Math.sin((dw * T) / 2) ** 2) / (alpha * alpha + dw * dw);\n const half = power(0) / 2;\n const h = (alpha + 1 / T) / 200;\n let lo = 0;\n let hi = h;\n for (let k = 1; power(hi) > half; k++) {\n if (k > 1e6) throw new Error(`${ID}: no half-power point found (α = ${alpha}, T = ${T})`);\n lo = hi;\n hi += h;\n }\n // The crossing inside the first step past half power, by MathTS `findRoot` (Brent) on the\n // order-one residual power/half − 1, to the bracket's floating-point resolution.\n const crossing = findRoot((dw) => power(dw) / half - 1, lo, hi, { tol: 4 * Number.EPSILON * hi, maxIter: 200 });\n return crossing / Math.PI;\n}\n\nexport const DAMPED_RESONATOR_CASE: AppliedCase = {\n id: ID,\n title: 'Damped resonator ring-down (damping, finite observation time)',\n parameters: [\n { key: 'f0_Hz', quantity: 'natural frequency', symbol: 'f0', unit: 'Hz', meaning: 'undamped natural frequency ω0/2π = √(k/m)/2π, > 0' },\n { key: 'Q', quantity: 'quality factor', symbol: 'Q', unit: '', meaning: 'Q = ω0 m/b (for an RLC: √(L/C)/R), > 0' },\n { key: 'x0_m', quantity: 'initial displacement', symbol: 'x0', unit: 'm', meaning: 'displacement at release, from rest' },\n { key: 't_s', quantity: 'read-out time', symbol: 't', unit: 's', meaning: 'time after release at which x and the envelope are read, ≥ 0' },\n { key: 't_obs_s', quantity: 'record length', symbol: 't_obs', unit: 's', meaning: 'length of the recorded ring-down, starting at release, > 0' },\n { 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 },\n {\n key: 'k_N_per_m',\n quantity: 'mode stiffness',\n symbol: 'k',\n unit: 'N/m',\n 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',\n optional: true,\n },\n ],\n governing: {\n parent: [\n 'ρ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)',\n '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)',\n ],\n scalar: [\n 'x(t) = x0 e^{−αt} [cos ω_d t + (α/ω_d) sin ω_d t], α = ω0/(2Q), ω_d = ω0 √(1 − 1/(4Q²)) (Q > 1/2)',\n 'envelope x0 e^{−αt}/√(1 − 1/(4Q²)); linewidth Δf = f0/Q; resolution of a record 1/t_obs',\n ],\n distinction:\n 'The parent is a field w(z, t) with infinitely many modes and a mode shape; the scalar keeps one mode\\'s amplitude ' +\n 'x(t) at the read-out point, with all loss lumped into a viscous (velocity-proportional) Q. Dropped: the other modes ' +\n 'and their coupling, the mode shape, and any frequency or amplitude dependence of the damping (structural damping ' +\n 'gives a different Q(f)).',\n },\n observable: 'envelope_m',\n outputs: [\n { key: 'alpha_per_s', symbol: 'α', unit: 's^-1', meaning: 'amplitude decay rate ω0/(2Q) = b/(2m)' },\n { key: 'tau_s', symbol: 'τ', unit: 's', meaning: 'amplitude ring-down time 1/α = Q/(πf0)' },\n { 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' },\n { key: 'f_d_Hz', symbol: 'f_d', unit: 'Hz', meaning: 'damped oscillation frequency f0 √(1 − 1/(4Q²))' },\n { key: 'x_m', symbol: 'x(t)', unit: 'm', meaning: 'displacement at t, released from rest at x0' },\n { key: 'envelope_m', symbol: 'A(t)', unit: 'm', meaning: 'ring-down envelope at t: the amplitude a peak-detecting read-out sees' },\n { key: 'resolution_Hz', symbol: '1/t_obs', unit: 'Hz', meaning: 'frequency resolution of the record' },\n { key: 'linewidth_windowed_Hz', symbol: 'Δf_T', unit: 'Hz', meaning: 'FWHM of the power spectrum of the truncated ring-down (rectangular window, near resonance)' },\n { key: 'windowed_excess', symbol: 'Δf_T/Δf − 1', unit: '', meaning: 'how much the finite record broadens the measured line' },\n { key: 'x_th_rms_m', symbol: '√⟨x²⟩_th', unit: 'm', meaning: 'thermal RMS displacement √(k_BT/k) of the mode (equipartition); not defined without T_K and k_N_per_m' },\n {\n key: 'envelope_rms_m',\n symbol: '√⟨A²⟩',\n unit: 'm',\n meaning: 'RMS envelope with the thermal motion added: √(A² + 2k_BT/k), the Rice second moment; not defined without T_K and k_N_per_m',\n },\n ],\n conditions: [\n 'released from rest: x(0) = x0, x′(0) = 0; free ring-down, no drive after release',\n '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)',\n 'the record starts at release and lasts t_obs; its spectrum is that of a rectangular window',\n ],\n comparison: {\n reference: 'the linewidth an infinitely long record would show, f0/Q',\n valueKey: 'linewidth_windowed_Hz',\n referenceKey: 'linewidth_Hz',\n deviationKey: 'windowed_excess',\n method: 'closed-form transform of the truncated ring-down, half-power point by MathTS findRoot (Brent) inside the first step past half power',\n },\n notIncluded: [\n '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)',\n 'frequency drift of f0 over the record',\n 'window shapes other than rectangular, and the negative-frequency image of the line (the Q ≫ 1 approximation)',\n 'the other modes of the structure',\n ],\n measurement: [\n 'ring-down: fit ln A(t) against t; the slope −α gives Q = πf0/α; compare the measured envelope at t with envelope_m',\n 'spectrum: the FWHM of the recorded line is linewidth_windowed_Hz, which approaches linewidth_Hz only when the record resolves it',\n 'for an RLC circuit read the capacitor voltage: f0 = 1/(2π√(LC)), Q = √(L/C)/R (ab-damped-rlc)',\n ],\n links: [\n { id: 'model-damped-spring', role: 'm x″ + b x′ + k x = 0, the single-mode equation evaluated here' },\n { id: 'ab-damped-rlc', role: 'the same equation for an RLC circuit, an exact equivalence' },\n { id: 'ab-damped-massless', role: 'the overdamped reduction, for the regime where this case refuses (Q ≤ 1/2)' },\n { id: 'ax-cubic-spring-lc', role: 'the refuted claim that a nonlinear (cubic) spring maps onto the linear circuit' },\n ],\n examples: {\n valid: {\n 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'],\n 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',\n fails: [],\n },\n failures: [\n {\n args: ['f0_Hz=1kHz', 'Q=1000', 'x0_m=1um', 't_s=0.1', 't_obs_s=1'],\n note: 'the same resonator recorded for 1 s: the 1 Hz resolution cannot resolve the 1 Hz line',\n fails: ['resolved'],\n },\n {\n args: ['f0_Hz=1kHz', 'Q=0.3', 'x0_m=1um', 't_s=0.1', 't_obs_s=20'],\n note: 'Q = 0.3 is overdamped: there is no ring-down, and the underdamped formulas are refused',\n fails: ['underdamped', 'single-lorentzian'],\n },\n {\n args: ['f0_Hz=1kHz', 'Q=1000', 'x0_m=100pm', 't_s=1', 't_obs_s=20', 'T_K=300', 'k_N_per_m=1'],\n 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',\n fails: ['above-thermal'],\n },\n ],\n },\n /** Evaluate the underdamped ring-down outputs and checks for the supplied resonator inputs. */\n run(i) {\n requirePositive(ID, i, ['f0_Hz', 'Q', 't_obs_s']);\n const { f0_Hz: f0, Q, x0_m: x0, t_s: t, t_obs_s: tObs } = i as Record<string, number>;\n if (!Number.isFinite(x0)) throw new Error(`${ID}: x0_m must be finite (got ${x0})`);\n if (!Number.isFinite(t) || t < 0) throw new Error(`${ID}: t_s must be a finite number ≥ 0 (got ${t})`);\n const w0 = 2 * Math.PI * f0;\n const alpha = w0 / (2 * Q);\n const linewidth = f0 / Q;\n const underdamped = Q > 0.5;\n const root = underdamped ? Math.sqrt(1 - 1 / (4 * Q * Q)) : NaN;\n const wd = w0 * root;\n const decay = Math.exp(-alpha * t);\n const windowed = underdamped ? windowedLinewidthHz(alpha, tObs) : null;\n const envelope = underdamped ? (Math.abs(x0) * decay) / root : null;\n const checks = [\n check('underdamped', 'underdamped: the solution rings (Q > 1/2)', 'Q', Q, '>', 0.5,\n 'exact: at Q ≤ 1/2 the solution is a sum of real exponentials, with no ring-down, f_d or envelope'),\n check('single-lorentzian', 'high Q: the line near f0 is one Lorentzian', 'Q', Q, '>=', MIN_Q_LORENTZIAN,\n 'chosen threshold for Q ≫ 1: the windowed spectrum drops the negative-frequency pole'),\n check('resolved', 'the record resolves the line: 1/t_obs ≪ f0/Q', '(1/t_obs)/(f0/Q)', 1 / tObs / linewidth, '<=', MAX_RESOLUTION_RATIO,\n 'chosen threshold for ≪ 1; see windowed_excess for the broadening it allows'),\n check('in-record', 'the read-out time lies inside the record', 't/t_obs', t / tObs, '<=', 1,\n 'exact: an envelope read after the record ends was not measured'),\n ];\n const unchecked = underdamped\n ? ['the damping is viscous (velocity-proportional) and the same over the whole ring-down']\n : ['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'];\n if ((i.T_K === undefined) !== (i.k_N_per_m === undefined)) throw new Error(`${ID}: give T_K and k_N_per_m together, or neither`);\n let xTh: number | null = null;\n if (i.T_K !== undefined) {\n requirePositive(ID, i, ['T_K', 'k_N_per_m']);\n xTh = Math.sqrt((K_B_SI * i.T_K) / i.k_N_per_m!);\n if (envelope !== null) {\n checks.push(\n check('above-thermal', 'the ring-down stands above the thermal motion at t', '√(k_BT/k)/A(t)', xTh / envelope, '<=', MAX_THERMAL_RATIO,\n 'chosen threshold: the RMS envelope √(A² + 2k_BT/k) then exceeds A by ≤ 1%'),\n );\n }\n 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');\n }\n return {\n outputs: {\n alpha_per_s: alpha,\n tau_s: 1 / alpha,\n linewidth_Hz: linewidth,\n f_d_Hz: underdamped ? f0 * root : null,\n x_m: underdamped ? x0 * decay * (Math.cos(wd * t) + (alpha / wd) * Math.sin(wd * t)) : null,\n envelope_m: envelope,\n resolution_Hz: 1 / tObs,\n linewidth_windowed_Hz: windowed,\n windowed_excess: windowed === null ? null : windowed / linewidth - 1,\n x_th_rms_m: xTh,\n envelope_rms_m: xTh === null || envelope === null ? null : Math.sqrt(envelope * envelope + 2 * xTh * xTh),\n },\n checks,\n unchecked,\n };\n },\n};\n"]}
@@ -1,13 +0,0 @@
1
- import { type AppliedCase } from './types.js';
2
- /** The Julian year, the year BE-52 takes (s): the unit table's `julian_year` row (`yr`). @internal */
3
- export declare const JULIAN_YEAR_S: number;
4
- /** m_p/M_* ceiling: the test-mass K then exceeds the two-body K by (1 + q)^{2/3} − 1 ≤ 0.67%. @internal */
5
- export declare const MAX_MASS_RATIO = 0.01;
6
- /** Ceiling on the stellar radius over the periastron separation, for point masses. @internal */
7
- export declare const MAX_RADIUS_RATIO = 0.1;
8
- /** G(M_* + m_p)/(c² a) ceiling for Newtonian gravity. @internal */
9
- export declare const MAX_WEAK_FIELD = 0.0001;
10
- /** e·Δω accumulated over the record (rad) ceiling for a fixed ellipse. @internal */
11
- export declare const MAX_APSIDAL_MISFIT = 0.01;
12
- export declare const KEPLER_RV_CASE: AppliedCase;
13
- //# sourceMappingURL=kepler-rv.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kepler-rv.d.ts","sourceRoot":"","sources":["../../src/cases/kepler-rv.ts"],"names":[],"mappings":"AAqBA,OAAO,EAA0B,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAItE,sGAAsG;AACtG,eAAO,MAAM,aAAa,QAAkC,CAAC;AAE7D,2GAA2G;AAC3G,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,mEAAmE;AACnE,eAAO,MAAM,cAAc,SAAO,CAAC;AAEnC,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,eAAO,MAAM,cAAc,EAAE,WA4I5B,CAAC"}
@@ -1,173 +0,0 @@
1
- /**
2
- * Applied case: the radial-velocity semi-amplitude of a star orbited by a
3
- * companion — what a spectrograph reads as the star's reflex motion, from the
4
- * two masses, the period, the eccentricity and the inclination.
5
- *
6
- * The scalar is the test-mass form of the Keplerian RV curve used to infer
7
- * m_p sin i (Lovis & Fischer, "Radial Velocity Techniques for Exoplanets", in
8
- * Seager (ed.), Exoplanets, 2010, eq. 1; Murray & Dermott, Solar System
9
- * Dynamics, 1999, §2.7). The parent is the two-body problem of two extended
10
- * bodies in general relativity. The case compares the test-mass K with the
11
- * exact Newtonian two-body K, and checks the three premises that make a fixed
12
- * Keplerian ellipse the right curve: a companion light beside the star, point
13
- * masses (no tides), and a weak field whose apsidal advance (BE-52, with the
14
- * total mass; Robertson 1938) does not reshape the curve over the record.
15
- *
16
- * @module cases/kepler-rv
17
- */
18
- import { C_SI, G_SI } from '../core/constants.js';
19
- import { convertValue } from '../dimensional/units.js';
20
- import { catalogRelations } from '../bridges/catalog-load.js';
21
- import { evaluateCatalogRelation } from '../bridges/relation-eval.js';
22
- import { check, requirePositive } from './types.js';
23
- const ID = 'case-kepler-rv';
24
- /** The Julian year, the year BE-52 takes (s): the unit table's `julian_year` row (`yr`). @internal */
25
- export const JULIAN_YEAR_S = convertValue('1 yr', 's').value;
26
- /** m_p/M_* ceiling: the test-mass K then exceeds the two-body K by (1 + q)^{2/3} − 1 ≤ 0.67%. @internal */
27
- export const MAX_MASS_RATIO = 0.01;
28
- /** Ceiling on the stellar radius over the periastron separation, for point masses. @internal */
29
- export const MAX_RADIUS_RATIO = 0.1;
30
- /** G(M_* + m_p)/(c² a) ceiling for Newtonian gravity. @internal */
31
- export const MAX_WEAK_FIELD = 1e-4;
32
- /** e·Δω accumulated over the record (rad) ceiling for a fixed ellipse. @internal */
33
- export const MAX_APSIDAL_MISFIT = 0.01;
34
- export const KEPLER_RV_CASE = {
35
- id: ID,
36
- title: 'Radial-velocity semi-amplitude of a star with a companion (mass ratio, tides, GR apsidal advance)',
37
- parameters: [
38
- { key: 'M_star_kg', quantity: 'stellar mass', symbol: 'M_*', unit: 'kg', meaning: 'mass of the star whose radial velocity is measured (1Msun = 1.989e30 kg), > 0' },
39
- { key: 'm_p_kg', quantity: 'companion mass', symbol: 'm_p', unit: 'kg', meaning: 'true mass of the companion (Jupiter ≈ 1.898e27 kg), > 0' },
40
- { key: 'P_s', quantity: 'orbital period', symbol: 'P', unit: 's', meaning: 'the orbital period the RV curve repeats with, > 0' },
41
- { key: 'eccentricity', quantity: 'eccentricity', symbol: 'e', unit: '', meaning: 'orbital eccentricity e, 0 ≤ e < 1 (a bare e is the elementary charge, so the key is spelled out)' },
42
- { key: 'sin_i', quantity: 'sine of the inclination', symbol: 'sin i', unit: '', meaning: 'sin of the angle between the orbit normal and the line of sight, 0 < sin i ≤ 1 (1 is edge-on)' },
43
- { key: 'R_star_m', quantity: 'stellar radius', symbol: 'R_*', unit: 'm', meaning: 'radius of the star (the Sun ≈ 6.957e8 m), > 0' },
44
- { key: 'T_obs_s', quantity: 'observing baseline', symbol: 'T_obs', unit: 's', meaning: 'time span of the RV record fitted with one fixed ellipse, > 0' },
45
- ],
46
- governing: {
47
- parent: [
48
- 'r̈ = −G(M_* + m_p) r/r³ + O(G(M_* + m_p)/(c² r)) · (G(M_* + m_p)/r²) (relative orbit, Newtonian term plus the 1PN Einstein–Infeld–Hoffmann terms)',
49
- 'M_* r_* + m_p r_p = 0 about the barycentre; the measured v_r is the line-of-sight component of ṙ_*',
50
- 'extended bodies: each is a point mass only if spherical and undeformed; tides and spin add quadrupole terms ∝ (R/r)²',
51
- ],
52
- scalar: [
53
- 'K = (2πG/P)^{1/3} m_p sin i / M_*^{2/3} / √(1 − e²) (test-mass form, m_p ≪ M_*)',
54
- 'v_r(t) = K [cos(ν(t) + ω) + e cos ω], ω fixed over the record',
55
- 'a³ = G(M_* + m_p) P²/(4π²) (Kepler III for the relative orbit; CE-kepler-third)',
56
- ],
57
- distinction: 'The parent is a coupled vector problem for two finite, deformable bodies in curved spacetime; the scalar keeps one ' +
58
- 'number K for a fixed Keplerian ellipse of the star about the barycentre and puts the whole mass in the star. Dropped: ' +
59
- 'the companion\'s share of the total mass (O(q)), the apsidal advance and the other 1PN terms (O(GM/(c²a))), and ' +
60
- 'the tidal and rotational quadrupoles (O((R_*/r)²)).',
61
- },
62
- observable: 'K_m_per_s',
63
- outputs: [
64
- { key: 'q', symbol: 'q', unit: '', meaning: 'mass ratio m_p/M_*' },
65
- { key: 'a_m', symbol: 'a', unit: 'm', meaning: 'semi-major axis of the relative orbit, from Kepler III with the total mass' },
66
- { key: 'a_star_m', symbol: 'a_*', unit: 'm', meaning: 'semi-major axis of the star\'s own orbit about the barycentre, a m_p/(M_* + m_p)' },
67
- { key: 'K_m_per_s', symbol: 'K', unit: 'm/s', meaning: 'RV semi-amplitude of the star, test-mass form (the scalar result)' },
68
- { key: 'K_two_body_m_per_s', symbol: 'K_2b', unit: 'm/s', meaning: 'the exact Newtonian two-body semi-amplitude (2πG/P)^{1/3} m_p sin i/(M_* + m_p)^{2/3}/√(1 − e²)' },
69
- { key: 'two_body_deviation', symbol: 'K/K_2b − 1', unit: '', meaning: 'relative excess of the test-mass K over the two-body K: (1 + q)^{2/3} − 1' },
70
- { key: 'r_peri_m', symbol: 'r_p', unit: 'm', meaning: 'periastron separation a(1 − e)' },
71
- { key: 'weak_field', symbol: 'G(M_* + m_p)/(c²a)', unit: '', meaning: 'the 1PN expansion parameter (half the Schwarzschild radius of the total mass, over a)' },
72
- { key: 'dphi_rad_per_orbit', symbol: 'Δω', unit: 'rad', meaning: 'GR apsidal advance per orbit 6πG(M_* + m_p)/(c²a(1 − e²)) (BE-52 with the total mass)' },
73
- { key: 'omega_dot_deg_per_yr', symbol: 'ω̇', unit: 'deg/yr', meaning: 'the same advance as a rate, degrees per Julian year' },
74
- { key: 'apsidal_misfit', symbol: 'e Δω T_obs/P', unit: '', meaning: 'eccentricity times the apsidal advance accumulated over the record (rad)' },
75
- ],
76
- conditions: [
77
- 'an isolated binary: no third body within the record, the systemic velocity constant (it is fitted out as an offset)',
78
- 'initial condition: the orbital elements (P, e, ω, time of periastron) are those at the start of the record',
79
- 'the line of sight is fixed; the star\'s light traces its centre of mass (no spots, no convective blueshift variation)',
80
- ],
81
- comparison: {
82
- reference: 'the parent\'s Newtonian limit: the exact two-body semi-amplitude with the companion\'s mass in the total',
83
- valueKey: 'K_m_per_s',
84
- referenceKey: 'K_two_body_m_per_s',
85
- deviationKey: 'two_body_deviation',
86
- method: 'closed form of the two-body Keplerian semi-amplitude',
87
- },
88
- notIncluded: [
89
- 'stellar activity (jitter), instrumental drift and the gravitational redshift and light-travel-time terms of the RV itself',
90
- 'the other 1PN terms beside the apsidal advance (O(GM/(c²a)) in the P–a relation and in K), bounded by the weak-field check but not applied',
91
- 'tidal orbital decay (dP/dt) and the tidal and rotational quadrupole precession, which the point-mass check bounds only by R_*/r_p',
92
- 'the inclination itself: RV alone gives m_p sin i; sin i must come from a transit or astrometry',
93
- ],
94
- measurement: [
95
- 'fit a Keplerian (P, K, e, ω, time of periastron, systemic offset) to the RV time series and compare the fitted K with K_m_per_s; ' +
96
- 'with P and e fixed, the fitted K inverts to the minimum mass m_p sin i through the same relation',
97
- 'where the two-body check fails, compare with K_two_body_m_per_s, which is the Newtonian parent',
98
- '`upt confront --bridge=be-52`: Mercury\'s anomalous perihelion advance, which tests the Δω formula the apsidal check uses',
99
- ],
100
- links: [
101
- { id: 'CE-kepler-third', role: 'T² = 4π²a³/(GM), with the assumptions two-body and M ≫ m; here with M → M_* + m_p' },
102
- { id: `be-${52}`, role: 'the GR perihelion advance Δφ = 6πGM/(c²a(1 − e²)), evaluated with the total mass (`upt evaluate be-52`)' },
103
- { id: 'CE-perihelion-precession', role: 'the canonical entry restating BE-52' },
104
- { id: 'CE-schwarzschild-radius', role: 'r_s = 2GM/c², whose ratio to a (halved) is the weak-field check\'s quantity' },
105
- ],
106
- examples: {
107
- valid: {
108
- args: ['M_star_kg=1Msun', 'm_p_kg=1.898e27', 'P_s=4332.59d', 'eccentricity=0.0489', 'sin_i=1', 'R_star_m=6.957e8', 'T_obs_s=12yr'],
109
- note: 'the Sun\'s reflex motion from Jupiter, seen edge-on over one orbit: K ≈ 12.5 m/s',
110
- fails: [],
111
- },
112
- failures: [
113
- {
114
- args: ['M_star_kg=1.434Msun', 'm_p_kg=2.79e27', 'P_s=1.09142d', 'eccentricity=0', 'sin_i=0.993', 'R_star_m=1.153e9', 'T_obs_s=10yr'],
115
- note: 'WASP-12 b, a 1.47 M_J planet on a 1.09 d orbit: the star\'s radius is a third of the separation, and the orbit is observed to decay by tides',
116
- fails: ['point-mass'],
117
- },
118
- {
119
- args: ['M_star_kg=1.3381Msun', 'm_p_kg=1.2489Msun', 'P_s=0.10225156248d', 'eccentricity=0.0877775', 'sin_i=0.99974', 'R_star_m=12km', 'T_obs_s=1yr'],
120
- note: 'the double pulsar PSR J0737−3039A/B timed for a year: equal masses, and a GR apsidal advance of ≈ 17°/yr',
121
- fails: ['test-mass', 'apsidal'],
122
- },
123
- ],
124
- },
125
- /** Evaluate the test-mass radial-velocity amplitude and checks for the supplied binary inputs. */
126
- run(i) {
127
- requirePositive(ID, i, ['M_star_kg', 'm_p_kg', 'P_s', 'sin_i', 'R_star_m', 'T_obs_s']);
128
- const { M_star_kg: M, m_p_kg: m, P_s: P, eccentricity: e, sin_i: sinI, R_star_m: R, T_obs_s: tObs } = i;
129
- if (!Number.isFinite(e) || e < 0 || e >= 1)
130
- throw new Error(`${ID}: eccentricity must be in [0, 1) (got ${e})`);
131
- if (sinI > 1)
132
- throw new Error(`${ID}: sin_i must be in (0, 1] (got ${sinI})`);
133
- const total = M + m;
134
- const a = Math.cbrt((G_SI * total * P * P) / (4 * Math.PI * Math.PI));
135
- const root = Math.sqrt(1 - e * e);
136
- const n13 = Math.cbrt((2 * Math.PI * G_SI) / P);
137
- const K = (n13 * m * sinI) / Math.cbrt(M * M) / root;
138
- const K2b = (n13 * m * sinI) / Math.cbrt(total * total) / root;
139
- const rPeri = a * (1 - e);
140
- const weak = (G_SI * total) / (C_SI * C_SI * a);
141
- const advance = catalogRelations().find((row) => row.target === 'perihelion-advance');
142
- if (advance === undefined)
143
- throw new Error(`${ID}: the perihelion relation is not in the catalog`);
144
- const dphi = evaluateCatalogRelation(advance, { mass: total, 'semi-major-axis': a, eccentricity: e });
145
- const misfit = (e * dphi * tObs) / P;
146
- return {
147
- outputs: {
148
- q: m / M,
149
- a_m: a,
150
- a_star_m: (a * m) / total,
151
- K_m_per_s: K,
152
- K_two_body_m_per_s: K2b,
153
- two_body_deviation: K / K2b - 1,
154
- r_peri_m: rPeri,
155
- weak_field: weak,
156
- dphi_rad_per_orbit: dphi,
157
- omega_dot_deg_per_yr: ((dphi / P) * JULIAN_YEAR_S * 180) / Math.PI,
158
- apsidal_misfit: misfit,
159
- },
160
- checks: [
161
- check('test-mass', 'the companion is light beside the star, m_p ≪ M_*', 'm_p/M_*', m / M, '<=', MAX_MASS_RATIO, 'chosen threshold: the test-mass K then exceeds the two-body K by (1 + q)^{2/3} − 1 ≤ 0.67%'),
162
- check('point-mass', 'point masses: the star is small beside the closest approach, R_* ≪ r_p', 'R_*/(a(1 − e))', R / rPeri, '<=', MAX_RADIUS_RATIO, 'chosen threshold: tidal and rotational quadrupole terms scale as (R_*/r)² times a Love number or J2 (each < 1), kept ≤ 1%'),
163
- check('weak-field', 'Newtonian gravity: G(M_* + m_p)/(c²a) ≪ 1', 'G(M_* + m_p)/(c² a)', weak, '<=', MAX_WEAK_FIELD, 'chosen threshold: the 1PN corrections to the P–a relation and to the orbital velocity are of this relative order'),
164
- check('apsidal', 'a fixed ellipse over the record: the GR apsidal advance does not reshape the RV curve', 'e Δω T_obs/P', misfit, '<=', MAX_APSIDAL_MISFIT, 'chosen threshold: beyond the mean longitude (absorbed by the fitted phase), v_r depends on ω only at O(e), so the misfit is of order e Δω K; its coefficient (order one) is not encoded'),
165
- ],
166
- unchecked: [
167
- 'no third body: an outer companion adds its own reflex signal and perturbs P and ω',
168
- 'the companion\'s radius is also small beside r_p (only the star\'s is checked)',
169
- ],
170
- };
171
- },
172
- };
173
- //# sourceMappingURL=kepler-rv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kepler-rv.js","sourceRoot":"","sources":["../../src/cases/kepler-rv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAoB,MAAM,YAAY,CAAC;AAEtE,MAAM,EAAE,GAAG,gBAAgB,CAAC;AAE5B,sGAAsG;AACtG,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC;AAE7D,2GAA2G;AAC3G,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC;AAEnC,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEpC,mEAAmE;AACnE,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC;AAEnC,oFAAoF;AACpF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,EAAE,EAAE,EAAE;IACN,KAAK,EAAE,mGAAmG;IAC1G,UAAU,EAAE;QACV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AoB,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,aAAa,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE;gBAClE,cAAc,EAAE,MAAM;aACvB;YACD,MAAM,EAAE;gBACN,KAAK,CAAC,WAAW,EAAE,mDAAmD,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,cAAc,EAC5G,4FAA4F,CAAC;gBAC/F,KAAK,CAAC,YAAY,EAAE,wEAAwE,EAAE,gBAAgB,EAAE,CAAC,GAAG,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAC/I,2HAA2H,CAAC;gBAC9H,KAAK,CAAC,YAAY,EAAE,2CAA2C,EAAE,qBAAqB,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAChH,kHAAkH,CAAC;gBACrH,KAAK,CAAC,SAAS,EAAE,uFAAuF,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EACxJ,yLAAyL,CAAC;aAC7L;YACD,SAAS,EAAE;gBACT,mFAAmF;gBACnF,gFAAgF;aACjF;SACF,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["/**\n * Applied case: the radial-velocity semi-amplitude of a star orbited by a\n * companion — what a spectrograph reads as the star's reflex motion, from the\n * two masses, the period, the eccentricity and the inclination.\n *\n * The scalar is the test-mass form of the Keplerian RV curve used to infer\n * m_p sin i (Lovis & Fischer, \"Radial Velocity Techniques for Exoplanets\", in\n * Seager (ed.), Exoplanets, 2010, eq. 1; Murray & Dermott, Solar System\n * Dynamics, 1999, §2.7). The parent is the two-body problem of two extended\n * bodies in general relativity. The case compares the test-mass K with the\n * exact Newtonian two-body K, and checks the three premises that make a fixed\n * Keplerian ellipse the right curve: a companion light beside the star, point\n * masses (no tides), and a weak field whose apsidal advance (BE-52, with the\n * total mass; Robertson 1938) does not reshape the curve over the record.\n *\n * @module cases/kepler-rv\n */\nimport { C_SI, G_SI } from '../core/constants.js';\nimport { convertValue } from '../dimensional/units.js';\nimport { catalogRelations } from '../bridges/catalog-load.js';\nimport { evaluateCatalogRelation } from '../bridges/relation-eval.js';\nimport { check, requirePositive, type AppliedCase } from './types.js';\n\nconst ID = 'case-kepler-rv';\n\n/** The Julian year, the year BE-52 takes (s): the unit table's `julian_year` row (`yr`). @internal */\nexport const JULIAN_YEAR_S = convertValue('1 yr', 's').value;\n\n/** m_p/M_* ceiling: the test-mass K then exceeds the two-body K by (1 + q)^{2/3} − 1 ≤ 0.67%. @internal */\nexport const MAX_MASS_RATIO = 0.01;\n\n/** Ceiling on the stellar radius over the periastron separation, for point masses. @internal */\nexport const MAX_RADIUS_RATIO = 0.1;\n\n/** G(M_* + m_p)/(c² a) ceiling for Newtonian gravity. @internal */\nexport const MAX_WEAK_FIELD = 1e-4;\n\n/** e·Δω accumulated over the record (rad) ceiling for a fixed ellipse. @internal */\nexport const MAX_APSIDAL_MISFIT = 0.01;\n\nexport const KEPLER_RV_CASE: AppliedCase = {\n id: ID,\n title: 'Radial-velocity semi-amplitude of a star with a companion (mass ratio, tides, GR apsidal advance)',\n parameters: [\n { key: 'M_star_kg', quantity: 'stellar mass', symbol: 'M_*', unit: 'kg', meaning: 'mass of the star whose radial velocity is measured (1Msun = 1.989e30 kg), > 0' },\n { key: 'm_p_kg', quantity: 'companion mass', symbol: 'm_p', unit: 'kg', meaning: 'true mass of the companion (Jupiter ≈ 1.898e27 kg), > 0' },\n { key: 'P_s', quantity: 'orbital period', symbol: 'P', unit: 's', meaning: 'the orbital period the RV curve repeats with, > 0' },\n { key: 'eccentricity', quantity: 'eccentricity', symbol: 'e', unit: '', meaning: 'orbital eccentricity e, 0 ≤ e < 1 (a bare e is the elementary charge, so the key is spelled out)' },\n { key: 'sin_i', quantity: 'sine of the inclination', symbol: 'sin i', unit: '', meaning: 'sin of the angle between the orbit normal and the line of sight, 0 < sin i ≤ 1 (1 is edge-on)' },\n { key: 'R_star_m', quantity: 'stellar radius', symbol: 'R_*', unit: 'm', meaning: 'radius of the star (the Sun ≈ 6.957e8 m), > 0' },\n { key: 'T_obs_s', quantity: 'observing baseline', symbol: 'T_obs', unit: 's', meaning: 'time span of the RV record fitted with one fixed ellipse, > 0' },\n ],\n governing: {\n parent: [\n 'r̈ = −G(M_* + m_p) r/r³ + O(G(M_* + m_p)/(c² r)) · (G(M_* + m_p)/r²) (relative orbit, Newtonian term plus the 1PN Einstein–Infeld–Hoffmann terms)',\n 'M_* r_* + m_p r_p = 0 about the barycentre; the measured v_r is the line-of-sight component of ṙ_*',\n 'extended bodies: each is a point mass only if spherical and undeformed; tides and spin add quadrupole terms ∝ (R/r)²',\n ],\n scalar: [\n 'K = (2πG/P)^{1/3} m_p sin i / M_*^{2/3} / √(1 − e²) (test-mass form, m_p ≪ M_*)',\n 'v_r(t) = K [cos(ν(t) + ω) + e cos ω], ω fixed over the record',\n 'a³ = G(M_* + m_p) P²/(4π²) (Kepler III for the relative orbit; CE-kepler-third)',\n ],\n distinction:\n 'The parent is a coupled vector problem for two finite, deformable bodies in curved spacetime; the scalar keeps one ' +\n 'number K for a fixed Keplerian ellipse of the star about the barycentre and puts the whole mass in the star. Dropped: ' +\n 'the companion\\'s share of the total mass (O(q)), the apsidal advance and the other 1PN terms (O(GM/(c²a))), and ' +\n 'the tidal and rotational quadrupoles (O((R_*/r)²)).',\n },\n observable: 'K_m_per_s',\n outputs: [\n { key: 'q', symbol: 'q', unit: '', meaning: 'mass ratio m_p/M_*' },\n { key: 'a_m', symbol: 'a', unit: 'm', meaning: 'semi-major axis of the relative orbit, from Kepler III with the total mass' },\n { key: 'a_star_m', symbol: 'a_*', unit: 'm', meaning: 'semi-major axis of the star\\'s own orbit about the barycentre, a m_p/(M_* + m_p)' },\n { key: 'K_m_per_s', symbol: 'K', unit: 'm/s', meaning: 'RV semi-amplitude of the star, test-mass form (the scalar result)' },\n { key: 'K_two_body_m_per_s', symbol: 'K_2b', unit: 'm/s', meaning: 'the exact Newtonian two-body semi-amplitude (2πG/P)^{1/3} m_p sin i/(M_* + m_p)^{2/3}/√(1 − e²)' },\n { key: 'two_body_deviation', symbol: 'K/K_2b − 1', unit: '', meaning: 'relative excess of the test-mass K over the two-body K: (1 + q)^{2/3} − 1' },\n { key: 'r_peri_m', symbol: 'r_p', unit: 'm', meaning: 'periastron separation a(1 − e)' },\n { key: 'weak_field', symbol: 'G(M_* + m_p)/(c²a)', unit: '', meaning: 'the 1PN expansion parameter (half the Schwarzschild radius of the total mass, over a)' },\n { key: 'dphi_rad_per_orbit', symbol: 'Δω', unit: 'rad', meaning: 'GR apsidal advance per orbit 6πG(M_* + m_p)/(c²a(1 − e²)) (BE-52 with the total mass)' },\n { key: 'omega_dot_deg_per_yr', symbol: 'ω̇', unit: 'deg/yr', meaning: 'the same advance as a rate, degrees per Julian year' },\n { key: 'apsidal_misfit', symbol: 'e Δω T_obs/P', unit: '', meaning: 'eccentricity times the apsidal advance accumulated over the record (rad)' },\n ],\n conditions: [\n 'an isolated binary: no third body within the record, the systemic velocity constant (it is fitted out as an offset)',\n 'initial condition: the orbital elements (P, e, ω, time of periastron) are those at the start of the record',\n 'the line of sight is fixed; the star\\'s light traces its centre of mass (no spots, no convective blueshift variation)',\n ],\n comparison: {\n reference: 'the parent\\'s Newtonian limit: the exact two-body semi-amplitude with the companion\\'s mass in the total',\n valueKey: 'K_m_per_s',\n referenceKey: 'K_two_body_m_per_s',\n deviationKey: 'two_body_deviation',\n method: 'closed form of the two-body Keplerian semi-amplitude',\n },\n notIncluded: [\n 'stellar activity (jitter), instrumental drift and the gravitational redshift and light-travel-time terms of the RV itself',\n 'the other 1PN terms beside the apsidal advance (O(GM/(c²a)) in the P–a relation and in K), bounded by the weak-field check but not applied',\n 'tidal orbital decay (dP/dt) and the tidal and rotational quadrupole precession, which the point-mass check bounds only by R_*/r_p',\n 'the inclination itself: RV alone gives m_p sin i; sin i must come from a transit or astrometry',\n ],\n measurement: [\n 'fit a Keplerian (P, K, e, ω, time of periastron, systemic offset) to the RV time series and compare the fitted K with K_m_per_s; ' +\n 'with P and e fixed, the fitted K inverts to the minimum mass m_p sin i through the same relation',\n 'where the two-body check fails, compare with K_two_body_m_per_s, which is the Newtonian parent',\n '`upt confront --bridge=be-52`: Mercury\\'s anomalous perihelion advance, which tests the Δω formula the apsidal check uses',\n ],\n links: [\n { id: 'CE-kepler-third', role: 'T² = 4π²a³/(GM), with the assumptions two-body and M ≫ m; here with M → M_* + m_p' },\n { id: `be-${52}`, role: 'the GR perihelion advance Δφ = 6πGM/(c²a(1 − e²)), evaluated with the total mass (`upt evaluate be-52`)' },\n { id: 'CE-perihelion-precession', role: 'the canonical entry restating BE-52' },\n { id: 'CE-schwarzschild-radius', role: 'r_s = 2GM/c², whose ratio to a (halved) is the weak-field check\\'s quantity' },\n ],\n examples: {\n valid: {\n args: ['M_star_kg=1Msun', 'm_p_kg=1.898e27', 'P_s=4332.59d', 'eccentricity=0.0489', 'sin_i=1', 'R_star_m=6.957e8', 'T_obs_s=12yr'],\n note: 'the Sun\\'s reflex motion from Jupiter, seen edge-on over one orbit: K ≈ 12.5 m/s',\n fails: [],\n },\n failures: [\n {\n args: ['M_star_kg=1.434Msun', 'm_p_kg=2.79e27', 'P_s=1.09142d', 'eccentricity=0', 'sin_i=0.993', 'R_star_m=1.153e9', 'T_obs_s=10yr'],\n note: 'WASP-12 b, a 1.47 M_J planet on a 1.09 d orbit: the star\\'s radius is a third of the separation, and the orbit is observed to decay by tides',\n fails: ['point-mass'],\n },\n {\n args: ['M_star_kg=1.3381Msun', 'm_p_kg=1.2489Msun', 'P_s=0.10225156248d', 'eccentricity=0.0877775', 'sin_i=0.99974', 'R_star_m=12km', 'T_obs_s=1yr'],\n note: 'the double pulsar PSR J0737−3039A/B timed for a year: equal masses, and a GR apsidal advance of ≈ 17°/yr',\n fails: ['test-mass', 'apsidal'],\n },\n ],\n },\n /** Evaluate the test-mass radial-velocity amplitude and checks for the supplied binary inputs. */\n run(i) {\n requirePositive(ID, i, ['M_star_kg', 'm_p_kg', 'P_s', 'sin_i', 'R_star_m', 'T_obs_s']);\n const { M_star_kg: M, m_p_kg: m, P_s: P, eccentricity: e, sin_i: sinI, R_star_m: R, T_obs_s: tObs } = i as Record<string, number>;\n if (!Number.isFinite(e) || e < 0 || e >= 1) throw new Error(`${ID}: eccentricity must be in [0, 1) (got ${e})`);\n if (sinI > 1) throw new Error(`${ID}: sin_i must be in (0, 1] (got ${sinI})`);\n const total = M + m;\n const a = Math.cbrt((G_SI * total * P * P) / (4 * Math.PI * Math.PI));\n const root = Math.sqrt(1 - e * e);\n const n13 = Math.cbrt((2 * Math.PI * G_SI) / P);\n const K = (n13 * m * sinI) / Math.cbrt(M * M) / root;\n const K2b = (n13 * m * sinI) / Math.cbrt(total * total) / root;\n const rPeri = a * (1 - e);\n const weak = (G_SI * total) / (C_SI * C_SI * a);\n const advance = catalogRelations().find((row) => row.target === 'perihelion-advance');\n if (advance === undefined) throw new Error(`${ID}: the perihelion relation is not in the catalog`);\n const dphi = evaluateCatalogRelation(advance, { mass: total, 'semi-major-axis': a, eccentricity: e });\n const misfit = (e * dphi * tObs) / P;\n return {\n outputs: {\n q: m / M,\n a_m: a,\n a_star_m: (a * m) / total,\n K_m_per_s: K,\n K_two_body_m_per_s: K2b,\n two_body_deviation: K / K2b - 1,\n r_peri_m: rPeri,\n weak_field: weak,\n dphi_rad_per_orbit: dphi,\n omega_dot_deg_per_yr: ((dphi / P) * JULIAN_YEAR_S * 180) / Math.PI,\n apsidal_misfit: misfit,\n },\n checks: [\n check('test-mass', 'the companion is light beside the star, m_p ≪ M_*', 'm_p/M_*', m / M, '<=', MAX_MASS_RATIO,\n 'chosen threshold: the test-mass K then exceeds the two-body K by (1 + q)^{2/3} − 1 ≤ 0.67%'),\n check('point-mass', 'point masses: the star is small beside the closest approach, R_* ≪ r_p', 'R_*/(a(1 − e))', R / rPeri, '<=', MAX_RADIUS_RATIO,\n 'chosen threshold: tidal and rotational quadrupole terms scale as (R_*/r)² times a Love number or J2 (each < 1), kept ≤ 1%'),\n check('weak-field', 'Newtonian gravity: G(M_* + m_p)/(c²a) ≪ 1', 'G(M_* + m_p)/(c² a)', weak, '<=', MAX_WEAK_FIELD,\n 'chosen threshold: the 1PN corrections to the P–a relation and to the orbital velocity are of this relative order'),\n check('apsidal', 'a fixed ellipse over the record: the GR apsidal advance does not reshape the RV curve', 'e Δω T_obs/P', misfit, '<=', MAX_APSIDAL_MISFIT,\n 'chosen threshold: beyond the mean longitude (absorbed by the fitted phase), v_r depends on ω only at O(e), so the misfit is of order e Δω K; its coefficient (order one) is not encoded'),\n ],\n unchecked: [\n 'no third body: an outer companion adds its own reflex signal and perturbs P and ω',\n 'the companion\\'s radius is also small beside r_p (only the star\\'s is checked)',\n ],\n };\n },\n};\n"]}
@@ -1,51 +0,0 @@
1
- import { type AppliedCase } from './types.js';
2
- /** The Stefan–Boltzmann constant (W m⁻² K⁻⁴) is `core/constants`'s; re-exported so the record's module-export table keeps its row. @internal */
3
- export { SIGMA_SB_SI } from '../core/constants.js';
4
- /** Bi = h L_c/k ceiling, L_c = V/A (Incropera §5.2, eq. 5.10). @internal */
5
- export declare const MAX_BIOT = 0.1;
6
- /** h_rad,max/h ceiling for a loss linear in T − T∞. @internal */
7
- export declare const MAX_RADIATION_RATIO = 0.1;
8
- /** Parameters of the lumped equation with the radiative loss kept, in SI units. @internal */
9
- export interface LumpedRadiating {
10
- readonly a: number;
11
- readonly rho: number;
12
- readonly c: number;
13
- /** ≥ 0; 0 is pure radiation. */
14
- readonly h: number;
15
- readonly eps: number;
16
- readonly T0: number;
17
- readonly Tinf: number;
18
- readonly t: number;
19
- }
20
- /**
21
- * T(t) of ρcV dT/dt = −A[h(T − T∞) + εσ_SB(T⁴ − T∞⁴)] for a sphere (V/A =
22
- * a/3), by classical RK4 (`integrateRK4`, MathTS `solveODESystem` with `dt`,
23
- * one call per step) with each step 1/100 of the local relaxation time
24
- * ρca/(3(h + 4εσ_SB T³)). Stops early once |T − T∞| is below 1e-15 |T0 − T∞|.
25
- * @internal
26
- */
27
- export declare function lumpedRadiatingTemperature(p: LumpedRadiating): number;
28
- /**
29
- * The first n roots of 1 − ζ cot ζ = Bi (Bi = h a/k, radius-based): the n-th
30
- * lies in ((n−1)π, nπ), where the left side runs from −∞ (0 for n = 1) to +∞.
31
- * Each is MathTS `findRoot` (Brent) on that interval, pulled in from the
32
- * poles by a few ulps of kπ, since the solver evaluates both ends: at 0 the
33
- * function is 0/0, and at an exact multiple of π `Math.tan` has no sign to
34
- * trust. The tolerance is the bracket's own floating-point resolution.
35
- * @internal
36
- */
37
- export declare function sphereEigenvalues(biRadius: number, n: number): number[];
38
- /**
39
- * θ/θ0 = (T − T∞)/(T0 − T∞) from the series solution of the sphere with a
40
- * convective surface, at Fourier number Fo = αt/a², for the volume mean, the
41
- * centre and the surface. Terms are summed until e^{−ζ²Fo} < 1e-18.
42
- * @throws Error when Fo is so small that the series would need over 1e5 terms.
43
- * @internal
44
- */
45
- export declare function sphereSeries(biRadius: number, fo: number): {
46
- mean: number;
47
- centre: number;
48
- surface: number;
49
- };
50
- export declare const LUMPED_COOLING_CASE: AppliedCase;
51
- //# sourceMappingURL=lumped-cooling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lumped-cooling.d.ts","sourceRoot":"","sources":["../../src/cases/lumped-cooling.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAoD,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAIhG,gJAAgJ;AAChJ,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,4EAA4E;AAC5E,eAAO,MAAM,QAAQ,MAAM,CAAC;AAE5B,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,6FAA6F;AAC7F,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,gCA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