AMReX-Astro / Microphysics

common astrophysical microphysics routines with interfaces for the different AMReX codes
https://amrex-astro.github.io/Microphysics
Other
34 stars 33 forks source link

(optionally) add T/e correction term to Strang Jacobians #1595

Open zingale opened 2 months ago

zingale commented 2 months ago

this is the dT/dX |_e term that appears in all species it is now controlled by integrator.correct_jacobian_for_const_e

zingale commented 2 months ago

closes #729

zingale commented 2 months ago

some Strang data using burn_cell. Build as:

make NETWORK_DIR=subch_simple

then run the old way:

./main3d.gnu.ex inputs_subch_simple integrator.jacobian=1 unit_test.nsteps=1 integrator.correct_jacobian_for_const_e=0

and it take 8084 steps.

Running with the new correction, integrator.correct_jacobian_for_const_e=1 and it takes

6788 steps

zingale commented 2 months ago

curiously, with aprox21, it goes the other way, and we are slower

zingale commented 2 months ago

for He-C-Fe-group, using the correction terms speeds things up by 4x

./main3d.gnu.ex inputs_subch_simple integrator.jacobian=1 unit_test.nsteps=1 integrator.correct_jacobian_for_const_e=1 unit_test.tmax=1.e-2

104499 without the corrections 24735 with the corrections

zingale commented 2 months ago

Here's some test_react runs:

zingale commented 1 month ago

here's a Castro run with these changes: http://groot.astro.sunysb.edu/Castro/test-suite/gfortran/2024-07-12-002/index.html