Tangential Magnetic Field Condition¶
The tangential magnetic field condition is a boundary condition that imposes a prescribed complex tangential magnetic field on \(\Gamma\):
By Ampère's law this is equivalent to prescribing a surface current density \(\tilde{\mathbf{K}}_s = \mathbf{n} \times \tilde{\mathbf{H}}\) on the boundary. Because the field is complex-valued, the real and imaginary parts are supplied separately.
Applicability¶
Applicable on boundary surfaces. It imposes the prescribed tangential field through a weak-form (Neumann-type) surface term — equivalent to a surface current — and does not constrain the potential directly. Because the field is complex-valued, its real and imaginary parts are supplied as separate vector coefficients.
When to use this¶
- Uniform external excitation. Apply a known background field on the outer boundary of an air box — the standard setup for many benchmark studies (e.g. Compumag TEAM 7).
- Source replacement. Replace a distant excitation coil or solenoid by its known surface-field contribution, avoiding the need to mesh it.
- Driven phase shift. Excite two faces with a \(90°\) phase difference (one real-valued, one imaginary-valued) to drive a rotating field — useful for rotating-field calibration and motor end-region studies.
Usage¶
A real-only excitation (phase reference at \(0\)):
from mufem.electromagnetics.timeharmonicmagnetic import (
TangentialMagneticFieldBoundaryCondition,
)
tangential_field_bc = TangentialMagneticFieldBoundaryCondition(
name="ExternalField",
marker="Air::Boundary" @ Bnd,
tangential_magnetic_field_real=(2.16e5, 0.0, 0.0),
tangential_magnetic_field_imag=(0.0, 0.0, 0.0),
)
time_harmonic_magnetic_model.add_condition(tangential_field_bc)
Two boundaries with a \(90°\) phase shift, driving a rotating field:
field_amplitude = 7.96e5
left_bc = TangentialMagneticFieldBoundaryCondition(
name="ExternalField-Real",
marker="Left" @ Bnd,
tangential_magnetic_field_real=(field_amplitude, 0.0, 0.0),
tangential_magnetic_field_imag=(0.0, 0.0, 0.0),
)
right_bc = TangentialMagneticFieldBoundaryCondition(
name="ExternalField-Imag",
marker="Right" @ Bnd,
tangential_magnetic_field_real=(0.0, 0.0, 0.0),
tangential_magnetic_field_imag=(0.0, 0.0, field_amplitude),
)
time_harmonic_magnetic_model.add_conditions([left_bc, right_bc])
Both arguments accept any vector coefficient (constant tuple, expression, etc.), so spatially varying excitations are supported.