AMReX-Astro / AMReX-Astro/Castro

PPM tracing can generate negative gamma

Open
#2,224 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement hydro
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.