hydro by example

A simple python-based tutorial on computational methods for hydrodynamics









low Mach





UPDATE: pyro's git repository has migrated to github.

∗ Download

pyro can be obtained on the pyro2 github page. The best thing to do is to fork the project there and then you can interact with your own git repo.

If you prefer to work via the commandline, you can clone it as1:
git clone https://github.com/zingale/pyro2

Alternately, if you setup a github account and store your ssh key in your account, you can clone it through ssh as:
git clone ssh://git@github.com:/zingale/pyro2.git

When you clone the git repository, you will have a full working directory along with all of the development history (hidden away in the files in the .git/ directory). You can use this repo to keep track of your own changes:

Note that all of the above only affects your copy of pyro. If you want to contribute changes back to the main pyro repository, you can use github to issue a "pull request". This will alert the developers who can evaluate your changes and then pull them from your repo into the main git repo for pyro.

There is extensive documentation on git online—here's some to get you started:


pyro is released under the BSD-3 license (LICENSE).

Getting Started

By default, pyro uses python 3.x—it is recommended that you use python 3 as well. There are a few steps to take to get things running. You need to make sure you have numpy, f2py, matplotlib, and h5py installed.

Not all matplotlib backends allow for the interactive plotting as pyro is run. One that does is the TkAgg backend. On recent Fedora systems, this appears to be the default. Otherwise, you can make this the default by creating a file ~/.matplotlib/matplotlibrc with the content:

  backend: TkAgg
You can check what backend is your current default in python via:
  import matplotlib.pyplot

The remaining steps are:

ChangeLog (updated automatically)

Regression and unit testing

Getting help

Information about the mailing list and a FAQ can be found on the pyro help page.


1git is available on most linux distributions through the package manager. On fedora, do dnf install git
2thanks to Selma E. de Mink for the Mac/OSX package installation instructions.