Excitation Current¶
The CoilExcitationCurrent excitation option prescribes the current at the
coil terminals directly. The current can be a constant value, a
time-dependent function (for transient simulation), or a complex amplitude
(for time-harmonic simulation).
When to use this¶
- Bench-test setups driven by a regulated current source.
- Field-oriented motor control studies where the inverter is modelled as an ideal current source delivering a prescribed waveform.
- Inductance / flux-linkage characterisation — apply a unit current and read off the resulting flux linkage or inductance.
- Compumag and TEAM benchmarks that specify the coil current directly.
Examples¶
DC current (transient simulation)¶
from mufem.electromagnetics.coil import CoilExcitationCurrent
coil_excitation = CoilExcitationCurrent(current=0.05)
Time-dependent current¶
A coefficient can be used to drive a ramped or arbitrary waveform:
import mufem
current_ramp = mufem.CffExpressionScalar("100 * {Time}")
coil_excitation = CoilExcitationCurrent(current=current_ramp)
Harmonic current (time-harmonic simulation)¶
Pass either a complex amplitude or a (magnitude, phase_in_degrees) tuple.
The same CoilExcitationCurrent class is reused — the simulation context
determines how the value is interpreted.
# 10 A at 0° (purely real)
coil_excitation = CoilExcitationCurrent(current=10.0)
# 10 A at +30° via complex amplitude
coil_excitation = CoilExcitationCurrent(current=complex(8.66, 5.0))
# Same, via (magnitude, phase) tuple — phase in degrees
coil_excitation = CoilExcitationCurrent(current=(10.0, 30.0))