As it turns out, the equations for magnetic fields and forces that I was hoping to plot in Mathematica are too complicated for Mathematica to handle. I am unsure whether this drawback just applies to my Student version of Mathematica, or if my personal computer is to blame. However, I took a slight deviation to begin my studies with a simpler equation to model, the equation for the magnetic force between two plates of some finite area, given by:
(1)
where is the magnetic flux density (magnetic field strength) at a given distance above the bottom magnet, is the common area between the two plates, and is the permeability of free space. In order to easily visualize this effect, I generalized the magnetic flux density by replacing it with a constant multiple times the inverse of distance cubed (which is the relationship between magnetic field strength and distance), producing the following graph in Mathematica:
Clearly, the force falls off extremely quickly with respect to distance, so I am expecting my other graphs to have a range of many fractions of a meter. This outcome is exactly as I would expect (ignoring any fringing effects near the edges), since the magnetic force between the two magnets decreases rapidly with distance; in my future calculations, I will expect the force on the top magnet to increase as the two get closer together, and decrease as the magnets separate, hopefully leading to a steady distance between the two over time. As soon as I can get Mathematica to accept my more complicated equations and graphs, I will post them.
Good start! It’s important to identify your axis. What information are you hoping to gain from this model.