hydro1d
is a simple one-dimensional finite-volume Eulerian hydrodynamics code that implements piecewise constant, piecewise linear, and piecewise parabolic (PPM) reconstruction, and supports both Cartesian and spherical geometries.
It is written in modern Fortran (a F2003+ compiler is needed).
At the moment, a constant-gamma equation of state is assumed.
Introduction
hydro1d is meant as a teaching code—written to help new Astronomy / Astrophysics undergraduate and graduate students come up to speed on the methods for solving the equations of hydrodynamics that are popular in our field.
hydro1d solves the compressible Euler equations in a finite-volume Godunov framework. A simple gamma-law gas is used. Slopes are reconstructed using piecewise constant (Godunov), piecewise linear, or piecewise parabolic (PPM) polynomials. The emphasis in the code is on readability and understanding the equations, so some steps are explicitly written out for clarity—performance is a secondary consideration.
The code is written in Fortran (using some elements of Fortran 2003 and 2008). The included makefile is setup for gfortran.
Some basic problems are supplied, including a shock-tube (in the sod/ directory), and simple advection (advect/) of a density pulse. The included README file explains how to get started.