The Astrophysical Journal Supplement Series (Jan 2024)

An Efficient Algorithm for Astrochemical Systems Using Stoichiometry Matrices

  • Kazutaka Motoyama,
  • Ruben Krasnopolsky,
  • Hsien Shang,
  • Kento Aida,
  • Eisaku Sakane

DOI
https://doi.org/10.3847/1538-4365/ad12c8
Journal volume & issue
Vol. 270, no. 2
p. 19

Abstract

Read online

Astrochemical simulations are a powerful tool for revealing chemical evolution in the interstellar medium. Astrochemical calculations require efficient processing of large matrices for the chemical networks. The large chemical reaction networks often present bottlenecks for computation because of time derivatives of chemical abundances. We propose an efficient algorithm using a stoichiometry matrix approach in which this time-consuming part is expressed as a loop, unlike the algorithm used in previous studies. Since stoichiometry matrices are sparse in general, the performances of simulations with our algorithm depend on which sparse-matrix storage format is used. We conducted a performance comparison experiment using the common storage formats, including the coordinate format, the compressed column storage format, the compressed row storage (CRS) format, and the sliced ELLPACK format. Experimental results showed that the simulations with the CRS format are the most suitable for astrochemical simulations and about a factor of 2 faster than those with the algorithm used in previous studies. In addition, our algorithm significantly reduces not only the computation time but also the compilation time. We also explore the beneficial effects of parallelization and sparse-matrix reordering in these algorithms.

Keywords