From 20bcbc67b58e06aa524594efad9ff107331d04eb Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 7 Oct 2024 13:27:15 -0400 Subject: [PATCH 01/18] start of a JOSS paper --- paper/paper.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 paper/paper.md diff --git a/paper/paper.md b/paper/paper.md new file mode 100644 index 000000000..b293cd524 --- /dev/null +++ b/paper/paper.md @@ -0,0 +1,60 @@ +--- +title: 'pynucastro: an interface to nuclear reaction rates and code generator for reaction network equations' + +tags: +- nuclear +- reactions +- astrophysics +- physics +- integration +- differential equations + +authors: +- name: AMReX-Astro Microphysics Development Team + +affiliations: + +date: 27 January 2018 + +bibliography: paper.bib +--- + +# Summary + +The AMReX-Astrophysics Microphysics library provides a common set of +microphysics routines (reaction networks, equations of state, and +other transport coefficients) for astrophysical simulation codes built +around the AMReX library. + +# History + +This project started out as Starkiller Microphysics, which was an +attempt to codevelop microphysics routines for the Castro and Flash +simulation codes. Originally the library used Fortran and was +restricted to CPUs, but C++ ports were added over time to take +advantage of GPU-offloading afforded by the AMReX library. Eventually +as the development of the two codes diverged, the C++ ports of the +Microphysis were split off into the AMReX-Astrophysics Microphysics +library. Today, the library is completely written in C++ and relies +on the AMReX data structures. + +# Design + +Porting many classic solvers from old Fortran to C++ + +header-only library as much as possible + +C++17 + +pynucastro integration + + +# Capabilities + + + +# Unit tests / examples + + +# References + From aff4225937bdab8e19a170a611cc8abd05442a47 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sun, 1 Dec 2024 12:52:09 -0500 Subject: [PATCH 02/18] fix title --- paper/paper.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index b293cd524..0c24b94d3 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -1,5 +1,6 @@ --- -title: 'pynucastro: an interface to nuclear reaction rates and code generator for reaction network equations' +title: 'AMReX-Astrophysics Microphysics: A set of microphysics routines for astrophysical simulation codes +based on the AMReX library' tags: - nuclear @@ -14,7 +15,7 @@ authors: affiliations: -date: 27 January 2018 +date: 01 January 2025 bibliography: paper.bib --- From 31d6550c647bdef78fb945aaa1ad52442552a021 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 3 Mar 2025 13:13:29 -0500 Subject: [PATCH 03/18] more work on the JOSS paper --- paper/paper.md | 52 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 0c24b94d3..951a3a4d6 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -25,7 +25,9 @@ bibliography: paper.bib The AMReX-Astrophysics Microphysics library provides a common set of microphysics routines (reaction networks, equations of state, and other transport coefficients) for astrophysical simulation codes built -around the AMReX library. +around the AMReX library. Several codes, including Castro, MAESTROeX, +and Quokka use Microphysics to provide the physics and solvers needed +to close the hydrodynamics systems that they evolve. # History @@ -39,13 +41,41 @@ Microphysis were split off into the AMReX-Astrophysics Microphysics library. Today, the library is completely written in C++ and relies on the AMReX data structures. -# Design +Several classical Fortran libraries have been converted to header-only C++ +implementations, including the VODE integrator and the hybrid Powell method +of MINPACK. + -Porting many classic solvers from old Fortran to C++ +# Design -header-only library as much as possible +Microphysics provides several different types of physics: equations of +state, reaction networks and screening methods, nuclear statistical +equilibrium solvers and table, conductivities, and opacities, as well +as the tools needed to work with them, most notably the ODE integrators +for the networks. + +There are two ways to use Microphysics: standalone for simple investigations +or as part of an (AMReX-based) application code. In both cases, the core +requirement is to select a network---this defines the composition that +is then used by most of the other physics routines. + +A key design feature is the separation of the reaction network from +the integrator. This allows us to easily experiment with different +integration methods (such as the RKC integrator) and also support +different modes of coupling reactions to a simulation code (operator +splitting and spectral deferred corrections) + +We rely on header-only implementations as much as possible, to allow +for easier compiler inlining. We also leverage C++17 `if constexpr` +templating to compile out unnecessary computations for performance. +For example, our equations of state can compute a lot of thermodynamic +quantities and derivatives, but for some operations, we only need a +few of these. If we pass the general `eos_t` type into the EOS, then +everything is calculated, but if we pass in to the same interface the +smaller `eos_re_t` type, then only a few energy terms are computed +(those that are needed when finding temperature from specific internal +energy). -C++17 pynucastro integration @@ -54,8 +84,20 @@ pynucastro integration + # Unit tests / examples +Microphysics can be used as a standalone tool through the tests +in `Microphysics/unit_test/`. There are 2 types of tests here: + +* *comprehensive tests* test performance by setting up a cube of data + (with density, temperature, and composition varying in a dimension) + and performing an operation on the entire cube (calling the EOS, + integrating a network, ...). + +* *one-zone tests* simply call one of the physics modules with a + single thermodynamic state. This can be used to explore the physics + that is implemented. # References From 671081f848b4eb3eeb5c32dfd794021e03fcd8e0 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 10:06:39 -0500 Subject: [PATCH 04/18] add JOSS paper builder action --- .github/workflows/draft-pdf.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/draft-pdf.yml diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml new file mode 100644 index 000000000..d65da360d --- /dev/null +++ b/.github/workflows/draft-pdf.yml @@ -0,0 +1,26 @@ +name: Draft PDF +on: [push] + +jobs: + paper: + runs-on: ubuntu-latest + name: Paper Draft + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build draft PDF + uses: openjournals/openjournals-draft-action@master + with: + journal: joss + # This should be the path to the paper within your repo. + paper-path: paper.md + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: paper + # This is the output path where Pandoc will write the compiled + # PDF. Note, this should be the same directory as the input + # paper.md + path: paper.pdf + +# see https://github.com/marketplace/actions/open-journals-pdf-generator From d991904e9e22e03df8048eee2b442ba1a31c0a30 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 10:12:24 -0500 Subject: [PATCH 05/18] fix path --- .github/workflows/draft-pdf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index d65da360d..e63eaf1bf 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -13,7 +13,7 @@ jobs: with: journal: joss # This should be the path to the paper within your repo. - paper-path: paper.md + paper-path: paper/paper.md - name: Upload uses: actions/upload-artifact@v4 with: From e2ccfc9a1b47169333b42ee0589a8217703bd381 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 10:15:20 -0500 Subject: [PATCH 06/18] fix bib path --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 951a3a4d6..1cb457024 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -17,7 +17,7 @@ affiliations: date: 01 January 2025 -bibliography: paper.bib +bibliography: paper/paper.bib --- # Summary From 4aac0b775a55c67b7748dfc83c95055c9eec7bea Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 10:17:02 -0500 Subject: [PATCH 07/18] fix again --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 1cb457024..9639192cf 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -17,7 +17,7 @@ affiliations: date: 01 January 2025 -bibliography: paper/paper.bib +bibliography: refs.bib --- # Summary From d604d6687178cdac1704c1105d6ee4ac5afd8323 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 10:21:00 -0500 Subject: [PATCH 08/18] yet again... --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 9639192cf..916c57498 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -17,7 +17,7 @@ affiliations: date: 01 January 2025 -bibliography: refs.bib +bibliography: paper/refs.bib --- # Summary From 5972f50349e642b08a915898a6d16a6c4eb6bf93 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 10:29:34 -0500 Subject: [PATCH 09/18] try again --- paper/paper.bib | 627 ++++++++++++++++++++++++++++++++++++++++++++++++ paper/paper.md | 2 +- 2 files changed, 628 insertions(+), 1 deletion(-) create mode 100644 paper/paper.bib diff --git a/paper/paper.bib b/paper/paper.bib new file mode 100644 index 000000000..4b92f50b2 --- /dev/null +++ b/paper/paper.bib @@ -0,0 +1,627 @@ +@article{br-refine, + title={An algorithm for point clustering and grid generation}, + author={Berger, Marsha and Rigoutsos, Isidore}, + journal={Systems, Man and Cybernetics, IEEE Transactions on}, + volume={21}, + number={5}, + pages={1278--1286}, + year={1991}, + publisher={IEEE} +} + +@ARTICLE{colglaz, + author = {{Colella}, P. and {Glaz}, H.~M.}, + title = "{Efficient solution algorithms for the Riemann problem + for real gases}", + journal = {Journal of Computational Physics}, + year = 1985, + month = jun, + volume = 59, + pages = {264-289}, + doi = {10.1016/0021-9991(85)90146-9}, + adsurl = {http://ui.adsabs.harvard.edu/abs/1985JCoPh..59..264C}, +} + +@ARTICLE{castro_I, + author = {{Almgren}, A.~S. and {Beckner}, V.~E. and {Bell}, J.~B. and + {Day}, M.~S. and {Howell}, L.~H. and {Joggerst}, C.~C. and {Lijewski}, M.~J. and + {Nonaka}, A. and {Singer}, M. and {Zingale}, M.}, + title = "{CASTRO: A New Compressible Astrophysical Solver. I. Hydrodynamics and Self-gravity}", + journal = {ApJ}, + year = 2010, + month = jun, + volume = 715, + pages = {1221-1238}, + doi = {10.1088/0004-637X/715/2/1221}, +} + + +@ARTICLE{ppm, + author = {{Colella}, P. and {Woodward}, P.~R.}, + title = "{The Piecewise Parabolic Method (PPM) for Gas-Dynamical Simulations}", + journal = {Journal of Computational Physics}, + year = 1984, + month = sep, + volume = 54, + pages = {174-201}, + doi = {10.1016/0021-9991(84)90143-8}, +} + +@ARTICLE{colgwhite, + author = {{Colgate}, S.~A. and {White}, R.~H.}, + title = "{The Hydrodynamic Behavior of Supernovae Explosions}", + journal = {ApJ}, + year = 1966, + month = mar, + volume = 143, + pages = {626}, + doi = {10.1086/148549}, +} + + +@book{quirk1997, + title={A contribution to the great Riemann solver debate}, + author={Quirk, James J}, + year={1997}, + publisher={Springer} +} + + +@ARTICLE{maestro:III, + author = {{Almgren}, A.~S. and {Bell}, J.~B. and {Nonaka}, A. and {Zingale}, M. + }, + title = "{Low Mach Number Modeling of Type Ia Supernovae. III. Reactions}", + journal = {ApJ}, + keywords = {Convection, Hydrodynamics, Methods: Numerical, Nuclear Reactions, Nucleosynthesis, Abundances, Stars: Supernovae: General, Stars: White Dwarfs}, + year = 2008, + month = sep, + volume = 684, + pages = {449-470}, + doi = {10.1086/590321} +} + + +@ARTICLE{zingalekatz, + author = {{Zingale}, M. and {Katz}, M.~P.}, + title = "{On the Piecewise Parabolic Method for Compressible Flow With Stellar Equations of State}", + journal = {ApJS}, + keywords = {hydrodynamics, methods: numerical}, + year = 2015, + month = feb, + volume = 216, + eid = {31}, + pages = {31}, + doi = {10.1088/0067-0049/216/2/31} +} + + +@ARTICLE{flash, + author = {{Fryxell}, B. and {Olson}, K. and {Ricker}, P. and {Timmes}, F.~X. and + {Zingale}, M. and {Lamb}, D.~Q. and {MacNeice}, P. and {Rosner}, R. and + {Truran}, J.~W. and {Tufo}, H.}, + title = "{FLASH: An Adaptive Mesh Hydrodynamics Code for Modeling Astrophysical Thermonuclear Flashes}", + journal = {ApJS}, + year = 2000, + month = nov, + volume = 131, + pages = {273-334}, + doi = {10.1086/317361}, +} + +@ARTICLE{timmes:1999, + author = {{Timmes}, F.~X. and {Arnett}, D.}, + title = "{The Accuracy, Consistency, and Speed of Five Equations of State for Stellar Hydrodynamics}", + journal = {ApJS}, + keywords = {EQUATION OF STATE, HYDRODYNAMICS, METHODS: NUMERICAL, STARS: GENERAL, STARS: INTERIORS, Equation of State, Hydrodynamics, Methods: Numerical, Stars: General, Stars: Interiors}, + year = 1999, + month = nov, + volume = 125, + pages = {277-294}, + doi = {10.1086/313271}, + adsurl = {http://ui.adsabs.harvard.edu/abs/1999ApJS..125..277T}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{timmes:2000, + author = {{Timmes}, F.~X. and {Swesty}, F.~D.}, + title = "{The Accuracy, Consistency, and Speed of an Electron-Positron Equation of State Based on Table Interpolation of the Helmholtz Free Energy}", + journal = {ApJS}, + keywords = {EQUATION OF STATE, HYDRODYNAMICS, METHODS: NUMERICAL, STARS: GENERAL, Equation of State, Hydrodynamics, Methods: Numerical, Stars: General}, + year = 2000, + month = feb, + volume = 126, + pages = {501-516}, + doi = {10.1086/313304}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2000ApJS..126..501T}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{colella:1990, + author = {{Colella}, P.}, + title = "{Multidimensional upwind methods for hyperbolic conservation laws}", + journal = {Journal of Computational Physics}, + year = 1990, + month = mar, + volume = 87, + pages = {171-200}, + doi = {10.1016/0021-9991(90)90233-Q}, +} + +@ARTICLE{colellasekora, + author = {{Colella}, P. and {Sekora}, M.~D.}, + title = "{A limiter for PPM that preserves accuracy at smooth extrema}", + journal = {Journal of Computational Physics}, + year = 2008, + month = jul, + volume = 227, + pages = {7069-7076}, + doi = {10.1016/j.jcp.2008.03.034}, +} + +@ARTICLE{millercolella:2002, + author = {{Miller}, G.~H. and {Colella}, P.}, + title = "{A Conservative Three-Dimensional Eulerian Method for Coupled Solid-Fluid Shock \ +Capturing}", + journal = {Journal of Computational Physics}, + year = 2002, + month = nov, + volume = 183, + pages = {26-82}, + doi = {10.1006/jcph.2002.7158}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2002JCoPh.183...26M}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + + +@TECHREPORT{pember:1996, + author = {Richard B. Pember and Jeffrey A. Greenough and Phillip Colella}, + title = {An Adaptive, Higher-Order Godunov Method For Gas Dynamics In Three-Dimensional Orthogonal Curvilinear Coordinates}, + year = {1996} +} + +@ARTICLE{chamulak:2008, + author = {{Chamulak}, D.~A. and {Brown}, E.~F. and {Timmes}, F.~X. and +{Dupczak}, K.}, + title = "{The Reduction of the Electron Abundance during the Pre-explosion Simmering in White Dwarf Supernovae}", + journal = {\apj}, +archivePrefix = "arXiv", + eprint = {0801.1643}, + keywords = {Galaxies: Evolution, Nuclear Reactions, Nucleosynthesis, Abundances, Stars: Supernovae: General, Stars: White Dwarfs}, + year = 2008, + month = apr, + volume = 677, + pages = {160-168}, + doi = {10.1086/528944}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2008ApJ...677..160C}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{lowMach4, + author = {{Zingale}, M. and {Almgren}, A.~S. and {Bell}, J.~B. and {Nonaka}, A. and + {Woosley}, S.~E.}, + title = "{Low Mach Number Modeling of Type IA Supernovae. IV. White Dwarf Convection}", + journal = {\apj}, +archivePrefix = "arXiv", + eprint = {0908.2668}, + year = 2009, + month = oct, + volume = 704, + pages = {196-210}, + doi = {10.1088/0004-637X/704/1/196}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2009ApJ...704..196Z}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{wdconvect, + author = {{Zingale}, M. and {Nonaka}, A. and {Almgren}, A.~S. and {Bell}, J.~B. and +{Malone}, C.~M. and {Woosley}, S.~E.}, + title = "{The Convective Phase Preceding Type Ia Supernovae}", + journal = {\apj}, + keywords = {convection, hydrodynamics, methods: numerical, nuclear reactions, nucleosynthesis, abundances, supernovae: general, white dwarfs}, + year = 2011, + month = oct, + volume = 740, + eid = {8}, + pages = {8}, + doi = {10.1088/0004-637X/740/1/8}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2011ApJ...740....8Z}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{raskin:2010, + author = {{Raskin}, C. and {Scannapieco}, E. and {Rockefeller}, G. and + {Fryer}, C. and {Diehl}, S. and {Timmes}, F.~X.}, + title = "{$^{56}$Ni Production in Double-degenerate White Dwarf Collisions}", + journal = {\apj}, +archivePrefix = "arXiv", + eprint = {1009.2507}, + primaryClass = "astro-ph.SR", + keywords = {hydrodynamics, nuclear reactions, nucleosynthesis, abundances, supernovae: general, white dwarfs}, + year = 2010, + month = nov, + volume = 724, + pages = {111-125}, + doi = {10.1088/0004-637X/724/1/111}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2010ApJ...724..111R}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{xrb:III, + author = {{Zingale}, M. and {Malone}, C.~M. and {Nonaka}, A. and {Almgren}, A.~S. and + {Bell}, J.~B.}, + title = "{Comparisons of Two- and Three-Dimensional Convection in Type I X-Ray Bursts}", + journal = {\apj}, +archivePrefix = "arXiv", + eprint = {1410.5796}, + primaryClass = "astro-ph.HE", + keywords = {convection, hydrodynamics, methods: numerical, stars: neutron, X-rays: bursts}, + year = 2015, + month = jul, + volume = 807, + eid = {60}, + pages = {60}, + doi = {10.1088/0004-637X/807/1/60}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2015ApJ...807...60Z}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{xrb:II, + author = {{Malone}, C.~M. and {Zingale}, M. and {Nonaka}, A. and {Almgren}, A.~S. and + {Bell}, J.~B.}, + title = "{Multidimensional Modeling of Type I X-Ray Bursts. II. Two-dimensional Convection in a Mixed H/He Accretor}", + journal = {\apj}, +archivePrefix = "arXiv", + eprint = {1404.6286}, + primaryClass = "astro-ph.HE", + keywords = {convection, hydrodynamics, methods: numerical, stars: neutron, X-rays: bursts}, + year = 2014, + month = jun, + volume = 788, + eid = {115}, + pages = {115}, + doi = {10.1088/0004-637X/788/2/115}, + adsurl = {http://ui.adsabs.harvard.edu/abs/2014ApJ...788..115M}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{wallacewoosley:1981, + author = {{Wallace}, R.~K. and {Woosley}, S.~E.}, + title = "{Explosive hydrogen burning}", + journal = {\apjs}, + keywords = {Abundance, Astrophysics, Hydrogen, Metallic Stars, Nuclear Fusion, Reaction Kinetics, Stellar Evolution, Gamma Rays, High Temperature, Isotopes, Neutron Stars, Novae, Resonance, Supermassive Stars, X Ray Sources, Astrophysics}, + year = 1981, + month = feb, + volume = {45}, + pages = {389-420}, + doi = {10.1086/190717}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1981ApJS...45..389W}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@article{ReacLib, + author={Richard H. Cyburt and A. Matthew Amthor and Ryan Ferguson + and Zach Meisel and Karl Smith and Scott Warren and + Alexander Heger and R. D. Hoffman and Thomas + Rauscher and Alexander Sakharuk and Hendrik Schatz + and F. K. Thielemann and Michael Wiescher}, + title={The JINA REACLIB Database: Its Recent Updates and Impact on + Type-I X-ray Bursts}, + journal={\apjs}, + volume={189}, + number={1}, + pages={240}, + url={http://stacks.iop.org/0067-0049/189/i=1/a=240}, + year={2010} +} + +@BOOK{NR, + author = {{Press}, W.~H. and {Teukolsky}, S.~A. and {Vetterling}, W.~T. and + {Flannery}, B.~P.}, + title = "{Numerical recipes in FORTRAN. The art of scientific computing}", +publisher = {Cambridge: University Press, |c1992, 2nd ed.}, + year = 1992, + adsurl = {http://ui.adsabs.harvard.edu/abs/1992nrfa.book.....P}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + + +@ARTICLE{vode, + author={P. N. Brown and G. D. Byrne and A. C. Hindmarsh}, + title={{VODE}: A Variable Coefficient ODE Solver}, + journal={SIAM J. Sci. Stat. Comput.}, + volume={10}, + pages={1038-1051}, + year={1989} +} + + +@ARTICLE{ShenBildsten, + author = {{Shen}, K.~J. and {Bildsten}, L.}, + title = "{Unstable Helium Shell Burning on Accreting White Dwarfs}", + journal = {\apj}, +archivePrefix = "arXiv", + eprint = {0903.0654v2}, + primaryClass = "astro-ph.HE", + year = 2009, + month = mar, + volume = 699, + pages = {10}} + +@ARTICLE{castro_sdc, + author = {{Zingale}, M. and {Katz}, M.~P. and {Bell}, J.~B. and {Minion}, M.~L. and + {Nonaka}, A.~J. and {Zhang}, W.}, + title = "{Improved Coupling of Hydrodynamics and Nuclear Reactions via Spectral Deferred Corrections}", + journal = {arXiv e-prints}, + keywords = {Physics - Computational Physics, Astrophysics - Instrumentation and Methods for Astrophysics}, + year = "2019", + month = "Aug", + eid = {arXiv:1908.03661}, + pages = {arXiv:1908.03661}, +archivePrefix = {arXiv}, + eprint = {1908.03661}, + primaryClass = {physics.comp-ph}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2019arXiv190803661Z}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + + +@ARTICLE{ma:2013, + author = {{Ma}, H. and {Woosley}, S.~E. and {Malone}, C.~M. and {Almgren}, A. and + {Bell}, J.}, + title = "{Carbon Deflagration in Type Ia Supernova. I. Centrally Ignited Models}", + journal = {\apj}, + keywords = {hydrodynamics, instabilities, nuclear reactions, nucleosynthesis, abundances, supernovae: general, turbulence, white dwarfs, Astrophysics - High Energy Astrophysical Phenomena, Astrophysics - Solar and Stellar Astrophysics}, + year = 2013, + month = "jul", + volume = {771}, + number = {1}, + eid = {58}, + pages = {58}, + doi = {10.1088/0004-637X/771/1/58}, +archivePrefix = {arXiv}, + eprint = {1305.2433}, + primaryClass = {astro-ph.HE}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2013ApJ...771...58M}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{graboske:1973, + author = {{Graboske}, H.~C. and {Dewitt}, H.~E. and {Grossman}, A.~S. and {Cooper}, M.~S.}, + title = "{Screening Factors for Nuclear Reactions. II. Intermediate Screen-Ing and Astrophysical Applications}", + journal = {\apj}, + year = 1973, + month = apr, + volume = {181}, + pages = {457-474}, + doi = {10.1086/152062}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1973ApJ...181..457G}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{alastuey:1978, + author = {{Alastuey}, A. and {Jancovici}, B.}, + title = "{Nuclear reaction rate enhancement in dense stellar matter.}", + journal = {\apj}, + keywords = {Astrophysics, Magnetohydrodynamics, Nuclear Astrophysics, Reaction Kinetics, Thermonuclear Reactions, Correlation, Nuclei (Nuclear Physics), Perturbation Theory, Potential Theory, Quantum Mechanics, Astrophysics, Nuclear Reactions:Stellar Interiors}, + year = 1978, + month = dec, + volume = {226}, + pages = {1034-1040}, + doi = {10.1086/156681}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1978ApJ...226.1034A}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{itoh:1979, + author = {{Itoh}, N. and {Totsuji}, H. and {Ichimaru}, S. and {Dewitt}, H.~E.}, + title = "{Enhancement of thermonuclear reaction rate due to strong screening. II - Ionic mixtures}", + journal = {\apj}, + keywords = {Nonuniform Plasmas, Reaction Kinetics, Thermonuclear Reactions, Astrophysics, Binary Mixtures, Dense Plasmas, Monte Carlo Method, Astrophysics}, + year = 1979, + month = dec, + volume = {234}, + pages = {1079-1084}, + doi = {10.1086/157590}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1979ApJ...234.1079I}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{chugunov:2007, + author = {{Chugunov}, A.~I. and {Dewitt}, H.~E. and {Yakovlev}, D.~G.}, + title = "{Coulomb tunneling for fusion reactions in dense matter: Path integral MonteCarlo versus mean field}", + journal = {\prd}, + keywords = {26.30.+k, Nucleosynthesis in novae supernovae and other explosive environments, Astrophysics, Nuclear Theory}, + year = 2007, + month = jul, + volume = {76}, + number = {2}, + eid = {025028}, + pages = {025028}, + doi = {10.1103/PhysRevD.76.025028}, +archivePrefix = {arXiv}, + eprint = {0707.3500}, + primaryClass = {astro-ph}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2007PhRvD..76b5028C}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{yakovlev:2006, + author = {{Yakovlev}, D.~G. and {Gasques}, L.~R. and {Afanasjev}, A.~V. and {Beard}, M. and {Wiescher}, M.}, + title = "{Fusion reactions in multicomponent dense matter}", + journal = {\prc}, + keywords = {25.60.Pj, 26.50.+x, 97.10.Cv, Fusion reactions, Nuclear physics aspects of novae supernovae and other explosive environments, Stellar structure interiors evolution nucleosynthesis ages, Astrophysics, Nuclear Theory}, + year = 2006, + month = sep, + volume = {74}, + number = {3}, + eid = {035803}, + pages = {035803}, + doi = {10.1103/PhysRevC.74.035803}, +archivePrefix = {arXiv}, + eprint = {astro-ph/0608488}, + primaryClass = {astro-ph}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2006PhRvC..74c5803Y}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{chugunov:2009, + author = {{Chugunov}, A.~I. and {Dewitt}, H.~E.}, + title = "{Nuclear fusion reaction rates for strongly coupled ionic mixtures}", + journal = {\prc}, + keywords = {26.30.-k, Nucleosynthesis in novae supernovae and other explosive environments, Astrophysics - Solar and Stellar Astrophysics, Astrophysics - High Energy Astrophysical Phenomena}, + year = 2009, + month = jul, + volume = {80}, + number = {1}, + eid = {014611}, + pages = {014611}, + doi = {10.1103/PhysRevC.80.014611}, +archivePrefix = {arXiv}, + eprint = {0905.3844}, + primaryClass = {astro-ph.SR}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2009PhRvC..80a4611C}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@article{Calder_2007, + doi = {10.1086/510709}, + url = {https://doi.org/10.1086/510709}, + year = 2007, + month = {feb}, + publisher = {American Astronomical Society}, + volume = {656}, + number = {1}, + pages = {313--332}, + author = {A. C. Calder and D. M. Townsley and I. R. Seitenzahl and F. Peng and O. E. B. Messer and N. Vladimirova and E. F. Brown and J. W. Truran and D. Q. Lamb}, + title = {Capturing the Fire: Flame Energetics and Neutronization for Type Ia Supernova Simulations}, + journal = {The Astrophysical Journal}, + abstract = {We develop and calibrate a realistic model flame for hydrodynamic simulations of deflagrations in white dwarf (Type Ia) supernovae. Our flame model builds on the advection-diffusion-reaction model of Khokhlov and includes electron screening and Coulomb corrections to the equation of state in a self-consistent way. We calibrate this model flame—its energetics and timescales for energy release and neutronization—with self-heating reaction network calculations that include both these Coulomb effects and up-to-date weak interactions. The burned material evolves postflame due to both weak interactions and hydrodynamic changes in density and temperature. We develop a scheme to follow the evolution, including neutronization, of the NSE state subsequent to the passage of the flame front. As a result, our model flame is suitable for deflagration simulations over a wide range of initial central densities and can track the temperature and electron fraction of the burned material through the explosion and into the expansion of the ejecta.} +} + +@article{mott_qss, + title = {A Quasi-Steady-State Solver for the Stiff Ordinary Differential Equations of Reaction Kinetics}, + journal = {Journal of Computational Physics}, + volume = {164}, + number = {2}, + pages = {407-428}, + year = {2000}, + issn = {0021-9991}, + doi = {https://doi.org/10.1006/jcph.2000.6605}, + author = {David R. Mott and Elaine S. Oran and Bram {van Leer}}, + abstract = {A quasi-steady-state method is presented that integrates stiff differential equations arising from reaction kinetics. This predictor–corrector method is A-stable for linear equations and second-order accurate. The method is used for all species regardless of the time scales of the individual equations, and it works well for problems typical of hydrocarbon combustion. Start-up costs are low, making the method ideal for use in process-split reacting-flow simulations which require the solution of an initial-value problem in every computational cell for every global time step. The algorithm is described, and error analysis and linear stability analysis are included. The algorithm is also applied to several test problems, and the results are compared to those of the stiff integrator CHEMEQ. The method, which we call α-QSS, is more stable, more accurate, and less costly than CHEMEQ.} +} + +@article{guidry_qss, + doi = {10.1088/1749-4699/6/1/015002}, + url = {https://dx.doi.org/10.1088/1749-4699/6/1/015002}, + year = {2013}, + month = {jan}, + publisher = {IOP Publishing}, + volume = {6}, + number = {1}, + pages = {015002}, + author = {M W Guidry and J A Harris}, + title = {Explicit integration of extremely stiff reaction networks: quasi-steady-state methods}, + journal = {Computational Science & Discovery}, + abstract = {A preceding paper by Guidry et al 2013 Comput. Sci. Disc. 6 015001 demonstrated that explicit asymptotic methods generally work much better for extremely stiff reaction networks than has previously been shown in the literature. There we showed that for systems well removed from equilibrium, explicit asymptotic methods can rival standard implicit codes in speed and accuracy for solving extremely stiff differential equations. In this paper, we continue the investigation of systems well removed from equilibrium by examining quasi-steady-state (QSS) methods as an alternative to asymptotic methods. We show that for systems well removed from equilibrium, QSS methods also can compete with, or even exceed, standard implicit methods in speed, even for extremely stiff networks, and in many cases give a somewhat better integration speed than for asymptotic methods. As for asymptotic methods, we will find that QSS methods give correct results, but with a non-competitive integration speed as equilibrium is approached. Thus, we find that both asymptotic and QSS methods must be supplemented with partial equilibrium methods as equilibrium is approached to remain competitive with implicit methods.} +} + + +@ARTICLE{jancovici:1977, + author = {{Jancovici}, B.}, + title = "{Pair correlation function in a dense plasma and pycnonuclear reactions in stars}", + journal = {Journal of Statistical Physics}, + keywords = {One-component plasma, pair correlation function (radial distribution function), quantum effects, pycnonuclear reactions}, + year = 1977, + month = nov, + volume = {17}, + number = {5}, + pages = {357-370}, + doi = {10.1007/BF01014403}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1977JSP....17..357J}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@ARTICLE{Wallace:1982, + author = {{Wallace}, R.~K. and {Woosley}, S.~E. and {Weaver}, T.~A.}, + title = "{The thermonuclear model for X-ray transients}", + journal = {\apj}, + keywords = {Binary Stars, Neutron Stars, Red Giant Stars, Stellar Mass Accretion, Stellar Models, Thermonuclear Reactions, X Ray Sources, Eddington Approximation, Stellar Envelopes, Stellar Evolution, Stellar Luminosity, Stellar Mass Ejection, Stellar Temperature, Astrophysics}, + year = 1982, + month = jul, + volume = {258}, + pages = {696-715}, + doi = {10.1086/160119}, + adsurl = {https://ui.adsabs.harvard.edu/abs/1982ApJ...258..696W}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + +@article{castro_simple_sdc, +doi = {10.3847/1538-4357/ac8478}, +url = {https://dx.doi.org/10.3847/1538-4357/ac8478}, +year = {2022}, +month = {aug}, +publisher = {The American Astronomical Society}, +volume = {936}, +number = {1}, +pages = {6}, +author = {M. Zingale and M. P. Katz and A. Nonaka and M. Rasmussen}, +title = {An Improved Method for Coupling Hydrodynamics with Astrophysical Reaction Networks}, +journal = {The Astrophysical Journal}, +abstract = {Reacting astrophysical flows can be challenging to model, because of the difficulty in accurately coupling hydrodynamics and reactions. This can be particularly acute during explosive burning or at high temperatures where nuclear statistical equilibrium is established. We develop a new approach, based on the ideas of spectral deferred corrections (SDC) coupling of explicit hydrodynamics and stiff reaction sources as an alternative to operator splitting, that is simpler than the more comprehensive SDC approach we demonstrated previously. We apply the new method to a double-detonation problem with a moderately sized astrophysical nuclear reaction network and explore the time step size and reaction network tolerances, to show that the simplified-SDC approach provides improved coupling with decreased computational expense compared to traditional Strang operator splitting. This is all done in the framework of the Castro hydrodynamics code, and all algorithm implementations are freely available.} +} + +@article{Kushnir_2020, + author = {{Kushnir}, Doron and {Katz}, Boaz}, + title = "{An accurate and efficient numerical calculation of detonation waves in multidimensional supernova simulations using a burning limiter and adaptive quasi-statistical equilibrium}", + keywords = {hydrodynamics, shock waves, supernovae: general, Astrophysics - High Energy Astrophysical Phenomena}, + year = 2020, + month = apr, + volume = {493}, + number = {4}, + pages = {5413-5433}, +archivePrefix = {arXiv}, + eprint = {1912.06151}, + primaryClass = {astro-ph.HE}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2020MNRAS.493.5413K}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System}, + journal = {Monthly Notices of the Royal Astronomical Society} +} + + +@article{Chabrier_1998, + doi = {10.1103/physreve.58.4941}, + url = {https://doi.org/10.1103}, + year = 1998, + month = {oct}, + publisher = {American Physical Society ({APS})}, + volume = {58}, + number = {4}, + pages = {4941--4949}, + author = {Gilles Chabrier and Alexander Y. Potekhin}, + title = {Equation of state of fully ionized electron-ion plasmas}, + journal = {Physical Review E} +} + +@article{sommeijer_rkc_1998, + title = {{RKC}: {An} explicit solver for parabolic {PDEs}}, + volume = {88}, + issn = {03770427}, + shorttitle = {{RKC}}, + url = {https://linkinghub.elsevier.com/retrieve/pii/S0377042797002197}, + doi = {10.1016/S0377-0427(97)00219-7}, + number = {2}, + journal = {Journal of Computational and Applied Mathematics}, + author = {Sommeijer, B.P. and Shampine, L.F. and Verwer, J.G.}, + month = mar, + year = {1998}, + pages = {315--326} +} + +@misc{autodiff, + author = {Leal, Allan M. M.}, + title = {autodiff, a modern, fast and expressive {C++} library for automatic differentiation}, + url = {https://autodiff.github.io}, + howpublished = {\texttt{https://autodiff.github.io}}, + year = {2018} +} diff --git a/paper/paper.md b/paper/paper.md index 916c57498..951a3a4d6 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -17,7 +17,7 @@ affiliations: date: 01 January 2025 -bibliography: paper/refs.bib +bibliography: paper.bib --- # Summary From 704b2dbd1dc067bf727f41f04c2aa02134c66987 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 10:32:37 -0500 Subject: [PATCH 10/18] fix artifact location --- .github/workflows/draft-pdf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index e63eaf1bf..36256733a 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -21,6 +21,6 @@ jobs: # This is the output path where Pandoc will write the compiled # PDF. Note, this should be the same directory as the input # paper.md - path: paper.pdf + path: paper/paper.pdf # see https://github.com/marketplace/actions/open-journals-pdf-generator From 640c0014aa3fd40598e13911572f14a012dc6eef Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 14:46:35 -0500 Subject: [PATCH 11/18] add cites --- paper/paper.bib | 42 +++++++++++++++++++++++++++++++++++++++++- paper/paper.md | 5 +++-- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 4b92f50b2..6d4202ac6 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -27,7 +27,7 @@ @ARTICLE{castro_I {Day}, M.~S. and {Howell}, L.~H. and {Joggerst}, C.~C. and {Lijewski}, M.~J. and {Nonaka}, A. and {Singer}, M. and {Zingale}, M.}, title = "{CASTRO: A New Compressible Astrophysical Solver. I. Hydrodynamics and Self-gravity}", - journal = {ApJ}, + journal = {Astrophysical Journal}, year = 2010, month = jun, volume = 715, @@ -625,3 +625,43 @@ @misc{autodiff howpublished = {\texttt{https://autodiff.github.io}}, year = {2018} } + + +@ARTICLE{maestroex, + author = {{Fan}, Duoming and {Nonaka}, Andrew and {Almgren}, Ann S. and {Harpole}, Alice and {Zingale}, Michael}, + title = "{MAESTROeX: A Massively Parallel Low Mach Number Astrophysical Solver}", + journal = {Astrophysical Journal}, + keywords = {Stellar convective zones, Hydrodynamics, Computational methods, Nuclear astrophysics, Nucleosynthesis, Nuclear abundances, 301, 1963, 1965, 1129, 1131, 1128, Physics - Computational Physics, Astrophysics - Solar and Stellar Astrophysics}, + year = 2019, + month = dec, + volume = {887}, + number = {2}, + eid = {212}, + pages = {212}, + doi = {10.3847/1538-4357/ab4f75}, +archivePrefix = {arXiv}, + eprint = {1908.03634}, + primaryClass = {physics.comp-ph}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2019ApJ...887..212F}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + + +@ARTICLE{quokka, + author = {{Wibking}, Benjamin D. and {Krumholz}, Mark R.}, + title = "{QUOKKA: a code for two-moment AMR radiation hydrodynamics on GPUs}", + journal = {Monthly Notices of the Royal Astronomical Society}, + keywords = {hydrodynamics, methods: numerical, Astrophysics - Instrumentation and Methods for Astrophysics}, + year = 2022, + month = may, + volume = {512}, + number = {1}, + pages = {1430-1449}, + doi = {10.1093/mnras/stac439}, +archivePrefix = {arXiv}, + eprint = {2110.01792}, + primaryClass = {astro-ph.IM}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2022MNRAS.512.1430W}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} + diff --git a/paper/paper.md b/paper/paper.md index 951a3a4d6..92a8ba7ff 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -25,8 +25,9 @@ bibliography: paper.bib The AMReX-Astrophysics Microphysics library provides a common set of microphysics routines (reaction networks, equations of state, and other transport coefficients) for astrophysical simulation codes built -around the AMReX library. Several codes, including Castro, MAESTROeX, -and Quokka use Microphysics to provide the physics and solvers needed +around the AMReX library. Several codes, including Castro +[@castro_I], MAESTROeX [@maestroex], and Quokka [@quokka] use +Microphysics to provide the physics and solvers needed to close the hydrodynamics systems that they evolve. # History From 3661849c0c93ca5807835066c0559dcf9c6a6e40 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 15:21:38 -0500 Subject: [PATCH 12/18] some more work --- paper/paper.bib | 12 +++++++- paper/paper.md | 74 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 69 insertions(+), 17 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 6d4202ac6..06b54243a 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -603,7 +603,7 @@ @article{Chabrier_1998 journal = {Physical Review E} } -@article{sommeijer_rkc_1998, +@article{rkc, title = {{RKC}: {An} explicit solver for parabolic {PDEs}}, volume = {88}, issn = {03770427}, @@ -665,3 +665,13 @@ @ARTICLE{quokka adsnote = {Provided by the SAO/NASA Astrophysics Data System} } +@inproceedings{powell, + author = {M. J. D. Powell}, + title = "{A hybrid method for nonlinear equations}", + booktitle = {Numerical methods for nonlinear algebraic equations}, + editor = {Philip Rabinowitz}, + chapter = {6}, + pages = {87--114}, + publisher = {Gordon and Breach Science Publishers, New York}, + year = {1970} +} \ No newline at end of file diff --git a/paper/paper.md b/paper/paper.md index 92a8ba7ff..241c2939a 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -13,6 +13,36 @@ tags: authors: - name: AMReX-Astro Microphysics Development Team +- name: Khanak Bhargava + affiliation: '1' + +- name: Zhi Chen + affiliation: '1' + +- name: Eric Johnson + affiliation: '1' + +- name: Max P. Katz + affiliation: '1' + +- name: Piyush Sharda + +- name: + given-names: Alexander + surname: Smith Clark + affiliation: '1' + +- name: Ben Wibking + +- name: Donald Willcox + +- name: Michael Zingale + affiliation: '1' + +affiliations: +- index: 1 + name: Department of Physics and Astronomy, Stony Brook University, Stony Brook, NY, USA + affiliations: date: 01 January 2025 @@ -28,7 +58,7 @@ other transport coefficients) for astrophysical simulation codes built around the AMReX library. Several codes, including Castro [@castro_I], MAESTROeX [@maestroex], and Quokka [@quokka] use Microphysics to provide the physics and solvers needed -to close the hydrodynamics systems that they evolve. +to close the hydrodynamics systems that they evolve. # History @@ -40,11 +70,12 @@ advantage of GPU-offloading afforded by the AMReX library. Eventually as the development of the two codes diverged, the C++ ports of the Microphysis were split off into the AMReX-Astrophysics Microphysics library. Today, the library is completely written in C++ and relies -on the AMReX data structures. +on the AMReX data structures. -Several classical Fortran libraries have been converted to header-only C++ -implementations, including the VODE integrator and the hybrid Powell method -of MINPACK. +Several classical Fortran libraries have been converted to header-only +C++ implementations, including the VODE integrator [@vode], the hybrid +Powell method of MINPACK [@powell], and the Runge-Kutta Chebyshev +integration method [@rkc]. # Design @@ -52,8 +83,8 @@ of MINPACK. Microphysics provides several different types of physics: equations of state, reaction networks and screening methods, nuclear statistical equilibrium solvers and table, conductivities, and opacities, as well -as the tools needed to work with them, most notably the ODE integrators -for the networks. +as the tools needed to work with them, most notably the ODE +integrators for the networks. There are two ways to use Microphysics: standalone for simple investigations or as part of an (AMReX-based) application code. In both cases, the core @@ -64,7 +95,7 @@ A key design feature is the separation of the reaction network from the integrator. This allows us to easily experiment with different integration methods (such as the RKC integrator) and also support different modes of coupling reactions to a simulation code (operator -splitting and spectral deferred corrections) +splitting and spectral deferred corrections [@castro_simple_sdc]) We rely on header-only implementations as much as possible, to allow for easier compiler inlining. We also leverage C++17 `if constexpr` @@ -80,10 +111,22 @@ energy). pynucastro integration +We also make use of the C++ autodiff library [@autodiff] to compute +thermodynamic derivatives required in the Jacobians of our reaction +networks. # Capabilities +## equations of state + +## networks + +We have ported many of the classic "aprox" networks used in the +astrophysics community to C++ using templating to construct the +righthand side of the network at compile time. + +Microphysics can also directly use networks created by the # Unit tests / examples @@ -91,14 +134,13 @@ pynucastro integration Microphysics can be used as a standalone tool through the tests in `Microphysics/unit_test/`. There are 2 types of tests here: -* *comprehensive tests* test performance by setting up a cube of data - (with density, temperature, and composition varying in a dimension) - and performing an operation on the entire cube (calling the EOS, - integrating a network, ...). +* *comprehensive tests*: these test performance by setting up a cube + of data (with density, temperature, and composition varying in a + dimension) and performing an operation on the entire cube (calling + the EOS, integrating a network, ...). -* *one-zone tests* simply call one of the physics modules with a - single thermodynamic state. This can be used to explore the physics - that is implemented. +* *one-zone tests*: these simply call one of the physics modules with + a single thermodynamic state. This can be used to explore the + physics that is implemented. # References - From ef838c018d4805ad63ad5ab11c5fd4b982921b4a Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 15:24:13 -0500 Subject: [PATCH 13/18] fix --- paper/paper.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 241c2939a..1d6fd4fd4 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -27,8 +27,7 @@ authors: - name: Piyush Sharda -- name: - given-names: Alexander +- given-names: Alexander surname: Smith Clark affiliation: '1' From e335c81994bcda40c5c2300e31b0aad817ca1d70 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 4 Mar 2025 15:28:10 -0500 Subject: [PATCH 14/18] another fix --- paper/paper.md | 1 - 1 file changed, 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 1d6fd4fd4..548598114 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -42,7 +42,6 @@ affiliations: - index: 1 name: Department of Physics and Astronomy, Stony Brook University, Stony Brook, NY, USA -affiliations: date: 01 January 2025 From fc64e37e77589a236c8058b5639c2ccd0c08d052 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 11 Mar 2025 09:47:24 -0400 Subject: [PATCH 15/18] more intro work --- paper/paper.bib | 73 ++++++++++++++++++++++++++++++++++++++++++++++++- paper/paper.md | 46 +++++++++++++++++++------------ 2 files changed, 100 insertions(+), 19 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 06b54243a..bb394ca61 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -674,4 +674,75 @@ @inproceedings{powell pages = {87--114}, publisher = {Gordon and Breach Science Publishers, New York}, year = {1970} -} \ No newline at end of file +} + +@article{amrex, +author = {{Zhang}, W. and {Almgren}, A. and {Beckner}, V. and {Bell}, J. and + {Blaschke}, J. and {Chan}, C. and {Day}, M. and {Friesen}, B. and {Gott}, K. + and {Graves}, D. and {Katz}, M. P. and {Myers}, A. and {Nguyen}, T. and + {Nonaka}, A. and {Rosso}, M. and {Williams}, S. and {Zingale}, M}, + title = "{AMReX: a framework for block-structured adaptive mesh refinement}", + journal = {Journal of Open Source Software}, + year = {2019}, + volume = {4}, + number = 37, + pages = {1370}, + doi = {10.21105/joss.01370}, + url = {http://joss.theoj.org/papers/10.21105/joss.01370}, + subject = {algorithms: general} +} + + +@article{castro-simple-sdc, +doi = {10.3847/1538-4357/ac8478}, +url = {https://dx.doi.org/10.3847/1538-4357/ac8478}, +year = {2022}, +month = {aug}, +publisher = {The American Astronomical Society}, +volume = {936}, +number = {1}, +pages = {6}, +author = {Zingale, M. and Katz, M. P. and Nonaka, A. and Rasmussen, M.}, +title = {An Improved Method for Coupling Hydrodynamics with Astrophysical Reaction Networks}, +journal = {ApJ}, +abstract = {Reacting astrophysical flows can be challenging to model, + because of the difficulty in accurately coupling + hydrodynamics and reactions. This can be + particularly acute during explosive burning or at + high temperatures where nuclear statistical + equilibrium is established. We develop a new + approach, based on the ideas of spectral deferred + corrections (SDC) coupling of explicit hydrodynamics + and stiff reaction sources as an alternative to + operator splitting, that is simpler than the more + comprehensive SDC approach we demonstrated + previously. We apply the new method to a + double-detonation problem with a moderately sized + astrophysical nuclear reaction network and explore + the time step size and reaction network tolerances, + to show that the simplified-SDC approach provides + improved coupling with decreased computational + expense compared to traditional Strang operator + splitting. This is all done in the framework of the + Castro hydrodynamics code, and all algorithm + implementations are freely available.} +} + +@ARTICLE{maestro, + author = {{Nonaka}, A. and {Almgren}, A.~S. and {Bell}, J.~B. and {Lijewski}, M.~J. and + {Malone}, C.~M. and {Zingale}, M.}, + title = "{MAESTRO: An Adaptive Low Mach Number Hydrodynamics Algorithm for Stellar Flows}", + journal = {ApJS}, +archivePrefix = "arXiv", + eprint = {1005.0112}, + primaryClass = "astro-ph.IM", + keywords = {convection, hydrodynamics, methods: numerical, nuclear reactions, nucleosynthesis, abundances, supernovae: general, white dwarfs}, + year = 2010, + month = {jun}, + volume = 188, + pages = {358-383}, + doi = {10.1088/0067-0049/188/2/358}, + adsurl = {http://adsabs.harvard.edu/abs/2010ApJS..188..358N}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System}, + subject = {algorithms: low Mach hydro} +} diff --git a/paper/paper.md b/paper/paper.md index 548598114..e8506b5b2 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -53,36 +53,46 @@ bibliography: paper.bib The AMReX-Astrophysics Microphysics library provides a common set of microphysics routines (reaction networks, equations of state, and other transport coefficients) for astrophysical simulation codes built -around the AMReX library. Several codes, including Castro -[@castro_I], MAESTROeX [@maestroex], and Quokka [@quokka] use -Microphysics to provide the physics and solvers needed -to close the hydrodynamics systems that they evolve. +around the AMReX adaptive mesh refinement library [@amrex]. Several +codes, including the compressible hydrodynamics code Castro +[@castro_I], the low-Mach number hydrodynamics code MAESTROeX +[@maestroex], and the radiation-hydrodynamics code Quokka [@quokka] +use Microphysics to provide the physics and solvers needed to close +the hydrodynamics systems that they evolve. # History -This project started out as Starkiller Microphysics, which was an -attempt to codevelop microphysics routines for the Castro and Flash -simulation codes. Originally the library used Fortran and was +This project in started out in 2013 as a way to centralize the +reaction networks and equations of state used by Castro and MAESTRO +[@maestro], the predecessor to MAESTROeX. For a brief period, it was +referred to as Starkiller Microphysics, which was an attempt to +co-develop microphysics routines for the Castro and the Flash [@flash] +simulation codes. Originally, Microphysics used Fortran and was restricted to CPUs, but C++ ports were added over time to take -advantage of GPU-offloading afforded by the AMReX library. Eventually -as the development of the two codes diverged, the C++ ports of the -Microphysis were split off into the AMReX-Astrophysics Microphysics -library. Today, the library is completely written in C++ and relies -on the AMReX data structures. - -Several classical Fortran libraries have been converted to header-only +advantage of GPU-offloading afforded by the AMReX library and Castro was converted +from a mix of C++ and Fortran to purely C++. At this point, +the development focused solely on AMReX-based codes and C++ and the project +was formally named the AMReX-Astrophysics Microphysics library and the +Fortran implementations were removed over time. +Today, the library is completely written in C++ and relies heavily on +the AMReX data structures to take advantage of GPUs. + +Several classic Fortran libraries have been converted to header-only C++ implementations, including the VODE integrator [@vode], the hybrid Powell method of MINPACK [@powell], and the Runge-Kutta Chebyshev -integration method [@rkc]. +(RKC) integration method [@rkc]. The code was modernized where possible, +with many `go to` statements removed and additional logic added +to support our applications (see for example the discussion +on VODE in [@castro-simple-sdc]). # Design Microphysics provides several different types of physics: equations of state, reaction networks and screening methods, nuclear statistical -equilibrium solvers and table, conductivities, and opacities, as well -as the tools needed to work with them, most notably the ODE -integrators for the networks. +equilibrium solvers and tabulations, thermal conductivities, and +opacities, as well as the tools needed to work with them, most notably +the suite of stiff ODE integrators for the networks. There are two ways to use Microphysics: standalone for simple investigations or as part of an (AMReX-based) application code. In both cases, the core From 36c9319043093e145a4d8f37814146a590714c90 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 11 Mar 2025 10:17:39 -0400 Subject: [PATCH 16/18] more cites --- paper/paper.bib | 81 ++++++++++++++++++++++++++++--------------------- paper/paper.md | 75 ++++++++++++++++++++++++++++----------------- 2 files changed, 95 insertions(+), 61 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index bb394ca61..b0ade7f94 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -693,40 +693,6 @@ @article{amrex } -@article{castro-simple-sdc, -doi = {10.3847/1538-4357/ac8478}, -url = {https://dx.doi.org/10.3847/1538-4357/ac8478}, -year = {2022}, -month = {aug}, -publisher = {The American Astronomical Society}, -volume = {936}, -number = {1}, -pages = {6}, -author = {Zingale, M. and Katz, M. P. and Nonaka, A. and Rasmussen, M.}, -title = {An Improved Method for Coupling Hydrodynamics with Astrophysical Reaction Networks}, -journal = {ApJ}, -abstract = {Reacting astrophysical flows can be challenging to model, - because of the difficulty in accurately coupling - hydrodynamics and reactions. This can be - particularly acute during explosive burning or at - high temperatures where nuclear statistical - equilibrium is established. We develop a new - approach, based on the ideas of spectral deferred - corrections (SDC) coupling of explicit hydrodynamics - and stiff reaction sources as an alternative to - operator splitting, that is simpler than the more - comprehensive SDC approach we demonstrated - previously. We apply the new method to a - double-detonation problem with a moderately sized - astrophysical nuclear reaction network and explore - the time step size and reaction network tolerances, - to show that the simplified-SDC approach provides - improved coupling with decreased computational - expense compared to traditional Strang operator - splitting. This is all done in the framework of the - Castro hydrodynamics code, and all algorithm - implementations are freely available.} -} @ARTICLE{maestro, author = {{Nonaka}, A. and {Almgren}, A.~S. and {Bell}, J.~B. and {Lijewski}, M.~J. and @@ -746,3 +712,50 @@ @ARTICLE{maestro adsnote = {Provided by the SAO/NASA Astrophysics Data System}, subject = {algorithms: low Mach hydro} } + +@article{pynucastro, +author = {{Willcox}, D.~E. and {Zingale}, M.}, + title = "{pynucastro: an interface to nuclear reaction rates and code generator for reaction net +work equations}", + journal = {Journal of Open Source Software}, + year = 2018, + volume = 3, + number = 23, + pages = 588, + url = {https://doi.org/10.21105/joss.00588}, + doi = {10.21105/joss.00588}, + subject = {nuclear astrophysics} +} + +@article{pynucastro2, +doi = {10.3847/1538-4357/acbaff}, +url = {https://dx.doi.org/10.3847/1538-4357/acbaff}, +year = {2023}, +month = {apr}, +publisher = {The American Astronomical Society}, +volume = {947}, +number = {2}, +pages = {65}, +author = {Alexander I. Smith and Eric T. Johnson and Zhi Chen and Kiran Eiden and + Donald E. Willcox and Brendan Boyd and Lyra Cao and Christopher J. DeGrendele and + Michael Zingale}, +title = {pynucastro: A Python Library for Nuclear Astrophysics}, +journal = {The Astrophysical Journal}, +abstract = {We describe pynucastro 2.0, an open-source library for + interactively creating and explor ing astrophysical + nuclear reaction networks. We demonstrate new + methods for approximating rates and use detailed + balance to create reverse rates, show how to build + networks and determine whether they are appropriate + for a particular science application, and discuss + the changes made to the library ov er the past few + years. Finally, we demonstrate the validity of the + networks produced and share how w e use pynucastro + networks in simulation codes.} +} + +@mics{cococubed, + titled = {cococubed website} + author = {{Timmes}, F.~X.}, + howpublished = {\url{https://cococubed.com/}} +} diff --git a/paper/paper.md b/paper/paper.md index e8506b5b2..3ac5dfda4 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -48,13 +48,14 @@ date: 01 January 2025 bibliography: paper.bib --- + # Summary The AMReX-Astrophysics Microphysics library provides a common set of microphysics routines (reaction networks, equations of state, and other transport coefficients) for astrophysical simulation codes built around the AMReX adaptive mesh refinement library [@amrex]. Several -codes, including the compressible hydrodynamics code Castro +multi-dimensional simulation codes, including the compressible hydrodynamics code Castro [@castro_I], the low-Mach number hydrodynamics code MAESTROeX [@maestroex], and the radiation-hydrodynamics code Quokka [@quokka] use Microphysics to provide the physics and solvers needed to close @@ -64,28 +65,20 @@ the hydrodynamics systems that they evolve. This project in started out in 2013 as a way to centralize the reaction networks and equations of state used by Castro and MAESTRO -[@maestro], the predecessor to MAESTROeX. For a brief period, it was +[@maestro], the predecessor to MAESTROeX. Originally, Microphysics used Fortran and +for a brief period, it was referred to as Starkiller Microphysics, which was an attempt to co-develop microphysics routines for the Castro and the Flash [@flash] -simulation codes. Originally, Microphysics used Fortran and was -restricted to CPUs, but C++ ports were added over time to take -advantage of GPU-offloading afforded by the AMReX library and Castro was converted -from a mix of C++ and Fortran to purely C++. At this point, +simulation codes. As interest in GPUs grew (with early support added to Microphysics in 2015), +Castro moved from a mixed of C++ and Fortran to pure C++ to take +advantage of GPU-offloading afforded by the AMReX library and C++ ports were +added to Microphysics. At this point, the development focused solely on AMReX-based codes and C++ and the project was formally named the AMReX-Astrophysics Microphysics library and the Fortran implementations were removed over time. Today, the library is completely written in C++ and relies heavily on the AMReX data structures to take advantage of GPUs. -Several classic Fortran libraries have been converted to header-only -C++ implementations, including the VODE integrator [@vode], the hybrid -Powell method of MINPACK [@powell], and the Runge-Kutta Chebyshev -(RKC) integration method [@rkc]. The code was modernized where possible, -with many `go to` statements removed and additional logic added -to support our applications (see for example the discussion -on VODE in [@castro-simple-sdc]). - - # Design Microphysics provides several different types of physics: equations of @@ -99,12 +92,6 @@ or as part of an (AMReX-based) application code. In both cases, the core requirement is to select a network---this defines the composition that is then used by most of the other physics routines. -A key design feature is the separation of the reaction network from -the integrator. This allows us to easily experiment with different -integration methods (such as the RKC integrator) and also support -different modes of coupling reactions to a simulation code (operator -splitting and spectral deferred corrections [@castro_simple_sdc]) - We rely on header-only implementations as much as possible, to allow for easier compiler inlining. We also leverage C++17 `if constexpr` templating to compile out unnecessary computations for performance. @@ -116,27 +103,61 @@ smaller `eos_re_t` type, then only a few energy terms are computed (those that are needed when finding temperature from specific internal energy). - -pynucastro integration - +Several classic Fortran libraries have been converted to header-only +C++ implementations, including the VODE integrator [@vode], the hybrid +Powell method of MINPACK [@powell], and the Runge-Kutta Chebyshev +(RKC) integration method [@rkc]. The code was modernized where possible, +with many `go to` statements removed and additional logic added +to support our applications (see for example the discussion +on VODE in [@castro_simple_sdc]). We also make use of the C++ autodiff library [@autodiff] to compute thermodynamic derivatives required in the Jacobians of our reaction networks. +Another key design feature is the separation of the reaction network +from the integrator. This allows us to easily experiment with +different integration methods (such as the RKC integrator) and also +support different modes of coupling reactions to a simulation code, +including operator splitting and spectral deferred corrections (SDC) +(see, e.g., [@castro_simple_sdc]). The latter is especially important +for explosive astrophysical flows. + + # Capabilities -## equations of state +## Reaction networks + +A reaction network defines the composition (including the atomic +weight and number) and the reactions that link the nuclei together. +Even if reactions are not being modeled, a `general_null` network can +be used to simply define the composition. -## networks +In multidimensional simulations, there is a desire to make the +reaction as small as possible (due to the memory and per-zone +computational costs) while still being able to represent the +nucleosynthesis reasonable accurately. As a result, approximations +to rates are common and a wide variety of networks are used depending +on the burning state being modeled. We have ported many of the classic "aprox" networks used in the -astrophysics community to C++ using templating to construct the +astrophysics community (for example "aprox21" described in +[@wallacewoosley:1981] to C++. Many of these originated from +the implementations of [@cococubed]. using templating to construct the righthand side of the network at compile time. +Finally, we integrate with the pynucastro nuclear astrophysics library [@pynucastro,@pynucastro2], +allowing us to gener + Microphysics can also directly use networks created by the + +## Equations of state + + + + # Unit tests / examples Microphysics can be used as a standalone tool through the tests From a22ab2f7f1506af90c95b91cf45f3b7b21b425d3 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 11 Mar 2025 10:23:28 -0400 Subject: [PATCH 17/18] fix bibtex --- paper/paper.bib | 2 +- paper/paper.md | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index b0ade7f94..b7b1b39eb 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -755,7 +755,7 @@ @article{pynucastro2 } @mics{cococubed, - titled = {cococubed website} + titled = {cococubed website}, author = {{Timmes}, F.~X.}, howpublished = {\url{https://cococubed.com/}} } diff --git a/paper/paper.md b/paper/paper.md index 3ac5dfda4..e16dccf9c 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -142,15 +142,19 @@ on the burning state being modeled. We have ported many of the classic "aprox" networks used in the astrophysics community (for example "aprox21" described in -[@wallacewoosley:1981] to C++. Many of these originated from -the implementations of [@cococubed]. using templating to construct the -righthand side of the network at compile time. - -Finally, we integrate with the pynucastro nuclear astrophysics library [@pynucastro,@pynucastro2], -allowing us to gener - -Microphysics can also directly use networks created by the - +[@wallacewoosley:1981] to C++. Many of these originated from the +implementations of [@cococubed]. Our implementation relies heavily on +C++ templates, allowing us to simply define the properties of the +reactions and then the compiler builds the righthand side and Jacobian +of the system at compile-time. This reduces the maintenance costs of +the networks and also eliminates some common indexing bugs. + +We also integrate with the pynucastro nuclear astrophysics library +[@pynucastro,@pynucastro2], allowing us to generate a custom network +in a few lines of python simply by specifying the nuclei we want. This +makes use of the reaction rates from [@ReacLib] and others, and allows us +to keep up to date with changes in rates and build more complex networks +than the traditional aprox nets. ## Equations of state From 900ac23fc7cbfcff2d9d5d8b1db8780e77cc2d9e Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 11 Mar 2025 10:32:28 -0400 Subject: [PATCH 18/18] more citation fixes --- paper/paper.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index e16dccf9c..e8b85fd2d 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -109,7 +109,7 @@ Powell method of MINPACK [@powell], and the Runge-Kutta Chebyshev (RKC) integration method [@rkc]. The code was modernized where possible, with many `go to` statements removed and additional logic added to support our applications (see for example the discussion -on VODE in [@castro_simple_sdc]). +on VODE in @castro_simple_sdc). We also make use of the C++ autodiff library [@autodiff] to compute thermodynamic derivatives required in the Jacobians of our reaction networks. @@ -119,7 +119,7 @@ from the integrator. This allows us to easily experiment with different integration methods (such as the RKC integrator) and also support different modes of coupling reactions to a simulation code, including operator splitting and spectral deferred corrections (SDC) -(see, e.g., [@castro_simple_sdc]). The latter is especially important +(see, e.g., @castro_simple_sdc). The latter is especially important for explosive astrophysical flows. @@ -142,17 +142,17 @@ on the burning state being modeled. We have ported many of the classic "aprox" networks used in the astrophysics community (for example "aprox21" described in -[@wallacewoosley:1981] to C++. Many of these originated from the -implementations of [@cococubed]. Our implementation relies heavily on +@wallacewoosley:1981 to C++. Many of these originated from the +implementations of @cococubed. Our implementation relies heavily on C++ templates, allowing us to simply define the properties of the reactions and then the compiler builds the righthand side and Jacobian of the system at compile-time. This reduces the maintenance costs of the networks and also eliminates some common indexing bugs. We also integrate with the pynucastro nuclear astrophysics library -[@pynucastro,@pynucastro2], allowing us to generate a custom network +[@pynucastro; @pynucastro2], allowing us to generate a custom network in a few lines of python simply by specifying the nuclei we want. This -makes use of the reaction rates from [@ReacLib] and others, and allows us +makes use of the reaction rates from @ReacLib and others, and allows us to keep up to date with changes in rates and build more complex networks than the traditional aprox nets.