Electromagnetics for CAE Engineers
Maxwell's Equations to Motor Simulation
Electromagnetic CAE encompasses an enormous range of applications: high-voltage insulation design in power transformers, eddy-current losses in motor laminations, antenna radiation patterns, and precise torque prediction in permanent magnet motors for EVs. The unifying framework is Maxwell's four equations, which we'll build up from first principles before tackling the FEM discretization and practical modeling considerations.
1. Basic Electromagnetic Quantities
I always get confused between E and D, and between B and H. Are they just different names for the same thing, or do they have genuinely different physical meaning?
They're fundamentally different, and the distinction matters in CAE. E and B are the "real" physical fields — they determine the force on a charged particle (Lorentz force). D and H are "convenient" fields that absorb the material's response (permittivity and permeability) into the equations. In vacuum, D = ε₀E and B = μ₀H. Inside a material, the polarization and magnetization change the relationship. In FEM, you often solve for E or H (or their potentials) and compute D and B from the constitutive relations.
| Symbol | Name | Units | Physical meaning |
|---|---|---|---|
| E | Electric field intensity | V/m | Force per unit charge on test charge |
| D | Electric flux density (displacement) | C/m² | E modified by material polarization; $\mathbf{D} = \varepsilon\mathbf{E}$ |
| B | Magnetic flux density | T = Wb/m² | Force on moving charge; $\mathbf{F} = q\mathbf{v}\times\mathbf{B}$ |
| H | Magnetic field intensity | A/m | B modified by magnetization; $\mathbf{B} = \mu\mathbf{H}$ |
| J | Current density | A/m² | Current per unit cross-sectional area; $\mathbf{J} = \sigma\mathbf{E}$ |
| ρ_e | Free charge density | C/m³ | Net free charge per unit volume |
1.1 Material Parameters
| Parameter | Symbol | Vacuum value | Relative form | Typical material range |
|---|---|---|---|---|
| Permittivity | ε = ε_r ε₀ | ε₀ = 8.854×10⁻¹² F/m | ε_r (relative) | Air: 1.0; Polyimide: 3.5; Water: 78; BaTiO₃: 2000+ |
| Permeability | μ = μ_r μ₀ | μ₀ = 4π×10⁻⁷ H/m | μ_r (relative) | Air: 1.0; Silicon steel: 2000–6000; Mu-metal: 20,000–400,000 |
| Conductivity | σ | 0 | — | Copper: 5.8×10⁷ S/m; Silicon: 1.56×10⁻³ S/m; Glass: 10⁻¹² S/m |
2. Maxwell's Equations
Can you give me the physical meaning of each Maxwell equation, not just the math? I want to understand what each one is actually saying.
Absolutely. Think of them as four fundamental laws about fields: (1) Electric field lines start and end on charges — Gauss's law. (2) There are no magnetic monopoles — magnetic field lines always form closed loops. (3) A changing magnetic field creates a circulating electric field — Faraday's induction, the principle behind transformers and generators. (4) Current (and changing electric fields) create circulating magnetic fields — Ampère-Maxwell law, the principle behind electromagnets. These four laws completely describe all electromagnetic phenomena at non-quantum scales.
2.1 Maxwell's Equations (Differential Form)
2.2 Integral Form (Physical Intuition)
2.3 Constitutive Relations for Linear Isotropic Media
2.4 Wave Equation from Maxwell's Equations
Combining Faraday and Ampère-Maxwell in a lossless medium:
This is the wave equation — electromagnetic waves travel at speed $c$ in the medium.
3. Electrostatic Analysis
When would I use an electrostatic analysis in practice? I design power electronics — is it something I need to worry about?
Very much so in power electronics. The main applications are: (1) Voltage stress distribution in insulation — finding where the electric field exceeds the dielectric breakdown strength. A typical failure mode in high-voltage converters is partial discharge at sharp conductor edges where E field concentrates. (2) Capacitance between conductors — affecting switching behavior. (3) Electrostatic actuation in MEMS sensors. Electrostatic analysis solves for the voltage distribution and E field with all time-derivatives set to zero — relatively fast to solve and often just a linear Poisson problem.
3.1 Governing Equation
For static charges with no time variation, Faraday's law gives $\nabla\times\mathbf{E} = 0$, allowing us to define a scalar electric potential $\phi$:
Combined with Gauss's law $\nabla\cdot\mathbf{D} = \rho_e$:
3.2 Electric Field Singularities at Sharp Edges
The electric field near a sharp conducting edge (corner angle $\alpha$) varies as $r^{\pi/\alpha - 1}$, where r is the distance from the edge. For a right-angle corner (α = π/2): $E \sim r^1$ (finite). For a sharper notch (α < π/2): field intensifies. For a reentrant corner (α > π): field singularity — this is why all high-voltage electrodes use rounded edges (large radius of curvature).
3.3 Dielectric Breakdown Strength
| Material | Breakdown Strength [MV/m] |
|---|---|
| Air (dry, 1 atm) | 3 |
| Transformer oil | 10–15 |
| Polyimide (Kapton) | 150–300 |
| Epoxy resin | 15–30 |
| Silicon carbide | 2,000–3,500 |
4. Magnetostatic Analysis
For a permanent magnet motor, the rotor position is fixed and I just want the no-load flux distribution. Is that a magnetostatic problem?
Exactly. Magnetostatics applies when all fields are constant in time — so it's perfect for mapping the flux from permanent magnets or DC coils. The key challenge compared to electrostatics is that the B-H relationship is nonlinear for ferromagnetic materials (iron core, silicon steel laminations), so you need a nonlinear solver even for the static case. The B-H curve (magnetic saturation curve) is the most critical material input, and it has a big effect on torque accuracy.
4.1 Governing Equations
From $\nabla\cdot\mathbf{B} = 0$, define the magnetic vector potential $\mathbf{A}$:
Substituting into Ampère's law $\nabla\times\mathbf{H} = \mathbf{J}$:
For linear isotropic media (constant μ), using the Coulomb gauge ($\nabla\cdot\mathbf{A} = 0$):
4.2 Nonlinear B-H Curve
For ferromagnetic materials, $\mathbf{B} = \mu(H)\mathbf{H}$ is nonlinear. The permeability $\mu_r$ drops significantly at magnetic saturation:
- Silicon steel (M270-35A): peak μ_r ≈ 6000 at low H; saturates to μ_r ≈ 1 above ~1.8 T
- The FEM solver uses Newton-Raphson iteration with the tangent permeability $\mu_T = dB/dH$
- Hysteresis (different loading/unloading B-H curves) can be ignored for magnetostatics but matters for core loss calculations
4.3 Magnetic Force Calculation
Two methods are commonly used in FEM to compute force/torque:
Maxwell Stress Tensor:
Virtual Work (Coulomb's method):
5. Eddy Current Analysis and Skin Effect
I've heard that high-frequency currents only flow near the surface of a conductor — the skin effect. Why does that happen and how does it affect motor design?
Here's the intuition: when alternating current flows in a conductor, it generates an alternating magnetic field, which by Faraday's law induces an opposing EMF that pushes current toward the surface. The higher the frequency, the more effective this self-shielding becomes. In a motor winding carrying current at 10 kHz (an EV inverter switching frequency), the effective current-carrying depth might be less than a millimeter in copper — but your physical wire might be 3 mm in diameter. This means most of the wire cross-section is unused, effectively increasing AC resistance. That's why high-frequency windings use Litz wire — many thin strands twisted together so each strand experiences the same average flux.
5.1 Skin Depth
where $\rho = 1/\sigma$ is resistivity, $\omega = 2\pi f$ is angular frequency, and $\mu = \mu_r\mu_0$.
| Material | 50 Hz | 1 kHz | 100 kHz | 10 MHz |
|---|---|---|---|---|
| Copper (σ = 5.8×10⁷ S/m) | 9.3 mm | 2.1 mm | 0.21 mm | 21 μm |
| Aluminum (σ = 3.5×10⁷ S/m) | 12 mm | 2.6 mm | 0.26 mm | 26 μm |
| Silicon steel (μ_r = 1000, σ = 2×10⁶ S/m) | 0.72 mm | 0.16 mm | 0.016 mm | 1.6 μm |
5.2 Eddy Current Problem Formulation
The time-harmonic (phasor) form of the eddy current problem (quasi-static, neglect displacement current):
where $\hat{\mathbf{A}}$ is the complex amplitude of the magnetic vector potential and $\hat{\mathbf{J}}_s$ is the source current density. The $j\omega\sigma$ term couples the magnetic and electric fields and causes the skin effect.
5.3 Eddy Current Losses (Core Loss)
The time-averaged eddy current power loss per unit volume:
This is why motor cores are laminated — thin sheets insulated from each other reduce eddy current loops. The Steinmetz equation captures total core loss including hysteresis:
6. Electromagnetic Waves and High-Frequency Analysis
When the structure size is comparable to the wavelength $\lambda = c/f$, wave effects dominate. The boundary between "quasi-static" and "wave" regimes:
| Frequency | Wavelength (air) | Regime | Application |
|---|---|---|---|
| 50 Hz | 6,000 km | Quasi-static | Power systems, motors |
| 1 MHz | 300 m | Quasi-static/transition | AM radio, wireless charging coils |
| 1 GHz | 30 cm | Wave (microwave) | Wi-Fi, radar, cellular |
| 10 GHz | 3 cm | Microwave/mm-wave | Automotive radar (77 GHz), satellite |
| 1 THz | 0.3 mm | THz | Imaging, spectroscopy |
6.1 Helmholtz Wave Equation
For time-harmonic fields ($e^{j\omega t}$ convention):
In lossy media (conductor): $k = \omega\sqrt{\mu(\varepsilon - j\sigma/\omega)}$ — complex wavenumber where the imaginary part describes attenuation.
6.2 Scattering Parameters (S-parameters)
For microwave circuits and antennas, the response is characterized by scattering parameters:
Return loss $= -20\log_{10}|S_{11}|$ dB. For antenna design: |S₁₁| < -10 dB (VSWR < 2) is the common bandwidth criterion.
7. FEM Electromagnetic Analysis
I've heard that electromagnetic FEM uses "edge elements" instead of the node-based elements in structural FEM. Why do you need different elements for electromagnetics?
Great question. The vector fields E and H have special physical constraints: their tangential components are continuous across interfaces (E_tan and H_tan are continuous), but their normal components can jump. Node-based elements treat the vector field as three independent scalar fields — they can't automatically enforce the tangential continuity while allowing normal discontinuity. Edge elements (Nédélec elements) associate DOFs with edges rather than nodes, and they naturally enforce exactly these continuity conditions. They also prevent the appearance of spurious non-physical oscillatory modes that plague node-based vector field FEM.
7.1 Edge Elements (Nédélec / Whitney Elements)
For a tetrahedron with nodes 1,2,3,4 and edges 12, 13, ..., 34, the edge element basis functions are:
where $\lambda_i$ are the nodal basis functions (barycentric coordinates). These functions have constant tangential components along edge ij and zero tangential component along all other edges — exactly the right behavior for tangential continuity.
7.2 Gauge Conditions
The magnetic vector potential $\mathbf{A}$ is not unique — adding $\nabla\psi$ for any scalar $\psi$ leaves $\mathbf{B} = \nabla\times\mathbf{A}$ unchanged. A gauge condition must fix this:
- Coulomb gauge: $\nabla\cdot\mathbf{A} = 0$ — natural choice for magnetostatics
- Lorenz gauge: $\nabla\cdot\mathbf{A} + \mu\varepsilon\dot{\phi} = 0$ — natural for wave problems
- Tree-cotree gauge: Used in FEM to eliminate null space of the curl operator
7.3 Absorbing Boundary Conditions for Wave Problems
Electromagnetic wave simulations require absorbing boundary conditions to prevent artificial reflections at the computational domain boundary:
- First-order ABC (Silver-Müller): $\hat{\mathbf{n}}\times\mathbf{H} + \sqrt{\varepsilon/\mu}\,\hat{\mathbf{n}}\times(\hat{\mathbf{n}}\times\mathbf{E}) = 0$
- PML (Perfectly Matched Layer): A fictitious lossy medium that absorbs outgoing waves without reflection — the industry standard for FDTD and FEM wave simulations
8. Motor and Actuator CAE
I'm working on an EV traction motor — a 150 kW IPM (interior permanent magnet) machine. What does a typical electromagnetic simulation workflow look like for that?
A production EV motor simulation usually goes through several levels: first, a 2D transient magnetic FEM at multiple operating points (speed, torque) to map out the torque-speed envelope and efficiency map — this uses tools like Motor-CAD, JMAG, or Ansys Maxwell. Then 3D magnetostatic or transient analysis for end-effect corrections (the 2D model doesn't capture the end windings). Then loss analysis: copper I²R losses, iron core losses (Steinmetz), and magnet eddy losses. Finally, the loss distribution feeds into a thermal model. The whole chain is usually automated for parametric optimization — slot geometry, magnet dimensions, winding configuration are swept to maximize power density and efficiency.
8.1 Torque Calculation in FEM
Torque computed by integrating the Maxwell stress tensor over a cylindrical surface in the air gap:
where $B_r$ and $B_\theta$ are the radial and tangential flux density components. This integral is performed on a cylindrical surface between rotor and stator — results are insensitive to the exact position of this surface if it's in the air gap.
8.2 Cogging Torque
Cogging torque is the pulsating torque due to the interaction of permanent magnet flux with stator slot geometry — it exists even with no current in the windings. It's a key NVH (noise/vibration) concern in EV drivetrains. In FEM:
- Compute torque vs. rotor angle with zero stator current
- Period = 360° / LCM(number of poles, number of slots)
- Reduction strategies: skewing (rotor or stator), optimizing slot opening, fractional slot/pole combinations
8.3 Key Outputs of Motor EM Simulation
| Output | Purpose | Analysis type |
|---|---|---|
| Torque vs. rotor angle | Average torque, cogging, ripple | 2D transient magnetic |
| Back-EMF waveform | Voltage regulation, harmonic content | 2D transient magnetic |
| Flux linkage, inductance (Ld, Lq) | Control algorithm design (MTPA) | 2D magnetostatic sweep |
| Core losses (W/m³) | Efficiency map, thermal input | Iron loss postprocessing |
| Demagnetization risk | Magnet integrity at fault conditions | 3D magnetostatic or transient |
- Maxwell's 4 equations govern all electromagnetic phenomena — Gauss, no-monopole, Faraday, Ampère
- Electrostatics (Poisson eq.) → voltage distribution, E-field for insulation design
- Magnetostatics (vector potential A) → flux maps, force/torque in motors
- Skin depth $\delta = \sqrt{2/(\omega\mu\sigma)}$ — critical for high-frequency winding design
- Edge elements (Nédélec) are essential for correct vector field FEM — avoid spurious modes
- Motor workflow: 2D transient → losses → thermal coupling
Related Interactive Tools
- Skin Depth Calculator — Compute δ vs. frequency for any material
- RC/RL Circuit Transient Response — Time constant visualization
- Transformer Basic Design Calculator