Magnetic Field of a Solenoid

From Physics Book
Revision as of 12:24, 5 December 2015 by Ramin8 (talk | contribs)
Jump to navigation Jump to search

Created by ramin8 !!

A Solenoid is a type of electromagnet, which consists of a coil tightly wound into a helix. Usually it produces a uniform magnetic field when an electric current is run through it. The purpose of a solenoid is to create a controlled magnetic field.


The Main Idea

The purpose of this application is to explore another way to apply the Biot-Sarvart law. The magnetic field is uniform along the axis of the solenoid, when electric current is run through it. The solenoid has has to have coils much larger than the radius.


A Mathematical Model

This is the formula for the magnetic field inside a long solenoid: [math]\displaystyle{ B = {\mu _{0}} \frac{NI}{L} }[/math] This formula is used inside a long solenoid, when the radius of the solenoid is much smaller than the length. B is the magnetic field. [math]\displaystyle{ {\mu _{0}} }[/math] is a constant. N is the number of loops in the solenoid. L is the length of the solenoid.

To determine the direction of the magnetic field: use your right hand and curl your fingers towards the direction of the current and the direction that your thumb is pointing to is the direction of the magnetic field.


A Computational Model

A solenoid has a length of .5 meters and a radius of .03 meters and wound around 50 times a wire that has a current of 1 ampere. Find the magnetic field vectors. from visual import ∗

scene . width=1024 scene.x = scene.y = 0

scene . background = color . white

L = 0.5

R = 0.03

kmag = 1e-7

I = 1

Nturns=50. ## number of turns in solenoid

Nelts=20. ## number of line segments per turn

bscale = 600. ## scale factor for B arrows

    1. make a solenoid

dxx = L/(Nturns∗Nelts)

xx = arange(L/2., L/2+dxx, dxx)

omega = 2∗pi∗Nturns/L

solenoid = curve(x=xx, y=R∗sin(xx∗omega), z=R∗cos(xx∗omega), color=(.9,.7,0),radius =0.001)


    1. make a list of zero lth arrows at observation locations

Barrows =[] ## empty list

dx = L/4.

zz=0.

for x in arange(