oscar2xdmf Converter

The oscar2xdmf utilities are for converting OSCAR files to XDMF files for visualization in the MADAI Workbench and ParaView. Tools are available to convert both OSCAR1997A (particle) and OSCAR2008H (2D/3D hydro volume) to XDMF (HDF5 + XDMF) format.

Note: The oscar2xdmf utilities have been superseded by the oscar2pvd utility. No further updates to the oscar2xdmf utilities are anticipated.



Version 1.1.2

Bug fixes

  • Fixed error where multiple timesteps in OSCAR2008 file with Euler 3D grid type were not converted successfully.

Ubuntu 12.04 64-bit


Fedora 19 64-bit


Mac OS X 10.6 64-bit


Version 1.0.0

Mac OS X 10.6 Intel 64-bit


RedHat Linux 64-bit

Requires GLIBC_2.7, GLIBCXX_3.4.11, GCC_4.0.0 libraries installed on the system


Installation instructions for Mac OS X

Double click the file oscar2xdmf-1.0.0-Darwin.dmg.  This will mount a new volume called oscar2xdmf-1.1.2-Darwin and will open a Finder window. Double click the installer oscar2xdmf-1.0.0-Darwin.pkg to run it. When you are finished, the OSCAR converters will be placed in /usr/local/bin and will be available on the command line.

Installation instructions for Linux

I assume you want to put these somewhere you can access without having root privileges, such as your home directory.
1). If you don’t have a special install directory in your file space, create one. For example,
mkdir /home/cquammen/install
2). Run the installer
./oscar2xdmf-1.0.0-Linux.sh --prefix=/home/cquammen/install
3). Answer the two questions about accepting the license and creating a subdirectory posed by the installer. You will probably want to answer ‘n’ for the second question.
4). If you created an install directory, add the bin directory created by the installer to your PATH environment variable.
5). If you want to put the binaries in /usr/local, change directory to /usr/local, copy oscar2xdmf-XXX-Linux.sh there, and run the installer as in Step 2 above. You will likely need to run the command using sudo.

XDMF Output

The following tables list the variables output by the converter tools.


id particle id none
px momentum x GeV/c x-components of momentum
py momentum y GeV/c y-components of momentum
pz momentum z GeV/c z-components of momentum
p0 energy GeV energy of particle
mass mass GeV/(c^2) mass of particle, given in GeV/(c^2) with c=1
x position x fm x-coordinate of particle given in femto-meter (fermi)
y position y fm y-coordinate of particle given in femto-meter (fermi)
z position z fm z-coordinate of particle given in femto-meter (fermi)
t time fm/c femto-meter (fermi) divided by speed of light, which is 10^(-24) seconds
x_f interaction vertex x fm x-coordinates of position of last scattering point of particle
y_f interaction vertex y fm y-coordinates of position of last scattering point of particle
z_f interaction vertex z fm z-coordinates of position of last scattering point of particle
t_f interaction vertex t fm/c time of last scattering
iflag particle status none special information on particle status
pt transverse momentum GeV/c pt=sqrt(px*px+py*py)
Etot on-shell energy GeV Etot=sqrt(mass*mass+px*px+py*py+pz*pz)
rap rapidity none rap=0.5*log( max((p0+pz),1e-8) / max((p0-pz), 1e-8) )
phi azimuthal angle deg phi=90-radians2degrees*atan(py/max(abs(px),1e-8))
theta polar angle deg theta=90-radians2degrees*atan(pz / max(pt, 1e-8))
pabs |momentum| GeV/c pabs=sqrt(pt*pt+pz*pz)
mt transverse mass GeV/(c^2) mt=sqrt(mass*mass+pt*pt)
qzz transversity Qzz (GeV/c)^2 qzz=2*pz*pz-pt*pt
mtm0 mt-m0 GeV/(c^2) mtm0=sqrt(mass*mass+pt*pt)-mass
r_fr freeze-out radius fm r_fr=sqrt(x_f*x_f+y_f*y_f+z_f*z_f)
ft_fr transverse freeze-out radius fm rt_fr=sqrt(x_f*x_f+y_f*y_f)
rt transverse radius fm rt=sqrt(x*x+y*y)
eta pseudo-rapidity none eta=-1.0*log(tan(acos(pz/pabs)/2.0))
v2 flow coefficient none v2=(p.px / p.pt)^2 – (p.py / p.pt)^2
charge electric charge none code comment says “waiting for the right formula”
Et transverse energy GeV Et=sqrt(pt*pt+mass*mass)
Ppt transverse velocity none Ppt=pt/Etot
x_v interaction vector x fm x_f – x
y_v interaction vector y fm y_f – y
z_v interaction vector z fm z_f – z
tau rapidity time none tau=sqrt(abs(t*t – z*z))
euclidiean position fm
relativisitic position fm
euclidean momentum GeV
relativistic momentum GeV
interaction position fm
Added by Xunlei
logMass? log mass times scalar 1.0 / max(0.4*log(1-abs(mass)),1e-8)


Cell data variable name Unit
R_qgp The fraction of QGP liquid in the cell
T GeV Temperature
e GeV/fm^3 Energy density in the local rest frame
mu(1) GeV Chemical potential corresponding to the first conserved charge
n(1) Density of first charge in the local rest frame
p GeV/fm^3 Pressure
vx c Fluid velocity in x- (or r- or rt-) direction
vy c Fluid velocity in y- (or phi-) direction. Can be absent in case of restricted solution, e.g., for “sphere”, “slab1d”, …
y_L c Longitudinal fluid rapidity. Can be absent
tau eigen-time of cell (only needed for Lagrangian grids)
t fm/c time
x lower x-boundary of cell [only needed for Lagrangian grids]
y lower y-boundary of cell [only needed for Lagrangian grids]
eta lower eta-boundary of cell (eta = space-time rapidity) [only needed for Lagrangian grids]
Diss dissipative components of shear pressure tensor:
Tr transport coefficients: e.g \eta/s and \tau_\pi, \tau_\Pi (the latter for the bulk pressure)
z z = tau * (exp(2*eta) – 1.0)/(exp(2*eta) + 1.0) = tau * tanh(eta)