The B-field of a long, thin solenoid


Problem statement


Consider a long, thin solenoid effectively made up of many closely spaced loops, each carrying current I. The solenoid has N of these turns per unit length.

Extracted from the Part 1A Electromagnetics Handout 2 - Magnetic Fields and Forces.

Objective : to calculate the magnetic field strength B inside a solenoid.
Principles : Biot-Savart law.

Method of analysis : Application of the Biot-Savart law of a wire loop and integration over an infinite length solenoid.


Sketch :


Maths :



Matlab(R) solution

Solution variables

Input variables


Number of turns per unit length, N (1/metres) Current, I (Amperes)

Output variables


Magnetic flux density, B.

View matlab source for this problem
[ Back ] [ Top ] [ Authors ]