Electromagnetic
Electromagnetic analysis predicts electric potential, current flow, magnetic vector potential, flux density, field intensity, and frequency-dependent loss. RunMat uses typed quantities for volts, amperes, coulombs, current density, and vector potential; it never passes them to a solver as unitless numbers.
Four electromagnetic analyses run from a .fea study with runmat run:
| Analysis | Selected by | Unknown | Elements |
|---|---|---|---|
| Steady current flow | electromagnetic { equation = steady_conduction } + electromagnetic static {} | electric potential | Tet4 / Tet10 nodal |
| Electrostatics | electromagnetic { equation = electrostatics } + electromagnetic static {} | electric potential | Tet4 / Tet10 nodal |
| Magnetostatics | electromagnetic { equation = magnetostatics } + electromagnetic static {} | magnetic vector potential | lowest-order Nédélec edges |
| Time-harmonic fields | electromagnetic harmonic { frequencies = [...] } | electric field phasor | lowest-order Nédélec edges |
A fifth analysis computes the impedance, delay and coupling of board traces from a 2D
cross-section of the stackup: electromagnetic line_parameters {}. See
trace impedance.
The loss of a steady-current or harmonic analysis can heat a thermal analysis of the same parts (see How does the loss heat the part? and electrothermal analysis).
What equations are solved?
Steady current flow and electrostatics. with (conduction) or (electrostatics), , or . Prescribed potentials are essential conditions; an injected terminal current is a natural condition with uniform normal current density over the terminal faces; every other face is insulated. Results: nodal potential, element electric field, current density or displacement, and Joule power density (or energy density). The Joule integral equals over the terminals (checked on every solve).
Magnetostatics. with tangential
on grounded faces (magnetic.vector_potential_ground, the far field or a flux wall)
and magnetic insulation, , on every other exterior face (a symmetry
plane of the current). A weak Coulomb gauge (magnetic.coulomb_gauge) fixes the gradient part of
in the whole field: in air, iron and conductors alike. Results:
vector potential, flux density and field intensity, at integration
points and as element averages.
Time-harmonic fields. For each authored frequency, with phasors (peak values),
the full Maxwell equation in the temporal gauge (), including displacement current. Conductivity, permittivity and permeability are per material; zero conductivity is allowed, so air needs no artificial loss. Results at integration points and as element averages: , , , , conduction current density, and the cycle-averaged Joule loss density .
Boundary conditions for harmonic fields:
magnetic.vector_potential_ground(orelectrical.perfect_conductor): tangential , the far field of an air region or a perfectly conducting wall.- every other exterior face: (a symmetry plane of the current).
Sources for harmonic fields:
magnetic_volume_current_densityon a body: an impressed (stranded) current density.- a driven solid conductor:
electric_current on <terminal face> = Iwithelectrical.potential { value = 0 V }on its return terminal (current drive), or twoelectrical.potentialterminals (voltage drive). Inside the conductor the field is , where is the conductor's electrokinetic unit potential and the terminal voltage (an unknown for current drive). Skin and proximity effect in the driven conductor are solved, not assumed. Terminals that lie on a grounded face return their current through it; terminals inside the model (a gap-fed coil) are joined by the discrete potential flow of the terminal current through the electrically transparent medium, so no artificial charge builds up across the gap. A medium is electrically transparent at a frequency when its skin depth exceeds the model size (, the model diagonal).
Each terminal drive reports its voltage, current and complex power ; the Joule loss in the conductors equals the real power delivered, and the complex Poynting balance and weak charge continuity are checked on every frequency.
Every authored frequency is an independent solve. A study with several frequencies runs one case
per frequency (frequency=<f>Hz), in parallel, and each case publishes its own fields.
The harmonic and magnetostatic systems are factored with a sparse direct solver (LU with partial pivoting); the residual of the original equations is measured after the solve.
How do I describe a harmonic electromagnetic study?
model hardening_cell {
assign material.steel_4140 to geometry.cell.region.gear
assign material.copper to geometry.cell.region.coil
assign material.air to geometry.cell.region.air
constraint coil_return {
electrical.potential { target = geometry.cell.region.coil_out; value = 0 V }
}
constraint far_field {
magnetic.vector_potential_ground { target = geometry.cell.region.outer_boundary }
}
load coil_drive {
electric_current on geometry.cell.region.coil_in = 2000 A
}
}
study gear_hardening {
geometry = geometry.cell
mesh = mesh.cell
model = model.hardening_cell
analysis field {
electromagnetic harmonic { frequencies = [3, 10, 30] kHz }
retain loss
}
analysis heating after analysis.field {
thermal transient {
start_time = 0 s
end_time = 3 s
time_step = 0.05 s
heat_source = analysis.field.state.loss
}
}
}No electromagnetic { equation = ... } block is needed for a harmonic analysis: the analysis's
frequencies define it. A harmonic_maxwell model domain with a reference_frequency is also
accepted; the analysis frequencies, not the reference, set what is solved.
How does the loss heat the part?
heat_source = analysis.<harmonic>.state.<name> in a thermal steady or thermal transient
analysis binds the harmonic analysis's retained state as the thermal heat source. For each frequency
the cycle-averaged Joule loss density of every element, , becomes the element heat generation of the thermal analysis on the same mesh, so the total
heat equals the electromagnetic loss. The run publishes the harmonic case and then the heating case
(frequency=<f>Hz/field, frequency=<f>Hz/heating).
For steady current flow with temperature-dependent conductivity, use an electrothermal analysis, which iterates current and temperature.
How do I apply voltage, current, charge, or current density?
electrical.potentialprescribes a terminal potential (static and harmonic).electric_currentinjects a total current through terminal faces (uniform normal density).electric_charge_densityis a volume charge for electrostatics.magnetic_volume_current_densityis an impressed current density in a body (magnetostatics and harmonic fields).magnetic_vector_potentialholds exterior faces at a known tangential vector potential (magnetostatics), for example an imposed external field; those faces count as grounded.
Use direct load syntax for constant data and signal plus excitation for frequency- or
time-dependent data.
What electrical and magnetic references are required?
- Steady current flow and electrostatics: at least one prescribed potential on each connected conductor.
- Magnetostatics:
magnetic.vector_potential_groundon one connected set of exterior faces (normally the far field; include the ends of a conductor whose current leaves the model, since current cannot cross an insulated face), and onemagnetic.coulomb_gauge. - Harmonic fields: a grounded far field (
magnetic.vector_potential_ground). A Coulomb gauge is not used: conductivity and permittivity fix the field.
RunMat reports a missing reference instead of adding one.
What material properties does electromagnetic analysis need?
Electrical conductivity, relative permittivity and relative permeability per material. A
resistive_heating_coefficient defines ;
standalone electromagnetic analyses use , electrothermal analyses the solved
temperature.
How accurate are the results?
See electromagnetic validation for the analytic checks (wire resistance, parallel-plate and coaxial capacitance, conductor field, skin-effect impedance). Resolve the skin depth with several elements where loss matters.
See electromagnetic constraints, electromagnetic loads, electrothermal analysis, typed units, and current status.