f8f6eaa765042a98952dec3e373c89e7c3246038
- sim/coilgun.py: chains StageConfig results through a global coordinate, stops honestly on the first infeasible stage (with which stage and why), and computes overall efficiency = exit KE / total capacitor energy in - Discovered while wiring up the chain: a high-capacitance single-stage test configuration let current stay high past the coil center, decelerating and reversing the slug (exit velocity negative). This is a real coilgun tuning failure mode (not a bug) since KE ~ v^2 doesn't care about direction and the energy balance still holds to ~1%. Kept it as an explicit regression test (test_overpowered_discharge_can_fling_slug_backward) instead of quietly picking parameters that hide it, and tightened the "kinetic energy increases" test to also require forward (exit_v > 0) motion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gausse
Симулятор и оптимизатор многоступенчатого электромагнитного ускорителя (coilgun) на реальных, доступных в рознице компонентах.
Полный план и чек-лист этапов — в PLAN.md.
Установка
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Тесты
pytest
Description
v0.1.0
Latest
Languages
Python
98.9%
Shell
0.9%
Dockerfile
0.2%