Neil Vaytet - 2014-02-09
               MINYDRO: Minimal Cell-Based Hydrodynamics
                   Written by Neil Vaytet (ENS Lyon)
                        Version 1.0 - July 2013

MINYDRO is a very simple code for 3D hydrodynamical simulations written in Fortran 90. It is less than 700 lines long, and has a pretty neat structure! Each cell is treated as a object which has a density, pressure, etc... and interacts with other cells (i.e. its neighbours).

Being very short, it can't do as many things as other codes used in research (such as MORPHEUS) can do. Indeed, it only has a cartesian grid, and currently only has free-flow and periodic boundary conditions, but the simplicity of the code makes it ideal for teaching purposes.

The code can be compiled with:
gfortran -o minydro minydro.f90 -ffree-line-length-none
If you wish to use OpenMP parallelisation, you can add the "-fopenmp" flag at the end of your compilation command line.

The default setup is a Sedov explosion inside a 2D rectangular box. Some parameters such as the simulation end time or the output frequency can be changed at the beginning of the "minydro" program (lines 101 to 103).
To change the simulation setup, one needs to modify the "setup" subroutine. The number of dimensions, the grid resolution, the simulation box size and the boundary conditions can be modified at the start of the subroutine, while the initial conditions of the gas conservative variables are modified starting from line 220.

A small plotting program is also supplied in this archive. It reads the outputs from the 2D simulation and writes density maps to ppm images. It can be compiled simply by entering:
gfortran -o read_minydro_data read_minydro_data.f90
It can then be run using:
./read_minydro_data noutput_start [noutput_end increment]
where noutput_start is the output number from which to start plotting, and the other two optional arguments are the output number at which plotting should stop and the increment to be used for stepping through the outputs. If not supplied, the default values are noutput_end = noutput_start and increment = 1.

This program is free to use. It was designed mainly for teaching purposes and it is made freely available in the hope that someone may find it useful.

 

Last edit: Neil Vaytet 2014-02-11