

I can't make animated curves in Celestia, since they are deforming in an organic way (torsion, etc), if the multi-dipolar source is changing. I also programmed Mathematica to cut the curves in 50 parts to add the color variations.
Fieldlines mathematica code#
I'll give some basic parts of the code in my next post. The Mathematica code is pretty messy right now, especially since I have to select the field lines by hand after inspection (you can't predict the results before the simulation). I'm still not sure I'll use this, however. In this case, I'm clearly cheating by using knotted curves on a deformed torus. I also intend to simulate the " flux tubes" of entangled field lines, like the small one visible on the center of this image : So I had to "cheat" a bit : I build a "generic" model using two dipoles only, and placed several of these on the surface, as shown above. Most of the time, the field's global aspect is a total mess. Unfortunately, the results are almost impossible to control, since there are too many variables to handle (parameters) : dipole strenght, dipole orientation, dipole location on the sphere, number of field lines to draw and selection of field lines (or initial condition to "grow" the field lines). I've experimented up to 8 dipoles, distributed on the surface of an unit sphere.

All dipoles are placed below the surface, very close to it. However, a pair of dipoles gives much better results. Each dipole, tangent to the surface and below it, simulates a pair of sun spots. This field is the result of a static multi-dipoles distribution (a solution to Maxwell's equations, using linear superposition of simple solutions). I absolutely love the last three pictures ! The field lines are so clear on them ! Here's a video showing the typical time evolution of the real magnetic field lines : Here are more pictures of the real thing, which inspired me : Of course, the star texture need to be changed to place the sun's spots at a proper location. My Mathematica notebook which created this model is a complete mess ! I'll have to do some code cleaning and optimisation before doing the final model.

Don't worry about the colors, they will be changed at a later stage : So here's a complete rotation around the model (anticlock way rotation, as seen from above). Since there are so much parameters to control (dipole strengh, dipoles number, dipoles position and orientation in space, number of field lines to draw, field line "initial condition", etc), I was at the point to kill the whole project, until I got this nice result today. Starting from some "initial conditions" which draw a field line, you can't predict where the line will end or what will be its extent in space. A small variation of parameters (there are LOTS of them) could change dramatically the field global character. Using Mathematica, it was actually extremely difficult (at least to me) to find some nice configuration of field lines which gives something like on the picture above, since they tend to behave in a cahotic way. Here's a picture of a real solar flare that I wanted to represent in Celestia : I finally found an interesting configuration of a magnetic field which simulates very well solar flares.
