LESIA-Observatoire de Paris   (Updated: February 16 2016)

OHM Code
3D line-tied zero-β resistive MHD numerical simulation

Data

This web page provides data from a run of a 3D line-tied zero-β resistive MHD numerical simulation with the OHM code from Observatoire de Paris / LESIA. The results are presented in G. Aulanier, T. Török, P. Démoulin, and E. E. DeLuca, Astrophysical Journal, 2010, 708, 314.
The initial state of the simulation presents the 3D potential magnetic field around an asymmetric magnetic bipole, resembling the typical asymmetric bipole in solar active regions. To this initial state, a slow twisting motion is applied on the two polarities resulting in magnetic field lines reconnection, inflation, and ejection. During that motion, electric currents are generated and can be analyzed. As the length scales of the magnetic field are smaller near the magnetic field neutral line, the grid is inhomogeneous, with a higher number of cells near the neutral line. All values produced by the simulation are dimensionless and have to be scaled to the typical values inside an active region.

Data format

The output data of the simulation are stored in HDF5 files; this format has been chosen for efficiency and portability. It can be read using many applications (ParaView, VisIt...) and languages (Fortran, IDL, C++, Python...) with the appropriate libraries, which are widely available. The data are stored in a hierarchy, analogous to the structures of any high-level programming language.

Along with the data files, XDMF files give the computation mesh and the time sequence of data output for each field. The XDMF file is used to provide visualization software all the information needed to interpret the data files.

Data retrieval

Links the full set of output as .tar.gz files (on FTP server) of the:

* magnetic field (0.98 Gb) : magnetic.all.tar.gz
* velocity field (0.95 Gb) : velocity.all.tar.gz
* density (0.32 Gb) : density.all.tar.gz

Retrieve a partial set of output:

This form generates a .tar.gz file containing a set of output files from the simulation. The HDF5 file names are bnnn.h5 for the magnetic field, unnn.h5 for the velocity field, and rnnn.h5 for the density, where nnn is the step of simulation. The XDMF file names are simulation.b/u/r.from_t1.to_t2.xdmf.

magnetic field velocity field density
Choose output steps (from 0 to 197)
From to
Cadence

Upon submission, a .tar will be generated; please do not close your browser during this time. Processing time can be as long as 3 hr for the whole set, and a minute for a file.
  

Conditions for using the data

When using the data (e.g. in a scientific paper), please make a reference to the Aulanier et al. (2010) paper and mention the database at MEDOC by including a sentence like "This work used data provided by the Ohm database at the MEDOC data and operations centre (CNES / CNRS / Univ. Paris-Sud), http://medoc.ias.u-psud.fr/".

Data visualization

Here are a few examples of data visualization: map of vertical magnetic field at the photosphere, magnetic field lines, and velocity contours.

1) Using VisIt

VisIt is an open-source interactive and scalable visualization, animation and analysis tool. The executables can be found at https://wci.llnl.gov/simulation/computer-codes/visit/executables for many plateforms. The application is working on top of the python language, but the executables provide the required python packages.

These instructions were written for VisIt /version number reference/.

a) Open the magnetic field file

When launching VisIt, two windows open. In the window named "VisIt /version number reference/", click on the "open" button. In the new window, set the "Path" to the path to your data. In "File grouping" menu select "Off". Choose the simulation.b.from_t1.to_t2.xdmf file and open it.

b) bz(z=0) map

We now draw the magnitude of the bz component of the magnetic field at z=0. Click on the "Add" button. The opening menu shows several "PlotAtts" that you can also find in the top menu. Click "Pseudocolor" -> "bz". Click on "Operator" -> "Slicing" -> "Slice".

Go to the sub-window where the chosen function has appeared. Click on the front arrow. Double click on "Slice". In the new window, choose "Orthogonal" to "Z" axis, and uncheck "Project to 2D". Click on "Apply" then on "Dismiss". The window closes. Click on "Draw".

The data cube slice is shown in "window 1". Click somewhere on this window and drag the cube to change the viewpoint. On one side of the cube, the magnitude of bz(z=0) is shown using the color scaling on the left top of the window. You can set a different value for z in the "Intercept" row of the "Slice operator attributes" previously opened.

c) Magnetic field lines

We now draw the magnetic field lines. In the top menu, click on "Controls" -> "Expressions". In the new window, click on "New", enter a name ("b" for example). For "Type", select "Vector Mesh Variable". In "Standard Editor" "Definition" window enter "{bx,by,bz}". Click on "Apply", then "Dismiss".

Before drawing the streamlines, at the bottom of the "Drawing" section, you will find a subsection "Apply to": uncheck "Apply the filters to all the drawings", otherwise you will have the slicing filter applied to the streamlines, leading VisIt to stop.

In the "VisIt /version number reference/" window, click on "Add" -> "Streamline" -> "b". In the window below, click on the arrow in front of "b", double click on "Streamline". In the new "Streamline plot Attribute" window, choose "Source type" -> "Circle", enter "Origin" (best to our point of view) 1.1 0.3 0; "Normal" 0 0 1; "Up axis" 1 0 0; "Radius" 1. You can adjust the number of seed points for the streamlines in the "Samples in Theta" and "Samples in R" boxes, 6 for both give a pretty drawing. As the default settings give wide streamlines, go to the "Appearance" tab, select "2" in "Display" "Draw as" "Width", enter "0.1" in "Radius" and "Absolute" in the nearest scrolling menu. You may need to put this window in full screen to see the "Apply" and "Dismiss" buttons; click on "Apply" then on "Dismiss".

