Design electromagnetic device

From pjt222/agent-almanac · View interactive version

Design electromagnetic device is an AI agent skill from the GitHub repository pjt222/agent-almanac. Design practical electromagnetic devices including electromagnets, DC and brushless motors, generators, and transformers by bridging theory to application. Use when sizing a solenoid or toroidal electromagnet for a target field or force, selecting motor topology and computing torque and efficiency,

How to use this skill

Skill file

Design Electromagnetic Device

Spec perf → topology → compute from EM first principles → analyze losses + efficiency → validate vs thermal + saturation.

Use When

In

Do

Step 1: Reqs + operating

Full targets before topology:

  1. Primary metric:
  1. Secondary: Eff (%), max T rise above ambient (K), duty (cont, intermittent, pulsed), envelope (max D, L, weight).
  1. Supply: V, I, freq (DC/AC w/ Hz), waveform (sine, PWM, trapezoidal).
  1. Environment: T range, cooling (nat convection, forced air, liquid), altitude, vibration/shock.
## Design Requirements
- **Device type**: [electromagnet / motor / generator / transformer]
- **Primary specification**: [value with units]
- **Efficiency target**: [%]
- **Supply**: [voltage, current, frequency]
- **Thermal limit**: [max temperature rise in K]
- **Size constraint**: [dimensions or weight]
- **Duty cycle**: [continuous / intermittent (on-time/off-time) / pulsed]

→ Complete quantified reqs, no ambiguity. Every req has val + units.

If err: Conflict (high T in tiny vol + high eff) → identify tradeoff explicit. EM scaling: force ~ volume, losses ~ surface area, thermal constrains power density.

Step 2: Topology

Config matches reqs:

  1. Electromagnet:
  1. Motor:
  1. Generator: Motors reversed. BLDC motor → BLDC gen (back-EMF = output). Induction above sync. PM gen for small (wind, hydro).
  1. Transformer:
## Topology Selection
- **Topology chosen**: [specific configuration]
- **Justification**: [why it matches the requirements]
- **Key advantages**: [for this application]
- **Key limitations**: [and mitigation strategy]
- **Alternatives considered**: [and why rejected]

→ Justified selection tied to Step 1 reqs w/ acknowledged limitations.

If err: No std topology meets all → hybrid (Halbach array) or relax secondary. Doc tradeoff.

Step 3: Design params

Physical dims + elec params from EM principles:

  1. Electromagnet:
  1. Motor:
  1. Transformer:
  1. Mag circuit (cores + gaps):
## Design Parameters
- **Turns**: N = [value] (primary), N_2 = [value] (if applicable)
- **Wire gauge**: AWG [number] (diameter [mm], area [mm^2])
- **Core dimensions**: A_core = [mm^2], l_core = [mm], l_gap = [mm]
- **Core material**: [type], B_max = [T], mu_r = [value]
- **Winding resistance**: R = [Ohms]
- **Operating current**: I = [A], current density J = [A/mm^2]
- **Key performance**: [B-field / torque / voltage ratio = calculated value]

→ Numerical vals for all dims + elec params from EM equations w/ units at each step.

If err: Turns don't fit → bigger core (more window), finer wire (higher J, more heat), or reduce target. Core above B_max → bigger X-sec or more turns.

Step 4: Losses + eff

Quantify all mechanisms + eff:

  1. Copper (I^2 R):
  1. Core (hyst + eddy):
  1. Eddy in conductors/structure:
  1. Mechanical (motors, gens):
  1. Eff calc:
## Loss Analysis
| Loss Mechanism | Formula | Value (W) | Fraction of Total |
|---------------|---------|-----------|-------------------|
| Copper (I^2R) | [expression] | [W] | [%] |
| Core hysteresis | [expression] | [W] | [%] |
| Core eddy current | [expression] | [W] | [%] |
| Mechanical (if applicable) | [expression] | [W] | [%] |
| **Total losses** | | [W] | 100% |

- **Efficiency**: eta = [%]
- **Temperature rise estimate**: Delta_T = P_total / (h * A_surface) = [K]

→ Loss breakdown, each quantified, eff, T rise for thermal feas.

If err: Eff below target → ID dominant. Copper → bigger wire or fewer turns. Core → lower-loss mat or reduce B_max. Mech → better bearings. T rise exceeds → more cooling or reduce density.

Step 5: Validate

Meets specs + physically realizable:

  1. Perf verify:
  1. Saturation:
  1. Thermal:
  1. Dims:
  1. Margin + sensitivity:
## Design Validation
| Requirement | Target | Achieved | Margin |
|------------|--------|----------|--------|
| [Primary metric] | [value] | [value] | [%] |
| Efficiency | [%] | [%] | [%] |
| Temperature rise | < [K] | [K] | [K margin] |
| Envelope | [dimensions] | [dimensions] | [fits / exceeds] |

## Sensitivity Analysis
| Parameter | Nominal | +10% Effect on Primary Metric | Most Sensitive? |
|-----------|---------|-------------------------------|----------------|
| Current | [A] | [+/- %] | [Yes/No] |
| Turns | [N] | [+/- %] | [Yes/No] |
| Air gap | [mm] | [+/- %] | [Yes/No] |
| mu_r | [value] | [+/- %] | [Yes/No] |

→ All reqs met w/ docs margins, thermal OK, most sensitive param ID'd.

If err: Req not met → iterate topology (Step 2), params (Step 3), or loss mitigation (Step 4). Thermal infeasible → reduce duty, more size (cooling), higher-T insulation, active cooling. Doc each iter.

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.