analyze-magnetic-levitation
关于
This skill analyzes magnetic levitation systems by applying Earnshaw's theorem to assess passive levitation feasibility and identify required stabilization mechanisms. It performs force balance and stability calculations for various systems like maglev transport, bearings, and superconducting devices. Developers should use it for advanced stability analysis across spatial modes and to distinguish between effects like Meissner and flux pinning.
快速安装
Claude Code
推荐npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/analyze-magnetic-levitation在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Analyze Magnetic Levitation
Can system achieve stable lev? ID mechanism enabling/forbidding, calc force balance + stability, verify stable vs perturbations in all DOF including tilting.
Use When
- Eval proposed lev design physically viable
- Determine why perm magnet fails + ID workaround
- Analyze superconducting lev (Meissner, flux pinning, mixed-state trapping)
- Design/troubleshoot active EM feedback lev (maglev trains, magnetic bearings)
- Assess diamagnetic lev feasibility given material + field
- Understand spin-stabilized lev (Levitron) dynamics
In
- Required: Levitated object (mass, geometry, magnetic moment or susceptibility)
- Required: Field src (perm magnets, electromagnets, supercond coils, geometry)
- Optional: Op env (temp, vacuum, vibration constraints)
- Optional: Desired lev height/gap
- Optional: Stability reqs (stiffness, damping, bandwidth active)
Do
Step 1: Characterize System
Complete physical desc of object + field src pre-analysis:
- Object props: Mass m, geometry (sphere, disk, rod), magnetic moment mu (perm magnet objects), vol susceptibility chi_v (para/dia/ferromagnetic), conductivity sigma (eddy currents).
- Field src props: Config — perm magnet array (Halbach, dipole, quadrupole), electromagnet coil params (turns, current, core), or supercond coil (critical current, critical field).
- Field geometry: Spatial profile B(r). ID gradient dB/dz along lev axis + curvature d^2B/dz^2 governing stability.
- Env constraints: Temp range (cryogenic for supercond), atm (vacuum reduces damping), vibration spectrum.
## System Characterization
- **Object**: [mass, geometry, mu or chi_v, sigma]
- **Field source**: [type, configuration, key parameters]
- **Field profile**: [B(r) functional form or measured map]
- **Gradient**: [dB/dz at intended levitation point]
- **Environment**: [temperature, pressure, vibration]
→ Complete spec of object + field src → determine forces + stability no more assumptions.
If err: Susceptibility/moment unknown → measure or estimate material data tables. No quantity → force calc impossible. Composite objects → effective susceptibility vol-weighted avg.
Step 2: Apply Earnshaw
Passive static lev possible?
- State Earnshaw: Region free of currents + time-varying fields, no static arrangement of charges/perm magnets produces stable equilibrium pt for para/ferromagnetic body. Laplacian of magnetic potential energy nabla^2 U >= 0 (para/ferro) → U has no local min.
- Classify response: Object paramagnetic (chi_v > 0), diamagnetic (chi_v < 0), ferromagnetic (chi_v >> 0, nonlinear), supercond (perfect diamagnet, chi_v = -1), or perm magnet (fixed mu).
- Apply:
- Para/ferro/perm magnet in static field from perm magnets/fixed currents → Earnshaw forbids stable lev. ≥1 spatial direction unstable.
- Diamagnetic → Earnshaw does NOT forbid. nabla^2 U <= 0 allows local min. Passive static permitted.
- Supercond → Meissner = perfect diamagnetism, flux pinning → both lev + lateral stability.
- Doc verdict: Clearly state Earnshaw-forbidden or Earnshaw-permitted + which material prop determines.
## Earnshaw Analysis
- **Object magnetic classification**: [paramagnetic / diamagnetic / ferromagnetic / superconducting / permanent magnet]
- **Susceptibility**: chi_v = [value with units]
- **Earnshaw verdict**: [FORBIDDEN / PERMITTED]
- **Reasoning**: [which condition of the theorem applies or fails]
→ Definitive classification Earnshaw-forbidden or permitted + specific physical reasoning.
If err: Mixed magnetic character (ferromagnetic core + diamagnetic shell) → analyze each separately. Overall stability from net energy landscape → may need numerical field computation.
Step 3: ID Circumvention
If Earnshaw forbids passive static → ID which of 4 std circumventions:
-
Diamagnetic lev: Object itself diamagnetic (chi_v < 0). Examples: pyrolytic graphite over NdFeB, water drops + frogs in 16 T Bitter magnets. Reqs strong gradients: (chi_v / mu_0) * B * (dB/dz) >= rho * g, rho = density.
-
Supercond lev: Type-I or type-II supercond below T_c.
- Meissner lev: Complete flux expulsion → repulsive force. Stable but limited load + supercond must stay in Meissner state (B < B_c1).
- Flux pinning (type-II): Flux vortices pinned at defect sites. Provides both vertical lev force + lateral restoring. Supercond suspended below or above magnet. Locked in 3D position rel to field src.
-
Active EM feedback: Sensors measure position, controller adjusts electromagnet currents → equilibrium. Examples: EMS maglev (Transrapid), active magnetic bearings. Reqs power + sensors + control system bandwidth > mechanical resonance freq.
-
Spin-stabilized lev: Spinning perm magnet (Levitron) → gyroscopic stabilization of tilting mode Earnshaw makes unstable. Spin > critical freq omega_c → gyroscopic stiffness overcomes magnetic torque. Object must stay within narrow mass window.
## Circumvention Mechanism
- **Mechanism**: [diamagnetic / superconducting (Meissner or flux pinning) / active feedback / spin-stabilized]
- **Physical basis**: [why this mechanism evades Earnshaw's theorem]
- **Key requirements**: [material property, field strength, temperature, spin rate, or control bandwidth]
- **Limitations**: [load capacity, power consumption, cryogenics, mass window]
→ ID specific mechanism + physical basis clearly + quant reqs.
If err: Doesn't fit any → check hybrid (perm magnets primary force + eddy current damping stability, or diamagnetic stabilization of paramagnetic). Consider electrodynamic lev (moving conductors in field) → distinct via Lenz.
Step 4: Calc Lev Conditions
Force balance + quant conditions:
-
Vertical force balance: Magnetic force = gravity.
- Magnetic dipole in gradient: F_z = mu * (dB/dz) = m * g.
- Diamagnetic: F_z = (chi_v * V / mu_0) * B * (dB/dz) = m * g.
- Supercond (image method): Model as mirror + compute repulsion between magnet + image.
- Active feedback: F_z = k_coil * I(t), I(t) feedback-controlled.
-
Solve lev height: F_z(z) = m * g → equilibrium z_0. Analytic → solve algebraic. Measured/numerical → graphically or numerically.
-
Restoring force gradient (stiffness): k_z = -dF_z/dz at z_0. Stable → k_z > 0 (force decreases w/ increasing height). Vertical oscillation freq omega_z = sqrt(k_z / m).
-
Lateral stiffness: k_x = -dF_x/dx in horizontal. Earnshaw-permitted (diamagnetic, supercond) → should be positive. Feedback systems → depends on sensor-actuator geometry.
-
Load capacity: Max mass levitated → field gradient where equilibrium marginally stable (k_z → 0 at max displacement).
## Levitation Conditions
- **Force balance equation**: [F_z(z) = m*g, explicit form]
- **Equilibrium height**: z_0 = [value]
- **Vertical stiffness**: k_z = [value, units N/m]
- **Vertical natural frequency**: omega_z = [value, units rad/s]
- **Lateral stiffness**: k_x = k_y = [value, units N/m]
- **Maximum load**: m_max = [value, units kg]
→ Complete force balance + equilibrium pos + stiffness vertical + lateral + load capacity.
If err: No force balance solution (too weak for gravity) → can't levitate. Increase gradient (stronger magnets, closer spacing), reduce mass, or switch higher-susceptibility material. Neg stiffness any direction → unstable that direction → Step 3 for stabilization.
Step 5: Verify Stability All DOF
Stable all 6 rigid-body DOF (3 trans, 3 rot):
-
Translational: k_z > 0, k_x > 0, k_y > 0. Axially symmetric → k_x = k_y by sym. Compute restoring force small delta_x, delta_y, delta_z.
-
Tilting: Restoring torque small ang deflections theta_x, theta_y about horizontal axes. Magnetic dipole → torque depends on field curvature + moment of inertia. Tilting instability = primary failure passive perm magnet lev (spin stabilization Levitron addresses).
-
Spin (if applicable): Spin-stabilized → spin > critical omega > omega_c. Critical freq determined by magnetic torque / ang momentum ratio. Below omega_c → precession → tilting instability.
-
Dynamic: Active feedback → control loop phase margin (>30°) + gain margin (>6 dB) at all resonance freqs. Sensor noise no excite instability.
-
Thermal + external perturbations: Temp fluctuations (supercond near T_c), air currents (diamagnetic lev of light objects), mechanical vibration (field src mounting).
## Stability Analysis
| Degree of Freedom | Stiffness / Restoring | Stable? | Notes |
|-------------------|----------------------|---------|-------|
| Vertical (z) | k_z = [value] | [Yes/No] | [primary levitation axis] |
| Lateral (x) | k_x = [value] | [Yes/No] | |
| Lateral (y) | k_y = [value] | [Yes/No] | |
| Tilt (theta_x) | tau_x = [value] | [Yes/No] | [most common failure mode] |
| Tilt (theta_y) | tau_y = [value] | [Yes/No] | |
| Spin (theta_z) | [N/A or value] | [Yes/No] | [only relevant for spin-stabilized] |
→ All 6 DOF inherently stable or stabilized by ID'd mechanism (feedback, gyroscopic, flux pinning). System viable.
If err: Any DOF unstable + no stabilization → design not viable. Common fix: add active feedback unstable direction, diamagnetic material passive stabilization lateral mode, or increase spin → gyroscopic. Step 3 → incorporate additional mechanism.
Check
- Object props (mass, susceptibility/moment, geometry) fully specified
- Field src + profile characterized + gradients computed
- Earnshaw correctly applied to magnetic classification
- Circumvention mechanism ID'd + physical basis
- Force balance solved + equilibrium pos
- Stiffness computed all 3 translational
- Tilting stability analyzed both horizontal tilt axes
- Spin-stabilized → critical spin rate computed + verified
- Active → control bandwidth + stability margins checked
- Load capacity limits estimated
Traps
- Assume perm magnets levitate each other statically: Earnshaw forbids para/ferro, yet common misconception. Attraction/repulsion along 1 axis always → instability perp axis. Always apply theorem pre-force balance.
- Confuse Meissner w/ flux pinning: Meissner (type-I) pure repulsion, only works supercond below magnet. Flux pinning (type-II) locks supercond at fixed position rel to field → suspension any orientation. Physics + design implications fundamentally different.
- Ignore tilting modes: Many analyses check only translational + declare stable. Tilting instability = primary failure passive magnetic lev, needs separate analysis. Pos translational stiffness all directions while tilt-unstable possible.
- Underestimate diamagnetic field reqs: Diamagnetic susceptibilities very small (chi_v ~ -10^-5 most, -4.5 x 10^-4 pyrolytic graphite). Levitate mg objects → strong gradients, typically B * dB/dz > 1000 T^2/m for non-graphite.
- Neglect eddy current effects: Time-varying or moving conductors → eddy currents → forces + heating. Active feedback → eddy currents in object create phase lag → destabilize control loop.
- Treat supercond as perfect diamagnets all conditions: Type-II in mixed state (B_c1 < B < B_c2) partial flux penetration. Lev force depends on magnetization history (hysteresis), not just instantaneous field.
→
evaluate-levitation-mechanism— comparative analysis → select best approachanalyze-magnetic-field— detailed field profile computation, input to thisformulate-maxwell-equations— derive EM field eqsdesign-acoustic-levitation— alternative non-magnetic lev for compareformulate-quantum-problem— quantum treatment supercond lev (BCS, Ginzburg-Landau)
GitHub 仓库
相关推荐技能
llamaguard
其他LlamaGuard是Meta推出的7-8B参数内容审核模型,专门用于过滤LLM的输入和输出内容。它能检测六大安全风险类别(暴力/仇恨、性内容、武器、违禁品、自残、犯罪计划),准确率达94-95%。开发者可通过HuggingFace、vLLM或Sagemaker快速部署,并能与NeMo Guardrails集成实现自动化安全防护。
cost-optimization
其他这个Claude Skill帮助开发者优化云成本,通过资源调整、标记策略和预留实例来降低AWS、Azure和GCP的开支。它适用于减少云支出、分析基础设施成本或实施成本治理策略的场景。关键功能包括提供成本可视化、资源规模调整指导和定价模型优化建议。
quantizing-models-bitsandbytes
其他这个Skill使用bitsandbytes库量化大语言模型,能在GPU内存有限时通过8位或4位量化减少50-75%内存占用,同时保持精度损失最小。它支持INT8、NF4、FP4等多种量化格式,可与HuggingFace Transformers无缝集成,适用于需要部署更大模型或加速推理的场景。还提供QLoRA训练和8位优化器支持,让开发者能轻松实现高效模型压缩。
dispatching-parallel-agents
其他该Skill用于并行处理3个以上无依赖关系的独立故障,可为每个问题域分派专属Claude代理同时执行调查修复。它通过并发处理多个独立问题显著提升故障排查效率,特别适用于测试文件、子系统等无共享状态的场景。
