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 how shock flag is computed for reactions #2724

Closed
zingale opened this issue Jan 22, 2024 · 3 comments
Closed

change how shock flag is computed for reactions #2724

zingale opened this issue Jan 22, 2024 · 3 comments

Comments

@zingale
Copy link
Member

zingale commented Jan 22, 2024

Right now, we use the shock flag (stored in the conserved state if USE_SHOCK_VAR=TRUE) in two different ways:

  • if we are doing the hybrid Riemann solve, it is used to determine if we call the HLL solver
  • it is used to check if we are zeroing reactions if we disable burning in shocks.

At the moment, it is computed only once per timestep -- at the start of the advection (in the same place that we compute the flattening coefficients).

But it appears that we are always zeroing it out in initialize_do_advance(), so the shock flag will always be zero in the first half of Strang reactions.

We should switch to computing it directly in when we call the burner, so it will be updated twice per step. For the first half Strang burn, this is easy, since Sborder has ghostcells. But for the second half of the Strang burn, S_new does not have ghost cells, so we would need to do a fill into a temporary Fab or MultiFab (we could just overwrite Sborder at this point, I think).

@zingale
Copy link
Member Author

zingale commented Jan 22, 2024

There is an additional complication though -- we need to remove the source terms, which we don't directly have at the new time (since we time-center the sources).

So it might just be simpler to compute the shock flag at the start of a timestep and keep it fixed for both halves of the burn -- this is certainly more in line with the way that Strang splitting works. Also since we are typically using small CFL numbers, it won't matter much.

@zingale
Copy link
Member Author

zingale commented Jan 23, 2024

there is an additional complication -- if we are to compute this before the first burn, we need the sources, so that means we need to compute gravity before the burn, which should be fine, since the burn doesn't change Phi

@zingale
Copy link
Member Author

zingale commented May 2, 2024

this has been completed

@zingale zingale closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant