universal-physics-tensor 10.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.
- package/README.md +39 -36
- package/bin/upt.mjs +13 -1
- package/data/applied-cases.json +1892 -0
- package/data/applied-cases.schema.json +194 -0
- package/data/atlas/atlas.json +25 -25
- package/data/atlas/atlas.jsonld +1 -1
- package/data/atlas/diffusion.json +6 -6
- package/data/atlas/oscillators.json +7 -7
- package/data/atlas/waves.json +14 -14
- package/data/atlas/witness-results.json +11 -11
- package/data/bridge-catalog.json +389 -230
- package/data/bridge-catalog.schema.json +45 -7
- package/data/units.json +6 -25
- package/dist/atlas/applicability.d.ts.map +1 -1
- package/dist/atlas/applicability.js +21 -15
- package/dist/atlas/applicability.js.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts +9 -1
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.js +15 -13
- package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
- package/dist/atlas/benchmark/loader.js +2 -2
- package/dist/atlas/benchmark/loader.js.map +1 -1
- package/dist/atlas/benchmark/stats.d.ts +2 -2
- package/dist/atlas/benchmark/stats.d.ts.map +1 -1
- package/dist/atlas/benchmark/stats.js +9 -15
- package/dist/atlas/benchmark/stats.js.map +1 -1
- package/dist/atlas/catalog-formal-ref.d.ts +26 -3
- package/dist/atlas/catalog-formal-ref.d.ts.map +1 -1
- package/dist/atlas/catalog-formal-ref.js +52 -5
- package/dist/atlas/catalog-formal-ref.js.map +1 -1
- package/dist/atlas/chain-pipeline.d.ts.map +1 -1
- package/dist/atlas/chain-pipeline.js +7 -8
- package/dist/atlas/chain-pipeline.js.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.d.ts +0 -4
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.js +8 -12
- package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
- package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges.js +27 -39
- package/dist/atlas/diffusion/bridges.js.map +1 -1
- package/dist/atlas/diffusion/dimensions.d.ts +6 -14
- package/dist/atlas/diffusion/dimensions.d.ts.map +1 -1
- package/dist/atlas/diffusion/dimensions.js +8 -16
- package/dist/atlas/diffusion/dimensions.js.map +1 -1
- package/dist/atlas/diffusion/models.d.ts +3 -3
- package/dist/atlas/diffusion/models.d.ts.map +1 -1
- package/dist/atlas/diffusion/models.js +5 -10
- package/dist/atlas/diffusion/models.js.map +1 -1
- package/dist/atlas/diffusion/numerics.d.ts +16 -4
- package/dist/atlas/diffusion/numerics.d.ts.map +1 -1
- package/dist/atlas/diffusion/numerics.js +38 -24
- package/dist/atlas/diffusion/numerics.js.map +1 -1
- package/dist/atlas/link-prediction.d.ts +106 -3
- package/dist/atlas/link-prediction.d.ts.map +1 -1
- package/dist/atlas/link-prediction.js +212 -66
- package/dist/atlas/link-prediction.js.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.js +7 -11
- package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.js +6 -7
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.d.ts +3 -16
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.js +23 -34
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
- package/dist/atlas/oscillators/dimensions.d.ts +9 -21
- package/dist/atlas/oscillators/dimensions.d.ts.map +1 -1
- package/dist/atlas/oscillators/dimensions.js +9 -21
- package/dist/atlas/oscillators/dimensions.js.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.d.ts +2 -2
- package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.js +17 -15
- package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
- package/dist/atlas/oscillators/models.d.ts.map +1 -1
- package/dist/atlas/oscillators/models.js +2 -6
- package/dist/atlas/oscillators/models.js.map +1 -1
- package/dist/atlas/oscillators/pendulum-motion.d.ts +29 -6
- package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -1
- package/dist/atlas/oscillators/pendulum-motion.js +60 -40
- package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
- package/dist/atlas/oscillators/phase-translation.d.ts +0 -11
- package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -1
- package/dist/atlas/oscillators/phase-translation.js +3 -4
- package/dist/atlas/oscillators/phase-translation.js.map +1 -1
- package/dist/atlas/oscillators/position-translation.d.ts +68 -7
- package/dist/atlas/oscillators/position-translation.d.ts.map +1 -1
- package/dist/atlas/oscillators/position-translation.js +123 -12
- package/dist/atlas/oscillators/position-translation.js.map +1 -1
- package/dist/atlas/oscillators/rejections.d.ts +0 -2
- package/dist/atlas/oscillators/rejections.d.ts.map +1 -1
- package/dist/atlas/oscillators/rejections.js +0 -7
- package/dist/atlas/oscillators/rejections.js.map +1 -1
- package/dist/atlas/physjs-entries.generated.d.ts +35 -25
- package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
- package/dist/atlas/physjs-entries.generated.js +37 -25
- package/dist/atlas/physjs-entries.generated.js.map +1 -1
- package/dist/atlas/physjs-ref.d.ts +34 -31
- package/dist/atlas/physjs-ref.d.ts.map +1 -1
- package/dist/atlas/physjs-ref.js +55 -53
- package/dist/atlas/physjs-ref.js.map +1 -1
- package/dist/atlas/physjs-reviewed.d.ts +1 -1
- package/dist/atlas/physjs-reviewed.js +15 -15
- package/dist/atlas/physjs-reviewed.js.map +1 -1
- package/dist/atlas/poster/statements.d.ts +0 -19
- package/dist/atlas/poster/statements.d.ts.map +1 -1
- package/dist/atlas/poster/statements.js +1 -1
- package/dist/atlas/poster/statements.js.map +1 -1
- package/dist/atlas/proof-target.d.ts +1 -1
- package/dist/atlas/proof-target.js +1 -1
- package/dist/atlas/proof-target.js.map +1 -1
- package/dist/atlas/regime.d.ts +1 -1
- package/dist/atlas/regime.d.ts.map +1 -1
- package/dist/atlas/regime.js +1 -1
- package/dist/atlas/regime.js.map +1 -1
- package/dist/atlas/text-overlap.d.ts +23 -0
- package/dist/atlas/text-overlap.d.ts.map +1 -0
- package/dist/atlas/text-overlap.js +41 -0
- package/dist/atlas/text-overlap.js.map +1 -0
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/waves/bridges-closure.js +2 -6
- package/dist/atlas/waves/bridges-closure.js.map +1 -1
- package/dist/atlas/waves/bridges.d.ts.map +1 -1
- package/dist/atlas/waves/bridges.js +32 -48
- package/dist/atlas/waves/bridges.js.map +1 -1
- package/dist/atlas/waves/models.d.ts +5 -6
- package/dist/atlas/waves/models.d.ts.map +1 -1
- package/dist/atlas/waves/models.js +7 -13
- package/dist/atlas/waves/models.js.map +1 -1
- package/dist/atlas/waves/numerics.d.ts.map +1 -1
- package/dist/atlas/waves/numerics.js +10 -3
- package/dist/atlas/waves/numerics.js.map +1 -1
- package/dist/atlas/witness-numeric.d.ts +30 -0
- package/dist/atlas/witness-numeric.d.ts.map +1 -1
- package/dist/atlas/witness-numeric.js +53 -0
- package/dist/atlas/witness-numeric.js.map +1 -1
- package/dist/atlas/witness-specs.d.ts.map +1 -1
- package/dist/atlas/witness-specs.js +19 -0
- package/dist/atlas/witness-specs.js.map +1 -1
- package/dist/atlas/witness-symbolic.d.ts +75 -3
- package/dist/atlas/witness-symbolic.d.ts.map +1 -1
- package/dist/atlas/witness-symbolic.js +116 -10
- package/dist/atlas/witness-symbolic.js.map +1 -1
- package/dist/bridges/catalog-load.d.ts.map +1 -1
- package/dist/bridges/catalog-load.js +13 -8
- package/dist/bridges/catalog-load.js.map +1 -1
- package/dist/bridges/catalog-types.d.ts +26 -2
- package/dist/bridges/catalog-types.d.ts.map +1 -1
- package/dist/bridges/catalog-types.js +11 -1
- package/dist/bridges/catalog-types.js.map +1 -1
- package/dist/bridges/evaluation-errors.d.ts +31 -1
- package/dist/bridges/evaluation-errors.d.ts.map +1 -1
- package/dist/bridges/evaluation-errors.js +20 -2
- package/dist/bridges/evaluation-errors.js.map +1 -1
- package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
- package/dist/bridges/evaluator-inputs.js +7 -5
- package/dist/bridges/evaluator-inputs.js.map +1 -1
- package/dist/bridges/evaluators.d.ts.map +1 -1
- package/dist/bridges/evaluators.js +27 -12
- package/dist/bridges/evaluators.js.map +1 -1
- package/dist/bridges/expr-parse.d.ts +11 -0
- package/dist/bridges/expr-parse.d.ts.map +1 -1
- package/dist/bridges/expr-parse.js +14 -5
- package/dist/bridges/expr-parse.js.map +1 -1
- package/dist/bridges/holds.d.ts +35 -3
- package/dist/bridges/holds.d.ts.map +1 -1
- package/dist/bridges/holds.js +117 -23
- package/dist/bridges/holds.js.map +1 -1
- package/dist/bridges/notices.d.ts.map +1 -1
- package/dist/bridges/notices.js +5 -5
- package/dist/bridges/notices.js.map +1 -1
- package/dist/bridges/relation-eval.d.ts +4 -4
- package/dist/bridges/relation-eval.d.ts.map +1 -1
- package/dist/bridges/relation-eval.js +15 -16
- package/dist/bridges/relation-eval.js.map +1 -1
- package/dist/bridges/sensitivity.d.ts.map +1 -1
- package/dist/bridges/sensitivity.js +3 -3
- package/dist/bridges/sensitivity.js.map +1 -1
- package/dist/bridges/validity.d.ts +33 -0
- package/dist/bridges/validity.d.ts.map +1 -0
- package/dist/bridges/validity.js +67 -0
- package/dist/bridges/validity.js.map +1 -0
- package/dist/canonical/entries/atomic.js +1 -3
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
- package/dist/canonical/entries/condensed-matter.js +4 -5
- package/dist/canonical/entries/condensed-matter.js.map +1 -1
- package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
- package/dist/canonical/entries/dimensional-classics.js +3 -4
- package/dist/canonical/entries/dimensional-classics.js.map +1 -1
- package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
- package/dist/canonical/entries/electromagnetism.js +4 -10
- package/dist/canonical/entries/electromagnetism.js.map +1 -1
- package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
- package/dist/canonical/entries/fluids-waves.js +3 -7
- package/dist/canonical/entries/fluids-waves.js.map +1 -1
- package/dist/canonical/entries/mechanics.d.ts.map +1 -1
- package/dist/canonical/entries/mechanics.js +4 -6
- package/dist/canonical/entries/mechanics.js.map +1 -1
- package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
- package/dist/canonical/entries/nonmonomial.js +9 -17
- package/dist/canonical/entries/nonmonomial.js.map +1 -1
- package/dist/canonical/entries/relativity.d.ts.map +1 -1
- package/dist/canonical/entries/relativity.js +6 -6
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js +6 -10
- package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
- package/dist/canonical/fixed-points.d.ts +94 -0
- package/dist/canonical/fixed-points.d.ts.map +1 -0
- package/dist/canonical/fixed-points.js +81 -0
- package/dist/canonical/fixed-points.js.map +1 -0
- package/dist/canonical/linkage.d.ts.map +1 -1
- package/dist/canonical/linkage.js +25 -44
- package/dist/canonical/linkage.js.map +1 -1
- package/dist/canonical/normal-form.d.ts.map +1 -1
- package/dist/canonical/normal-form.js +5 -11
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/structural.d.ts +21 -21
- package/dist/canonical/structural.d.ts.map +1 -1
- package/dist/canonical/structural.js +40 -19
- package/dist/canonical/structural.js.map +1 -1
- package/dist/cases/catalog-checks.d.ts +10 -0
- package/dist/cases/catalog-checks.d.ts.map +1 -0
- package/dist/cases/catalog-checks.js +241 -0
- package/dist/cases/catalog-checks.js.map +1 -0
- package/dist/cases/catalog.d.ts +83 -0
- package/dist/cases/catalog.d.ts.map +1 -0
- package/dist/cases/catalog.js +118 -0
- package/dist/cases/catalog.js.map +1 -0
- package/dist/cases/engine.d.ts +13 -0
- package/dist/cases/engine.d.ts.map +1 -0
- package/dist/cases/engine.js +179 -0
- package/dist/cases/engine.js.map +1 -0
- package/dist/cases/index.d.ts.map +1 -1
- package/dist/cases/index.js +5 -7
- package/dist/cases/index.js.map +1 -1
- package/dist/cases/methods.d.ts +215 -0
- package/dist/cases/methods.d.ts.map +1 -0
- package/dist/cases/methods.js +743 -0
- package/dist/cases/methods.js.map +1 -0
- package/dist/cases/quadrature.d.ts +7 -9
- package/dist/cases/quadrature.d.ts.map +1 -1
- package/dist/cases/quadrature.js +28 -32
- package/dist/cases/quadrature.js.map +1 -1
- package/dist/cases/types.d.ts +12 -0
- package/dist/cases/types.d.ts.map +1 -1
- package/dist/cases/types.js.map +1 -1
- package/dist/cli/args.d.ts +25 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +30 -8
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/bindings.d.ts.map +1 -1
- package/dist/cli/bindings.js +5 -4
- package/dist/cli/bindings.js.map +1 -1
- package/dist/cli/command.d.ts +11 -1
- package/dist/cli/command.d.ts.map +1 -1
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/_atlas-map.d.ts +0 -9
- package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-map.js +8 -18
- package/dist/cli/commands/_atlas-map.js.map +1 -1
- package/dist/cli/commands/_atlas-route.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-route.js +6 -2
- package/dist/cli/commands/_atlas-route.js.map +1 -1
- package/dist/cli/commands/_discovery-opts.d.ts +1 -0
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +9 -9
- package/dist/cli/commands/_discovery-opts.js.map +1 -1
- package/dist/cli/commands/atlas.d.ts.map +1 -1
- package/dist/cli/commands/atlas.js +8 -5
- package/dist/cli/commands/atlas.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +8 -1
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/axes.d.ts.map +1 -1
- package/dist/cli/commands/axes.js +20 -1
- package/dist/cli/commands/axes.js.map +1 -1
- package/dist/cli/commands/confront.d.ts.map +1 -1
- package/dist/cli/commands/confront.js +8 -14
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +22 -22
- package/dist/cli/commands/derive.js.map +1 -1
- package/dist/cli/commands/discover.d.ts.map +1 -1
- package/dist/cli/commands/discover.js +122 -73
- package/dist/cli/commands/discover.js.map +1 -1
- package/dist/cli/commands/eval.d.ts.map +1 -1
- package/dist/cli/commands/eval.js +1 -0
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +67 -39
- package/dist/cli/commands/evaluate.js.map +1 -1
- package/dist/cli/commands/explain.d.ts.map +1 -1
- package/dist/cli/commands/explain.js +24 -3
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/ground.d.ts.map +1 -1
- package/dist/cli/commands/ground.js +7 -1
- package/dist/cli/commands/ground.js.map +1 -1
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +84 -11
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/metric.d.ts.map +1 -1
- package/dist/cli/commands/metric.js +12 -9
- package/dist/cli/commands/metric.js.map +1 -1
- package/dist/cli/commands/path.d.ts +10 -0
- package/dist/cli/commands/path.d.ts.map +1 -1
- package/dist/cli/commands/path.js +25 -3
- package/dist/cli/commands/path.js.map +1 -1
- package/dist/cli/commands/probe.d.ts.map +1 -1
- package/dist/cli/commands/probe.js +59 -16
- package/dist/cli/commands/probe.js.map +1 -1
- package/dist/cli/commands/regime.d.ts.map +1 -1
- package/dist/cli/commands/regime.js +1 -0
- package/dist/cli/commands/regime.js.map +1 -1
- package/dist/cli/commands/retrieve.d.ts.map +1 -1
- package/dist/cli/commands/retrieve.js +1 -0
- package/dist/cli/commands/retrieve.js.map +1 -1
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/search.js +1 -0
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/symbolic.d.ts.map +1 -1
- package/dist/cli/commands/symbolic.js +19 -28
- package/dist/cli/commands/symbolic.js.map +1 -1
- package/dist/cli/commands/testplan.d.ts.map +1 -1
- package/dist/cli/commands/testplan.js +4 -2
- package/dist/cli/commands/testplan.js.map +1 -1
- package/dist/cli/determination.d.ts +1 -0
- package/dist/cli/determination.d.ts.map +1 -1
- package/dist/cli/determination.js.map +1 -1
- package/dist/cli/expr-print.d.ts +0 -2
- package/dist/cli/expr-print.d.ts.map +1 -1
- package/dist/cli/expr-print.js +7 -31
- package/dist/cli/expr-print.js.map +1 -1
- package/dist/cli/flag-help.d.ts +1 -0
- package/dist/cli/flag-help.d.ts.map +1 -1
- package/dist/cli/flag-help.js +1 -0
- package/dist/cli/flag-help.js.map +1 -1
- package/dist/cli/graphs.d.ts +2 -0
- package/dist/cli/graphs.d.ts.map +1 -1
- package/dist/cli/graphs.js +1 -0
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/main.d.ts +8 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +19 -3
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/numeric-flag.d.ts +12 -0
- package/dist/cli/numeric-flag.d.ts.map +1 -0
- package/dist/cli/numeric-flag.js +44 -0
- package/dist/cli/numeric-flag.js.map +1 -0
- package/dist/cli/output.d.ts +28 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +23 -0
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/record-reach.js +2 -2
- package/dist/cli/record-reach.js.map +1 -1
- package/dist/cli/record-tables.d.ts.map +1 -1
- package/dist/cli/record-tables.js +6 -5
- package/dist/cli/record-tables.js.map +1 -1
- package/dist/cli/record.d.ts +1 -5
- package/dist/cli/record.d.ts.map +1 -1
- package/dist/cli/record.js +9 -8
- package/dist/cli/record.js.map +1 -1
- package/dist/cli/search-index.d.ts.map +1 -1
- package/dist/cli/search-index.js +7 -6
- package/dist/cli/search-index.js.map +1 -1
- package/dist/cli/statuses.d.ts +0 -2
- package/dist/cli/statuses.d.ts.map +1 -1
- package/dist/cli/statuses.js +12 -9
- package/dist/cli/statuses.js.map +1 -1
- package/dist/cli/stored-results.d.ts +7 -0
- package/dist/cli/stored-results.d.ts.map +1 -0
- package/dist/cli/stored-results.js +23 -0
- package/dist/cli/stored-results.js.map +1 -0
- package/dist/cli/version.d.ts +1 -0
- package/dist/cli/version.d.ts.map +1 -1
- package/dist/cli/version.js +8 -5
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +36 -5
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +30 -4
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/algebraic-equivalence.d.ts +43 -0
- package/dist/composition/algebraic-equivalence.d.ts.map +1 -0
- package/dist/composition/algebraic-equivalence.js +115 -0
- package/dist/composition/algebraic-equivalence.js.map +1 -0
- package/dist/composition/axes.d.ts +0 -6
- package/dist/composition/axes.d.ts.map +1 -1
- package/dist/composition/axes.js +6 -6
- package/dist/composition/axes.js.map +1 -1
- package/dist/composition/axis-audit.d.ts +47 -20
- package/dist/composition/axis-audit.d.ts.map +1 -1
- package/dist/composition/axis-audit.js +82 -9
- package/dist/composition/axis-audit.js.map +1 -1
- package/dist/composition/bridge-analysis.d.ts +17 -0
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +102 -55
- package/dist/composition/bridge-analysis.js.map +1 -1
- package/dist/composition/canonical-compare.d.ts +40 -0
- package/dist/composition/canonical-compare.d.ts.map +1 -1
- package/dist/composition/canonical-compare.js +122 -24
- package/dist/composition/canonical-compare.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +3 -3
- package/dist/composition/canonical-graph.d.ts.map +1 -1
- package/dist/composition/canonical-graph.js +11 -38
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/canonical-json.js +2 -2
- package/dist/composition/canonical-json.js.map +1 -1
- package/dist/composition/catalog-graph.d.ts.map +1 -1
- package/dist/composition/catalog-graph.js +2 -5
- package/dist/composition/catalog-graph.js.map +1 -1
- package/dist/composition/chain-candidate.d.ts +8 -0
- package/dist/composition/chain-candidate.d.ts.map +1 -1
- package/dist/composition/chain-candidate.js +9 -2
- package/dist/composition/chain-candidate.js.map +1 -1
- package/dist/composition/chain-match.d.ts +6 -3
- package/dist/composition/chain-match.d.ts.map +1 -1
- package/dist/composition/chain-match.js +4 -1
- package/dist/composition/chain-match.js.map +1 -1
- package/dist/composition/chain-result.d.ts.map +1 -1
- package/dist/composition/chain-result.js +2 -14
- package/dist/composition/chain-result.js.map +1 -1
- package/dist/composition/compose-symbolic.d.ts.map +1 -1
- package/dist/composition/compose-symbolic.js +3 -2
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +13 -5
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/composition-recovery.d.ts.map +1 -1
- package/dist/composition/composition-recovery.js +4 -7
- package/dist/composition/composition-recovery.js.map +1 -1
- package/dist/composition/consequence.d.ts +15 -5
- package/dist/composition/consequence.d.ts.map +1 -1
- package/dist/composition/consequence.js +6 -4
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/discovery.d.ts +129 -9
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +171 -67
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +21 -2
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +23 -1
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/enumerate.d.ts.map +1 -1
- package/dist/composition/enumerate.js +18 -3
- package/dist/composition/enumerate.js.map +1 -1
- package/dist/composition/evaluate-relation.d.ts +35 -11
- package/dist/composition/evaluate-relation.d.ts.map +1 -1
- package/dist/composition/evaluate-relation.js +60 -39
- package/dist/composition/evaluate-relation.js.map +1 -1
- package/dist/composition/explain.d.ts +3 -12
- package/dist/composition/explain.d.ts.map +1 -1
- package/dist/composition/explain.js +7 -20
- package/dist/composition/explain.js.map +1 -1
- package/dist/composition/expr-eval.d.ts +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js +6 -15
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts +26 -14
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +64 -72
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/formula-shape.d.ts +23 -4
- package/dist/composition/formula-shape.d.ts.map +1 -1
- package/dist/composition/formula-shape.js +57 -17
- package/dist/composition/formula-shape.js.map +1 -1
- package/dist/composition/graph-structure.d.ts +98 -0
- package/dist/composition/graph-structure.d.ts.map +1 -0
- package/dist/composition/graph-structure.js +167 -0
- package/dist/composition/graph-structure.js.map +1 -0
- package/dist/composition/graph-viz-svg.d.ts.map +1 -1
- package/dist/composition/graph-viz-svg.js +1 -1
- package/dist/composition/graph-viz-svg.js.map +1 -1
- package/dist/composition/graph-viz.d.ts.map +1 -1
- package/dist/composition/graph-viz.js +8 -37
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/grounding.d.ts.map +1 -1
- package/dist/composition/grounding.js +19 -7
- package/dist/composition/grounding.js.map +1 -1
- package/dist/composition/identifiability.d.ts +91 -4
- package/dist/composition/identifiability.d.ts.map +1 -1
- package/dist/composition/identifiability.js +363 -6
- package/dist/composition/identifiability.js.map +1 -1
- package/dist/composition/index.d.ts +8 -4
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +3 -2
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/mathts-quiet.d.ts +7 -8
- package/dist/composition/mathts-quiet.d.ts.map +1 -1
- package/dist/composition/mathts-quiet.js +7 -16
- package/dist/composition/mathts-quiet.js.map +1 -1
- package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
- package/dist/composition/mathts-scalar-symbols.js +2 -1
- package/dist/composition/mathts-scalar-symbols.js.map +1 -1
- package/dist/composition/own-equation-magnitude.d.ts +95 -0
- package/dist/composition/own-equation-magnitude.d.ts.map +1 -0
- package/dist/composition/own-equation-magnitude.js +270 -0
- package/dist/composition/own-equation-magnitude.js.map +1 -0
- package/dist/composition/probe/backend-protocol.d.ts +3 -0
- package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
- package/dist/composition/probe/backend-protocol.js.map +1 -1
- package/dist/composition/probe/candidate-store.d.ts +1 -0
- package/dist/composition/probe/candidate-store.d.ts.map +1 -1
- package/dist/composition/probe/candidate-store.js +1 -0
- package/dist/composition/probe/candidate-store.js.map +1 -1
- package/dist/composition/probe/corpus.d.ts +8 -4
- package/dist/composition/probe/corpus.d.ts.map +1 -1
- package/dist/composition/probe/corpus.js +23 -12
- package/dist/composition/probe/corpus.js.map +1 -1
- package/dist/composition/probe/dataset.d.ts +18 -0
- package/dist/composition/probe/dataset.d.ts.map +1 -1
- package/dist/composition/probe/dataset.js +95 -50
- package/dist/composition/probe/dataset.js.map +1 -1
- package/dist/composition/probe/experiment-design.d.ts +7 -1
- package/dist/composition/probe/experiment-design.d.ts.map +1 -1
- package/dist/composition/probe/experiment-design.js +44 -24
- package/dist/composition/probe/experiment-design.js.map +1 -1
- package/dist/composition/probe/falsify.d.ts +2 -0
- package/dist/composition/probe/falsify.d.ts.map +1 -1
- package/dist/composition/probe/falsify.js +2 -0
- package/dist/composition/probe/falsify.js.map +1 -1
- package/dist/composition/probe/fit.d.ts +7 -0
- package/dist/composition/probe/fit.d.ts.map +1 -1
- package/dist/composition/probe/fit.js +46 -22
- package/dist/composition/probe/fit.js.map +1 -1
- package/dist/composition/probe/frontier.d.ts.map +1 -1
- package/dist/composition/probe/frontier.js +33 -15
- package/dist/composition/probe/frontier.js.map +1 -1
- package/dist/composition/probe/generator.d.ts +30 -1
- package/dist/composition/probe/generator.d.ts.map +1 -1
- package/dist/composition/probe/generator.js +58 -36
- package/dist/composition/probe/generator.js.map +1 -1
- package/dist/composition/probe/index.d.ts +14 -0
- package/dist/composition/probe/index.d.ts.map +1 -1
- package/dist/composition/probe/index.js +6 -0
- package/dist/composition/probe/index.js.map +1 -1
- package/dist/composition/probe/limits.d.ts +25 -1
- package/dist/composition/probe/limits.d.ts.map +1 -1
- package/dist/composition/probe/limits.js +53 -11
- package/dist/composition/probe/limits.js.map +1 -1
- package/dist/composition/probe/pipeline.d.ts +5 -0
- package/dist/composition/probe/pipeline.d.ts.map +1 -1
- package/dist/composition/probe/pipeline.js +73 -24
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/power-law.d.ts +121 -0
- package/dist/composition/probe/power-law.d.ts.map +1 -0
- package/dist/composition/probe/power-law.js +251 -0
- package/dist/composition/probe/power-law.js.map +1 -0
- package/dist/composition/probe/problem.d.ts +8 -4
- package/dist/composition/probe/problem.d.ts.map +1 -1
- package/dist/composition/probe/problem.js +177 -49
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/report.js +1 -1
- package/dist/composition/probe/report.js.map +1 -1
- package/dist/composition/probe/residual.d.ts +7 -1
- package/dist/composition/probe/residual.d.ts.map +1 -1
- package/dist/composition/probe/residual.js +10 -7
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/run-manifest.d.ts +1 -0
- package/dist/composition/probe/run-manifest.d.ts.map +1 -1
- package/dist/composition/probe/run-manifest.js.map +1 -1
- package/dist/composition/probe/scalar-search.d.ts +50 -0
- package/dist/composition/probe/scalar-search.d.ts.map +1 -0
- package/dist/composition/probe/scalar-search.js +169 -0
- package/dist/composition/probe/scalar-search.js.map +1 -0
- package/dist/composition/probe/scoring.d.ts +1 -0
- package/dist/composition/probe/scoring.d.ts.map +1 -1
- package/dist/composition/probe/scoring.js.map +1 -1
- package/dist/composition/probe/structure.d.ts +82 -17
- package/dist/composition/probe/structure.d.ts.map +1 -1
- package/dist/composition/probe/structure.js +129 -55
- package/dist/composition/probe/structure.js.map +1 -1
- package/dist/composition/probe/study.d.ts +31 -9
- package/dist/composition/probe/study.d.ts.map +1 -1
- package/dist/composition/probe/study.js +235 -184
- package/dist/composition/probe/study.js.map +1 -1
- package/dist/composition/probe/t-tail.d.ts +16 -0
- package/dist/composition/probe/t-tail.d.ts.map +1 -0
- package/dist/composition/probe/t-tail.js +29 -0
- package/dist/composition/probe/t-tail.js.map +1 -0
- package/dist/composition/probe/types.d.ts +3 -0
- package/dist/composition/probe/types.d.ts.map +1 -1
- package/dist/composition/probe/types.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +52 -12
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +107 -60
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/quantity-clusters.d.ts +48 -0
- package/dist/composition/quantity-clusters.d.ts.map +1 -0
- package/dist/composition/quantity-clusters.js +98 -0
- package/dist/composition/quantity-clusters.js.map +1 -0
- package/dist/composition/rational-exponent.d.ts +40 -0
- package/dist/composition/rational-exponent.d.ts.map +1 -0
- package/dist/composition/rational-exponent.js +65 -0
- package/dist/composition/rational-exponent.js.map +1 -0
- package/dist/composition/representative-values.d.ts +22 -0
- package/dist/composition/representative-values.d.ts.map +1 -1
- package/dist/composition/representative-values.js +29 -0
- package/dist/composition/representative-values.js.map +1 -1
- package/dist/composition/retrodiction.d.ts +15 -0
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +12 -4
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/user-equation.d.ts +1 -0
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/composition/user-equation.js +3 -2
- package/dist/composition/user-equation.js.map +1 -1
- package/dist/core/assignment.d.ts +19 -0
- package/dist/core/assignment.d.ts.map +1 -0
- package/dist/core/assignment.js +19 -0
- package/dist/core/assignment.js.map +1 -0
- package/dist/core/compare.d.ts +32 -0
- package/dist/core/compare.d.ts.map +1 -0
- package/dist/core/compare.js +46 -0
- package/dist/core/compare.js.map +1 -0
- package/dist/core/constants.d.ts +42 -41
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +71 -51
- package/dist/core/constants.js.map +1 -1
- package/dist/core/data-file.d.ts +7 -0
- package/dist/core/data-file.d.ts.map +1 -1
- package/dist/core/data-file.js +17 -0
- package/dist/core/data-file.js.map +1 -1
- package/dist/core/format.d.ts +36 -0
- package/dist/core/format.d.ts.map +1 -0
- package/dist/core/format.js +39 -0
- package/dist/core/format.js.map +1 -0
- package/dist/core/hash.d.ts +14 -0
- package/dist/core/hash.d.ts.map +1 -0
- package/dist/core/hash.js +17 -0
- package/dist/core/hash.js.map +1 -0
- package/dist/core/json-schema.d.ts +2 -0
- package/dist/core/json-schema.d.ts.map +1 -1
- package/dist/core/json-schema.js +14 -13
- package/dist/core/json-schema.js.map +1 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/labeled-tensor.js +0 -8
- package/dist/core/labeled-tensor.js.map +1 -1
- package/dist/core/mathts-read.d.ts +25 -0
- package/dist/core/mathts-read.d.ts.map +1 -0
- package/dist/core/mathts-read.js +51 -0
- package/dist/core/mathts-read.js.map +1 -0
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js +24 -0
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.d.ts +5 -5
- package/dist/diff/bridge-ast-gradient.d.ts +27 -23
- package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-ast-gradient.js +75 -173
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- package/dist/diff/bridge-gradient.d.ts +19 -6
- package/dist/diff/bridge-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-gradient.js +19 -11
- package/dist/diff/bridge-gradient.js.map +1 -1
- package/dist/diff/bridge-specs.d.ts.map +1 -1
- package/dist/diff/bridge-specs.js +3 -0
- package/dist/diff/bridge-specs.js.map +1 -1
- package/dist/dimensional/algebra.d.ts +18 -0
- package/dist/dimensional/algebra.d.ts.map +1 -1
- package/dist/dimensional/algebra.js +41 -1
- package/dist/dimensional/algebra.js.map +1 -1
- package/dist/dimensional/ast-builders.d.ts +7 -0
- package/dist/dimensional/ast-builders.d.ts.map +1 -1
- package/dist/dimensional/ast-builders.js +11 -0
- package/dist/dimensional/ast-builders.js.map +1 -1
- package/dist/dimensional/ast-leaves.d.ts +81 -0
- package/dist/dimensional/ast-leaves.d.ts.map +1 -0
- package/dist/dimensional/ast-leaves.js +146 -0
- package/dist/dimensional/ast-leaves.js.map +1 -0
- package/dist/dimensional/ast-types.d.ts +15 -0
- package/dist/dimensional/ast-types.d.ts.map +1 -1
- package/dist/dimensional/ast-types.js.map +1 -1
- package/dist/dimensional/buckingham.d.ts.map +1 -1
- package/dist/dimensional/buckingham.js +15 -27
- package/dist/dimensional/buckingham.js.map +1 -1
- package/dist/dimensional/constant-rows.js +9 -9
- package/dist/dimensional/constant-rows.js.map +1 -1
- package/dist/dimensional/curvature-composite.d.ts +1 -1
- package/dist/dimensional/curvature-composite.js.map +1 -1
- package/dist/dimensional/dimension-inference.d.ts.map +1 -1
- package/dist/dimensional/dimension-inference.js +1 -2
- package/dist/dimensional/dimension-inference.js.map +1 -1
- package/dist/dimensional/errors.d.ts +1 -1
- package/dist/dimensional/errors.d.ts.map +1 -1
- package/dist/dimensional/errors.js +1 -15
- package/dist/dimensional/errors.js.map +1 -1
- package/dist/dimensional/exact-scale.d.ts +24 -11
- package/dist/dimensional/exact-scale.d.ts.map +1 -1
- package/dist/dimensional/exact-scale.js +122 -130
- package/dist/dimensional/exact-scale.js.map +1 -1
- package/dist/dimensional/gauge-field.d.ts.map +1 -1
- package/dist/dimensional/gauge-field.js +2 -2
- package/dist/dimensional/gauge-field.js.map +1 -1
- package/dist/dimensional/hyphen-names.d.ts +12 -2
- package/dist/dimensional/hyphen-names.d.ts.map +1 -1
- package/dist/dimensional/hyphen-names.js +44 -19
- package/dist/dimensional/hyphen-names.js.map +1 -1
- package/dist/dimensional/mathts-unit-delegation.d.ts +29 -0
- package/dist/dimensional/mathts-unit-delegation.d.ts.map +1 -0
- package/dist/dimensional/mathts-unit-delegation.js +187 -0
- package/dist/dimensional/mathts-unit-delegation.js.map +1 -0
- package/dist/dimensional/mathts-unit-wrapper.d.ts +33 -0
- package/dist/dimensional/mathts-unit-wrapper.d.ts.map +1 -0
- package/dist/dimensional/mathts-unit-wrapper.js +190 -0
- package/dist/dimensional/mathts-unit-wrapper.js.map +1 -0
- package/dist/dimensional/metric.d.ts.map +1 -1
- package/dist/dimensional/metric.js +0 -1
- package/dist/dimensional/metric.js.map +1 -1
- package/dist/dimensional/scalar-lowering.d.ts +21 -0
- package/dist/dimensional/scalar-lowering.d.ts.map +1 -0
- package/dist/dimensional/scalar-lowering.js +45 -0
- package/dist/dimensional/scalar-lowering.js.map +1 -0
- package/dist/dimensional/symbolic-constants.d.ts +9 -0
- package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
- package/dist/dimensional/symbolic-constants.js +13 -1
- package/dist/dimensional/symbolic-constants.js.map +1 -1
- package/dist/dimensional/types.d.ts +36 -0
- package/dist/dimensional/types.d.ts.map +1 -1
- package/dist/dimensional/types.js +45 -7
- package/dist/dimensional/types.js.map +1 -1
- package/dist/dimensional/unit-data.d.ts +5 -1
- package/dist/dimensional/unit-data.d.ts.map +1 -1
- package/dist/dimensional/unit-data.js +30 -6
- package/dist/dimensional/unit-data.js.map +1 -1
- package/dist/dimensional/units.d.ts +2 -0
- package/dist/dimensional/units.d.ts.map +1 -1
- package/dist/dimensional/units.js +59 -3
- package/dist/dimensional/units.js.map +1 -1
- package/dist/dimensional/validator.d.ts +2 -0
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/numerical/christoffel-flat.d.ts.map +1 -1
- package/dist/numerical/christoffel-flat.js +3 -2
- package/dist/numerical/christoffel-flat.js.map +1 -1
- package/dist/numerical/connection-lowering-helpers.d.ts +3 -1
- package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/connection-lowering-helpers.js +11 -15
- package/dist/numerical/connection-lowering-helpers.js.map +1 -1
- package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/covariant-eikonal.js +34 -11
- package/dist/numerical/covariant-eikonal.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +3 -2
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js +0 -3
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/finite-difference.d.ts +22 -0
- package/dist/numerical/finite-difference.d.ts.map +1 -0
- package/dist/numerical/finite-difference.js +27 -0
- package/dist/numerical/finite-difference.js.map +1 -0
- package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
- package/dist/numerical/geodesic-integrator.js +22 -14
- package/dist/numerical/geodesic-integrator.js.map +1 -1
- package/dist/numerical/geometrized.d.ts.map +1 -1
- package/dist/numerical/geometrized.js +0 -1
- package/dist/numerical/geometrized.js.map +1 -1
- package/dist/numerical/mathts-engine.d.ts.map +1 -1
- package/dist/numerical/mathts-engine.js +10 -24
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.d.ts.map +1 -1
- package/dist/numerical/metric-inverse.js +83 -46
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/null-ray-integrator.d.ts +2 -1
- package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
- package/dist/numerical/null-ray-integrator.js +12 -12
- package/dist/numerical/null-ray-integrator.js.map +1 -1
- package/dist/numerical/painleve-gullstrand-metric.js +2 -2
- package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
- package/dist/numerical/pderiv.d.ts.map +1 -1
- package/dist/numerical/pderiv.js +2 -6
- package/dist/numerical/pderiv.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +0 -36
- package/dist/numerical/perihelion-finder.d.ts.map +1 -1
- package/dist/numerical/perihelion-finder.js +41 -87
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/quadrature.d.ts.map +1 -1
- package/dist/numerical/quadrature.js +11 -13
- package/dist/numerical/quadrature.js.map +1 -1
- package/dist/numerical/rk4-trajectory.d.ts +10 -0
- package/dist/numerical/rk4-trajectory.d.ts.map +1 -0
- package/dist/numerical/rk4-trajectory.js +37 -0
- package/dist/numerical/rk4-trajectory.js.map +1 -0
- package/dist/numerical/schwarzschild.d.ts +14 -0
- package/dist/numerical/schwarzschild.d.ts.map +1 -0
- package/dist/numerical/schwarzschild.js +17 -0
- package/dist/numerical/schwarzschild.js.map +1 -0
- package/dist/numerical/spacetime-metrics.d.ts +12 -0
- package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
- package/dist/numerical/spacetime-metrics.js +72 -56
- package/dist/numerical/spacetime-metrics.js.map +1 -1
- package/dist/numerical/statistics.d.ts +24 -0
- package/dist/numerical/statistics.d.ts.map +1 -0
- package/dist/numerical/statistics.js +52 -0
- package/dist/numerical/statistics.js.map +1 -0
- package/dist/numerical/strides.d.ts +3 -2
- package/dist/numerical/strides.d.ts.map +1 -1
- package/dist/numerical/strides.js +3 -10
- package/dist/numerical/strides.js.map +1 -1
- package/dist/numerical/tensor-engine.d.ts +21 -0
- package/dist/numerical/tensor-engine.d.ts.map +1 -1
- package/dist/numerical/tensor-engine.js +12 -0
- package/dist/numerical/tensor-engine.js.map +1 -1
- package/dist/relations/regime.d.ts +10 -0
- package/dist/relations/regime.d.ts.map +1 -1
- package/dist/relations/regime.js +18 -1
- package/dist/relations/regime.js.map +1 -1
- package/package.json +9 -12
- package/dist/cases/brownian-sphere.d.ts +0 -68
- package/dist/cases/brownian-sphere.d.ts.map +0 -1
- package/dist/cases/brownian-sphere.js +0 -354
- package/dist/cases/brownian-sphere.js.map +0 -1
- package/dist/cases/damped-resonator.d.ts +0 -23
- package/dist/cases/damped-resonator.d.ts.map +0 -1
- package/dist/cases/damped-resonator.js +0 -224
- package/dist/cases/damped-resonator.js.map +0 -1
- package/dist/cases/kepler-rv.d.ts +0 -13
- package/dist/cases/kepler-rv.d.ts.map +0 -1
- package/dist/cases/kepler-rv.js +0 -172
- package/dist/cases/kepler-rv.js.map +0 -1
- package/dist/cases/lumped-cooling.d.ts +0 -46
- package/dist/cases/lumped-cooling.d.ts.map +0 -1
- package/dist/cases/lumped-cooling.js +0 -261
- package/dist/cases/lumped-cooling.js.map +0 -1
- package/dist/cases/resistor-noise.d.ts +0 -14
- package/dist/cases/resistor-noise.d.ts.map +0 -1
- package/dist/cases/resistor-noise.js +0 -215
- package/dist/cases/resistor-noise.js.map +0 -1
- package/dist/cases/skin-depth.d.ts +0 -21
- package/dist/cases/skin-depth.d.ts.map +0 -1
- package/dist/cases/skin-depth.js +0 -174
- package/dist/cases/skin-depth.js.map +0 -1
|
@@ -0,0 +1,743 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Numeric methods and case runners for applied cases (Part B catalog).
|
|
3
|
+
*
|
|
4
|
+
* @module cases/methods
|
|
5
|
+
*/
|
|
6
|
+
import { findRoot } from '@danielsimonjr/mathts-functions';
|
|
7
|
+
import { C_SI, EPS0_SI, G_SI, H_SI, K_B_SI, MU0_SI, SIGMA_SB_SI } from '../core/constants.js';
|
|
8
|
+
import { convertValue } from '../dimensional/units.js';
|
|
9
|
+
import { catalogRelations } from '../bridges/catalog-load.js';
|
|
10
|
+
import { evaluateCatalogRelation } from '../bridges/relation-eval.js';
|
|
11
|
+
import { integrateRK4 } from '../numerical/null-ray-integrator.js';
|
|
12
|
+
import { adaptiveQuadrature } from './quadrature.js';
|
|
13
|
+
import { appliedCaseCatalog, appliedCaseRecord, assembleAppliedCase, catalogSemanticProblems } from './catalog.js';
|
|
14
|
+
import { runAppliedCaseEngine, usesCatalogEngine, registerCaseMethods } from './engine.js';
|
|
15
|
+
import { check, requirePositive } from './types.js';
|
|
16
|
+
// --- skin-depth.ts ---
|
|
17
|
+
const SKIN_DEPTH_ID = 'case-skin-depth';
|
|
18
|
+
/** ωε/σ ceiling: the displacement current then moves the penetration depth by ≈ ωε/(2σ) ≤ 0.5%. @internal */
|
|
19
|
+
export const MAX_DISPLACEMENT_RATIO = 0.01;
|
|
20
|
+
/** l/δ ceiling for a local (classical) conductivity. @internal */
|
|
21
|
+
export const MAX_MFP_RATIO = 0.1;
|
|
22
|
+
/** ωτ ceiling: the Drude σ(ω) = σ0/(1 − iωτ) is then within 0.5% of σ0 in modulus. @internal */
|
|
23
|
+
export const MAX_OMEGA_TAU = 0.1;
|
|
24
|
+
/** d/δ floor: the field reaching the back face is then ≤ e^{−5} ≈ 0.7% of the surface field. @internal */
|
|
25
|
+
export const MIN_THICKNESS_RATIO = 5;
|
|
26
|
+
/**
|
|
27
|
+
* δ_Maxwell/δ for the plane wave k² = ω²με + iωμσ, as a function of r = ωε/σ:
|
|
28
|
+
* 1/Im k = δ √(√(1 + r²) + r), written without the cancellation of |z| − Re z.
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export function maxwellDepthFactor(r) {
|
|
32
|
+
return Math.sqrt(Math.hypot(1, r) + r);
|
|
33
|
+
}
|
|
34
|
+
/** Parent penetration depth δ_M from classical δ and r = ωε/σ. @internal */
|
|
35
|
+
export function skinDeltaMaxwellM(_inputs, outputs) {
|
|
36
|
+
const delta = outputs.delta_m;
|
|
37
|
+
const r = outputs.displacement_ratio;
|
|
38
|
+
if (delta === null || r === null || !Number.isFinite(delta) || !Number.isFinite(r)) {
|
|
39
|
+
throw new Error('skinDeltaMaxwellM: need finite delta_m and displacement_ratio');
|
|
40
|
+
}
|
|
41
|
+
return delta * maxwellDepthFactor(r);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Evaluate the skin-depth applied case at the given SI inputs.
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export function runCaseSkinDepth(i) {
|
|
48
|
+
requirePositive(SKIN_DEPTH_ID, i, ['rho_ohm_m', 'f_Hz', 'mu_r', 'eps_r', 'l_mfp_m', 'v_carrier_m_per_s', 'thickness_m']);
|
|
49
|
+
const { rho_ohm_m: rho, f_Hz: f, mu_r: muR, eps_r: epsR, l_mfp_m: l, v_carrier_m_per_s: v, thickness_m: d } = i;
|
|
50
|
+
const omega = 2 * Math.PI * f;
|
|
51
|
+
const mu = muR * MU0_SI;
|
|
52
|
+
const delta = Math.sqrt((2 * rho) / (omega * mu));
|
|
53
|
+
const r = omega * epsR * EPS0_SI * rho;
|
|
54
|
+
const deltaMaxwell = delta * maxwellDepthFactor(r);
|
|
55
|
+
const omegaTau = (omega * l) / v;
|
|
56
|
+
return {
|
|
57
|
+
outputs: {
|
|
58
|
+
omega_per_s: omega,
|
|
59
|
+
delta_m: delta,
|
|
60
|
+
R_s_ohm: rho / delta,
|
|
61
|
+
delta_maxwell_m: deltaMaxwell,
|
|
62
|
+
maxwell_deviation: delta / deltaMaxwell - 1,
|
|
63
|
+
displacement_ratio: r,
|
|
64
|
+
mfp_ratio: l / delta,
|
|
65
|
+
omega_tau: omegaTau,
|
|
66
|
+
thickness_ratio: d / delta,
|
|
67
|
+
back_field_ratio: Math.exp(-d / delta),
|
|
68
|
+
},
|
|
69
|
+
checks: [
|
|
70
|
+
check('good-conductor', 'good conductor: conduction current ≫ displacement current', 'ωε/σ', r, '<=', MAX_DISPLACEMENT_RATIO, 'chosen threshold for ≪ 1: the parent penetration depth then differs from δ by ≈ ωε/(2σ) ≤ 0.5%'),
|
|
71
|
+
check('local', 'local conductivity: the carriers\' mean free path well inside the skin depth, l ≪ δ', 'l/δ', l / delta, '<=', MAX_MFP_RATIO, 'chosen threshold for ≪ 1; beyond it the current at a point depends on the field over a path l and the anomalous skin effect sets in (Pippard 1947; Reuter & Sondheimer 1948)'),
|
|
72
|
+
check('dc-conductivity', 'DC conductivity: the drive is slow beside the carrier relaxation, ωτ ≪ 1', 'ω l/v', omegaTau, '<=', MAX_OMEGA_TAU, 'chosen threshold for ≪ 1: the Drude σ(ω) = σ0/(1 − iωτ) is then within 0.5% of σ0 in modulus'),
|
|
73
|
+
check('thick', 'the conductor is a half-space for the field: d ≫ δ', 'd/δ', d / delta, '>=', MIN_THICKNESS_RATIO, 'chosen threshold: the half-space field at the back face is then ≤ e^{−5} ≈ 0.7% of the surface field'),
|
|
74
|
+
],
|
|
75
|
+
unchecked: [
|
|
76
|
+
'ρ, μ_r and ε_r are the values at the conductor\'s temperature and at f; τ = l/v assumes one carrier species with one speed',
|
|
77
|
+
'the conductor is planar on the scale of δ (a wire of radius a needs a ≫ δ, not checked here)',
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
// --- kepler-rv.ts ---
|
|
82
|
+
const KEPLER_RV_ID = 'case-kepler-rv';
|
|
83
|
+
/** The Julian year, the year BE-52 takes (s): the unit table's `julian_year` row (`yr`). @internal */
|
|
84
|
+
export const JULIAN_YEAR_S = convertValue('1 yr', 's').value;
|
|
85
|
+
/** m_p/M_* ceiling: the test-mass K then exceeds the two-body K by (1 + q)^{2/3} − 1 ≤ 0.67%. @internal */
|
|
86
|
+
export const MAX_MASS_RATIO = 0.01;
|
|
87
|
+
/** Ceiling on the stellar radius over the periastron separation, for point masses. @internal */
|
|
88
|
+
export const MAX_RADIUS_RATIO = 0.1;
|
|
89
|
+
/** G(M_* + m_p)/(c² a) ceiling for Newtonian gravity. @internal */
|
|
90
|
+
export const MAX_WEAK_FIELD = 1e-4;
|
|
91
|
+
/** e·Δω accumulated over the record (rad) ceiling for a fixed ellipse. @internal */
|
|
92
|
+
export const MAX_APSIDAL_MISFIT = 0.01;
|
|
93
|
+
/**
|
|
94
|
+
* Evaluate the Kepler radial-velocity applied case at the given SI inputs.
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
export function runCaseKeplerRv(i) {
|
|
98
|
+
requirePositive(KEPLER_RV_ID, i, ['M_star_kg', 'm_p_kg', 'P_s', 'sin_i', 'R_star_m', 'T_obs_s']);
|
|
99
|
+
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;
|
|
100
|
+
if (!Number.isFinite(e) || e < 0 || e >= 1)
|
|
101
|
+
throw new Error(`${KEPLER_RV_ID}: eccentricity must be in [0, 1) (got ${e})`);
|
|
102
|
+
if (sinI > 1)
|
|
103
|
+
throw new Error(`${KEPLER_RV_ID}: sin_i must be in (0, 1] (got ${sinI})`);
|
|
104
|
+
const total = M + m;
|
|
105
|
+
const a = Math.cbrt((G_SI * total * P * P) / (4 * Math.PI * Math.PI));
|
|
106
|
+
const root = Math.sqrt(1 - e * e);
|
|
107
|
+
const n13 = Math.cbrt((2 * Math.PI * G_SI) / P);
|
|
108
|
+
const K = (n13 * m * sinI) / Math.cbrt(M * M) / root;
|
|
109
|
+
const K2b = (n13 * m * sinI) / Math.cbrt(total * total) / root;
|
|
110
|
+
const rPeri = a * (1 - e);
|
|
111
|
+
const weak = (G_SI * total) / (C_SI * C_SI * a);
|
|
112
|
+
const advance = catalogRelations().find((row) => row.target === 'perihelion-advance');
|
|
113
|
+
if (advance === undefined)
|
|
114
|
+
throw new Error(`${KEPLER_RV_ID}: the perihelion relation is not in the catalog`);
|
|
115
|
+
const dphi = evaluateCatalogRelation(advance, { mass: total, 'semi-major-axis': a, eccentricity: e });
|
|
116
|
+
const misfit = (e * dphi * tObs) / P;
|
|
117
|
+
return {
|
|
118
|
+
outputs: {
|
|
119
|
+
q: m / M,
|
|
120
|
+
a_m: a,
|
|
121
|
+
a_star_m: (a * m) / total,
|
|
122
|
+
K_m_per_s: K,
|
|
123
|
+
K_two_body_m_per_s: K2b,
|
|
124
|
+
two_body_deviation: K / K2b - 1,
|
|
125
|
+
r_peri_m: rPeri,
|
|
126
|
+
weak_field: weak,
|
|
127
|
+
dphi_rad_per_orbit: dphi,
|
|
128
|
+
omega_dot_deg_per_yr: ((dphi / P) * JULIAN_YEAR_S * 180) / Math.PI,
|
|
129
|
+
apsidal_misfit: misfit,
|
|
130
|
+
},
|
|
131
|
+
checks: [
|
|
132
|
+
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%'),
|
|
133
|
+
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%'),
|
|
134
|
+
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'),
|
|
135
|
+
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'),
|
|
136
|
+
],
|
|
137
|
+
unchecked: [
|
|
138
|
+
'no third body: an outer companion adds its own reflex signal and perturbs P and ω',
|
|
139
|
+
'the companion\'s radius is also small beside r_p (only the star\'s is checked)',
|
|
140
|
+
],
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
// --- damped-resonator.ts ---
|
|
144
|
+
const DAMPED_RESONATOR_ID = 'case-damped-resonator';
|
|
145
|
+
/** Q floor for the single-Lorentzian (near-resonance) form of the spectrum. @internal */
|
|
146
|
+
export const MIN_Q_LORENTZIAN = 10;
|
|
147
|
+
/** (1/t_obs)/linewidth ceiling: the record resolves the line. @internal */
|
|
148
|
+
export const MAX_RESOLUTION_RATIO = 0.1;
|
|
149
|
+
/**
|
|
150
|
+
* √(k_BT/k)/A ceiling. Thermal motion of one mode is x = X cos ω_d t + Y sin ω_d t
|
|
151
|
+
* with ⟨X²⟩ = ⟨Y²⟩ = k_BT/k (equipartition), so the envelope of the ring-down
|
|
152
|
+
* plus it is Rician with ⟨A_obs²⟩ = A² + 2k_BT/k (Rice 1944); at the ceiling
|
|
153
|
+
* √(1 + 2·0.01) − 1 ≈ 0.0100.
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
export const MAX_THERMAL_RATIO = 0.1;
|
|
157
|
+
/**
|
|
158
|
+
* FWHM in Hz of |∫₀ᵀ e^{−(α + iΔω)t} dt|², the near-resonance power spectrum of
|
|
159
|
+
* a ring-down x0 e^{−αt} cos(ω_d t) recorded for T. The negative-frequency
|
|
160
|
+
* pole is dropped, which is the Q ≫ 1 approximation. The peak is at Δω = 0:
|
|
161
|
+
* the integrand is positive, so |X(Δω)| ≤ X(0).
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
164
|
+
export function windowedLinewidthHz(alpha, T) {
|
|
165
|
+
const oneMinusE = -Math.expm1(-alpha * T);
|
|
166
|
+
const E = 1 - oneMinusE;
|
|
167
|
+
// (1 − E)² + 4E sin²(ΔωT/2) is 1 − 2E cos(ΔωT) + E² without its cancellation near Δω = 0.
|
|
168
|
+
const power = (dw) => (oneMinusE ** 2 + 4 * E * Math.sin((dw * T) / 2) ** 2) / (alpha * alpha + dw * dw);
|
|
169
|
+
const half = power(0) / 2;
|
|
170
|
+
const h = (alpha + 1 / T) / 200;
|
|
171
|
+
let lo = 0;
|
|
172
|
+
let hi = h;
|
|
173
|
+
for (let k = 1; power(hi) > half; k++) {
|
|
174
|
+
if (k > 1e6)
|
|
175
|
+
throw new Error(`${DAMPED_RESONATOR_ID}: no half-power point found (α = ${alpha}, T = ${T})`);
|
|
176
|
+
lo = hi;
|
|
177
|
+
hi += h;
|
|
178
|
+
}
|
|
179
|
+
// The crossing inside the first step past half power, by MathTS `findRoot` (Brent) on the
|
|
180
|
+
// order-one residual power/half − 1, to the bracket's floating-point resolution.
|
|
181
|
+
const crossing = findRoot((dw) => power(dw) / half - 1, lo, hi, { tol: 4 * Number.EPSILON * hi, maxIter: 200 });
|
|
182
|
+
return crossing / Math.PI;
|
|
183
|
+
}
|
|
184
|
+
/** Catalog engine: FWHM of the truncated ring-down spectrum (null when overdamped). @internal */
|
|
185
|
+
export function windowedLinewidthCatalogHz(inputs, outputs) {
|
|
186
|
+
if (inputs.Q <= 0.5)
|
|
187
|
+
return null;
|
|
188
|
+
const alpha = outputs.alpha_per_s;
|
|
189
|
+
if (alpha === null || !Number.isFinite(alpha))
|
|
190
|
+
return null;
|
|
191
|
+
return windowedLinewidthHz(alpha, inputs.t_obs_s);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Evaluate the damped-resonator applied case at the given SI inputs.
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
export function runCaseDampedResonator(i) {
|
|
198
|
+
requirePositive(DAMPED_RESONATOR_ID, i, ['f0_Hz', 'Q', 't_obs_s']);
|
|
199
|
+
const { f0_Hz: f0, Q, x0_m: x0, t_s: t, t_obs_s: tObs } = i;
|
|
200
|
+
if (!Number.isFinite(x0))
|
|
201
|
+
throw new Error(`${DAMPED_RESONATOR_ID}: x0_m must be finite (got ${x0})`);
|
|
202
|
+
if (!Number.isFinite(t) || t < 0)
|
|
203
|
+
throw new Error(`${DAMPED_RESONATOR_ID}: t_s must be a finite number ≥ 0 (got ${t})`);
|
|
204
|
+
const w0 = 2 * Math.PI * f0;
|
|
205
|
+
const alpha = w0 / (2 * Q);
|
|
206
|
+
const linewidth = f0 / Q;
|
|
207
|
+
const underdamped = Q > 0.5;
|
|
208
|
+
const root = underdamped ? Math.sqrt(1 - 1 / (4 * Q * Q)) : NaN;
|
|
209
|
+
const wd = w0 * root;
|
|
210
|
+
const decay = Math.exp(-alpha * t);
|
|
211
|
+
const windowed = underdamped ? windowedLinewidthHz(alpha, tObs) : null;
|
|
212
|
+
const envelope = underdamped ? (Math.abs(x0) * decay) / root : null;
|
|
213
|
+
const checks = [
|
|
214
|
+
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'),
|
|
215
|
+
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'),
|
|
216
|
+
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'),
|
|
217
|
+
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'),
|
|
218
|
+
];
|
|
219
|
+
const unchecked = underdamped
|
|
220
|
+
? ['the damping is viscous (velocity-proportional) and the same over the whole ring-down']
|
|
221
|
+
: ['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'];
|
|
222
|
+
if ((i.T_K === undefined) !== (i.k_N_per_m === undefined))
|
|
223
|
+
throw new Error(`${DAMPED_RESONATOR_ID}: give T_K and k_N_per_m together, or neither`);
|
|
224
|
+
let xTh = null;
|
|
225
|
+
if (i.T_K !== undefined) {
|
|
226
|
+
requirePositive(DAMPED_RESONATOR_ID, i, ['T_K', 'k_N_per_m']);
|
|
227
|
+
xTh = Math.sqrt((K_B_SI * i.T_K) / i.k_N_per_m);
|
|
228
|
+
if (envelope !== null) {
|
|
229
|
+
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%'));
|
|
230
|
+
}
|
|
231
|
+
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');
|
|
232
|
+
}
|
|
233
|
+
return {
|
|
234
|
+
outputs: {
|
|
235
|
+
alpha_per_s: alpha,
|
|
236
|
+
tau_s: 1 / alpha,
|
|
237
|
+
linewidth_Hz: linewidth,
|
|
238
|
+
f_d_Hz: underdamped ? f0 * root : null,
|
|
239
|
+
x_m: underdamped ? x0 * decay * (Math.cos(wd * t) + (alpha / wd) * Math.sin(wd * t)) : null,
|
|
240
|
+
envelope_m: envelope,
|
|
241
|
+
resolution_Hz: 1 / tObs,
|
|
242
|
+
linewidth_windowed_Hz: windowed,
|
|
243
|
+
windowed_excess: windowed === null ? null : windowed / linewidth - 1,
|
|
244
|
+
x_th_rms_m: xTh,
|
|
245
|
+
envelope_rms_m: xTh === null || envelope === null ? null : Math.sqrt(envelope * envelope + 2 * xTh * xTh),
|
|
246
|
+
},
|
|
247
|
+
checks,
|
|
248
|
+
unchecked,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
// --- resistor-noise.ts ---
|
|
252
|
+
const RESISTOR_NOISE_ID = 'case-resistor-noise';
|
|
253
|
+
/** h f_hi/(k_B T) ceiling: the Planck factor x/(eˣ−1) is then within x/2 ≤ 0.5% of 1. @internal */
|
|
254
|
+
export const CLASSICAL_MAX_X = 0.01;
|
|
255
|
+
/** 2π f_hi R_eff C_in ceiling: the input RC pole then passes 1/(1+w²) ≥ 99% at f_hi. @internal */
|
|
256
|
+
export const FLAT_BAND_MAX_WRC = 0.1;
|
|
257
|
+
/**
|
|
258
|
+
* Ceiling on σ(S_R)/S_R = 1/(φ√(B t_avg)): the resistor's noise power, left after
|
|
259
|
+
* subtracting an exactly known amplifier power, scatters by ≤ 1%. The total
|
|
260
|
+
* power scatters by 1/√(B t_avg) (Dicke 1946); φ is the resistor's share of it.
|
|
261
|
+
* @internal
|
|
262
|
+
*/
|
|
263
|
+
export const AMPLIFIER_MAX_REL_SIGMA = 0.01;
|
|
264
|
+
/** Nyquist's thermal spectral density at f, shaped by the input RC; `x/expm1(x)` → 1 as x → 0. */
|
|
265
|
+
function parentDensity(f, T, rEff, c) {
|
|
266
|
+
const x = (H_SI * f) / (K_B_SI * T);
|
|
267
|
+
const planck = x === 0 ? 1 : x / Math.expm1(x);
|
|
268
|
+
const w = 2 * Math.PI * f * rEff * c;
|
|
269
|
+
return (4 * K_B_SI * T * rEff * planck) / (1 + w * w);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Evaluate the resistor thermal-noise applied case at the given SI inputs.
|
|
273
|
+
* @internal
|
|
274
|
+
*/
|
|
275
|
+
export function runCaseResistorNoise(i) {
|
|
276
|
+
requirePositive(RESISTOR_NOISE_ID, i, ['T_K', 'R_ohm', 'R_in_ohm', 'f_hi_Hz', 't_avg_s']);
|
|
277
|
+
const { T_K: T, R_ohm: R, R_in_ohm: Rin, C_in_F: C, f_lo_Hz: fLo, f_hi_Hz: fHi, t_avg_s: tAvg } = i;
|
|
278
|
+
if (!Number.isFinite(C) || C < 0)
|
|
279
|
+
throw new Error(`${RESISTOR_NOISE_ID}: C_in_F must be a finite number ≥ 0 (got ${C})`);
|
|
280
|
+
if (!Number.isFinite(fLo) || fLo < 0 || fLo >= fHi)
|
|
281
|
+
throw new Error(`${RESISTOR_NOISE_ID}: need 0 ≤ f_lo_Hz < f_hi_Hz (got ${fLo}, ${fHi})`);
|
|
282
|
+
const B = fHi - fLo;
|
|
283
|
+
const rEff = (R * Rin) / (R + Rin);
|
|
284
|
+
const noise = catalogRelations().find((row) => row.target === 'voltage-noise-density');
|
|
285
|
+
if (noise === undefined)
|
|
286
|
+
throw new Error(`${RESISTOR_NOISE_ID}: the resistor-noise relation is not in the catalog`);
|
|
287
|
+
const spectral = (temperature, ohms) => evaluateCatalogRelation(noise, { 'johnson-temperature': temperature, resistance: ohms });
|
|
288
|
+
const S = spectral(T, rEff);
|
|
289
|
+
const S0 = spectral(T, R);
|
|
290
|
+
const vRms = Math.sqrt(S * B);
|
|
291
|
+
const vParent = Math.sqrt(adaptiveQuadrature((f) => parentDensity(f, T, rEff, C), fLo, fHi));
|
|
292
|
+
const x = (H_SI * fHi) / (K_B_SI * T);
|
|
293
|
+
const wrc = 2 * Math.PI * fHi * rEff * C;
|
|
294
|
+
const checks = [
|
|
295
|
+
check('classical', 'flat, classical spectrum: hf ≪ k_BT across the band', 'h f_hi/(k_B T)', x, '<=', CLASSICAL_MAX_X, 'chosen threshold for ≪ 1: the Planck factor at f_hi is then within x/2 ≤ 0.5% of 1'),
|
|
296
|
+
check('flat-band', 'the input RC pole lies above the band', '2π f_hi R_eff C_in', wrc, '<=', FLAT_BAND_MAX_WRC, 'chosen threshold for ≪ 1: the RC low-pass then passes ≥ 99% of the density at f_hi'),
|
|
297
|
+
];
|
|
298
|
+
const unchecked = [
|
|
299
|
+
'R_in is a physical resistance at T; an actively synthesized or cold input adds less noise than its resistance would, ' +
|
|
300
|
+
'down to the resistor alone divided by the input: V_rms,0 · R_in/(R + R_in)',
|
|
301
|
+
'no DC current through R, so no 1/f excess noise',
|
|
302
|
+
];
|
|
303
|
+
const withAmplifier = i.e_n2_V2_per_Hz !== undefined || i.i_n2_A2_per_Hz !== undefined;
|
|
304
|
+
let amp = null;
|
|
305
|
+
if (withAmplifier) {
|
|
306
|
+
const en2 = i.e_n2_V2_per_Hz ?? 0;
|
|
307
|
+
const in2 = i.i_n2_A2_per_Hz ?? 0;
|
|
308
|
+
for (const [k, v] of [['e_n2_V2_per_Hz', en2], ['i_n2_A2_per_Hz', in2]]) {
|
|
309
|
+
if (!Number.isFinite(v) || v < 0)
|
|
310
|
+
throw new Error(`${RESISTOR_NOISE_ID}: ${k} must be a finite number ≥ 0 (got ${v})`);
|
|
311
|
+
}
|
|
312
|
+
const excess = en2 + in2 * rEff * rEff;
|
|
313
|
+
const fraction = S / (S + excess);
|
|
314
|
+
amp = { total: Math.sqrt((S + excess) * B), fraction, tN: excess / (4 * K_B_SI * rEff) };
|
|
315
|
+
checks.push(check('amplifier', "the resistor's noise is resolved above the amplifier's in t_avg", '1/(φ √(B t_avg))', 1 / (fraction * Math.sqrt(B * tAvg)), '<=', AMPLIFIER_MAX_REL_SIGMA, "chosen threshold: after subtracting the amplifier's power (known exactly, e.g. from a long shorted-input run) the resistor's power scatters by ≤ 1%"));
|
|
316
|
+
unchecked.push(`e_n and i_n are white over the band and uncorrelated${i.e_n2_V2_per_Hz === undefined ? '; e_n was not given and is taken as 0' : ''}` +
|
|
317
|
+
`${i.i_n2_A2_per_Hz === undefined ? '; i_n was not given and is taken as 0' : ''}`);
|
|
318
|
+
}
|
|
319
|
+
return {
|
|
320
|
+
outputs: {
|
|
321
|
+
B_Hz: B,
|
|
322
|
+
R_eff_ohm: rEff,
|
|
323
|
+
S_V_V2_per_Hz: S,
|
|
324
|
+
V_rms_unloaded_V: Math.sqrt(S0 * B),
|
|
325
|
+
V_rms_V: vRms,
|
|
326
|
+
loading_ratio: Math.sqrt(S / S0),
|
|
327
|
+
V_rms_parent_V: vParent,
|
|
328
|
+
parent_deviation: vRms / vParent - 1,
|
|
329
|
+
V_rms_rel_sigma: 1 / (2 * Math.sqrt(B * tAvg)),
|
|
330
|
+
V_rms_total_V: amp?.total ?? null,
|
|
331
|
+
resistor_fraction: amp?.fraction ?? null,
|
|
332
|
+
T_n_K: amp?.tN ?? null,
|
|
333
|
+
},
|
|
334
|
+
checks,
|
|
335
|
+
unchecked,
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
// --- lumped-cooling.ts ---
|
|
339
|
+
const LUMPED_COOLING_ID = 'case-lumped-cooling';
|
|
340
|
+
/** The Stefan–Boltzmann constant (W m⁻² K⁻⁴) is `core/constants`'s; re-exported so the record's module-export table keeps its row. @internal */
|
|
341
|
+
export { SIGMA_SB_SI } from '../core/constants.js';
|
|
342
|
+
/** Bi = h L_c/k ceiling, L_c = V/A (Incropera §5.2, eq. 5.10). @internal */
|
|
343
|
+
export const MAX_BIOT = 0.1;
|
|
344
|
+
/** h_rad,max/h ceiling for a loss linear in T − T∞. @internal */
|
|
345
|
+
export const MAX_RADIATION_RATIO = 0.1;
|
|
346
|
+
/**
|
|
347
|
+
* T(t) of ρcV dT/dt = −A[h(T − T∞) + εσ_SB(T⁴ − T∞⁴)] for a sphere (V/A =
|
|
348
|
+
* a/3), by classical RK4 (`integrateRK4`, MathTS `solveODESystem` with `dt`,
|
|
349
|
+
* one call per step) with each step 1/100 of the local relaxation time
|
|
350
|
+
* ρca/(3(h + 4εσ_SB T³)). Stops early once |T − T∞| is below 1e-15 |T0 − T∞|.
|
|
351
|
+
* @internal
|
|
352
|
+
*/
|
|
353
|
+
export function lumpedRadiatingTemperature(p) {
|
|
354
|
+
const k = 3 / (p.rho * p.c * p.a);
|
|
355
|
+
const f = (_t, y) => {
|
|
356
|
+
const T = y[0];
|
|
357
|
+
return [-k * (p.h * (T - p.Tinf) + p.eps * SIGMA_SB_SI * (T ** 4 - p.Tinf ** 4))];
|
|
358
|
+
};
|
|
359
|
+
const floor = 1e-15 * Math.abs(p.T0 - p.Tinf);
|
|
360
|
+
let T = p.T0;
|
|
361
|
+
let s = 0;
|
|
362
|
+
while (s < p.t && Math.abs(T - p.Tinf) > floor) {
|
|
363
|
+
const rate = k * (p.h + 4 * p.eps * SIGMA_SB_SI * Math.max(T, p.Tinf) ** 3);
|
|
364
|
+
const dt = Math.min(p.t - s, 0.01 / rate);
|
|
365
|
+
T = integrateRK4(f, [T], s, s + dt, 1)[0] ?? Number.NaN;
|
|
366
|
+
s += dt;
|
|
367
|
+
}
|
|
368
|
+
return T;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* The first n roots of 1 − ζ cot ζ = Bi (Bi = h a/k, radius-based): the n-th
|
|
372
|
+
* lies in ((n−1)π, nπ), where the left side runs from −∞ (0 for n = 1) to +∞.
|
|
373
|
+
* Each is MathTS `findRoot` (Brent) on that interval, pulled in from the
|
|
374
|
+
* poles by a few ulps of kπ, since the solver evaluates both ends: at 0 the
|
|
375
|
+
* function is 0/0, and at an exact multiple of π `Math.tan` has no sign to
|
|
376
|
+
* trust. The tolerance is the bracket's own floating-point resolution.
|
|
377
|
+
* @internal
|
|
378
|
+
*/
|
|
379
|
+
export function sphereEigenvalues(biRadius, n) {
|
|
380
|
+
const f = (z) => 1 - z / Math.tan(z) - biRadius;
|
|
381
|
+
const roots = [];
|
|
382
|
+
for (let k = 1; k <= n; k++) {
|
|
383
|
+
const hi = k * Math.PI;
|
|
384
|
+
const inset = 8 * Number.EPSILON * hi;
|
|
385
|
+
const lo = k === 1 ? Number.MIN_VALUE : (k - 1) * Math.PI + inset;
|
|
386
|
+
roots.push(findRoot(f, lo, hi - inset, { tol: 4 * Number.EPSILON * hi, maxIter: 200 }));
|
|
387
|
+
}
|
|
388
|
+
return roots;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* θ/θ0 = (T − T∞)/(T0 − T∞) from the series solution of the sphere with a
|
|
392
|
+
* convective surface, at Fourier number Fo = αt/a², for the volume mean, the
|
|
393
|
+
* centre and the surface. Terms are summed until e^{−ζ²Fo} < 1e-18.
|
|
394
|
+
* @throws Error when Fo is so small that the series would need over 1e5 terms.
|
|
395
|
+
* @internal
|
|
396
|
+
*/
|
|
397
|
+
export function sphereSeries(biRadius, fo) {
|
|
398
|
+
if (fo === 0)
|
|
399
|
+
return { mean: 1, centre: 1, surface: 1 };
|
|
400
|
+
const terms = Math.ceil(Math.sqrt(42 / fo) / Math.PI) + 2;
|
|
401
|
+
if (terms > 1e5)
|
|
402
|
+
throw new Error(`${LUMPED_COOLING_ID}: Fo = ${fo} is too small for the series (needs ${terms} terms)`);
|
|
403
|
+
let mean = 0;
|
|
404
|
+
let centre = 0;
|
|
405
|
+
let surface = 0;
|
|
406
|
+
for (const z of sphereEigenvalues(biRadius, terms)) {
|
|
407
|
+
const s = Math.sin(z);
|
|
408
|
+
const c = Math.cos(z);
|
|
409
|
+
const cn = (4 * (s - z * c)) / (2 * z - Math.sin(2 * z));
|
|
410
|
+
const decay = Math.exp(-z * z * fo);
|
|
411
|
+
centre += cn * decay;
|
|
412
|
+
surface += (cn * decay * s) / z;
|
|
413
|
+
mean += (cn * decay * 3 * (s - z * c)) / z ** 3;
|
|
414
|
+
}
|
|
415
|
+
return { mean, centre, surface };
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Evaluate the lumped thermal cooling applied case at the given SI inputs.
|
|
419
|
+
* @internal
|
|
420
|
+
*/
|
|
421
|
+
export function runCaseLumpedCooling(i) {
|
|
422
|
+
requirePositive(LUMPED_COOLING_ID, i, ['a_m', 'rho_kg_per_m3', 'c_J_per_kg_K', 'k_W_per_m_K', 'h_W_per_m2_K', 'T0_K', 'T_inf_K']);
|
|
423
|
+
const { a_m: a, rho_kg_per_m3: rho, c_J_per_kg_K: c, k_W_per_m_K: k, h_W_per_m2_K: h, emissivity: eps, T0_K: T0, T_inf_K: Tinf, t_s: t, } = i;
|
|
424
|
+
if (!Number.isFinite(eps) || eps < 0 || eps > 1)
|
|
425
|
+
throw new Error(`${LUMPED_COOLING_ID}: emissivity must be in [0, 1] (got ${eps})`);
|
|
426
|
+
if (!Number.isFinite(t) || t < 0)
|
|
427
|
+
throw new Error(`${LUMPED_COOLING_ID}: t_s must be a finite number ≥ 0 (got ${t})`);
|
|
428
|
+
const tau = (rho * c * a) / (3 * h);
|
|
429
|
+
const bi = (h * (a / 3)) / k;
|
|
430
|
+
const biRadius = (h * a) / k;
|
|
431
|
+
const alpha = k / (rho * c);
|
|
432
|
+
const fo = (alpha * t) / (a * a);
|
|
433
|
+
const theta = Math.exp(-t / tau);
|
|
434
|
+
const series = sphereSeries(biRadius, fo);
|
|
435
|
+
const dT0 = T0 - Tinf;
|
|
436
|
+
const Tmax = Math.max(T0, Tinf);
|
|
437
|
+
const hRad = eps * SIGMA_SB_SI * (Tmax + Tinf) * (Tmax * Tmax + Tinf * Tinf);
|
|
438
|
+
const volume = (4 / 3) * Math.PI * a ** 3;
|
|
439
|
+
const biRadiating = ((h + hRad) * (a / 3)) / k;
|
|
440
|
+
const tRadiating = biRadiating <= MAX_BIOT ? lumpedRadiatingTemperature({ a, rho, c, h, eps, T0, Tinf, t }) : null;
|
|
441
|
+
return {
|
|
442
|
+
outputs: {
|
|
443
|
+
tau_s: tau,
|
|
444
|
+
Bi: bi,
|
|
445
|
+
Bi_radius: biRadius,
|
|
446
|
+
alpha_m2_per_s: alpha,
|
|
447
|
+
Fo: fo,
|
|
448
|
+
theta,
|
|
449
|
+
T_K: Tinf + dT0 * theta,
|
|
450
|
+
Q_J: rho * c * volume * dT0 * -Math.expm1(-t / tau),
|
|
451
|
+
theta_parent_mean: series.mean,
|
|
452
|
+
parent_deviation: theta / series.mean - 1,
|
|
453
|
+
T_centre_K: Tinf + dT0 * series.centre,
|
|
454
|
+
T_surface_K: Tinf + dT0 * series.surface,
|
|
455
|
+
h_rad_max_W_per_m2_K: hRad,
|
|
456
|
+
Bi_radiating: biRadiating,
|
|
457
|
+
T_radiating_K: tRadiating,
|
|
458
|
+
},
|
|
459
|
+
checks: [
|
|
460
|
+
check('lumped', 'one temperature for the sphere: internal conduction fast beside surface loss, Bi ≪ 1', 'h (a/3)/k', bi, '<=', MAX_BIOT, 'the conventional criterion Bi ≤ 0.1 with L_c = V/A (Incropera §5.2); parent_deviation shows the error it leaves at t'),
|
|
461
|
+
check('linear-loss', 'the loss is linear in T − T∞: radiation small beside convection', 'εσ_SB(T_max + T∞)(T_max² + T∞²)/h', hRad / h, '<=', MAX_RADIATION_RATIO, 'chosen threshold: the neglected radiative conductance is ≤ 10% of h at the hottest point of the run (Incropera eq. 1.9 linearization)'),
|
|
462
|
+
],
|
|
463
|
+
unchecked: [
|
|
464
|
+
'h is uniform over the sphere and constant in time; for natural convection it falls as the sphere approaches T∞',
|
|
465
|
+
'ρ, c and k are constant over [min(T0, T∞), max(T0, T∞)]',
|
|
466
|
+
],
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
// --- brownian-sphere.ts ---
|
|
470
|
+
const BROWNIAN_SPHERE_ID = 'case-brownian-sphere';
|
|
471
|
+
/** Standard gravity (CGPM 1901), for the sedimentation speed: the unit table's `standard_gravity` row, read as newtons per kilogram-force. @internal */
|
|
472
|
+
export const G_STANDARD = convertValue('1 kgf/kg', 'm/s^2').value;
|
|
473
|
+
/** The thresholds `ab-stokes-einstein` states: Re ≤ 0.1 and τ_p/t ≤ 0.01. @internal */
|
|
474
|
+
export const MAX_RE = 0.1;
|
|
475
|
+
/** τ_p/t ceiling beside the Stokes–Einstein regime. @internal */
|
|
476
|
+
export const MAX_TAU_P_RATIO = 0.01;
|
|
477
|
+
/** Ceiling on the memory term's own share of the MSD, |MSD_H/MSD_OU − 1|. @internal */
|
|
478
|
+
export const MAX_MEMORY_CORRECTION = 0.01;
|
|
479
|
+
/** (v_s t)²/(2Dt) ceiling along gravity when the vertical axis is tracked. @internal */
|
|
480
|
+
export const MAX_DRIFT_RATIO = 0.01;
|
|
481
|
+
/** Ceiling on |MSD/MSD_wall − 1|: the wall's correction to the tracked MSD is negligible. @internal */
|
|
482
|
+
export const MAX_WALL_CORRECTION = 0.01;
|
|
483
|
+
/** Ceiling on the last retained Faxén term (a/h)⁵/16 over the series' value. @internal */
|
|
484
|
+
export const MAX_FAXEN_LAST_TERM = 0.01;
|
|
485
|
+
/** Ceiling on √(2 D_⊥ t)/(h − a): the height, and so D_∥ and D_⊥, barely change over t. @internal */
|
|
486
|
+
export const MAX_WALL_EXCURSION = 0.1;
|
|
487
|
+
/** t − τ(1 − e^{−t/τ}) in units of τ, i.e. x − (1 − e^{−x}), without its cancellation at small x. @internal */
|
|
488
|
+
export function ballisticDeficit(x) {
|
|
489
|
+
return x < 1e-3 ? x * x * (1 / 2 - x / 6 + (x * x) / 24 - (x * x * x) / 120) : x + Math.expm1(-x);
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* MSD/(2Dt) per axis for a sphere with fluid inertia: added mass and the Basset
|
|
493
|
+
* memory force, in an unbounded incompressible fluid, velocities in equilibrium.
|
|
494
|
+
*
|
|
495
|
+
* The velocity autocorrelation has the Laplace transform
|
|
496
|
+
* Ĉ(s) = k_BT/(M s + γ(1 + √(s τ_f))), M = m + m_f/2, from the frequency-dependent
|
|
497
|
+
* Stokes drag γ(1 + √(sτ_f)) + s m_f/2 (Stokes 1851; the Basset 1888 term is its
|
|
498
|
+
* √s part; Hinch 1975, J. Fluid Mech. 72, 499; Clercx & Schram 1992, Phys. Rev.
|
|
499
|
+
* A 46, 1942). Its poles in √s both have negative real part, so Ĉ has none on the
|
|
500
|
+
* principal sheet and C(t) is the branch-cut integral
|
|
501
|
+
* C(t) = (k_BT/πγ) ∫₀^∞ e^{−ut} √(τ_f u)/((1 − τ_p u)² + τ_f u) du, τ_p = M/γ.
|
|
502
|
+
* Then ⟨Δx²⟩ = 2∫₀ᵗ (t − s) C(s) ds, and with v = ut,
|
|
503
|
+
* MSD/(2Dt) = (1/π) ∫₀^∞ √(βv) (v − 1 + e^{−v}) / (v² ((1 − αv)² + βv)) dv, α = τ_p/t, β = τ_f/t,
|
|
504
|
+
* integrated here over ln v by MathTS `quad` (adaptive Gauss–Kronrod), split at v = 1, 1/β and around
|
|
505
|
+
* the near-resonance at v = 1/α (width √(β/α) in ln v; β/α ≤ 9 for any densities).
|
|
506
|
+
*
|
|
507
|
+
* Limits: → 1 − 2√(τ_f/(πt)) + (τ_f − τ_p)/t for t ≫ τ_p, τ_f (expanding Ĉ in √s),
|
|
508
|
+
* whose second derivative is the VACF tail k_BT/(12 ρ_f (πνt)^{3/2}); → t/(2τ_p)
|
|
509
|
+
* for t ≪ τ_p, i.e. ⟨Δx²⟩ → (k_BT/M) t². Requires β > 0: without memory the
|
|
510
|
+
* poles reach the principal sheet and this integral no longer holds them.
|
|
511
|
+
* @internal
|
|
512
|
+
*/
|
|
513
|
+
export function hydrodynamicMsdRatio(alpha, beta) {
|
|
514
|
+
const f = (y) => {
|
|
515
|
+
const v = Math.exp(y);
|
|
516
|
+
const lag = 1 - alpha * v;
|
|
517
|
+
return (Math.sqrt(beta * v) * (ballisticDeficit(v) / v)) / (lag * lag + beta * v);
|
|
518
|
+
};
|
|
519
|
+
const peak = -Math.log(alpha);
|
|
520
|
+
const w = Math.min(1, Math.sqrt(beta / alpha));
|
|
521
|
+
const points = [0, -Math.log(beta), peak, ...[1, 2, 4].flatMap((k) => [peak - k * w, peak + k * w])].sort((x, y) => x - y);
|
|
522
|
+
// The integrand falls as v^{3/2} below and v^{−3/2} above the breakpoints: e^{−75} at ±50 in ln v.
|
|
523
|
+
const edges = [points[0] - 50, ...points, points[points.length - 1] + 50];
|
|
524
|
+
let sum = 0;
|
|
525
|
+
for (let k = 1; k < edges.length; k++)
|
|
526
|
+
if (edges[k] > edges[k - 1])
|
|
527
|
+
sum += adaptiveQuadrature(f, edges[k - 1], edges[k], 1e-12);
|
|
528
|
+
return sum / Math.PI;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* D_∥/D₀ for a sphere translating parallel to a plane wall, centre at h:
|
|
532
|
+
* 1 − (9/16)ξ + (1/8)ξ³ − (45/256)ξ⁴ − (1/16)ξ⁵, ξ = a/h (Faxén 1923, method of
|
|
533
|
+
* reflections, as quoted in Happel & Brenner 1965, Low Reynolds Number
|
|
534
|
+
* Hydrodynamics, ch. 7). A series in a/h, truncated:
|
|
535
|
+
* its error is not bounded here, and near contact it misses the logarithmic
|
|
536
|
+
* lubrication divergence of the drag.
|
|
537
|
+
* @internal
|
|
538
|
+
*/
|
|
539
|
+
export function faxenParallel(aOverH) {
|
|
540
|
+
const x = aOverH;
|
|
541
|
+
return 1 - (9 / 16) * x + (1 / 8) * x ** 3 - (45 / 256) * x ** 4 - (1 / 16) * x ** 5;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* λ = F/(6πηaU) for a sphere approaching a plane wall head-on, centre at h > a,
|
|
545
|
+
* exact in Stokes flow (Brenner 1961, Chem. Eng. Sci. 16, 242, bispherical coordinates):
|
|
546
|
+
* λ = (4/3) sinh α Σₙ n(n+1)/((2n−1)(2n+3)) · [(2 sinh(2n+1)α + (2n+1) sinh 2α) /
|
|
547
|
+
* (4 sinh²(n+½)α − (2n+1)² sinh²α) − 1], cosh α = h/a. D_⊥ = D₀/λ.
|
|
548
|
+
*
|
|
549
|
+
* The bracket is rewritten over 4 sinh²(n+½)α so that no sinh overflows; its
|
|
550
|
+
* terms fall as e^{−(2n+1)α}, so near contact (α → 0) the sum needs ~40/α terms,
|
|
551
|
+
* and the low-n denominators lose ~α⁻² of relative precision to cancellation.
|
|
552
|
+
* Limits: λ → 1 + (9/8)(a/h) far away (Lorentz 1907); λ → a/δ + (1/5) ln(a/δ) +
|
|
553
|
+
* 0.971 as the gap δ = h − a → 0 (Cox & Brenner 1967, Chem. Eng. Sci. 22, 1753).
|
|
554
|
+
* @throws Error if h/a ≤ 1.
|
|
555
|
+
* @internal
|
|
556
|
+
*/
|
|
557
|
+
export function brennerPerpendicular(hOverA) {
|
|
558
|
+
if (!(hOverA > 1))
|
|
559
|
+
throw new Error(`brennerPerpendicular: need h/a > 1 (got ${hOverA})`);
|
|
560
|
+
const al = Math.acosh(hOverA);
|
|
561
|
+
const s = Math.sinh(al);
|
|
562
|
+
const s2a = Math.sinh(2 * al);
|
|
563
|
+
let sum = 0;
|
|
564
|
+
for (let n = 1;; n++) {
|
|
565
|
+
const x = (n + 0.5) * al;
|
|
566
|
+
const k = 2 * n + 1;
|
|
567
|
+
const inv4Sinh2 = Math.exp(-2 * x) / Math.expm1(-2 * x) ** 2;
|
|
568
|
+
const cothMinus1 = 2 / Math.expm1(2 * x);
|
|
569
|
+
const bracket = (cothMinus1 + k * s2a * inv4Sinh2 + k * k * s * s * inv4Sinh2) / (1 - k * k * s * s * inv4Sinh2);
|
|
570
|
+
const term = ((n * (n + 1)) / ((2 * n - 1) * (2 * n + 3))) * bracket;
|
|
571
|
+
sum += term;
|
|
572
|
+
if (term < 1e-17 * sum)
|
|
573
|
+
break;
|
|
574
|
+
if (n > 1e7)
|
|
575
|
+
throw new Error(`brennerPerpendicular: no convergence at h/a = ${hOverA}`);
|
|
576
|
+
}
|
|
577
|
+
return (4 / 3) * s * sum;
|
|
578
|
+
}
|
|
579
|
+
/** Regime tag string for the brownian-sphere case at the current inputs and outputs. */
|
|
580
|
+
export function brownianSphereRegimeAt(inputs, outputs) {
|
|
581
|
+
const re = outputs.Re;
|
|
582
|
+
const m = outputs.m_kg;
|
|
583
|
+
const gamma = outputs.gamma_kg_per_s;
|
|
584
|
+
const t = inputs.t_s;
|
|
585
|
+
if (re == null || m == null || gamma == null || t == null)
|
|
586
|
+
return '';
|
|
587
|
+
return `upt regime diffusion --at Re=${re} m=${m} gamma=${gamma} t=${t}`;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Evaluate the brownian-sphere applied case at the given SI inputs.
|
|
591
|
+
* @internal
|
|
592
|
+
*/
|
|
593
|
+
export function runCaseBrownianSphere(i) {
|
|
594
|
+
requirePositive(BROWNIAN_SPHERE_ID, i, ['T_K', 'eta_Pa_s', 'a_m', 'rho_p_kg_per_m3', 'rho_f_kg_per_m3', 't_s']);
|
|
595
|
+
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;
|
|
596
|
+
if (d !== 1 && d !== 2 && d !== 3)
|
|
597
|
+
throw new Error(`${BROWNIAN_SPHERE_ID}: d must be 1, 2 or 3 (got ${d})`);
|
|
598
|
+
const kT = K_B_SI * T;
|
|
599
|
+
const gamma = 6 * Math.PI * eta * a;
|
|
600
|
+
const D = kT / gamma;
|
|
601
|
+
const msd = 2 * d * D * t;
|
|
602
|
+
const volume = (4 / 3) * Math.PI * a ** 3;
|
|
603
|
+
const m = volume * rhoP;
|
|
604
|
+
const tauP = (m + 0.5 * volume * rhoF) / gamma;
|
|
605
|
+
const tauF = (rhoF * a * a) / eta;
|
|
606
|
+
const vSed = ((2 / 9) * (rhoP - rhoF) * G_STANDARD * a * a) / eta;
|
|
607
|
+
const re = (rhoF * a * Math.max(Math.sqrt(kT / m), Math.abs(vSed))) / eta;
|
|
608
|
+
const tauBare = m / gamma;
|
|
609
|
+
const msdLangevin = 2 * d * D * tauBare * ballisticDeficit(t / tauBare);
|
|
610
|
+
const msdHydro = msd * hydrodynamicMsdRatio(tauP / t, tauF / t);
|
|
611
|
+
const msdAddedMass = 2 * d * D * tauP * ballisticDeficit(t / tauP);
|
|
612
|
+
const memory = msdHydro / msdAddedMass - 1;
|
|
613
|
+
const checks = [
|
|
614
|
+
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"),
|
|
615
|
+
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)"),
|
|
616
|
+
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)'),
|
|
617
|
+
];
|
|
618
|
+
const unchecked = ['the particle is a rigid sphere and a is its hydrodynamic radius (a coating or a shell changes it)'];
|
|
619
|
+
let wall = null;
|
|
620
|
+
if (i.h_m !== undefined) {
|
|
621
|
+
const h = i.h_m;
|
|
622
|
+
if (!Number.isFinite(h) || !(h > a))
|
|
623
|
+
throw new Error(`${BROWNIAN_SPHERE_ID}: h_m must be a finite distance > a_m, centre to wall (got ${h})`);
|
|
624
|
+
const faxen = faxenParallel(a / h);
|
|
625
|
+
const lambda = brennerPerpendicular(h / a);
|
|
626
|
+
const dPar = D * faxen;
|
|
627
|
+
const dPerp = D / lambda;
|
|
628
|
+
const msdWall = 2 * t * (Math.min(d, 2) * dPar + (d === 3 ? dPerp : 0));
|
|
629
|
+
wall = { dPar, dPerp, msdWall };
|
|
630
|
+
const excursion = Math.sqrt(2 * dPerp * t) + (Math.abs(vSed) * t) / lambda;
|
|
631
|
+
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'));
|
|
632
|
+
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)');
|
|
633
|
+
}
|
|
634
|
+
if (d === 3) {
|
|
635
|
+
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'));
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
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'}`);
|
|
639
|
+
}
|
|
640
|
+
return {
|
|
641
|
+
outputs: {
|
|
642
|
+
gamma_kg_per_s: gamma,
|
|
643
|
+
D_m2_per_s: D,
|
|
644
|
+
MSD_m2: msd,
|
|
645
|
+
rms_displacement_m: Math.sqrt(msd),
|
|
646
|
+
m_kg: m,
|
|
647
|
+
tau_p_s: tauP,
|
|
648
|
+
tau_f_s: tauF,
|
|
649
|
+
v_sed_m_per_s: vSed,
|
|
650
|
+
Re: re,
|
|
651
|
+
MSD_langevin_m2: msdLangevin,
|
|
652
|
+
langevin_deviation: msd / msdLangevin - 1,
|
|
653
|
+
MSD_hydro_m2: msdHydro,
|
|
654
|
+
hydro_correction_m2: msdHydro - msd,
|
|
655
|
+
hydro_deviation: msd / msdHydro - 1,
|
|
656
|
+
memory_correction: memory,
|
|
657
|
+
D_parallel_m2_per_s: wall?.dPar ?? null,
|
|
658
|
+
D_perp_m2_per_s: wall?.dPerp ?? null,
|
|
659
|
+
MSD_wall_m2: wall?.msdWall ?? null,
|
|
660
|
+
wall_deviation: wall === null ? null : msd / wall.msdWall - 1,
|
|
661
|
+
},
|
|
662
|
+
checks,
|
|
663
|
+
unchecked,
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
const RUN_BY_ID = {
|
|
667
|
+
'case-skin-depth': runCaseSkinDepth,
|
|
668
|
+
'case-kepler-rv': runCaseKeplerRv,
|
|
669
|
+
'case-damped-resonator': runCaseDampedResonator,
|
|
670
|
+
'case-resistor-noise': runCaseResistorNoise,
|
|
671
|
+
'case-lumped-cooling': runCaseLumpedCooling,
|
|
672
|
+
'case-brownian-sphere': runCaseBrownianSphere,
|
|
673
|
+
};
|
|
674
|
+
function buildAppliedCase(id) {
|
|
675
|
+
const record = appliedCaseRecord(id);
|
|
676
|
+
const legacy = RUN_BY_ID[id];
|
|
677
|
+
const run = usesCatalogEngine(record)
|
|
678
|
+
? (inputs) => runAppliedCaseEngine(record, inputs)
|
|
679
|
+
: legacy;
|
|
680
|
+
const regimeAt = id === 'case-brownian-sphere' ? brownianSphereRegimeAt : undefined;
|
|
681
|
+
return assembleAppliedCase(record, { run, regimeAt });
|
|
682
|
+
}
|
|
683
|
+
/** Case id → case assembled from the catalog and a runner. @internal */
|
|
684
|
+
export const APPLIED_CASE_RUNNERS = new Map(appliedCaseCatalog().cases.map((row) => [row.id, buildAppliedCase(row.id)]));
|
|
685
|
+
/** Names exported numeric methods for catalog validation. @internal */
|
|
686
|
+
export const CASE_METHOD_NAMES = new Set([
|
|
687
|
+
'maxwellDepthFactor',
|
|
688
|
+
'skinDeltaMaxwellM',
|
|
689
|
+
'windowedLinewidthCatalogHz',
|
|
690
|
+
'windowedLinewidthHz',
|
|
691
|
+
'lumpedRadiatingTemperature',
|
|
692
|
+
'sphereEigenvalues',
|
|
693
|
+
'sphereSeries',
|
|
694
|
+
'ballisticDeficit',
|
|
695
|
+
'hydrodynamicMsdRatio',
|
|
696
|
+
'faxenParallel',
|
|
697
|
+
'brennerPerpendicular',
|
|
698
|
+
'brownianSphereRegimeAt',
|
|
699
|
+
'runCaseResistorNoise',
|
|
700
|
+
'runCaseSkinDepth',
|
|
701
|
+
'runCaseKeplerRv',
|
|
702
|
+
'runCaseDampedResonator',
|
|
703
|
+
'runCaseLumpedCooling',
|
|
704
|
+
'runCaseBrownianSphere',
|
|
705
|
+
]);
|
|
706
|
+
/** Named numeric methods invoked from catalog output `method` fields. */
|
|
707
|
+
export const CASE_METHODS = {
|
|
708
|
+
maxwellDepthFactor,
|
|
709
|
+
skinDeltaMaxwellM,
|
|
710
|
+
windowedLinewidthCatalogHz,
|
|
711
|
+
windowedLinewidthHz,
|
|
712
|
+
lumpedRadiatingTemperature,
|
|
713
|
+
sphereEigenvalues,
|
|
714
|
+
sphereSeries,
|
|
715
|
+
ballisticDeficit,
|
|
716
|
+
hydrodynamicMsdRatio,
|
|
717
|
+
faxenParallel,
|
|
718
|
+
brennerPerpendicular,
|
|
719
|
+
brownianSphereRegimeAt,
|
|
720
|
+
runCaseResistorNoise,
|
|
721
|
+
runCaseSkinDepth,
|
|
722
|
+
runCaseKeplerRv,
|
|
723
|
+
runCaseDampedResonator,
|
|
724
|
+
runCaseLumpedCooling,
|
|
725
|
+
runCaseBrownianSphere,
|
|
726
|
+
};
|
|
727
|
+
registerCaseMethods(CASE_METHODS);
|
|
728
|
+
/** Assembled skin-depth applied case (catalog + runner). */
|
|
729
|
+
export const SKIN_DEPTH_CASE = APPLIED_CASE_RUNNERS.get('case-skin-depth');
|
|
730
|
+
/** Assembled Kepler RV applied case (catalog + runner). */
|
|
731
|
+
export const KEPLER_RV_CASE = APPLIED_CASE_RUNNERS.get('case-kepler-rv');
|
|
732
|
+
/** Assembled damped-resonator applied case (catalog + runner). */
|
|
733
|
+
export const DAMPED_RESONATOR_CASE = APPLIED_CASE_RUNNERS.get('case-damped-resonator');
|
|
734
|
+
/** Assembled resistor-noise applied case (catalog + runner). */
|
|
735
|
+
export const RESISTOR_NOISE_CASE = APPLIED_CASE_RUNNERS.get('case-resistor-noise');
|
|
736
|
+
/** Assembled lumped-cooling applied case (catalog + runner). */
|
|
737
|
+
export const LUMPED_COOLING_CASE = APPLIED_CASE_RUNNERS.get('case-lumped-cooling');
|
|
738
|
+
/** Assembled brownian-sphere applied case (catalog + runner). */
|
|
739
|
+
export const BROWNIAN_SPHERE_CASE = APPLIED_CASE_RUNNERS.get('case-brownian-sphere');
|
|
740
|
+
for (const msg of catalogSemanticProblems(appliedCaseCatalog(), CASE_METHOD_NAMES)) {
|
|
741
|
+
throw new Error(msg);
|
|
742
|
+
}
|
|
743
|
+
//# sourceMappingURL=methods.js.map
|