Numerical Noise and Confusion
MHD Debugging
I spent this week comparing my code to Athena++. Throughout that process I fixed a sign error in the CT equation, turns out they should all be plusses with no minuses. I also fixed an error in the single wave initial conditions, made my floating point arithamatic match Athena’s for associativity symmetry, and a few other minor tweaks. Except the sign error nothing has really changed the fundamental issue, there appears to be an error occuring at the level of \(10^{-16} \), i.e. the last floating point digit, that is slowly growing until it destabilizes the entire simulation. I’ve been hunting down the issue and it seems to be related to an instability in the z magnetic field but I can’t find a cause. It happens faster in the left moving contact wave than the right but I haven’t isolated the reason yet.
A low res simulation. You can see the “noise” develope immediately
A higher res simulation. The “noise” takes awhile to build up but once it does the entire simulation destabilizes