cholla-hydro / cholla

A GPU-based hydro code
https://github.com/cholla-hydro/cholla/wiki
MIT License
60 stars 32 forks source link

MHD Shock Tube Bug Fixes #255

Closed bcaddy closed 1 year ago

bcaddy commented 1 year ago

General

I believe that with this PR all the bugs in MDH are squashed. There are still some fully 3D tests to run but I've run five different MHD shock tubes in X, Y, Z, and both left and right orientations so I doubt there are any significant bugs remaining. I've attached some plots of those shock tubes and you can find the fiducial plots to compare them against in the MHD Project within the card for that shock tube.

MHD Shock Tubes.zip

Bug Fixes

  1. Make the state selection more explicit in the HLLD solver. Before I was using a set of single speed checks to verify the correct state was chosen. Now I'm using the full 1-2 speed checks; if this becomes a performance issue we can figure out out to reduce it to single speed checks at that time.
  2. The double star state check for zero magnetic field was comparing against Bx not Bx^2 which led to issues with negative Bx.
  3. Fix initial conditions for the Dai & Woodward and Ryu & Jones 2a shock tubes. There were typos in the papers I was referencing. These initial conditions now agree with the plots in those papers and the actual values used in Athena++.

New Tests

Other