Difference between revisions of "Visualizing magnetic field lines"

From Einstein Toolkit Documentation
Jump to: navigation, search
(ad final picture, resize images)
(add conn_cmfe example)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
To visualize them, one has to do the "usual VisIt" stuff to get a vector into VisIt. Ie.
 
To visualize them, one has to do the "usual VisIt" stuff to get a vector into VisIt. Ie.
  
* open the file in VisIt
+
* if all vector components are in a single set of files then
* create a new vector Expression (Control/Expressions...)
+
** open the file in VisIt and
<code>
+
** create a new vector Expression (Control/Expressions...)
 +
<pre>
 
   {<HYDROBASE--Bvec_lb_0_rb_>,<HYDROBASE--Bvec_lb_1_rb_>,<HYDROBASE--Bvec_lb_2_rb_>}
 
   {<HYDROBASE--Bvec_lb_0_rb_>,<HYDROBASE--Bvec_lb_1_rb_>,<HYDROBASE--Bvec_lb_2_rb_>}
</code>
+
</pre>
that combines the three components into a single vector (the precise names of the scalars differ from version to version in VisIt).
+
* if the vector components are in different sets of files <code>bvec[0]</code>, <code>bvec[1]</code>, <code>bvec[2]</code> then
 +
** open the <code>bvec[0]</code> file in VisIt and
 +
** create a new vector Expression (Control/Expressions...) using <code>conn_cfme</code> (see http://visitusers.org/index.php?title=Cmfe_overview, where <code>[0]id</code> stands for 0-delta-iteration i.e. the same iteration in all databases) to combine files
 +
<pre>
 +
  {<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_>)}
 +
</pre>
 +
: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
 
* add a "Streamline" plot and the "Project" operator
 
* set the streamline options as shown below
 
* set the streamline options as shown below

Latest revision as of 15:40, 6 November 2019

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