- #1
asdf12312
- 199
- 1
Homework Statement
In the picture in the figure, three coils are tightly wrapped around a non-magnetic cylinder of diameter Dcyl. Each coil is defined through the diameter of each wire comprising the coil, dcoil1-dcoil3, the current going through each coil, I1-I3, and the number of turns in each coil, N1 – N3. In addition, each coil extends a length equal to a 1/3 the length of the cylinder. Write a program that defines the magnetic field in the centerline of the cylinder (on the z axis) and plots it against z (from –l to l, where l is the length of the cylinder). Note that the cylinder extends from –l/2 to l/2.
The user inputs values for Dcyl, dcoil1, dcoil2, dcoil3, N1, N2, N3, I1, I2, I3, and l.
The program outputs a graph of Bz vs z from –l to l for:
1. All coils identical – same current I, same diameter, same number of coils. This should give you an answer identical to the case of one coil with current I and number of coils equal to 3N. Confirm.
2. Each coil activated separately – so, I1=I while I2=I3=0, etc. If, in each case you use the same I and N to define each coil, how do you expect the results to compare with each other. Are your results reasonable?
3. Two combinations of I1, I2, and I3, including at least one where the currents are going in different directions.
Homework Equations
The Attempt at a Solution
can someone please help me i don't understand this! I think the magnetic field of cylinder is something like B= u0*I / (2*pi*r) but I'm not sure!