This code generates the XY vector field of the magnetic field made by six rings of current in a box. Raising the number of cells increases the resolution of the vector field.
The size of the machine is the following. Mid-plane to mid-plane is 0.0285 meters. The diameter of the rings is 0.0433 meters. There are 60 amps of current in each ring, with 15 turns. The grid has a height and width of 0.1 meter each. This can be adjusted in the code. The user must give some input:
Number of Cells? (suggest 40):10
Rings To Turn On? (1-6, 0 for all)0
The output is a vector field. |