PYRO

pyro is a simple set of 2-d hydrodynamics solvers written in Python/C. It serves as a framework to test solvers easily, and more will be added with time. Pyro is my 'coffeeshop code'---it is written in my spare time in order to learn some new techniques. It is not written for performance, but rather for ease of understanding/modification. It is also my first foray into python and numarray.

Currently, there are solvers for:

pyro uses the numarray package and HDF5, and requires gcc and python to run. Some parts are still a bit rough, but I am gradually moving toward writing the memory management and services in python and doing the heavy computation in C. Simple IDL routines are provided to help visualize--eventually I will try writing the visualization routines in python. The included Readme file details how to install and run pyro. A test suite is provided which provides automated regression testing.

Download pyro 0.61 (2005-09-13)

 

Compressible Flow Examples

Sedov Test Problem

Comparison of the unsplit compressible algorithm's solution to the Sedov point explosion test problem to the analytic solution (from Sedov 1959), using gamma = 1.4. This is a 256x256 zone domain, with an initial perturbation size of 0.005 cm. Subsampling was used (4x in each direction) in initializing the perturbation to get a more accurate realization of the circular perturbation in the zone averages of the rectangular grid. The comparison was made at t = 0.05 s.

sedov error plot

The solid line is the analytic solution, taken from the tables in Sedov (1959), page 223. The analytic solution puts the shock position at r = C sqrt(t), where C is a constant close to 1. The diamonds are the radially binned numerical solution.

 

Effects of Dimensional Splitting on Compressible Hydrodynamics Schemes

Comparison of an unsplit and Strang-split 2nd order Godunov scheme on a 4-shock problem. The unsplit algorithm follows Colella (JCP, 1990), using the 4th order MC limiters, the high-order transverse flux implementation, and the multi-dimensional flattening algorithm. The split version is a one-dimensional projection of this same algorithm.

Each run is 128x128 zones. Aside from the splitting, the two runs use identical parameters. The unsplit version looks more symmetric about the diagonal, but appears to suffer some post shock oscillations. Analysis and computation of the error (and convergence rates) and the code itself will follow shortly.

unsplitsplit

unsplit (left) and split (right) density fields

 

Incompressible Flow Examples

The incompressible Euler equations are solved via an cell-centered approximate projection method. The results of a doubly periodic shear layer calculation are shown below. This is a work in progress.

incompressible shear layerincompressible shear layerincompressible shear layer

Vorticity for a doubly periodic shear layer simulation on a 64x64 grid (left), 128x128 grid (center), and 256x256 grid (right) shown at t=1.0.

 

History

version 0.61 (2005-09-13)

version 0.6 (2005-09-02)

version 0.51 (2005-08-15)

version 0.50 (2005-05-02)

version 0.42 (2005-03-26)

version 0.41 (2005-01-08)

version 0.40 (2004-10-06)

version 0.30 (2004-08-13)

version 0.20 (2004-07-13)

version 0.18 (2004-07-11)

version 0.15 (2004-05-24)

pyro comes with no warranty, explicit or implicit.

Valid HTML 4.01!