Helmholtz:

In this lab, you will again use MATLAB to numerically examine a problem which is difficult to solve by analytic methods.

This program is much simpler than the one you used in the first MATLAB exercise. It simply uses the equation for the magnetic field along the axis of a Helmholtz coil pair (eqn. 1 in your lab manual) and some various input parameters to numerically determine the magnetic field from -1.0 to 1.0 meters. It uses about 2000 points to do this. You will then examine the plots that are generated to answer various questions about this arrangement.

You will again need the files which contain the simulation. Download helm.zip from save it to an easy to find location (example: place).

Run MATLAB and allow it to initialize. Now, you must change the active directory from the default to the folder which contains the simulation. To do this, type “cd place” and press enter. Now, run the simulation by typing “rangegui” and pressing enter.

You will now have an interface which you can modify the parameters of the function you derived earlier. Be careful about the units of the parameters you supply. After you have set all these, click “Go!” to run the simulation. This will create a plot of B(x) and mark the positions of the two coils. To examine another set of parameters, simply change the desired values through the interface and press “Go!” to re-evaluate the magnetic field.

Questions:

1)Vary the distance between the coils to determine the ideal spacing that produces a uniform magnetic field in the region between the coils. How does this spacing compare to the radius of each coil? This special arrangement of two coaxial coils is called a Helmholtz coil pair. To confirm your understanding, look up “Helmholtz coil” in a reputable source and cite the definition in your lab report.

2)How does the spacing of the coil pair that you measured in lab compare with a Helmholtz coil pair? How well does the MATLAB simulation for your coil arrangement match your empirical data? To compare these, you may find it helpful to superimpose (either electronically or on paper) the theoretical and measured graphs. Try to explain any differences you observe.

3)What other insights did you learn from using the MATLAB simulation?

Extra:

The function used to generate the plots you examined in this exercise is called “rangefinder.” You can examine the actual code behind this by executing the command “edit rangefinder” in MATLAB. The program has several comments to help you understand what the program does. Additionally, you can access MATLAB’s extensive help files to learn about individual functions within the program by using the help command (example: “help plot”) or the included help documentation (by pressing F1).

Extra Questions: