python-hydro / pyro2

A framework for hydrodynamics explorations and prototyping
https://python-hydro.github.io/pyro2
BSD 3-Clause "New" or "Revised" License
305 stars 124 forks source link

compressible: add a get_external_sources method #290

Closed zingale closed 1 month ago

zingale commented 1 month ago

this will make it easier to do external sources problem-by-problem

For the conservative update, we now do a predictor-corrector, in the same fashion as Castro:

U^{n+1,*} = U^n - dt [div{F}]^{n+1/2} + dt S^n
S^{n+1} = S(U^{n+1,*})
U^{n+1} = U^{n+1,*} + dt/2 (S^{n+1} - S^n)

and we construct the gravity part of S^{n+1} to give us the implicit update.