Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change SMALL_NUMBER to 10^-4 in the HLLD-series Riemann solvers #457

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

tomidakn
Copy link
Contributor

@tomidakn tomidakn commented Oct 8, 2022

Prerequisite checklist

  • My code follows the Athena++ Style Guide
  • My change requires a change to the documentation.
  • I have updated the documentation in the Wiki accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed. (at least the mhd test sets)

Description

The SMALL_NUMBER constant was used to detect degeneracy conditions in the HLLD-series Riemann solvers (HLLD, LHLLD, and isothermal HLLD). The previous value 10^-8 was too small and failed in some situations with strong magnetic fields. This PR changes this number to 10^-4, which is more robust.

Note that the number in HLLD and LHLLD are used for comparing variables with the pressure dimension, while in the isothermal HLLD it is for comparing variables with the velocity dimension. Therefore, a different value may be more optimal for the isothermal HLLD solver.

Testing and validation

ssi
A slow-shock with perturbation. The top panel is the original implementation and the bottom is the new one. The unphysical explosions in the original are fixed with this change.

The previous value 10^-8 was too small and failed in some situations.
Copy link
Contributor

@jmstone jmstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken functionality or unexpected result
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants