Magnetic field due to finite coil along axis

Using the Biot—Savart law, it is possible to obtain the formula for the magnetic flux density at any point on the axis of a coil. It is directly proportional to the coil’s turn count and current and inversely proportional to its length, and also depends on the position of the measurement point relative to the coil ends.

Conditions:

  1. The point of measurement must lie on the axis of the coil.

  2. The medium is a vacuum.

  3. The \(z\)-axis is the axis of rotation and is oriented according to the right-hand side rule.

Links:

  1. Physics LibreTexts — Solenoids and Toroids. Equation (12.7.4).

magnetic_flux_density

Magnitude of magnetic_flux_density.

Symbol:

B

Latex:

\(B\)

Dimension:

magnetic_density

current

current flowing through the wire.

Symbol:

I

Latex:

\(I\)

Dimension:

current

turn_count

Number of turns in the coil. See positive_number.

Symbol:

N

Latex:

\(N\)

Dimension:

dimensionless

coil_length

length of the coil.

Symbol:

l

Latex:

\(\ell\)

Dimension:

length

first_angle

Acute angle between the coil axis (or side) and the vector from the measuring point and the first end of the coil (that has a smaller \(z\) coordinate).

Symbol:

phi_1

Latex:

\(\varphi_{1}\)

Dimension:

angle

second_angle

Acute angle between the coil axis (or side) and the vector from the measuring point and the second end of the coil (that has a greater \(z\) coordinate).

Symbol:

phi_2

Latex:

\(\varphi_{2}\)

Dimension:

angle

law

B = mu_0 * I * N / (2 * l) * (cos(phi_1) + cos(phi_2))

Latex:
\[B = \frac{\mu_0 I N}{2 \ell} \left(\cos{\left(\varphi_{1} \right)} + \cos{\left(\varphi_{2} \right)}\right)\]