I have moved! New homepage https://homepages.dias.ie/jmackey/

From 1. January 2016 I have moved to the Dublin Institute for Advanced Studies. Please go to my new homepage for up-to-date information.

pion is a grid-based fluid dynamics code for hydrodynamics (HD) and magnetohydrodynamics (MHD), including a ray-tracing module for calculating the attenuation of radiation from point sources of ionizing photons, and a module for coupling fluid dynamics to microphysical processes. The algorithms are described in Mackey & Lim (2010), Mackey & Lim (2011), and with more recent updates in Mackey (2012).

I wrote some documentation of the code in 2010 (now partly outdated), including results from a suite of standard test problems to validate the code. Follow the link to read more. In the meantime, versions of the code as used for any of my papers are available on request, but with very little documentation/help to make it useful. If you are interested in using the code for an astrophysics project, let me know and I will try to help. The source code is hosted in a Mercurial repository at BitBucket (currently private, contact me to request access), and I am going to add content to the associated wiki.

pion is described in the paragraphs below. Results and movies from simulations can be found in my research pages, and in the links to my publications.

Simulation Snapshot

Above is a snapshot of a simulation using pion, taken from Mackey, Mohamed, Neilson, Langer, & Meyer, 2012, ApJ Letters, 751, L10. We modelled the bow shock produced by the runaway star Betelgeuse assuming it has recently evolved from a blue supergiant to its current state as a red supergiant. This can partly explain some of the more puzzling aspects of Betelgeuse's circumstellar medium. Click on the image to open a movie of the simulation's full evolution. Read more here.

Introduction to the pion code

pion is written in C++, and is designed to be as object-oriented (i.e. modular) as possible. This means that, at least in principle, parts of the code can be taken out and plugged into other codes, and parts of other codes can be merged into pion. In practice, this is only really possible for things like chemistry networks and heating/cooling processes, because most other modules depend on the underlying data structures in the computational grid. The main advantage of object-oriented code is that if you edit one part of the code you are very unlikely to break another part; it helps with maintenance, debugging, and extending the code's capabilities.

The main code modules are:

Problems are set up with a parameter file and an initial-condition generator. This writes an output file, which the code-executable reads. The output files are also restart files, and contain all of the simulation parameters in the header. Many simulation parameters can also be over-ridden with command-line arguments. Almost all features of the code can be used without recompilation e.g. HD, MHD, photoionization, different coordinate systems, different dimensionality of the problem, etc. are all run-time parameters. This is achieved with inherited classes and interfaces defined by virtual base classes. Some features can be excluded with compile-time flags to make the executable smaller, but I haven't found noticeable speedup using these flags.

Features included in pion

Features NOT included in pion

Parallelisation and scaling

Plans for future development

Publications using pion

  1. "Wind bubbles within H II regions around slowly moving stars"
    Mackey, Gvaramadze, Mohamed, & Langer, 2015, A&A, 573, A10.
  2. "Interacting supernovae from photoionization-confined shells around red supergiant stars,"
    Mackey, Mohamed, Gvaramadze, Kotak, Langer, Meyer, Moriya, & Neilson, 2014, Nature, 512, 282-285.
  3. "Pressure-driven fragmentation of clouds at high redshift,"
    Dhanoa, Mackey, & Yates, 2014, MNRAS, 444, 2085.
  4. "Dynamics of H II regions around exiled O stars,"
    Mackey, Langer, & Gvaramadze, 2013, MNRAS, 436, 859-880.
  5. "Double bow shocks around young, runaway red supergiants: application to Betelgeuse,"
    Mackey, Mohamed, Neilson, Langer, & Meyer, 2012, ApJ Letters, 751, L10.
  6. "Accuracy and efficiency of raytracing photoionisation algorithms,"
    Mackey, 2012, A&A, 539, A147.
  7. "Effects of magnetic fields on photoionized pillars and globules,"
    Mackey & Lim, 2011, MNRAS, 412, Issue 3, pp. 2079-2094.
  8. "Dynamical Models for the Formation of Elephant Trunks in H II Regions,"
    Mackey & Lim, 2010, MNRAS, 403, Issue 2, pp. 714-730.

Valid HTML 4.01 Transitional