Visualizing magnetic field lines

From Einstein Toolkit Documentation
Jump to: navigation, search

For the ET MHD paper, I wanted to visualize magnetic field lines as done in figure 4 of DelZannaa 2002. For this I wanted to use VisIt on 2d hdf5 output (unigrid) from Carpet. The data and paremter files can be found in the MHD paper repository [1].

To visualize them, one has to do the "usual VisIt" stuff to get a vector into VisIt. Ie.

  • if all vector components are in a single set of files then
    • open the file in VisIt and
    • create a new vector Expression (Control/Expressions...)
  {<HYDROBASE--Bvec_lb_0_rb_>,<HYDROBASE--Bvec_lb_1_rb_>,<HYDROBASE--Bvec_lb_2_rb_>}
  • if the vector components are in different sets of files bvec[0], bvec[1], bvec[2] then
    • open the bvec[0] file in VisIt and
    • create a new vector Expression (Control/Expressions...) using conn_cfme (see http://visitusers.org/index.php?title=Cmfe_overview, where [0]id stands for 0-delta-iteration i.e. the same iteration in all databases) to combine files
  {<HYDROBASE--Bvec_lb_0_rb_>,
   conn_cmfe(<bvec[1].file_0.h5[0]id:HYDROBASE--Bvec_lb_1_rb_>),
   conn_cmfe(<bvec[2].file_0.h5[0]id:HYDROBASE--Bvec_lb_2_rb_>)}
This combines the three components into a single vector (the precise names of the scalars differ from version to version in VisIt).
  • add a "Streamline" plot and the "Project" operator
  • set the streamline options as shown below

streamlineoptions.png

  • you can find the full settings in the session file in the rotor repository [2]
  • the final plot should look like this:

fieldlines.png