@@ -25,7 +25,9 @@ bibliography: paper.bib
25
25
The AMReX-Astrophysics Microphysics library provides a common set of
26
26
microphysics routines (reaction networks, equations of state, and
27
27
other transport coefficients) for astrophysical simulation codes built
28
- around the AMReX library.
28
+ around the AMReX library. Several codes, including Castro, MAESTROeX,
29
+ and Quokka use Microphysics to provide the physics and solvers needed
30
+ to close the hydrodynamics systems that they evolve.
29
31
30
32
# History
31
33
@@ -39,13 +41,41 @@ Microphysis were split off into the AMReX-Astrophysics Microphysics
39
41
library. Today, the library is completely written in C++ and relies
40
42
on the AMReX data structures.
41
43
42
- # Design
44
+ Several classical Fortran libraries have been converted to header-only C++
45
+ implementations, including the VODE integrator and the hybrid Powell method
46
+ of MINPACK.
47
+
43
48
44
- Porting many classic solvers from old Fortran to C++
49
+ # Design
45
50
46
- header-only library as much as possible
51
+ Microphysics provides several different types of physics: equations of
52
+ state, reaction networks and screening methods, nuclear statistical
53
+ equilibrium solvers and table, conductivities, and opacities, as well
54
+ as the tools needed to work with them, most notably the ODE integrators
55
+ for the networks.
56
+
57
+ There are two ways to use Microphysics: standalone for simple investigations
58
+ or as part of an (AMReX-based) application code. In both cases, the core
59
+ requirement is to select a network---this defines the composition that
60
+ is then used by most of the other physics routines.
61
+
62
+ A key design feature is the separation of the reaction network from
63
+ the integrator. This allows us to easily experiment with different
64
+ integration methods (such as the RKC integrator) and also support
65
+ different modes of coupling reactions to a simulation code (operator
66
+ splitting and spectral deferred corrections)
67
+
68
+ We rely on header-only implementations as much as possible, to allow
69
+ for easier compiler inlining. We also leverage C++17 ` if constexpr `
70
+ templating to compile out unnecessary computations for performance.
71
+ For example, our equations of state can compute a lot of thermodynamic
72
+ quantities and derivatives, but for some operations, we only need a
73
+ few of these. If we pass the general ` eos_t ` type into the EOS, then
74
+ everything is calculated, but if we pass in to the same interface the
75
+ smaller ` eos_re_t ` type, then only a few energy terms are computed
76
+ (those that are needed when finding temperature from specific internal
77
+ energy).
47
78
48
- C++17
49
79
50
80
pynucastro integration
51
81
@@ -54,8 +84,20 @@ pynucastro integration
54
84
55
85
56
86
87
+
57
88
# Unit tests / examples
58
89
90
+ Microphysics can be used as a standalone tool through the tests
91
+ in ` Microphysics/unit_test/ ` . There are 2 types of tests here:
92
+
93
+ * * comprehensive tests* test performance by setting up a cube of data
94
+ (with density, temperature, and composition varying in a dimension)
95
+ and performing an operation on the entire cube (calling the EOS,
96
+ integrating a network, ...).
97
+
98
+ * * one-zone tests* simply call one of the physics modules with a
99
+ single thermodynamic state. This can be used to explore the physics
100
+ that is implemented.
59
101
60
102
# References
61
103
0 commit comments