pyro: a framework for hydrodynamics explorations and prototyping

  • Harpole A
  • Zingale M
  • Hawke I
  • et al.
N/ACitations
Citations of this article
9Readers
Mendeley users who have this article in their library.

Abstract

pyro is a Python-based simulation framework designed for ease of implementation and exploration of hydrodynamics methods. It is built in a object-oriented fashion, allowing for the reuse of the core components and fast prototyping of new methods. The original goal of pyro was to learn hydrodynamics methods through example, and it still serves this goal. At Stony Brook, pyro is used with new undergraduate researchers in our group to introduce them to the ideas of computational hydrodynamics. But the current framework has evolved to the point where pyro is used for prototyping hydro-dynamics solvers before implementing them into science codes. An example of this is the 4th-order compressible solver built on the ideas of spectral deferred corrections (the compressible_sdc solver). This implementation was used as the model for the development of higher-order schemes in the Castro hydrodynamics code (Almgren et al., 2010). The low Mach number atmospheric solver (lm_atm) is based on the Maestro code (Non-aka et al., 2010) and the pyro implementation will be used to prototype new low Mach number algorithms before porting them to science codes. In the time since the first pyro paper (Zingale, 2014), the code has undergone considerable development, gained a large number of solvers, adopted unit testing through pytest and documentation through sphinx, and a number of new contributors. pyro's functionality can now be accessed directly through a Pyro() class, in addition to the original comman-dline script interface. This new interface in particular allows for easy use within Jupyter notebooks. We also now use HDF5 for output instead of Python's pickle() function. Previously, we used Fortran to speed up some performance-critical portions of the code. These routines could be called by the main Python code by first compiling them using f2py. In the new version, we have replaced these Fortran routines by Python functions that are compiled at runtime by numba. Consequently, pyro is now written entirely in Python. The current pyro solvers are: • linear advection (including a second-order unsplit CTU scheme, a method-of-lines piecewise linear solver ⋆ , a 4th-order finite-volume scheme ⋆ , a WENO method ⋆ , and advection with a non-uniform velocity field ⋆) • compressible hydrodynamics (including a second-order unsplit CTU scheme, a method-of-lines piecewise linear solver ⋆ , and two 4th-order finite-volume schemes, one with Runge-Kutta integration and the other using a spectral deferred corrections method ⋆) • diffusion using a second-order implicit discretization Harpole et al., (2019). pyro: a framework for hydrodynamics explorations and prototyping. Journal of Open Source Software, 4(34), 1265.

Cite

CITATION STYLE

APA

Harpole, A., Zingale, M., Hawke, I., & Chegini, T. (2019). pyro: a framework for hydrodynamics explorations and prototyping. Journal of Open Source Software, 4(34), 1265. https://doi.org/10.21105/joss.01265

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free