Magnetic Field Wire⚠ unverified
Physics / Electromagnetics · Compute the magnetic field around a long straight current-carrying wire
Parameters
| Input | Symbol | Unit | Default | Description |
|---|---|---|---|---|
| I | I | A | 1.0 | Current through the wire |
| r | r | m | 1.0 | Radial distance from the wire axis |
| Output | Symbol | Unit | Description |
|---|---|---|---|
| result | B | T | Magnetic flux density, in teslas (T). Returns 0.0 when ``r`` is not positive |
The science & history
Understanding the Parameters
- $I$ — field proportional to current.
- $r$ — field falls as $1/r$ (not $1/r^{2}$).
- $B$ — azimuthal field lines circling the wire.
Derivation (Approaching a Proof)
Ampère’s law $\oint\mathbf{B}\cdot d\mathbf{l} = \mu_0 I_{\mathrm{enc}}$ on a circle of radius $r$ centred on an infinite straight wire: $B\cdot 2\pi r = \mu_0 I$, hence $B = \mu_0 I/(2\pi r)$. Biot–Savart integration yields the same result.
History
Oersted’s discovery (1820) that currents produce magnetism led to Ampère’s and Biot–Savart laws; the long-wire field is the first magnetostatics example.
Related Concepts: Magnetic Force, Lorentz Force, Magnetic Flux Density, Inductance Solenoid
Notes: Registry calculator magnetic-field-wire (unverified). Infinite straight wire in free space.