AMReX-Astro / Microphysics

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

screening does not appear to be capped #911

Open zingale opened 2 years ago

zingale commented 2 years ago

At low T, we can get really large screening factors (~ 1.e100 or so) -- these might not matter because the rates themselves are very small, but I wonder if we should have a cap on how large the screening factor can be?

Maybe the new screening routines do a better job?

zingale commented 2 years ago

It would be helpful to have a 1-zone screening test just to see what the screening factor is for a given thermodynamic state. The example I was seeing had

State Density (g/cm^3): 4128932.628
State Temperature (K): 849916.2867
Mass Fraction (n): 1e-200
Mass Fraction (h1): 3.48172497e-09
Mass Fraction (he4): 0.000320647264
Mass Fraction (c12): 0.9999999968
Mass Fraction (c14): 1.071204851e-10
Mass Fraction (n13): 8.762868821e-11
Mass Fraction (n14): 1.062386283e-10
Mass Fraction (o16): 1e-10
Mass Fraction (o18): 0.001442913668
Mass Fraction (f18): 1e-200
Mass Fraction (ne20): 9.989945721e-11
Mass Fraction (ne21): 1e-200
Mass Fraction (na23): 7.100028535e-08
Mass Fraction (mg23): 1e-200
Mass Fraction (mg24): 1.565193226e-09
Mass Fraction (al27): 1.000004885e-10
Mass Fraction (si27): 9.99994325e-11
Mass Fraction (si28): 1.621202909e-09
Mass Fraction (p31): 1.000007303e-10
Mass Fraction (s31): 9.999918897e-11
Mass Fraction (s32): 1.000545668e-10
Mass Fraction (cl35): 1e-10
Mass Fraction (ar36): 1e-10
Mass Fraction (k39): 1e-10
Mass Fraction (ca40): 1e-10
Mass Fraction (sc43): 1e-10
Mass Fraction (ti44): 1e-10
Mass Fraction (v47): 1e-10
Mass Fraction (cr48): 1e-10
Mass Fraction (mn51): 1e-10
Mass Fraction (fe52): 0
Mass Fraction (co55): 0
Mass Fraction (ni56): 0

and gave screening factors of 1.e130.

zingale commented 2 years ago

This was with a branch of the subch2 network

zingale commented 2 months ago

one thing we could do is add a BL_ASSERT() that ensures that the screening factor is < 1.e30 or something like that. This will only be active with debug builds, but would be a useful diagnostic.