Analyze magnetic levitation

From pjt222/agent-almanac · View interactive version

Analyze magnetic levitation is an AI agent skill from the GitHub repository pjt222/agent-almanac. Analyze magnetic levitation systems by applying Earnshaw's theorem to determine whether passive static levitation is possible, then identifying the appropriate circumvention mechanism (diamagnetic, superconducting, active feedback, or spin-stabilized). Use when evaluating maglev transport, magnetic

How to use this skill

Skill file

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

In

Do

Step 1: Characterize System

Complete physical desc of object + field src pre-analysis:

  1. 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).
  2. Field src props: Config — perm magnet array (Halbach, dipole, quadrupole), electromagnet coil params (turns, current, core), or supercond coil (critical current, critical field).
  3. Field geometry: Spatial profile B(r). ID gradient dB/dz along lev axis + curvature d^2B/dz^2 governing stability.
  4. 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?

  1. 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.
  2. 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).
  3. Apply:
  1. 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:

  1. 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.
  1. Supercond lev: Type-I or type-II supercond below T_c.
  1. 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.
  1. 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:

  1. Vertical force balance: Magnetic force = gravity.
  1. Solve lev height: F_z(z) = m * g → equilibrium z_0. Analytic → solve algebraic. Measured/numerical → graphically or numerically.
  1. 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).
  1. Lateral stiffness: k_x = -dF_x/dx in horizontal. Earnshaw-permitted (diamagnetic, supercond) → should be positive. Feedback systems → depends on sensor-actuator geometry.
  1. 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):

  1. 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.
  1. 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).
  1. 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.
  1. Dynamic: Active feedback → control loop phase margin (>30°) + gain margin (>6 dB) at all resonance freqs. Sensor noise no excite instability.
  1. 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

Traps

→

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.