## HLLD Prep

My first project this week was to get correct data from an HLLD solver. After extracting the HLLD solver from Athena last week I ran some shock tubes using Athena++, plotted the results to find the locations of the waves, then extractracted the states on each side of each wave. After that I plugged those states into the HLLD solver to get known correct fluxes. In addition to the cross-wave states I only created some tests with special cases, negative density, all zeros, degenerate state, etc.

Writing dozens of tests for the HLLD solver would have required duplicating a ton of code. To deal with this I wrote a test fixture that handles most of the actual running and testing so that the user just has to provide the states, adiabatic index, etc. I tested it by implementing it the HLLC solver and made a PR with the new changes. While working on this I also implemented a processor agnostic function for computing the MHD energy in a cell so I’ll need to write some tests for that too. I found that Athena does something so that their adiabatic index variable, `Gamma`

, appears to actually be \( \gamma - 1 \) but I haven’t verified that. I will look into that more next week and get it ironed out; I’ll probably have to rerun the flux calculations to get new fiducial fluxes.

*Brio & Wu run by Athena++. Fields with constant values not shown*

*Dai & Woodward shock tube run by Athena++. Fields with constant values not shown*

*Ryu & Jones shock tube 4d run by Athena++. Fields with constant values not shown*

*Einfeldt Strong Rarefaction run by Athena++. Fields with constant values not shown*

## Other

- Figured out how to use VS Code for Jupyter Notebooks
- Ryu & Jones 1995
^{1}has a ton of great MHD shock tubes that would make fantastic system tests once MHD is done.

## Useful links

Original HLLD paper: Miyoshi & Kusano 2005

Blog post on the HLLD Algorithm: HLLD Algorithm

### Citations

Ryu, D., Jones, T. W., & Frank, A. (1995). Numerical Magnetohydrodynamics in Astrophysics: Algorithm and Tests for Multi-Dimensional Flow 1.

*The Astrophysical Journal*. http://adsabs.harvard.edu/pdf/1995ApJ…452..785R ↩