AMReX-Astro / AMReX-Astro/Castro
PPM tracing can generate negative gamma
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 340
- Forks
- 105
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 8
Description
It's possible for gamma to go negative when tracing if the timestep is much larger than it should be. Since the sound speed goes as sqrt(gamma), this results in c becoming NaN, resulting in fluid variables going to NaN as well. Normally we should avoid taking a timestep much larger than what the CFL criterion would require (#2222), but in case we fail to do so for whatever reason, we want to avoid generating NaNs, which are hard to gracefully recover from. It would be good if we detected failure modes like this in the PPM and issued a retry.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the PPM tracing implementation and reviewing issue #2222 for the CFL timestep context. Trace how gamma and the sound speed are computed, then identify the failure condition that should trigger a retry before fluid variables become NaN. Done means oversized timesteps no longer propagate NaNs through PPM tracing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100