The GODUNOV code

GODUNOV is a code to perform numerical simulations in a fluid approximation on a uniform mesh. The goal in developing this code is to create a solid framework for simulations on uniform mesh in the Cartesian, cylindrical, or spherical coordinate systems with a number of numerical methods which can be selected in an easy manner. The code is completely written in Fortran 2003.

The following features are already implemented:

  • hydrodynamic and magnetohydrodynamic set of equations (HD and MHD),
  • both classical and special relativity cases for the above equations,
  • Cartesian coordinate system,
  • 2nd to 4th order time integration using Strong Stability Preserving Runge-Kutta methods,
  • 2nd order TVD interpolation with number of limiters and higher order reconstructions,
  • Riemann solvers of Roe- and HLL-types (HLL, HLLC, and HLLD),
  • periodic and open boundary conditions,
  • viscous and resistive source terms,
  • data stored in the HDF5 format,
  • MPI parallelization.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see




  1. Clone or unpack the code sources downloaded from Bitbucket.
  2. Go to directory hosts/ and copy file default to a new file named exactly as your host name (name returned by command hostname).
  3. Customize your compiler and compilation options in your new host file.
  4. Go to directory src/ and copy file make.default to make.config.
  5. Customize compilation time options in make.config.
  6. Compile sources by typing make in directory src/. The executable file godunov.x should be created.


In order to run some test problems you can simply copy corresponding parameter from directory problems/ to the location when you wish to run your test. Copy the executable file godunov.x compiled earlier to the same directory. If you provide option -i <parameter_file>, the code will know that the parameters have to be read from file <parameter_file>. If you don't provide this option, the code will assume that the parameters are stored in file in the same director.

In order to run serial version, type in your terminal: ./godunov.x -i

In order to run the parallel version (after compiling the code with MPI version), type in your terminal: mpirun -n N ./godunov.x -i, where N is the number of processors.