From 7529cdc6d25f17221aee04961703d6a5594aab47 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 8 Apr 2024 08:38:17 -0400 Subject: [PATCH 1/2] update the reaction docs this describes the new shock burning algorithm --- Docs/source/reactions.rst | 47 ++++++++++++++++++++++++++++++++++----- Docs/source/refs.bib | 19 +++++++++++++++- 2 files changed, 60 insertions(+), 6 deletions(-) diff --git a/Docs/source/reactions.rst b/Docs/source/reactions.rst index ed23b9d746..79a04d3bdc 100644 --- a/Docs/source/reactions.rst +++ b/Docs/source/reactions.rst @@ -11,10 +11,17 @@ and it evolves those components through a nuclear burning step. All of the reaction networks that Castro uses are provided by the `Microphysics repository `_. +.. index:: USE_REACT + .. note:: - An arbitrary reaction network can be created for Castro via the - `pynucastro library `_. + To enable reactions in a simulation, you must compile with + + :: + + USE_REACT=TRUE + + This can be set in your ``GNUmakefile``. Microphysics comes with a ``general_null`` network. This is a bare interface for a @@ -24,6 +31,16 @@ are accepted. It contains several sets of isotopes; for example, isotopes needed to represent the triple-\ :math:`\alpha` reaction converting helium into carbon, as well as oxygen and iron. +Other reaction networks can be found in ``Microphysics/networks``. To select +a network, you set the make variable ``NETWORK_DIR`` to the name of the network +directory. + +.. note:: + + An arbitrary reaction network can be created for Castro via the + `pynucastro library `_. + + The main interface for burning is in ``Microphysics/interfaces/burner.H``: .. code:: c++ @@ -65,6 +82,11 @@ reactions to occur in a zone using the parameters: .. index:: castro.disable_shock_burning, USE_SHOCK_VAR +Burning in Shocks +----------------- + +.. index:: USE_SHOCK_VAR, castro.diable_shock_burning, castro.shock_detection_threshold, castro.shock_detection_include_sources + Burning can also be disabled inside shocks. This requires that the code be compiled with:: @@ -72,12 +94,27 @@ compiled with:: in the ``GNUmakefile``. This will allocate storage for a shock flag in the conserved state array. This flag is computed via a multidimensional shock detection algorithm -that looks for compression (:math:`\nabla \cdot \ub < 0`) along with a pressure jump -in the direction of compression. The runtime parameter:: +described in :cite:`doubledet2024`. A zone is tagged as a shock if the following +conditions are true: + +.. math:: + + \begin{align*} + \nabla \cdot \ub &< 0 \\ + \frac{|(\nabla p - \rho {\bf g}) \cdot \ub|}{p |\ub_\mathrm{cell}|} > &f_\mathrm{shock} + \end{align*} + +This requires that there is compression and that the pressure jump (excluding +the part of the pressure that balances gravity) is large. The runtime parameter + +:: castro.disable_shock_burning = 1 -will skip reactions in a zone where we've detected a shock. +will skip reactions in a zone where we've detected a shock. The runtime parameters +``castro.shock_detection_threshold`` and ``castro.shock_detection_include_sources`` +will set the value of $f_\mathrm{shock}$ and whether to subtract $\rho {\bf g}$ +from the pressure gradient. .. note:: diff --git a/Docs/source/refs.bib b/Docs/source/refs.bib index 612f332637..7683e16623 100644 --- a/Docs/source/refs.bib +++ b/Docs/source/refs.bib @@ -1119,4 +1119,21 @@ @article{castro_simple_sdc 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.} -} \ No newline at end of file +} + +@ARTICLE{doubledet2024, + author = {{Zingale}, Michael and {Chen}, Zhi and {Rasmussen}, Melissa and {Polin}, Abigail and {Katz}, Max and {Smith Clark}, Alexander and {Johnson}, Eric T.}, + title = "{Sensitivity of Simulations of Double Detonation Type Ia Supernova to Integration Methodology}", + journal = {arXiv e-prints}, + keywords = {Astrophysics - High Energy Astrophysical Phenomena, Astrophysics - Solar and Stellar Astrophysics}, + year = 2023, + month = sep, + eid = {arXiv:2309.01802}, + pages = {arXiv:2309.01802}, + doi = {10.48550/arXiv.2309.01802}, +archivePrefix = {arXiv}, + eprint = {2309.01802}, + primaryClass = {astro-ph.HE}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv230901802Z}, + adsnote = {Provided by the SAO/NASA Astrophysics Data System} +} From 281c4e59a43d50d7b52fd5acb3201062e55fd9d3 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 8 Apr 2024 08:46:55 -0400 Subject: [PATCH 2/2] update index --- Docs/source/reactions.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Docs/source/reactions.rst b/Docs/source/reactions.rst index 79a04d3bdc..25df19d9d9 100644 --- a/Docs/source/reactions.rst +++ b/Docs/source/reactions.rst @@ -63,7 +63,7 @@ details. Controlling burning =================== -.. index:: castro.react_T_min, castro.react_T_max, castro.react_rho_min, castro.react_rho_max +.. index:: castro.react_T_min, castro.react_T_max, castro.react_rho_min, castro.react_rho_max, castro.do_react There are a number of reactions-related parameters that can be set at runtime in the inputs file. Reactions are enabled by setting:: @@ -80,7 +80,6 @@ reactions to occur in a zone using the parameters: * ``castro.react_rho_min`` and ``castro.react_rho_max`` for density -.. index:: castro.disable_shock_burning, USE_SHOCK_VAR Burning in Shocks -----------------