# NRPy+

# NRPy+/SENR: The Software at the Heart of BlackHoles@Home

## Translations

**中文***Courtesy Yutong Wang and Zhoujian Cao*

Encoding partial differential equations (PDEs) into high-performance software by hand (usually in a low-level language like C or FORTRAN) can be a frustrating, error-prone process.

**NRPy+** ("Python-based code generation for numerical relativity... and beyond!") is a Python package aimed at accelerating this process.
Users may input complex expressions in clean tensorial form (Einstein notation), which acts to minimize human error.
**NRPy+** processes this input and outputs highly optimized C code with CSE and/or SIMD
compiler intrinsics if desired.

Interactive NRPy+ Tutorial:

*Be sure to check out the new Colliding Black Holes tutorial module!*

*Be sure to check out the new Colliding Black Holes tutorial module!*

Unlike other software packages with similar functionality, **NRPy+** requires **no expensive Mathematica or Maple license to function**. Instead, it makes extensive use of the powerful, open-source SymPy as its computer algebra system back-end. In this way, **NRPy+** is designed to **lower the barrier to entry** for new users.
Though it was originally designed to greatly **accelerate software development** for numerical relativity (i.e., solving Einstein's equations of general relativity on the computer), **NRPy+** can be used to rapidly develop software to solve much broader classes of hyperbolic and parabolic PDEs.
By default it supports finite difference approaches, but can be extended to accommodate other numerical representations of derivatives as well.

**SENR** ("the Simple, Efficient Numerical Relativity code") is a fully-functional,
OpenMP parallelized numerical relativity code in C that simply incorporates the
C code generated by **NRPy+** where needed. Its uncluttered appearance and small
number of lines of code make the algorithmic underpinnings of a numerical
relativity code completely transparent.

The **NRPy+/SENR** software packages have implemented a new generalized approach for solving Einstein's equations of general relativity in singular coordinate systems (built upon the pioneering work of our colleagues: [1], [2]), with a goal of modeling black hole and neutron star binaries at about
**1/100** the cost in memory of more traditional, AMR-based numerical relativity software.
**We aim to leverage this cost savings, as described in this presentation,
to unlock the desktop computer as a core tool for gravitational wave astrophysics**.

**New! (Continuously updated)**

- Minute-by-minute GitHub commits tracker
- Interactive NRPy+ Tutorial (Interactive Jupyter notebooks generously hosted by mybinder)
- Non-interactive, bare-bones version

## Introductory presentation on NRPy+/SENR.

**Status Updates**

An at-a-glance summary of recent progress from ongoing projects.

**Jan. 2019 onwards:**visit Intro Presentations**June 2018:**SENR can do black hole binary mergers in a co-rotating frame!**Dec. 2018:**Completed NRPy+ tutorial module enabling simulations of black hole collisions! (Brill-Lindquist initial data, evolved in pure axisymmetry using BSSN in curvilinear coordinates.)**Fall 2018:**Completed NRPy+ tutorial modules on solving scalar wave equation, Maxwell's equations, constructing Psi_4, and Einstein's equations in curvilinear coordinates using NRPy+**Summer 2018:**Basic NRPy+ tutorial**Spring 2018:**Black hole binary mergers in corotating cylindrical coordinates, using NRPy+/SENR! (Click Intro Presentations button in Menu Bar)**Dec. 22, 2017:**Released first paper on NRPy+/SENR

### Recent results (prior to the black hole binary work) are summarized in our first paper.

### Key Result from the First Paper (2017): Black Hole Spectroscopy

We performed a black hole head-on collision with SENR in sinh-spherical coordinates, and compared the resulting waveform (as measured by the absolute value of the real part of the Weyl scalar \Psi_4; the vertical scale is arbitrary) from our calculation with the exponentially decaying waveform predicted by the black hole perturbation theory.

Notice that we find excellent phase and amplitude agreement to nearly **7 decades**
in amplitude. The same calculation performed on a Cartesian AMR grid at high
resolution results in disagreement after only about 3 or 4 decades, indicating
the importance of using spherical-like coordinates in the gravitational wavezone.

**Click on the image to learn more about SENR!**

# People

**Zachariah B. Etienne** is an associate professor of Physics & Astronomy at West Virginia University.