LESIA-Observatoire de Paris logo IAS logo MEDOC logo (Updated: 2017-06-12)  

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

Data

This web page, hosted at the MEDOC data centre (CNRS/Univ. Paris-Sud/CNES), provides output 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 of a previous run in the same configuration 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. A tutorial for visualizing the data is provided below.

Data retrieval

Links to the full set of output

The following full sets of output data are provided as .tar.gz files:

Retrieve a partial set of output

This form generates a .tar archive 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 simulation step. The XDMF file names are simulation.[b/u/r].from_t1.to_t2.xdmf.

Choose output steps (from 0 to 197):
From to , cadence:

magnetic field velocity field density

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 on the VisIt website for many plateforms. The application is working on top of the Python language, but the executables provide the required Python packages.

The following instructions are written for VisIt 2.10.

a) Open the magnetic field file

When launching VisIt, two windows open. In the window named "VisIt [version number]", 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_cadence_n.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]" 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 gives 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]" 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]" window, open the simulation.u.from_t1.to_t2_cadence_n.xdmf file. Then click on "Controls" → "expression" and add a "New" expression
"Name": "u" for example
"Type": "Scalar"
"Standard editor"
"Definition": sqrt(ux*ux+uy*uy+uz*uz).
"Apply" and "Dismiss".

In the "VisIt [version number]" 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_cadence_n.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]" 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]" 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]" 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 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 5.1.

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_cadence_n.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"

Then you can trace the lines
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.", click on "Apply"

You can change the orientation of the 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_cadence_n.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_cadence_n.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 did 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 (e.g. 5 min per frame).

3) Using IDL

The Interactive Data Language needs to use arrays corresponding to a regularly spaced grid and then needs to read the entire data cube before playing with the values. This process is very consuming in memory and time, but the language permits precise rendering and easy plotting. Of course doing an interpolation from the non linear grid to the linear one leads to loss of information or of storage efficiency, but most of analyses are not sensitive to this loss.

You can find here two small routines that will do the basics. readh5.pro and 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, you can restore the .save files that have been stored in your directory:

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

Then compile makestream.pro

 > .r makestream

and display the lines:

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

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

4) Using Python

The h5py Python module can be used to read the HDF5 files.


If you have any questions/comments, please contact: