Posts

Showing posts from March, 2019

Modelling a Magnetic Cube: Dipoles!

Image
So I found this paper    https://doi.org/10.1063/1.4941750  (It's open access by the way) and in it they have a nice equation for the energy between two magnetic dipoles. $$E_{m_{1}m_{2}} = \frac{1}{4\pi\mu}\frac{m_{1}m_{2}-3(m_{1}e_{r})(m_{2}e_{r})}{|l^{3}|}$$ In it, the terms m1 and m2 describe the dipole vector of each magnet, and er describes the normal vector between the centers of each dipole, l describes the distance between the two dipoles, and mu is the permeability of the medium. For our purposes I got rid of mu because it's just a scaling factor. With dipoles the determination of the energy becomes a little more complicated because I've got to permute through all the possible orientations of the magnets in order to find the best choice for moving to a lower energy. This is simplified greatly by the fact that the magnets in this case are cubes and so can only have six possible orientations. In the code I've described this with an integer (1 to 6

Modelling a Magnetic Cube: Optimizing an 8x8 grid of Monopoles

Image
I was quite excited by the result obtained in the previous post from this series. However after acheiving it I realized that although I could propose a configuration and illustrate its energy distribution it was pretty much useless for finding what the minimum energy configuration of an arbitrary arrangement of positions each containing a monopole is. In order to find the energetic minimum, one could in theory simply characterize the entire state space of a configuration. Since there are two possible monopoles that can occupy a position the size of the state space is 2^N for N positions. Obviously for an 8x8x8 cube that is 13,407,807,929,942,597,099,574,024,998,205,846,127,479,365,820,592,393,377,723,561,443,721,764,030,073,546,976,801,874,298,166,903,427,690,031,858,186,486,050,853,753,882,811,946,569,946,433,649,006,084,096 possible configurations. I don't think I have the resources to characterize the whole state space so we need a more efficient way of finding the energetic m

Modelling a Magnetic Cube: Monopoles

Image
I took an interesting course this past term on biochemical computation. It's taught by Erik Winfree who was one of the first to identify that DNA strands can be used to model computation. On one of the homework assignments it was announced that the best solution would get a prize at the end of the term. Although I did not get first play, my solution was "within epsilon of winning" and so I too got a first place prize. The prize was an 8x8x8 cube of small cubes of neodymium cubic magnets. The cube was all well and good before I began dissassembling it but when the task of reassembling the cube came up I realized that although it was tauted as a "self assembling" cube, actually getting it to its most stable configuration is quite challenging. The easiest way of doing it is to make a one dimensional chain of cubes and then fold it into an 8x64 rectangle with the poles oriented parallell with the short side, then folding this rectangle into a cube. I can see why th