GalCEM: Galactic Chemical Evolution Model
- GalCEM is an open-source, Python-based framework designed for precision isotopic chemical evolution modeling in galaxies, tracking 86 elements and 451 isotopes.
- It employs a modular architecture that integrates detailed yield data from massive stars, LIMs, and SNIa using advanced numerical methods like a 4th-order Runge–Kutta integrator.
- Its design enables fast, high-fidelity simulations validated against observational benchmarks, with extensible features for future multi-zone and neutron-capture enhancements.
GalCEM (GALactic Chemical Evolution Model) is an open-source, modular, Python-based numerical framework for precision isotopic chemical evolution modeling within galaxies. Designed to solve the full integrodifferential one-zone chemical evolution equations governing the time-dependent masses of individual isotopes in the interstellar medium (ISM), GalCEM integrates detailed yield data from multiple nucleosynthetic channels, leveraging array-based numerical engines to achieve both high speed and high fidelity. The current implementation tracks 86 elements subdivided into 451 isotopes and includes contributions from massive stars, low- and intermediate-mass stars, and Type Ia supernovae. GalCEM is publicly available and extensible, providing researchers with a flexible platform for simulating the chemical enrichment history from light to intermediate elements, with future expansions planned for neutron-capture channels and spatially resolved treatments (Gjergo et al., 2023).
1. Mathematical Formulation and Core Equations
GalCEM solves the canonical one-zone galactic chemical evolution (GCE) equation for each tracked isotope :
where:
- is the mass of isotope in the ISM,
- and are the abundance fractions in infalling and ISM gas,
- is the star formation rate (SFR),
- for no outflow,
- are the rates of isotope returned via nucleosynthetic channel : low-intermediate mass stars, core-collapse supernovae, and Type Ia supernovae respectively.
For SNCC and LIM channels, the birth-time convolution rate is:
For SNIa, a delay-time distribution (DTD, Greggio 2005) produces:
where is the stellar yield, the IMF, the lifetime, the Jacobian, and is computed analytically from binary mass-ratio distributions. The system is advanced using a classical 4th-order Runge–Kutta method with uniform time step Myr.
2. Modular Architecture and Numerical Engines
GalCEM features three primary ingredient classes—morphology, yields, and input parameters—tightly coupled with its numerical engines. Morphology encompasses the IMF (), SFR (), infall, outflow, and stellar lifetime functions (). Yield tables for different enrichment channels (FRUITY AGB [Cristallo et al.], Limongi & Chieffi SNCC, Iwamoto SNIa) provide data for 86 elements and 451 isotopes. Input parameters configure solver options, including channel selection, yield choices, and timestep control.
Numerical engines perform:
- Multidimensional yield table preprocessing and spline interpolation;
- Construction of time-step grid arrays for each channel and isotope;
- Efficient convolution integral evaluation via Simpson’s rule;
- ODE integration via a fourth-order Runge–Kutta solver.
The entry point, the OneZone class, orchestrates initialization, isotope extraction, and the iterative evolution loop.
3. Yield Table Preprocessing and Interpolation
To optimize computation, GalCEM employs the standalone GalCemInterpolant tool, which ingests raw stellar yield tables and constructs smooth multidimensional splines for each isotope.
- For LIM (FRUITY), interpolation occurs in space.
- For SNCC yields (Limongi & Chieffi), space is used.
- SNIa yields (Iwamoto) are similarly treated.
Splines are typically constructed in , and the mass–lifetime relation and its inverse are also interpolated for analytic Jacobian computation. The framework is dimensionally agnostic and supports extensions (e.g., extra dimensions for He enhancement). In-sample RMSE errors are , yielding machine-precision fidelity in tabulated values.
4. Convolution Grid-Mapping and Computational Performance
At each time step and for each enrichment channel , GalCEM constructs a grid in (with points) over relevant mass ranges. Array-based mappings provide immediate evaluation of , birth times , IMF values , yields , and stored past SFR values . The convolution integral for each isotope/channel reduces to a dot-product of pre-computed arrays, numerically integrated via Simpson’s rule.
This array-centric approach suppresses expensive Python-level looping, providing order-of-magnitude speed enhancements. A single full run (451 isotopes, 86 elements, typical spiral galaxy) completes in minutes on standard workstation hardware (Gjergo et al., 2023).
5. Validation Against Observational Data
Benchmark simulations using Milky Way-like parameters (, Gyr, SFR , Kroupa (2001) IMF, standard yield choices) yield age–metallicity and [Fe/H] tracks that intersect the solar point at Gyr and agree with APOKASC stellar-age measurements (Silva Aguirre et al. 2018). Elemental [X/Fe] versus [Fe/H] tracks for C to Zn and Li reproduce key features: the -plateau at low [Fe/H], knee at , and iron-peak rises from SNIa. Minor discrepancies at the few tenths dex level suggest areas for further model refinement, including treatment of rotating massive stars and additional enrichment sources.
6. Public Availability and Usage
GalCEM is hosted at https://github.com/egjergo/GalCEM and distributed via PyPI:
1 |
pip install galcem |
A minimal script for one-zone GCE simulation is:
1 2 3 4 |
import galcem as gc inputs = gc.Inputs() oz = gc.OneZone(inputs, outdir='my_output') oz.main() |
Channels can be toggled and yield options specified:
1 2 3 4 |
inputs.include_channel=['SNCC','LIMs','SNIa'] inputs.yields_LIMs_option='c15' inputs.yields_SNCC_option='lc18' inputs.yields_SNIa_option='i99' |
Solver timestep granularity is adjustable:
1 |
inputs.ntime_step = 0.002 # in Gyr |
galcem/classes/inputs.py. Planned future expansions include adaptive timestepping, multi-zone capability, neutron-capture channels (e.g., r-process), and expanded yield libraries.
7. Roadmap and Prospective Extensions
Current limitations restrict nucleosynthetic coverage to light and intermediate elements (C to Zn, Li) and one-zone galactic models. Upcoming releases aim to incorporate the full periodic table by adding neutron-capture channels and spatially-dependent galaxy properties. Further anticipated features include adaptive timestep solvers and multi-zone enrichment coupling. The GalCEM architecture is designed for extensibility, facilitating precision studies of galactic chemical evolution across parameter regimes and astrophysical contexts (Gjergo et al., 2023).