Click on "Draw" in the "VisIt /version number reference/" window.

d) Velocity contours

Eventually you might like to draw the contours of the velocity output over the magnetic field lines. In the "VisIt /version number reference/" window, open the simulation.u.from_t1.to_t2.xdmf file. Then click on "Controls" -> "expression" and add a "New" expression
"Name" -> "u" for example
"Type" -> "Scalar"
"Standard editor"
"Definition" enter sqrt(ux*ux+uy*uy+uz*uz).
"Apply" and "Dismiss".

In the "VisIt /version number reference/" window, click on "Add"->"Contours"->"u".
A new "Correlate database?" window opens. Click on "Yes"
Click on the large arrow in front of the "simulation.u.from_t1.to_t2.xdmf" line. Double click on "Contour". Preferably, at "Select by" -> "Values", enter few values for example 0.0004 0.004 0.04, and press enter. In "Contours colors", several color tables appear. If you want to observe the relation of the magnetic field lines and the velocity, choose an "Opacity" of 20% for example. "Apply" and "Dismiss".

To get an animation of the magnetic field running together with the velocity, in the "VisIt /version number reference/" window go to "Controls" -> "Database correlations". In the new "Database correlation list" window, click on "New", give a "Name", select the two opened "Sources", click on the arrow "-->". The sources appear in the "Correlated sources". Click on "Create database correlation", and "Dismiss".

Go to the "VisIt /version number reference/" window, click on the "Controls" menu then on "Animation", check "Cache animation for faster playback", "Apply", then "Dismiss".

You are ready to draw, so click on the "Draw" button of the "VisIt /version number reference/" window, then on the arrow in the "Time" box, and wait for the animation to be compute. It can take a while. And enjoy.

2) Using ParaView

ParaView is an open-source, multi-platform scientific data analysis and visualization tool that enables analysis and visualization of extremely large datasets. It can be downloaded from http://www.paraview.org/download/ and the user's guide is at http://www.paraview.org/paraview-guide/.

We give here instructions to get the same visualization as above with ParaView /version number reference/.

a) Open the magnetic field file

Click on the "Open File" icon or on "File" -> "Open". Set your path to the directory with your data files and choose the simulation.b.from_t1.to_t2.xdmf file. In the new "Open data with ..." window, double click on "Xdmf Reader".

In the main window, "Properties" tab every parameters en steps are listed. Click on "Apply"

b) Magnetic field lines

You first have to build the magnetic field lines to avoid unexpected behavior.
Go to "Filters"->"Common"->"Calculator"
In the new "Properties" tab linked to "Calculator1", enter a name in "Result Array Name", for example "b".
Use the "Scalar" scrolling menu and the table of function to enter the "bx*ihat+by*jhat+bz*khat" formula.
Click on "Apply"

Go to "Filters"->"Common"->"Stream tracer"
In the "Properties" tab, usually you would prefer to have "Seeds" at the bottom.
In "Point" enter "0" "0" "0"
In "Radius" enter "5." -> "Apply"

You can change the orientation of data cube.

c) bz(z=0) map

After drawing the magnetic field lines, you can overlay the map of bz(z=0).

Go to "Pipeline Browser" click on "simulation.b.from_t1.to_t2.xdmf"
Go to "Filters"->"Common"->"Slice"
In "Properties" choose "Origin" "0" "0" "0.1" ("0" gives nothing)
Click on "Z Normal" ->"Apply" ->"Coloring"->"bz"

d) Velocity contours

Go to "Pipeline Browser" tab, click on "builtin"
Go to "File" -> "Open"
Choose the simulation.u.from_t1.to_t2.xdmf file
Double click on "Xdmf Reader"
In the "Properties" tab click on "Apply"
Go to "Filters" -> "Common" -> "Calculator"
In the "Properties" tab, "Result Array Name", enter a name (for example "v")
Below enter the expression for "v": "sqrt(ux^2+uy^2+uz^2)" -> "Apply"
Go to "Filters" -> "Common" -> "Contours"
In "Properties" tab "Contours By" -> "v"
Enter a value of "0.04" -> "Apply"
Click on "Calculator2" then add "Contours" by repeating the above steps

e) Animation

The animation does not work correctly in the version we tried. It is preferable to save it and to visualize it in a different application.
"Files" -> "Save Animation"
In the new window click on "Save Animation"
Choose your directory, enter a name for the file to be saved, choose the format of animation -> "OK"
The save process can take quite a while (10 min. for 2 frame in the avi format).
Also, in our experience, ParaView was unstable when .

3) Using IDL


The Interactive Data Language usually use array which grid is linear and then reads the entire array before playing with the values. This process is very consuming in memory and time, but the language permits precise rendering viewing and easy plotting. Of course doing an interpolation from the non linear grid to the linear one leads to lost of information, but most of analysis are not sensitive to this lost.

You can find here two small routines that will do the basics. readh5.pro makestream.pro

First run at the command line

> .r readh5.pro
to read the .h5 files and make the interpolation. Enter your answers to the questions.

If you already performed the interpolation, .save files are on your directory. Make a

> restore,'simulation.b/u/r.from_step1.to_step2.save'.

Compile

>makestream.pro (.r makestream).

Run

>show_stream,bxlin,bylin,bzlin,dimensions,/lines.

A widget window shows the bz(z=0) in the background, with the bz(z=0)=[-3,-1,1,3] contours, and some choosen field lines which footpoint are around the contours at bz(z=0)=3. Feel free to modify the two routines to match your needs.

If you have any questions/comments, please contact: