@classytic/labs 0.1.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/LICENSE +21 -0
- package/README.md +105 -0
- package/dist/biology/enzyme-rate/index.d.mts +1 -0
- package/dist/biology/enzyme-rate/preset.d.mts +25 -0
- package/dist/biology/enzyme-rate/preset.mjs +256 -0
- package/dist/biology/genetic-cross/core.d.mts +64 -0
- package/dist/biology/genetic-cross/core.mjs +147 -0
- package/dist/biology/genetic-cross/grid.mjs +239 -0
- package/dist/biology/genetic-cross/index.d.mts +3 -0
- package/dist/biology/genetic-cross/preset.d.mts +26 -0
- package/dist/biology/genetic-cross/preset.mjs +184 -0
- package/dist/biology/genetic-cross/sex-linked.d.mts +27 -0
- package/dist/biology/genetic-cross/sex-linked.mjs +226 -0
- package/dist/biology/index.d.mts +11 -0
- package/dist/biology/index.mjs +12 -0
- package/dist/biology/photosynthesis-factors/index.d.mts +1 -0
- package/dist/biology/photosynthesis-factors/preset.d.mts +25 -0
- package/dist/biology/photosynthesis-factors/preset.mjs +270 -0
- package/dist/biology/punnett-cross/index.d.mts +1 -0
- package/dist/biology/punnett-cross/preset.d.mts +27 -0
- package/dist/biology/punnett-cross/preset.mjs +21 -0
- package/dist/biology/respiration/index.d.mts +1 -0
- package/dist/biology/respiration/preset.d.mts +17 -0
- package/dist/biology/respiration/preset.mjs +179 -0
- package/dist/biology/sequence/central-dogma.d.mts +17 -0
- package/dist/biology/sequence/central-dogma.mjs +339 -0
- package/dist/biology/sequence/core.d.mts +38 -0
- package/dist/biology/sequence/core.mjs +178 -0
- package/dist/biology/sequence/index.d.mts +3 -0
- package/dist/biology/sequence/preset.d.mts +20 -0
- package/dist/biology/sequence/preset.mjs +235 -0
- package/dist/blocks/accounting.d.mts +142 -0
- package/dist/blocks/accounting.mjs +446 -0
- package/dist/blocks/authoring.d.mts +12 -0
- package/dist/blocks/authoring.mjs +705 -0
- package/dist/blocks/biology.d.mts +197 -0
- package/dist/blocks/biology.mjs +513 -0
- package/dist/blocks/chem.d.mts +128 -0
- package/dist/blocks/chem.mjs +486 -0
- package/dist/blocks/circuits.d.mts +86 -0
- package/dist/blocks/circuits.mjs +348 -0
- package/dist/blocks/discrete.d.mts +62 -0
- package/dist/blocks/discrete.mjs +314 -0
- package/dist/blocks/economics.d.mts +56 -0
- package/dist/blocks/economics.mjs +203 -0
- package/dist/blocks/geography.d.mts +58 -0
- package/dist/blocks/geography.mjs +115 -0
- package/dist/blocks/geometry.d.mts +28 -0
- package/dist/blocks/geometry.mjs +160 -0
- package/dist/blocks/ict.d.mts +65 -0
- package/dist/blocks/ict.mjs +197 -0
- package/dist/blocks/index.d.mts +4555 -0
- package/dist/blocks/index.mjs +120 -0
- package/dist/blocks/lab-block.d.mts +16 -0
- package/dist/blocks/lab-block.mjs +74 -0
- package/dist/blocks/lab-config.d.mts +23 -0
- package/dist/blocks/lab-config.mjs +200 -0
- package/dist/blocks/lab-gallery.d.mts +30 -0
- package/dist/blocks/lab-gallery.mjs +208 -0
- package/dist/blocks/language.d.mts +349 -0
- package/dist/blocks/language.mjs +750 -0
- package/dist/blocks/lesson.d.mts +43 -0
- package/dist/blocks/lesson.mjs +140 -0
- package/dist/blocks/math.d.mts +411 -0
- package/dist/blocks/math.mjs +1536 -0
- package/dist/blocks/ml.d.mts +84 -0
- package/dist/blocks/ml.mjs +146 -0
- package/dist/blocks/physics.d.mts +259 -0
- package/dist/blocks/physics.mjs +868 -0
- package/dist/blocks/statistics.d.mts +29 -0
- package/dist/blocks/statistics.mjs +123 -0
- package/dist/catalog/index.d.mts +3 -0
- package/dist/catalog/index.mjs +8 -0
- package/dist/catalog/registry.d.mts +46 -0
- package/dist/catalog/registry.mjs +56 -0
- package/dist/catalog/templates.d.mts +11 -0
- package/dist/catalog/templates.mjs +141 -0
- package/dist/chem/battery.d.mts +16 -0
- package/dist/chem/battery.mjs +311 -0
- package/dist/chem/bohr-atom.d.mts +16 -0
- package/dist/chem/bohr-atom.mjs +212 -0
- package/dist/chem/diffusion/asset.mjs +76 -0
- package/dist/chem/diffusion/index.d.mts +1 -0
- package/dist/chem/diffusion/preset.d.mts +15 -0
- package/dist/chem/diffusion/preset.mjs +188 -0
- package/dist/chem/electrochem/index.d.mts +1 -0
- package/dist/chem/electrochem/preset.d.mts +23 -0
- package/dist/chem/electrochem/preset.mjs +402 -0
- package/dist/chem/equilibrium/index.d.mts +1 -0
- package/dist/chem/equilibrium/preset.d.mts +36 -0
- package/dist/chem/equilibrium/preset.mjs +416 -0
- package/dist/chem/gas-box/index.d.mts +1 -0
- package/dist/chem/gas-box/preset.d.mts +27 -0
- package/dist/chem/gas-box/preset.mjs +395 -0
- package/dist/chem/index.d.mts +16 -0
- package/dist/chem/index.mjs +17 -0
- package/dist/chem/kinetics/index.d.mts +1 -0
- package/dist/chem/kinetics/preset.d.mts +31 -0
- package/dist/chem/kinetics/preset.mjs +478 -0
- package/dist/chem/periodic-trends/index.d.mts +1 -0
- package/dist/chem/periodic-trends/preset.d.mts +21 -0
- package/dist/chem/periodic-trends/preset.mjs +831 -0
- package/dist/chem/reaction-lab.d.mts +18 -0
- package/dist/chem/reaction-lab.mjs +165 -0
- package/dist/chem/reaction-profile.d.mts +21 -0
- package/dist/chem/reaction-profile.mjs +287 -0
- package/dist/chem/solution/dilution.d.mts +27 -0
- package/dist/chem/solution/dilution.mjs +199 -0
- package/dist/chem/solution/field.d.mts +30 -0
- package/dist/chem/solution/field.mjs +145 -0
- package/dist/chem/solution/index.d.mts +3 -0
- package/dist/chem/solution/solution-box.d.mts +28 -0
- package/dist/chem/solution/solution-box.mjs +140 -0
- package/dist/chem/stoichiometry/index.d.mts +1 -0
- package/dist/chem/stoichiometry/preset.d.mts +29 -0
- package/dist/chem/stoichiometry/preset.mjs +392 -0
- package/dist/chem/titration/index.d.mts +1 -0
- package/dist/chem/titration/preset.d.mts +29 -0
- package/dist/chem/titration/preset.mjs +436 -0
- package/dist/circuits/ac-dc/asset.mjs +295 -0
- package/dist/circuits/ac-dc/index.d.mts +1 -0
- package/dist/circuits/ac-dc/preset.d.mts +16 -0
- package/dist/circuits/ac-dc/preset.mjs +134 -0
- package/dist/circuits/capacitor-leak/index.d.mts +1 -0
- package/dist/circuits/capacitor-leak/preset.d.mts +32 -0
- package/dist/circuits/capacitor-leak/preset.mjs +271 -0
- package/dist/circuits/circuit/asset.d.mts +6 -0
- package/dist/circuits/circuit/asset.mjs +367 -0
- package/dist/circuits/circuit/index.d.mts +2 -0
- package/dist/circuits/circuit/preset.d.mts +46 -0
- package/dist/circuits/circuit/preset.mjs +235 -0
- package/dist/circuits/circuit-builder.d.mts +30 -0
- package/dist/circuits/circuit-builder.mjs +412 -0
- package/dist/circuits/circuit-lab.d.mts +20 -0
- package/dist/circuits/circuit-lab.mjs +400 -0
- package/dist/circuits/index.d.mts +7 -0
- package/dist/circuits/index.mjs +8 -0
- package/dist/commerce/accounting/core.d.mts +48 -0
- package/dist/commerce/accounting/core.mjs +57 -0
- package/dist/commerce/accounting/equation-balance.d.mts +35 -0
- package/dist/commerce/accounting/equation-balance.mjs +292 -0
- package/dist/commerce/accounting/index.d.mts +4 -0
- package/dist/commerce/accounting/journal-poster.d.mts +29 -0
- package/dist/commerce/accounting/journal-poster.mjs +472 -0
- package/dist/commerce/accounting/statement-sorter.d.mts +25 -0
- package/dist/commerce/accounting/statement-sorter.mjs +304 -0
- package/dist/commerce/economics/core.d.mts +33 -0
- package/dist/commerce/economics/core.mjs +26 -0
- package/dist/commerce/economics/demand-shift-vs-move.d.mts +35 -0
- package/dist/commerce/economics/demand-shift-vs-move.mjs +324 -0
- package/dist/commerce/economics/elasticity-revenue.d.mts +31 -0
- package/dist/commerce/economics/elasticity-revenue.mjs +253 -0
- package/dist/commerce/economics/index.d.mts +4 -0
- package/dist/commerce/economics/market-equilibrium.d.mts +33 -0
- package/dist/commerce/economics/market-equilibrium.mjs +340 -0
- package/dist/commerce/index.d.mts +9 -0
- package/dist/commerce/index.mjs +10 -0
- package/dist/core/easing.d.mts +28 -0
- package/dist/core/easing.mjs +66 -0
- package/dist/core/index.d.mts +10 -0
- package/dist/core/index.mjs +11 -0
- package/dist/core/numeric.d.mts +37 -0
- package/dist/core/numeric.mjs +75 -0
- package/dist/core/reactive.d.mts +24 -0
- package/dist/core/reactive.mjs +51 -0
- package/dist/core/rng.d.mts +21 -0
- package/dist/core/rng.mjs +39 -0
- package/dist/core/tex.d.mts +14 -0
- package/dist/core/tex.mjs +44 -0
- package/dist/core/timeline.d.mts +34 -0
- package/dist/core/timeline.mjs +77 -0
- package/dist/core/util.d.mts +19 -0
- package/dist/core/util.mjs +31 -0
- package/dist/discrete/arrangements/preset.d.mts +28 -0
- package/dist/discrete/arrangements/preset.mjs +304 -0
- package/dist/discrete/bayes/preset.d.mts +33 -0
- package/dist/discrete/bayes/preset.mjs +476 -0
- package/dist/discrete/binomial/preset.d.mts +25 -0
- package/dist/discrete/binomial/preset.mjs +333 -0
- package/dist/discrete/core/combinatorics.d.mts +23 -0
- package/dist/discrete/core/combinatorics.mjs +57 -0
- package/dist/discrete/core/inclusionExclusion.d.mts +19 -0
- package/dist/discrete/core/inclusionExclusion.mjs +30 -0
- package/dist/discrete/core/pigeonhole.d.mts +15 -0
- package/dist/discrete/core/pigeonhole.mjs +24 -0
- package/dist/discrete/core/probability.d.mts +29 -0
- package/dist/discrete/core/probability.mjs +43 -0
- package/dist/discrete/core/sets.d.mts +21 -0
- package/dist/discrete/core/sets.mjs +45 -0
- package/dist/discrete/counting-slots/preset.d.mts +30 -0
- package/dist/discrete/counting-slots/preset.mjs +553 -0
- package/dist/discrete/counting-tree/index.d.mts +1 -0
- package/dist/discrete/counting-tree/preset.d.mts +44 -0
- package/dist/discrete/counting-tree/preset.mjs +364 -0
- package/dist/discrete/expected-value/preset.d.mts +28 -0
- package/dist/discrete/expected-value/preset.mjs +352 -0
- package/dist/discrete/hypergeometric/preset.d.mts +25 -0
- package/dist/discrete/hypergeometric/preset.mjs +330 -0
- package/dist/discrete/index.d.mts +26 -0
- package/dist/discrete/index.mjs +27 -0
- package/dist/discrete/karnaugh/index.d.mts +1 -0
- package/dist/discrete/karnaugh/preset.d.mts +30 -0
- package/dist/discrete/karnaugh/preset.mjs +452 -0
- package/dist/discrete/lln/asset.mjs +206 -0
- package/dist/discrete/lln/index.d.mts +1 -0
- package/dist/discrete/lln/preset.d.mts +17 -0
- package/dist/discrete/lln/preset.mjs +152 -0
- package/dist/discrete/logic-circuit/index.d.mts +1 -0
- package/dist/discrete/logic-circuit/preset.d.mts +47 -0
- package/dist/discrete/logic-circuit/preset.mjs +307 -0
- package/dist/discrete/monte-carlo/index.d.mts +1 -0
- package/dist/discrete/monte-carlo/preset.d.mts +64 -0
- package/dist/discrete/monte-carlo/preset.mjs +446 -0
- package/dist/discrete/monty-hall/index.d.mts +1 -0
- package/dist/discrete/monty-hall/preset.d.mts +23 -0
- package/dist/discrete/monty-hall/preset.mjs +491 -0
- package/dist/discrete/outcome-builder/preset.d.mts +24 -0
- package/dist/discrete/outcome-builder/preset.mjs +283 -0
- package/dist/discrete/pascal/preset.d.mts +24 -0
- package/dist/discrete/pascal/preset.mjs +372 -0
- package/dist/discrete/sample-space/index.d.mts +1 -0
- package/dist/discrete/sample-space/preset.d.mts +42 -0
- package/dist/discrete/sample-space/preset.mjs +395 -0
- package/dist/discrete/selection/preset.d.mts +33 -0
- package/dist/discrete/selection/preset.mjs +406 -0
- package/dist/discrete/truth-table/index.d.mts +1 -0
- package/dist/discrete/truth-table/preset.d.mts +30 -0
- package/dist/discrete/truth-table/preset.mjs +456 -0
- package/dist/discrete/venn/index.d.mts +1 -0
- package/dist/discrete/venn/preset.d.mts +32 -0
- package/dist/discrete/venn/preset.mjs +461 -0
- package/dist/geography/cycle-lab/index.d.mts +1 -0
- package/dist/geography/cycle-lab/preset.d.mts +25 -0
- package/dist/geography/cycle-lab/preset.mjs +254 -0
- package/dist/geography/cycles.d.mts +21 -0
- package/dist/geography/cycles.mjs +205 -0
- package/dist/geography/index.d.mts +4 -0
- package/dist/geography/index.mjs +5 -0
- package/dist/geometry/board/index.d.mts +1 -0
- package/dist/geometry/board/preset.d.mts +71 -0
- package/dist/geometry/board/preset.mjs +148 -0
- package/dist/geometry/builder.d.mts +18 -0
- package/dist/geometry/builder.mjs +332 -0
- package/dist/geometry/index.d.mts +4 -0
- package/dist/geometry/index.mjs +5 -0
- package/dist/geometry/intersecting-circles.d.mts +17 -0
- package/dist/geometry/intersecting-circles.mjs +104 -0
- package/dist/ict/index.d.mts +5 -0
- package/dist/ict/index.mjs +6 -0
- package/dist/ict/number-systems/base-odometer.d.mts +34 -0
- package/dist/ict/number-systems/base-odometer.mjs +160 -0
- package/dist/ict/number-systems/bit-grouper.d.mts +32 -0
- package/dist/ict/number-systems/bit-grouper.mjs +190 -0
- package/dist/ict/number-systems/index.d.mts +4 -0
- package/dist/ict/number-systems/place-value-dial.d.mts +29 -0
- package/dist/ict/number-systems/place-value-dial.mjs +153 -0
- package/dist/ict/number-systems/wheel.d.mts +73 -0
- package/dist/ict/number-systems/wheel.mjs +279 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.mjs +11 -0
- package/dist/kit/anim.mjs +52 -0
- package/dist/kit/annotate.mjs +116 -0
- package/dist/kit/answer-check.d.mts +38 -0
- package/dist/kit/answer-check.mjs +65 -0
- package/dist/kit/asset-util.mjs +15 -0
- package/dist/kit/controls.mjs +77 -0
- package/dist/kit/cycle.d.mts +44 -0
- package/dist/kit/cycle.mjs +188 -0
- package/dist/kit/diagram.mjs +176 -0
- package/dist/kit/electronics.mjs +357 -0
- package/dist/kit/expr-analysis.d.mts +37 -0
- package/dist/kit/expr-analysis.mjs +111 -0
- package/dist/kit/frame.d.mts +70 -0
- package/dist/kit/frame.mjs +205 -0
- package/dist/kit/freq-tree.mjs +99 -0
- package/dist/kit/gameshow.mjs +315 -0
- package/dist/kit/index.d.mts +5 -0
- package/dist/kit/index.mjs +6 -0
- package/dist/kit/logic-gates.d.mts +6 -0
- package/dist/kit/logic-gates.mjs +210 -0
- package/dist/kit/molecules.mjs +178 -0
- package/dist/kit/pedagogy.d.mts +126 -0
- package/dist/kit/pedagogy.mjs +331 -0
- package/dist/kit/play.d.mts +21 -0
- package/dist/kit/play.mjs +52 -0
- package/dist/kit/probability.mjs +141 -0
- package/dist/kit/proportion.mjs +112 -0
- package/dist/kit/reaction.mjs +102 -0
- package/dist/kit/rich.d.mts +10 -0
- package/dist/kit/rich.mjs +21 -0
- package/dist/kit/scale.mjs +230 -0
- package/dist/kit/space.mjs +326 -0
- package/dist/kit/steps.d.mts +24 -0
- package/dist/kit/steps.mjs +57 -0
- package/dist/kit/thermal.mjs +289 -0
- package/dist/language/agreement/index.d.mts +1 -0
- package/dist/language/agreement/preset.d.mts +27 -0
- package/dist/language/agreement/preset.mjs +113 -0
- package/dist/language/article-lens/index.d.mts +1 -0
- package/dist/language/article-lens/preset.d.mts +31 -0
- package/dist/language/article-lens/preset.mjs +125 -0
- package/dist/language/deck.d.mts +45 -0
- package/dist/language/deck.mjs +61 -0
- package/dist/language/icon.d.mts +40 -0
- package/dist/language/icon.mjs +73 -0
- package/dist/language/index.d.mts +10 -0
- package/dist/language/index.mjs +11 -0
- package/dist/language/preposition-scene/index.d.mts +1 -0
- package/dist/language/preposition-scene/preset.d.mts +34 -0
- package/dist/language/preposition-scene/preset.mjs +234 -0
- package/dist/language/sentence-builder/index.d.mts +1 -0
- package/dist/language/sentence-builder/preset.d.mts +32 -0
- package/dist/language/sentence-builder/preset.mjs +122 -0
- package/dist/language/transform/index.d.mts +1 -0
- package/dist/language/transform/preset.d.mts +31 -0
- package/dist/language/transform/preset.mjs +137 -0
- package/dist/language/ui.d.mts +53 -0
- package/dist/language/ui.mjs +88 -0
- package/dist/language/word-match/index.d.mts +1 -0
- package/dist/language/word-match/preset.d.mts +22 -0
- package/dist/language/word-match/preset.mjs +148 -0
- package/dist/math/area-model/asset.d.mts +6 -0
- package/dist/math/area-model/asset.mjs +270 -0
- package/dist/math/area-model/index.d.mts +2 -0
- package/dist/math/area-model/preset.d.mts +29 -0
- package/dist/math/area-model/preset.mjs +243 -0
- package/dist/math/balance-algebra/asset.d.mts +6 -0
- package/dist/math/balance-algebra/asset.mjs +150 -0
- package/dist/math/balance-algebra/index.d.mts +2 -0
- package/dist/math/balance-algebra/preset.d.mts +30 -0
- package/dist/math/balance-algebra/preset.mjs +228 -0
- package/dist/math/derivation.d.mts +22 -0
- package/dist/math/derivation.mjs +113 -0
- package/dist/math/derivative-explorer/index.d.mts +1 -0
- package/dist/math/derivative-explorer/preset.d.mts +19 -0
- package/dist/math/derivative-explorer/preset.mjs +227 -0
- package/dist/math/function-machine/index.d.mts +1 -0
- package/dist/math/function-machine/preset.d.mts +21 -0
- package/dist/math/function-machine/preset.mjs +177 -0
- package/dist/math/gradient-descent.d.mts +23 -0
- package/dist/math/gradient-descent.mjs +473 -0
- package/dist/math/grapher/index.d.mts +1 -0
- package/dist/math/grapher/preset.d.mts +40 -0
- package/dist/math/grapher/preset.mjs +313 -0
- package/dist/math/harmonic-form/index.d.mts +1 -0
- package/dist/math/harmonic-form/preset.d.mts +21 -0
- package/dist/math/harmonic-form/preset.mjs +387 -0
- package/dist/math/index.d.mts +25 -0
- package/dist/math/index.mjs +26 -0
- package/dist/math/integral-explorer/index.d.mts +1 -0
- package/dist/math/integral-explorer/preset.d.mts +23 -0
- package/dist/math/integral-explorer/preset.mjs +217 -0
- package/dist/math/interactive/index.d.mts +1 -0
- package/dist/math/interactive/preset.d.mts +72 -0
- package/dist/math/interactive/preset.mjs +202 -0
- package/dist/math/limit-explorer/index.d.mts +1 -0
- package/dist/math/limit-explorer/preset.d.mts +19 -0
- package/dist/math/limit-explorer/preset.mjs +216 -0
- package/dist/math/linear-system/index.d.mts +1 -0
- package/dist/math/linear-system/preset.d.mts +28 -0
- package/dist/math/linear-system/preset.mjs +164 -0
- package/dist/math/mystery-bucket/asset.d.mts +6 -0
- package/dist/math/mystery-bucket/asset.mjs +145 -0
- package/dist/math/mystery-bucket/index.d.mts +2 -0
- package/dist/math/mystery-bucket/preset.d.mts +36 -0
- package/dist/math/mystery-bucket/preset.mjs +116 -0
- package/dist/math/number-line/index.d.mts +1 -0
- package/dist/math/number-line/preset.d.mts +24 -0
- package/dist/math/number-line/preset.mjs +142 -0
- package/dist/math/parabola/index.d.mts +1 -0
- package/dist/math/parabola/preset.d.mts +13 -0
- package/dist/math/parabola/preset.mjs +79 -0
- package/dist/math/pattern/asset.d.mts +6 -0
- package/dist/math/pattern/asset.mjs +102 -0
- package/dist/math/pattern/index.d.mts +2 -0
- package/dist/math/pattern/preset.d.mts +32 -0
- package/dist/math/pattern/preset.mjs +294 -0
- package/dist/math/triangle-trig/index.d.mts +1 -0
- package/dist/math/triangle-trig/preset.d.mts +47 -0
- package/dist/math/triangle-trig/preset.mjs +245 -0
- package/dist/math/trig-explorer.d.mts +18 -0
- package/dist/math/trig-explorer.mjs +209 -0
- package/dist/ml/boundary/index.d.mts +1 -0
- package/dist/ml/boundary/preset.d.mts +24 -0
- package/dist/ml/boundary/preset.mjs +385 -0
- package/dist/ml/classifier/index.d.mts +1 -0
- package/dist/ml/classifier/preset.d.mts +25 -0
- package/dist/ml/classifier/preset.mjs +315 -0
- package/dist/ml/index.d.mts +6 -0
- package/dist/ml/index.mjs +7 -0
- package/dist/ml/kmeans/index.d.mts +1 -0
- package/dist/ml/kmeans/preset.d.mts +33 -0
- package/dist/ml/kmeans/preset.mjs +236 -0
- package/dist/ml/knn/index.d.mts +1 -0
- package/dist/ml/knn/preset.d.mts +28 -0
- package/dist/ml/knn/preset.mjs +279 -0
- package/dist/ml/regression/index.d.mts +1 -0
- package/dist/ml/regression/preset.d.mts +32 -0
- package/dist/ml/regression/preset.mjs +394 -0
- package/dist/physics/atwood/index.d.mts +1 -0
- package/dist/physics/atwood/preset.d.mts +23 -0
- package/dist/physics/atwood/preset.mjs +312 -0
- package/dist/physics/bullet-walls/index.d.mts +1 -0
- package/dist/physics/bullet-walls/preset.d.mts +28 -0
- package/dist/physics/bullet-walls/preset.mjs +373 -0
- package/dist/physics/carnot/index.d.mts +1 -0
- package/dist/physics/carnot/preset.d.mts +27 -0
- package/dist/physics/carnot/preset.mjs +427 -0
- package/dist/physics/circular-motion/index.d.mts +1 -0
- package/dist/physics/circular-motion/preset.d.mts +25 -0
- package/dist/physics/circular-motion/preset.mjs +293 -0
- package/dist/physics/collision-track/index.d.mts +1 -0
- package/dist/physics/collision-track/preset.d.mts +27 -0
- package/dist/physics/collision-track/preset.mjs +352 -0
- package/dist/physics/efficiency/index.d.mts +1 -0
- package/dist/physics/efficiency/preset.d.mts +33 -0
- package/dist/physics/efficiency/preset.mjs +343 -0
- package/dist/physics/electric-field/index.d.mts +1 -0
- package/dist/physics/electric-field/preset.d.mts +15 -0
- package/dist/physics/electric-field/preset.mjs +306 -0
- package/dist/physics/energy-skate/index.d.mts +1 -0
- package/dist/physics/energy-skate/preset.d.mts +25 -0
- package/dist/physics/energy-skate/preset.mjs +254 -0
- package/dist/physics/entropy/index.d.mts +1 -0
- package/dist/physics/entropy/preset.d.mts +18 -0
- package/dist/physics/entropy/preset.mjs +416 -0
- package/dist/physics/expansion/index.d.mts +1 -0
- package/dist/physics/expansion/preset.d.mts +26 -0
- package/dist/physics/expansion/preset.mjs +609 -0
- package/dist/physics/exponential/asset.mjs +221 -0
- package/dist/physics/exponential/index.d.mts +1 -0
- package/dist/physics/exponential/preset.d.mts +17 -0
- package/dist/physics/exponential/preset.mjs +182 -0
- package/dist/physics/gas-process/index.d.mts +1 -0
- package/dist/physics/gas-process/preset.d.mts +30 -0
- package/dist/physics/gas-process/preset.mjs +384 -0
- package/dist/physics/gravitation/index.d.mts +1 -0
- package/dist/physics/gravitation/preset.d.mts +24 -0
- package/dist/physics/gravitation/preset.mjs +345 -0
- package/dist/physics/gravity-drop.d.mts +9 -0
- package/dist/physics/gravity-drop.mjs +187 -0
- package/dist/physics/heat-transfer/index.d.mts +1 -0
- package/dist/physics/heat-transfer/preset.d.mts +27 -0
- package/dist/physics/heat-transfer/preset.mjs +626 -0
- package/dist/physics/impulse/index.d.mts +1 -0
- package/dist/physics/impulse/preset.d.mts +29 -0
- package/dist/physics/impulse/preset.mjs +453 -0
- package/dist/physics/index.d.mts +43 -0
- package/dist/physics/index.mjs +44 -0
- package/dist/physics/kepler/index.d.mts +1 -0
- package/dist/physics/kepler/preset.d.mts +27 -0
- package/dist/physics/kepler/preset.mjs +257 -0
- package/dist/physics/lever/asset.d.mts +6 -0
- package/dist/physics/lever/asset.mjs +220 -0
- package/dist/physics/lever/index.d.mts +2 -0
- package/dist/physics/lever/preset.d.mts +31 -0
- package/dist/physics/lever/preset.mjs +261 -0
- package/dist/physics/lorentz/index.d.mts +1 -0
- package/dist/physics/lorentz/preset.d.mts +29 -0
- package/dist/physics/lorentz/preset.mjs +367 -0
- package/dist/physics/magnetism/index.d.mts +1 -0
- package/dist/physics/magnetism/preset.d.mts +15 -0
- package/dist/physics/magnetism/preset.mjs +334 -0
- package/dist/physics/optics/asset.d.mts +6 -0
- package/dist/physics/optics/asset.mjs +234 -0
- package/dist/physics/optics/index.d.mts +2 -0
- package/dist/physics/optics/preset.d.mts +14 -0
- package/dist/physics/optics/preset.mjs +202 -0
- package/dist/physics/orbit-lab.d.mts +6 -0
- package/dist/physics/orbit-lab.mjs +222 -0
- package/dist/physics/projectile-lab.d.mts +10 -0
- package/dist/physics/projectile-lab.mjs +354 -0
- package/dist/physics/rain-relative/index.d.mts +1 -0
- package/dist/physics/rain-relative/preset.d.mts +19 -0
- package/dist/physics/rain-relative/preset.mjs +358 -0
- package/dist/physics/ramp-forces/index.d.mts +1 -0
- package/dist/physics/ramp-forces/preset.d.mts +36 -0
- package/dist/physics/ramp-forces/preset.mjs +550 -0
- package/dist/physics/river-boat.d.mts +22 -0
- package/dist/physics/river-boat.mjs +498 -0
- package/dist/physics/shm/index.d.mts +1 -0
- package/dist/physics/shm/preset.d.mts +33 -0
- package/dist/physics/shm/preset.mjs +554 -0
- package/dist/physics/stopping-distance/index.d.mts +1 -0
- package/dist/physics/stopping-distance/preset.d.mts +29 -0
- package/dist/physics/stopping-distance/preset.mjs +662 -0
- package/dist/physics/temperature-scales/index.d.mts +1 -0
- package/dist/physics/temperature-scales/preset.d.mts +15 -0
- package/dist/physics/temperature-scales/preset.mjs +353 -0
- package/dist/physics/terminal-velocity/index.d.mts +1 -0
- package/dist/physics/terminal-velocity/preset.d.mts +26 -0
- package/dist/physics/terminal-velocity/preset.mjs +404 -0
- package/dist/physics/thermal/index.d.mts +1 -0
- package/dist/physics/thermal/preset.d.mts +44 -0
- package/dist/physics/thermal/preset.mjs +373 -0
- package/dist/physics/vector-board/index.d.mts +1 -0
- package/dist/physics/vector-board/preset.d.mts +65 -0
- package/dist/physics/vector-board/preset.mjs +273 -0
- package/dist/physics/vector-board/view.d.mts +49 -0
- package/dist/physics/vector-board/view.mjs +58 -0
- package/dist/physics/vector-scene.d.mts +41 -0
- package/dist/physics/vector-scene.mjs +211 -0
- package/dist/physics/vector-types/index.d.mts +1 -0
- package/dist/physics/vector-types/preset.d.mts +27 -0
- package/dist/physics/vector-types/preset.mjs +192 -0
- package/dist/physics/water-density/index.d.mts +1 -0
- package/dist/physics/water-density/preset.d.mts +18 -0
- package/dist/physics/water-density/preset.mjs +439 -0
- package/dist/physics/waves/core.mjs +33 -0
- package/dist/physics/waves/doppler.d.mts +23 -0
- package/dist/physics/waves/doppler.mjs +260 -0
- package/dist/physics/waves/index.d.mts +4 -0
- package/dist/physics/waves/preset.d.mts +30 -0
- package/dist/physics/waves/preset.mjs +488 -0
- package/dist/physics/waves/ripple.d.mts +26 -0
- package/dist/physics/waves/ripple.mjs +234 -0
- package/dist/physics/waves/string.d.mts +29 -0
- package/dist/physics/waves/string.mjs +289 -0
- package/dist/physics/work-energy/index.d.mts +1 -0
- package/dist/physics/work-energy/preset.d.mts +17 -0
- package/dist/physics/work-energy/preset.mjs +341 -0
- package/dist/schemas/index.d.mts +235 -0
- package/dist/schemas/index.mjs +145 -0
- package/dist/statistics/center-spread/preset.d.mts +34 -0
- package/dist/statistics/center-spread/preset.mjs +323 -0
- package/dist/statistics/core/descriptive.d.mts +35 -0
- package/dist/statistics/core/descriptive.mjs +64 -0
- package/dist/statistics/core/normal.d.mts +21 -0
- package/dist/statistics/core/normal.mjs +37 -0
- package/dist/statistics/core/sequences.d.mts +27 -0
- package/dist/statistics/core/sequences.mjs +35 -0
- package/dist/statistics/galton/preset.d.mts +27 -0
- package/dist/statistics/galton/preset.mjs +331 -0
- package/dist/statistics/histogram/preset.d.mts +27 -0
- package/dist/statistics/histogram/preset.mjs +385 -0
- package/dist/statistics/index.d.mts +11 -0
- package/dist/statistics/index.mjs +12 -0
- package/dist/statistics/normal/preset.d.mts +30 -0
- package/dist/statistics/normal/preset.mjs +400 -0
- package/dist/statistics/sampling/preset.d.mts +32 -0
- package/dist/statistics/sampling/preset.mjs +406 -0
- package/dist/statistics/sequence/preset.d.mts +28 -0
- package/dist/statistics/sequence/preset.mjs +302 -0
- package/dist/statistics/z-table/preset.d.mts +28 -0
- package/dist/statistics/z-table/preset.mjs +348 -0
- package/package.json +266 -0
- package/styles.css +267 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Tex } from "../../core/tex.mjs";
|
|
4
|
+
import { Chip, Slider } from "../../kit/controls.mjs";
|
|
5
|
+
import { Callout, ControlBar, Field, LabFrame } from "../../kit/frame.mjs";
|
|
6
|
+
import { useFrameTick } from "../../kit/anim.mjs";
|
|
7
|
+
import { PlayWrap, usePlayGate } from "../../kit/play.mjs";
|
|
8
|
+
import { useRef, useState } from "react";
|
|
9
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { carnotCycle, gammaDiatomic, gammaMonatomic } from "@classytic/stage/thermo";
|
|
11
|
+
|
|
12
|
+
//#region src/physics/carnot/preset.tsx
|
|
13
|
+
/**
|
|
14
|
+
* CarnotCycleLab — the most efficient possible heat engine, shown two ways at once:
|
|
15
|
+
* • P–V diagram: the four-leg loop (hot isothermal expansion → adiabatic expansion
|
|
16
|
+
* → cold isothermal compression → adiabatic compression). The ENCLOSED area is
|
|
17
|
+
* the net work the engine delivers per cycle.
|
|
18
|
+
* • T–S diagram: the very same cycle is a RECTANGLE — heat in along the top (Th),
|
|
19
|
+
* heat out along the bottom (Tc), entropy unchanged on the adiabatic sides. Its
|
|
20
|
+
* area (ΔS·(Th−Tc)) equals the net work too, and it makes the entropy bookkeeping
|
|
21
|
+
* obvious: ΔS = Qh/Th = Qc/Tc, so the gas returns to the same entropy (net ΔS = 0).
|
|
22
|
+
*
|
|
23
|
+
* The efficiency η = 1 − Tc/Th falls straight out, and no real engine can beat it
|
|
24
|
+
* (2nd law). A point animates around both diagrams together. Pure
|
|
25
|
+
* `@classytic/stage/thermo` kernel; play-gated.
|
|
26
|
+
*/
|
|
27
|
+
const W = 720, H = 380;
|
|
28
|
+
const V1 = .02;
|
|
29
|
+
const J = (x) => Math.round(x).toString();
|
|
30
|
+
function CarnotCycleLab({ hotK = 500, coldK = 300, gas = "monatomic", expansionRatio = 2, title = "Carnot cycle — the best a heat engine can do", prompt = "A gas absorbs heat at a hot temperature, does work, and dumps the rest at a cold one. Watch the loop on the P–V diagram and the same cycle as a rectangle on the T–S diagram.", objectives = [
|
|
31
|
+
"See the Carnot cycle as a P–V loop whose area is the net work",
|
|
32
|
+
"Read the same cycle as a T–S rectangle (heat in at Th, out at Tc)",
|
|
33
|
+
"Derive the efficiency η = 1 − Tc/Th — the ceiling no engine can beat"
|
|
34
|
+
] } = {}) {
|
|
35
|
+
const [Th, setTh] = useState(hotK);
|
|
36
|
+
const [Tc, setTc] = useState(coldK);
|
|
37
|
+
const [mono, setMono] = useState(gas === "monatomic");
|
|
38
|
+
const [vr, setVr] = useState(expansionRatio);
|
|
39
|
+
const uRef = useRef(0);
|
|
40
|
+
const gate = usePlayGate();
|
|
41
|
+
useFrameTick(gate.running, (f) => {
|
|
42
|
+
uRef.current = (uRef.current + Math.min(.05, f.dtMs / 1e3) * .18) % 1;
|
|
43
|
+
});
|
|
44
|
+
const tcc = Math.min(Tc, Th - 20);
|
|
45
|
+
const gamma = mono ? gammaMonatomic : gammaDiatomic;
|
|
46
|
+
const c = carnotCycle(1, Th, tcc, V1, V1 * vr, gamma);
|
|
47
|
+
const dS = c.legs[0].dS;
|
|
48
|
+
const allV = c.legs.flatMap((l) => l.path.map((p) => p.V));
|
|
49
|
+
const allP = c.legs.flatMap((l) => l.path.map((p) => p.P));
|
|
50
|
+
const Vmax = Math.max(...allV) * 1.08, Vmin = Math.min(...allV) * .9;
|
|
51
|
+
const Pmax = Math.max(...allP) * 1.08;
|
|
52
|
+
const AX = 50, BX = 350, AY = 64, BY = 320;
|
|
53
|
+
const pvx = (v) => AX + (v - Vmin) / (Vmax - Vmin) * (BX - AX);
|
|
54
|
+
const pvy = (p) => BY - p / Pmax * (BY - AY);
|
|
55
|
+
const loop = c.legs.flatMap((l) => l.path).map((p) => `${pvx(p.V).toFixed(1)},${pvy(p.P).toFixed(1)}`).join(" ");
|
|
56
|
+
const CX = 430, DX = 700, CY = 64, DY = 320;
|
|
57
|
+
const Smax = dS * 1.18, Tmax = Th * 1.12;
|
|
58
|
+
const tsx = (s) => CX + s / Smax * (DX - CX);
|
|
59
|
+
const tsy = (t) => DY - t / Tmax * (DY - CY);
|
|
60
|
+
const u = uRef.current;
|
|
61
|
+
const li = Math.min(3, Math.floor(u * 4));
|
|
62
|
+
const lf = u * 4 % 1;
|
|
63
|
+
const leg = c.legs[li];
|
|
64
|
+
const pvPt = leg.path[Math.min(leg.path.length - 1, Math.round(lf * (leg.path.length - 1)))];
|
|
65
|
+
const tsState = () => {
|
|
66
|
+
if (li === 0) return {
|
|
67
|
+
s: lf * dS,
|
|
68
|
+
t: Th
|
|
69
|
+
};
|
|
70
|
+
if (li === 1) return {
|
|
71
|
+
s: dS,
|
|
72
|
+
t: Th + lf * (tcc - Th)
|
|
73
|
+
};
|
|
74
|
+
if (li === 2) return {
|
|
75
|
+
s: dS - lf * dS,
|
|
76
|
+
t: tcc
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
s: 0,
|
|
80
|
+
t: tcc + lf * (Th - tcc)
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
const ts = tsState();
|
|
84
|
+
const legColor = (i) => i === 0 ? "var(--stage-danger, #e03131)" : i === 2 ? "var(--stage-accent, #3b82f6)" : "var(--stage-muted)";
|
|
85
|
+
const figure = /* @__PURE__ */ jsx(PlayWrap, {
|
|
86
|
+
gate,
|
|
87
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
88
|
+
style: {
|
|
89
|
+
borderRadius: 14,
|
|
90
|
+
overflow: "hidden",
|
|
91
|
+
background: "var(--stage-bg)",
|
|
92
|
+
border: "1px solid var(--stage-grid)"
|
|
93
|
+
},
|
|
94
|
+
children: /* @__PURE__ */ jsxs("svg", {
|
|
95
|
+
viewBox: `0 0 ${W} ${H}`,
|
|
96
|
+
width: "100%",
|
|
97
|
+
role: "img",
|
|
98
|
+
"aria-label": `Carnot cycle, efficiency ${(c.efficiency * 100).toFixed(0)} percent`,
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsx("text", {
|
|
101
|
+
x: AX,
|
|
102
|
+
y: AY - 14,
|
|
103
|
+
fontSize: 12,
|
|
104
|
+
fontWeight: 700,
|
|
105
|
+
fill: "var(--stage-fg)",
|
|
106
|
+
children: "P–V diagram"
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ jsx("line", {
|
|
109
|
+
x1: AX,
|
|
110
|
+
y1: CY,
|
|
111
|
+
x2: AX,
|
|
112
|
+
y2: BY,
|
|
113
|
+
stroke: "var(--stage-fg)",
|
|
114
|
+
strokeWidth: 1.5
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ jsx("line", {
|
|
117
|
+
x1: AX,
|
|
118
|
+
y1: BY,
|
|
119
|
+
x2: BX,
|
|
120
|
+
y2: BY,
|
|
121
|
+
stroke: "var(--stage-fg)",
|
|
122
|
+
strokeWidth: 1.5
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ jsx("text", {
|
|
125
|
+
x: AX - 6,
|
|
126
|
+
y: 70,
|
|
127
|
+
textAnchor: "end",
|
|
128
|
+
fontSize: 10,
|
|
129
|
+
fill: "var(--stage-muted)",
|
|
130
|
+
children: "P"
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ jsx("text", {
|
|
133
|
+
x: BX,
|
|
134
|
+
y: 338,
|
|
135
|
+
textAnchor: "end",
|
|
136
|
+
fontSize: 10,
|
|
137
|
+
fill: "var(--stage-muted)",
|
|
138
|
+
children: "V →"
|
|
139
|
+
}),
|
|
140
|
+
/* @__PURE__ */ jsx("polygon", {
|
|
141
|
+
points: loop,
|
|
142
|
+
fill: "var(--stage-warn)",
|
|
143
|
+
opacity: .16
|
|
144
|
+
}),
|
|
145
|
+
c.legs.map((l, i) => /* @__PURE__ */ jsx("polyline", {
|
|
146
|
+
points: l.path.map((p) => `${pvx(p.V).toFixed(1)},${pvy(p.P).toFixed(1)}`).join(" "),
|
|
147
|
+
fill: "none",
|
|
148
|
+
stroke: legColor(i),
|
|
149
|
+
strokeWidth: i % 2 === 0 ? 3 : 2,
|
|
150
|
+
strokeDasharray: i % 2 === 1 ? "4 3" : void 0,
|
|
151
|
+
strokeLinejoin: "round"
|
|
152
|
+
}, i)),
|
|
153
|
+
/* @__PURE__ */ jsx("text", {
|
|
154
|
+
x: 400 / 2,
|
|
155
|
+
y: 384 / 2,
|
|
156
|
+
textAnchor: "middle",
|
|
157
|
+
fontSize: 11,
|
|
158
|
+
fontWeight: 700,
|
|
159
|
+
fill: "color-mix(in oklab, var(--stage-warn) 80%, var(--stage-fg))",
|
|
160
|
+
children: "W = enclosed area"
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ jsx("circle", {
|
|
163
|
+
cx: pvx(pvPt.V),
|
|
164
|
+
cy: pvy(pvPt.P),
|
|
165
|
+
r: 6,
|
|
166
|
+
fill: "var(--stage-good)",
|
|
167
|
+
stroke: "var(--stage-bg)",
|
|
168
|
+
strokeWidth: 2
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ jsx("text", {
|
|
171
|
+
x: CX,
|
|
172
|
+
y: AY - 14,
|
|
173
|
+
fontSize: 12,
|
|
174
|
+
fontWeight: 700,
|
|
175
|
+
fill: "var(--stage-fg)",
|
|
176
|
+
children: "T–S diagram"
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ jsx("line", {
|
|
179
|
+
x1: CX,
|
|
180
|
+
y1: CY,
|
|
181
|
+
x2: CX,
|
|
182
|
+
y2: DY,
|
|
183
|
+
stroke: "var(--stage-fg)",
|
|
184
|
+
strokeWidth: 1.5
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ jsx("line", {
|
|
187
|
+
x1: CX,
|
|
188
|
+
y1: DY,
|
|
189
|
+
x2: DX,
|
|
190
|
+
y2: DY,
|
|
191
|
+
stroke: "var(--stage-fg)",
|
|
192
|
+
strokeWidth: 1.5
|
|
193
|
+
}),
|
|
194
|
+
/* @__PURE__ */ jsx("text", {
|
|
195
|
+
x: CX - 6,
|
|
196
|
+
y: 70,
|
|
197
|
+
textAnchor: "end",
|
|
198
|
+
fontSize: 10,
|
|
199
|
+
fill: "var(--stage-muted)",
|
|
200
|
+
children: "T"
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ jsx("text", {
|
|
203
|
+
x: DX,
|
|
204
|
+
y: 338,
|
|
205
|
+
textAnchor: "end",
|
|
206
|
+
fontSize: 10,
|
|
207
|
+
fill: "var(--stage-muted)",
|
|
208
|
+
children: "S →"
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ jsx("rect", {
|
|
211
|
+
x: tsx(0),
|
|
212
|
+
y: tsy(Th),
|
|
213
|
+
width: tsx(dS) - tsx(0),
|
|
214
|
+
height: tsy(tcc) - tsy(Th),
|
|
215
|
+
fill: "var(--stage-warn)",
|
|
216
|
+
opacity: .16
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ jsx("line", {
|
|
219
|
+
x1: tsx(0),
|
|
220
|
+
y1: tsy(Th),
|
|
221
|
+
x2: tsx(dS),
|
|
222
|
+
y2: tsy(Th),
|
|
223
|
+
stroke: "var(--stage-danger, #e03131)",
|
|
224
|
+
strokeWidth: 3
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ jsx("line", {
|
|
227
|
+
x1: tsx(0),
|
|
228
|
+
y1: tsy(tcc),
|
|
229
|
+
x2: tsx(dS),
|
|
230
|
+
y2: tsy(tcc),
|
|
231
|
+
stroke: "var(--stage-accent, #3b82f6)",
|
|
232
|
+
strokeWidth: 3
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ jsx("line", {
|
|
235
|
+
x1: tsx(dS),
|
|
236
|
+
y1: tsy(Th),
|
|
237
|
+
x2: tsx(dS),
|
|
238
|
+
y2: tsy(tcc),
|
|
239
|
+
stroke: "var(--stage-muted)",
|
|
240
|
+
strokeWidth: 2,
|
|
241
|
+
strokeDasharray: "4 3"
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ jsx("line", {
|
|
244
|
+
x1: tsx(0),
|
|
245
|
+
y1: tsy(Th),
|
|
246
|
+
x2: tsx(0),
|
|
247
|
+
y2: tsy(tcc),
|
|
248
|
+
stroke: "var(--stage-muted)",
|
|
249
|
+
strokeWidth: 2,
|
|
250
|
+
strokeDasharray: "4 3"
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ jsx("text", {
|
|
253
|
+
x: (tsx(0) + tsx(dS)) / 2,
|
|
254
|
+
y: tsy(Th) - 5,
|
|
255
|
+
textAnchor: "middle",
|
|
256
|
+
fontSize: 10,
|
|
257
|
+
fill: "var(--stage-danger, #e03131)",
|
|
258
|
+
children: "Qh in at Th"
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ jsx("text", {
|
|
261
|
+
x: (tsx(0) + tsx(dS)) / 2,
|
|
262
|
+
y: tsy(tcc) + 14,
|
|
263
|
+
textAnchor: "middle",
|
|
264
|
+
fontSize: 10,
|
|
265
|
+
fill: "var(--stage-accent, #3b82f6)",
|
|
266
|
+
children: "Qc out at Tc"
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ jsx("circle", {
|
|
269
|
+
cx: tsx(ts.s),
|
|
270
|
+
cy: tsy(ts.t),
|
|
271
|
+
r: 6,
|
|
272
|
+
fill: "var(--stage-good)",
|
|
273
|
+
stroke: "var(--stage-bg)",
|
|
274
|
+
strokeWidth: 2
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
})
|
|
278
|
+
})
|
|
279
|
+
});
|
|
280
|
+
return /* @__PURE__ */ jsx(LabFrame, {
|
|
281
|
+
title,
|
|
282
|
+
prompt,
|
|
283
|
+
objectives,
|
|
284
|
+
aside: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Callout, {
|
|
285
|
+
tone: "result",
|
|
286
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
287
|
+
style: {
|
|
288
|
+
display: "grid",
|
|
289
|
+
gap: 2,
|
|
290
|
+
fontVariantNumeric: "tabular-nums"
|
|
291
|
+
},
|
|
292
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
293
|
+
style: {
|
|
294
|
+
fontWeight: 800,
|
|
295
|
+
fontSize: 18
|
|
296
|
+
},
|
|
297
|
+
children: [
|
|
298
|
+
"η = ",
|
|
299
|
+
(c.efficiency * 100).toFixed(1),
|
|
300
|
+
"%"
|
|
301
|
+
]
|
|
302
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
303
|
+
style: { fontSize: 13 },
|
|
304
|
+
children: [
|
|
305
|
+
"Qh ",
|
|
306
|
+
J(c.Qh),
|
|
307
|
+
" J → W ",
|
|
308
|
+
J(c.Wnet),
|
|
309
|
+
" J + Qc ",
|
|
310
|
+
J(c.Qc),
|
|
311
|
+
" J"
|
|
312
|
+
]
|
|
313
|
+
})]
|
|
314
|
+
})
|
|
315
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
316
|
+
style: {
|
|
317
|
+
display: "grid",
|
|
318
|
+
gap: 8,
|
|
319
|
+
padding: "8px 2px 0",
|
|
320
|
+
fontSize: 13
|
|
321
|
+
},
|
|
322
|
+
children: [
|
|
323
|
+
/* @__PURE__ */ jsx(Tex, {
|
|
324
|
+
tex: "\\eta = 1 - \\dfrac{T_c}{T_h} = \\dfrac{W}{Q_h}",
|
|
325
|
+
block: true
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ jsxs("span", {
|
|
328
|
+
style: { color: "var(--stage-muted)" },
|
|
329
|
+
children: [
|
|
330
|
+
"Heat enters at ",
|
|
331
|
+
/* @__PURE__ */ jsxs("strong", {
|
|
332
|
+
style: { color: "var(--stage-danger, #e03131)" },
|
|
333
|
+
children: [
|
|
334
|
+
"Th = ",
|
|
335
|
+
Th,
|
|
336
|
+
" K"
|
|
337
|
+
]
|
|
338
|
+
}),
|
|
339
|
+
" and leaves at ",
|
|
340
|
+
/* @__PURE__ */ jsxs("strong", {
|
|
341
|
+
style: { color: "var(--stage-accent, #3b82f6)" },
|
|
342
|
+
children: [
|
|
343
|
+
"Tc = ",
|
|
344
|
+
tcc,
|
|
345
|
+
" K"
|
|
346
|
+
]
|
|
347
|
+
}),
|
|
348
|
+
". The wider the temperature gap, the more efficient — but you can never reach 100% without Tc = 0."
|
|
349
|
+
]
|
|
350
|
+
}),
|
|
351
|
+
/* @__PURE__ */ jsxs("span", {
|
|
352
|
+
style: { color: "var(--stage-muted)" },
|
|
353
|
+
children: [
|
|
354
|
+
"On the T–S rectangle, ",
|
|
355
|
+
/* @__PURE__ */ jsx(Tex, { tex: "\\Delta S = Q_h/T_h = Q_c/T_c" }),
|
|
356
|
+
" = ",
|
|
357
|
+
dS.toFixed(2),
|
|
358
|
+
" J/K, so the gas comes back to the same entropy — ",
|
|
359
|
+
/* @__PURE__ */ jsx("strong", {
|
|
360
|
+
style: { color: "var(--stage-fg)" },
|
|
361
|
+
children: "net ΔS = 0"
|
|
362
|
+
}),
|
|
363
|
+
" for a reversible cycle."
|
|
364
|
+
]
|
|
365
|
+
})
|
|
366
|
+
]
|
|
367
|
+
})] }),
|
|
368
|
+
controls: /* @__PURE__ */ jsxs("div", {
|
|
369
|
+
style: {
|
|
370
|
+
display: "grid",
|
|
371
|
+
gap: 10
|
|
372
|
+
},
|
|
373
|
+
children: [/* @__PURE__ */ jsxs(ControlBar, { children: [/* @__PURE__ */ jsx(Field, {
|
|
374
|
+
label: "hot Th",
|
|
375
|
+
value: `${Th} K`,
|
|
376
|
+
children: /* @__PURE__ */ jsx(Slider, {
|
|
377
|
+
value: Th,
|
|
378
|
+
min: 360,
|
|
379
|
+
max: 800,
|
|
380
|
+
step: 10,
|
|
381
|
+
onChange: setTh,
|
|
382
|
+
ariaLabel: "hot reservoir temperature"
|
|
383
|
+
})
|
|
384
|
+
}), /* @__PURE__ */ jsx(Field, {
|
|
385
|
+
label: "cold Tc",
|
|
386
|
+
value: `${tcc} K`,
|
|
387
|
+
children: /* @__PURE__ */ jsx(Slider, {
|
|
388
|
+
value: Tc,
|
|
389
|
+
min: 250,
|
|
390
|
+
max: 600,
|
|
391
|
+
step: 10,
|
|
392
|
+
onChange: setTc,
|
|
393
|
+
ariaLabel: "cold reservoir temperature"
|
|
394
|
+
})
|
|
395
|
+
})] }), /* @__PURE__ */ jsxs(ControlBar, { children: [/* @__PURE__ */ jsx(Field, {
|
|
396
|
+
label: "expansion V₂/V₁",
|
|
397
|
+
value: `×${vr.toFixed(1)}`,
|
|
398
|
+
children: /* @__PURE__ */ jsx(Slider, {
|
|
399
|
+
value: vr,
|
|
400
|
+
min: 1.3,
|
|
401
|
+
max: 3,
|
|
402
|
+
step: .1,
|
|
403
|
+
onChange: setVr,
|
|
404
|
+
ariaLabel: "isothermal expansion ratio"
|
|
405
|
+
})
|
|
406
|
+
}), /* @__PURE__ */ jsx(Field, {
|
|
407
|
+
label: "gas",
|
|
408
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
409
|
+
className: "lab-field-row",
|
|
410
|
+
children: [/* @__PURE__ */ jsx(Chip, {
|
|
411
|
+
selected: mono,
|
|
412
|
+
onClick: () => setMono(true),
|
|
413
|
+
children: "monatomic"
|
|
414
|
+
}), /* @__PURE__ */ jsx(Chip, {
|
|
415
|
+
selected: !mono,
|
|
416
|
+
onClick: () => setMono(false),
|
|
417
|
+
children: "diatomic"
|
|
418
|
+
})]
|
|
419
|
+
})
|
|
420
|
+
})] })]
|
|
421
|
+
}),
|
|
422
|
+
children: figure
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
//#endregion
|
|
427
|
+
export { CarnotCycleLab };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { CircularMotionLab, CircularMotionProps } from "./preset.mjs";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ControlConfig } from "../../kit/frame.mjs";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/physics/circular-motion/preset.d.ts
|
|
5
|
+
interface CircularMotionProps {
|
|
6
|
+
speed?: number;
|
|
7
|
+
radius?: number;
|
|
8
|
+
mass?: number;
|
|
9
|
+
title?: string;
|
|
10
|
+
prompt?: string;
|
|
11
|
+
objectives?: string[];
|
|
12
|
+
/** Lock/hide knobs, e.g. `{ lock: ['radius'] }`. */
|
|
13
|
+
controlConfig?: ControlConfig;
|
|
14
|
+
}
|
|
15
|
+
declare function CircularMotionLab({
|
|
16
|
+
speed,
|
|
17
|
+
radius,
|
|
18
|
+
mass,
|
|
19
|
+
title,
|
|
20
|
+
prompt,
|
|
21
|
+
objectives,
|
|
22
|
+
controlConfig
|
|
23
|
+
}: CircularMotionProps): ReactNode;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { CircularMotionLab, CircularMotionProps };
|