# OSCAR Standard Output Format for Hydro Codes

Here is a draft specification for a standardized hydro output format (called OSCAR2008H):

- All units should be in terms of GeV and fm
- Line 1 must start with (CHARACTER*12 in FORTRAN)
**OSCAR2008H**followed by either (again, CHARACTER*12)**ideal**or**viscous**(depending on the type of hydro evolution) and either (again, CHARACTER*12)**final_hs**or**history**(depending whether the file contains only output on some hypersurface as specified in Line 5 (for example some isotherm) or the whole `history', i.e. the complete evolution in the forward light-cone restricted in space as specified in COMM below).

- Lines 2-10 are strings of type CHARACTER*80. They start with a keyword (denoted by capital letters below) followed by a colon and some additional text:

INIT: <descriptor for collision system and initial conditions> INIT: <parameters> EOS: ideal gas of massless pions CHARGES: none HYPER: full evolution GEOM: 3d GRID: Euler <grid details> VISCOSITY: shear and bulk viscosity, heat conduction VISCOSITY: <parameters> COMM: any comments and further explanations END_OF_HEADER

- The meaning should be as follows:
- Line 2 starting with INIT: should contain a string with a description of the collision system and initial conditions (CGC, Glauber, WN etc.); it is followed by one or several lines (Lines 2a, 2b etc.) listing key parameters (e.g. atomic number, initial peak energy density, etc.). They should all start with the INIT: keyword to denote that they belong to the description of the initial conditions
- Line 3 starting with EOS: describes briefly the equation of state that has been employed to generate this output. Other EoS would be e.g. "massless pions + bag model QGP, Tc=160MeV" etc.
- Line 4 starting with CHARGES: tells what type of continuity equations have been solved on top of energy-momentum conservation. Some examples (if there was more than one conserved nonvanishing current, separate by commas): "none/baryon/strangeness/charm/electric charge".
- Line 5 starting with HYPER: serves to remember which hypersurface has been generated, e.g. "T=100 MeV isotherm", "Hadronization", "baryon density 0.2/fm^3" etc. If the output contains the entire history, write "full evolution".
- Line 6 starting with GEOM: explains the geometry assumed in the calculation. The most common ones are (more may be introduced later, in which case they will be documented here):

sphere spherical symmetry scaling2d longitudinal scaling flow without azimuthal symmetry; rapidity independent temperature, chem. potentials, transv. flow velocity etc. scaling1d as scaling2d but with additional azimuthal symmetry slab1d a slab of finite length in longitudinal direction but infinite extension in transverse x- and y-directions 3d full solution without any ad-hoc assumptions regarding symmetries or the flow profile 3d-cart same as 3d, but with Cartesian coordinates

- Depending on the geometry, the space-time variables are fixed as (the unit vectors in x- and y-direction span the reaction plane, x- giving the impact parameter direction, and z denotes the longitudinal (beam-) direction)
- t, r=sqrt(x*x+y*y+z*z) for "sphere".
- tau=sqrt(t*t-z*z), rt=sqrt(x*x+y*y) for "scaling1d"
- tau, x, y for "scaling2d",
- tau, x, y, eta for "3d"
- t, x, y, z for "3d-cart"

- Line 7 denotes whether the calculations has been performed using a Eulerian or a Lagrangian grid ("Euler" vs. "Lagrange"); this is followed by Lines 7a and 7b describing the space-time grid used in the output file(s) and having the following format:

- Depending on the geometry, the space-time variables are fixed as (the unit vectors in x- and y-direction span the reaction plane, x- giving the impact parameter direction, and z denotes the longitudinal (beam-) direction)

Nt Nx Ny Nz C D T t0 t1 x0 x1 y0 y1 z0 z1

- Line 7a tells how many time-steps are printed out, and how many cells in each spatial direction are given. (If a different (e.g. finer) grid was used in the hydro calculation, this should be detailed in the COMM line below.) Note that Ni refers to the space-time variables defined above! For example, if spherical symmetry was used in the code, Nx would actually mean the number of cells in radial direction, each with volume r^2 dr dOmega ! Also, in that case Ny=Nz=0 would be printed. The integer number C specifies the number of non-vanishing conserved charges, and should match with what is printed in the 4th line of the header. The integer number D specifies the number of dissipative components printed out for each cell in the case of a viscous hydro calculation, and the integer T gives the number of transport parameters printed out for each cell of a viscous hydro calculation (these should be defined/indicated in the VISCOSITY line). If the transport coefficients and relaxation times in a viscous hydro calculation are simple functions of other output variables (e.g. temperature or entropy density), they will not be printed out (i.e. they are not counted in T), but will be explained in the VISCOSITY line described below.
- Line 7b fixes the positioning of the grid in space-time, i.e. the upper and lower edges. Print zeros if the corresponding values are not used in the code/output because of symmetry restrictions. In some 3d codes reaction-plane symmetry is assumed in which case Ny=Nx/2 and y1-y0=(x1-x0)/2 would be printed out. Units are fm for lengths and fm/c for times. Note that this line only carries useful information for Eulerian grids - in case of a Lagrangian grid the information refers to the values given by the initial conditions.
- Line 8, starting with "VISCOSITY:" denotes which transport effects are included; choose from the following options (if needed others will be added later and listed here):

none shear viscosity only bulk viscosity only shear and bulk viscosity shear and bulk viscosity, heat conduction

This is followed by a line listing the values or describing the functions used for the corresponding transport coefficients and relaxation times.

- Finally, Line 9 (and subsequent lines) starting with COMM: are reserved for additional comments. Examples include:
- `reaction plane symmetry' if the output was generated by a 3d code but with the nuclei in the initial state oriented such that the initial condition is symmetric with respect to the reaction plane, y->-y
- the type of dissipative terms & transport coefficients written out in case of a viscous hydro calculation
- the chemical potential(s) in the case of a PCE calculation and isotherm freeze-out hypersurface

- The last line of the header should just contain the string END_OF_HEADER - this allows simple FORTRAN parsers to unambiguously determine

- Finally, Line 9 (and subsequent lines) starting with COMM: are reserved for additional comments. Examples include:

the end of the header w/o reading in the 1st line of the cell output

- Now follows the listing of all the cells (or only those on the given hypersurface) . Note that the format will depend on whether 'full evolution' has been chosen or output of a hypersurface

## Cell output format for 'full evolution'

For Eulerian grid:

it ix [iy iz] e p T R_qgp vx [vy y_L] [n(1)...n(C)] [mu(1)...mu(C)] [Diss(1)...Diss(D)] [Tr(1)...Tr(T)]

For Lagrangian grid:

it ix [iy iz] tau x [y eta] e p T R_qgp vx [vy y_L] [n(1)...n(C)] [mu(1)...mu(C)] [Diss(1)...Diss(D)] [Tr(1)...Tr(T)]

The various entries have the following meanings (square brackets signal that the corresponding entry may be absent):

it (integer) : the time-step index; the physical time is t0+it*(t1-t0)/Nt. Again, be careful what geometry has been specified! In case of scaling expansion it refers to longit. proper time tau! ix (integer) : cell-index in x-(or r- or rt-) direction, physical value is x0+ix*(x1-x0)/Nx. iy (integer) : as above but in y-direction. Can be absent in case of symmetry restricted solution, e.g. for "sphere", "slab1d"... iz (integer) : as above but in the z-direction. Can be absent.

tau (float) : eigen-time of cell [only needed for Lagrangian grids] x (float) : lower x-boudary of cell [only needed for Lagrangian grids] y (float) : lower y-boundary of cell [only needed for Lagrangian grids] eta (float) : lower eta-boundary of cell (eta = space-time rapidity) [only needed for Lagrangian grids]

e (float) : energy density in the local rest frame; in units of GeV/fm^3 p (float) : pressure in units of GeV/fm^3 T (float) : temperature in units of GeV. R_qgp (float) : the fraction of QGP liquid in the cell vx (float) : fluid velocity in x- (or r- or rt-) direction vy (float) : y- (or phi-) direction. Can be absent in case of symmetry restricted solution, e.g. for "sphere", "slab1d"... y_L(float) : longitudinal fluid rapidity; Can be absent. note that the fluid 4-velocity can be calculated from the output as: u^\mu = \gamma_\perp (\cosh(y_L), vx, vy, \sinh(y_L)) with \gamma_\perp = 1/sqrt(1-vx^2-vy^2) n(i) (float) : density of i'th charge in the local rest frame; in units of 1/fm^3. Can be absent if no nonvanishing conserved currents where considered. mu(i) (float) : chemical potential corresponding to the i'th conserved charge; in units of GeV. Can be absent if no nonvanishing conserved currents where considered.

Diss(i) (float): dissipative components of shear pressure tensor: e.g. \pi^xx, \pi^yy, \pi^xy, and \pi^\eta\eta in 2D case Tr(i) (float) : transport coefficients: e.g \eta/s and \tau_\pi, \tau_\Pi (the latter for the bulk pressure)

## Cell output format for hypersurface output

For Eulerian grid:

t x [y z] e p T R_qgp vx [vy y_L] [n(1)...n(C)] [mu(1)...mu(C)] dsig_t dsig_x [dsig_y dsig_eta] [Diss(1)...Diss(D)] [Tr(1)...Tr(T)]

For Lagrangian grid:

t x [y z] tau x [y eta] e p T R_qgp vx [vy y_L] [n(1)...n(C)] [mu(1)...mu(C)] dsig_t dsig_x [dsig_y dsig_eta] [Diss(1)...Diss(D)] [Tr(1)...Tr(T)]

- all fields are defined as above in the full evolution mode, except the first 2-4 columns which in this case specify the coordinate vector at which the hypersurface vector is attached.

t (float) x (float) y (float) z (float)

- in addition the components of of the vector defining the freeze-out hypersurface are provided:

dsig_t (float) dsig_x (float) dsig_y (float) dsig_eta (float)

(created by Steffen A. Bass on Aug. 5th 2008, last edited by Bass on 4 Dec 2010 (EDT))