Add component database layer and validated physics core

- components/schema.py + database.py: typed loader for real retail parts
  (wire, capacitors, switches, sensors, projectile materials)
- physics/inductance.py: multilayer solenoid inductance (Wheeler) with
  ferromagnetic-slug coupling via smooth overlap model and analytic dL/dx
- physics/force.py: F = 0.5*I^2*dL/dx with a saturation clamp
- physics/circuit.py: coupled [Q,I,x,v] discharge ODE
- Validated against textbook RLC analytical solutions (under/over/critically
  damped) and energy conservation, not just spot-checked by eye
- PLAN.md updated with animation (per-run field visualization) and
  GPU-accelerated batch sweep as explicit later stages

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
jze9
2026-07-06 19:45:32 +05:00
parent 04233aefd7
commit 2046dcba10
17 changed files with 698 additions and 0 deletions

22
tests/fixtures/data/wires.json vendored Normal file
View File

@@ -0,0 +1,22 @@
[
{
"part_id": "test-cu-0.5",
"material": "copper",
"gauge_mm": 0.5,
"insulation_od_mm": 0.55,
"resistivity_ohm_m": 1.72e-8,
"max_current_a": 3.0,
"price_per_m": 5.0,
"source": "fixture"
},
{
"part_id": "test-al-0.5",
"material": "aluminum",
"gauge_mm": 0.5,
"insulation_od_mm": 0.55,
"resistivity_ohm_m": 2.82e-8,
"max_current_a": 2.2,
"price_per_m": 2.0,
"source": "fixture"
}
]