Skip to content
/ CHIPS Public

Open source code to unveil the Complete History of Interaction-Powered Supernovae

License

Notifications You must be signed in to change notification settings

DTsuna/CHIPS

Repository files navigation

CHIPS

Complete History of Interaction-Powered Supernovae (CHIPS)

CHIPS is a tool for simulating the circumstellar matter and light curves of interaction-powered transients. Coupling the MESA stellar evolution code and codes implemented by the authors, the user can obtain the circumstellar matter profile and light curves of interaction-powered supernovae.

The PDF documentation of the code is available in the repository.

What can CHIPS do?

CHIPS can generate a realistic CSM from a model-agnostic mass eruption calculation (reference 2), which can serve as a reference for observers to compare with various observations of the CSM. It can also generate light curves from CSM interaction (reference 3), which can also be compared with observed light curves. For our sample red supergiant models, the calculation of mass eruption and light curve typically takes respectively half a day and half an hour on modern CPUs. For stripped stars, both the eruption and light curve typically takes around an hour.

Pre-reqs

The requirement for running CHIPS is quite minimal. One needs only the standard gcc and gfortran, python3 with numpy and scipy, and mesa_reader (modules for reading MESA output files) installed. If matplotlib is installed, one can also obtain some plots that are automatically generated by CHIPS.

For installation of mesa_reader, please see here for details.

Steps for running CHIPS:

  1. git clone this repository

    git clone https://github.com/DTsuna/CHIPS.git

  2. At the top directory, compile the scripts for the mass eruption and light curve.

    make

  3. Execute the script run.py. For example, to simulate an interaction-powered SN of

  • a star with ZAMS (Zero-Age Main Sequence) mass 15 Msun and metallicity 0.014,
  • which experiences mass eruption 5 years before core-collapse, with energy injection of 0.3 times the envelope's binding energy,
  • and finally explodes with energy 1e51 erg,

run the following command:

python run.py --tinj 5 --finj 0.3 --Eej 1e51 --stellar-model input/mesa_models_rsg/15Msun_Z0.014_preccsn.data --analytical-CSM

The argument tinj and finj are required, and can be given only once. The argument Eej can be given multiple times to simulate light curves with different explosion energies.

For the argument --stellar-model, one can read in their MESA stellar model generated on their own. Alternatively, one can use the MESA pre-SN models generated by us.

Our sample models cover

  • IIn progenitors: red supergiants of solar metallicity (Z=0.014) with ZAMS mass range 13-26 Msun, with 1 Msun interval up to 20 Msun and 2 Msun interval from 20 to 26 Msun,
  • Ibn progenitors: hydrogen-poor helium stars of solar metallicity (Z=0.014) with ZAMS mass range 15-29 Msun with 1 Msun interval, and
  • Icn progenitors: hydrogen and helium poor stars of solar metallicity (Z=0.014) with ZAMS masses of 20, 22, 25, 29 Msun.

The pre-SN models are in zip files in the directories input/mesa_models_XXX. Once you un-zip these files, you will find MESA data files with the naming showing the mass and metallicity at ZAMS. For the light curve module, the currently available opacity tables support only solar metallicity (Z=0.014) input progenitor models for IIn/Ibn, and the above four models for Icn. Work is under way to enable more flexibility in the progenitors.

Although this is not the recommended way, one can also do the MESA calculation inside run.py with additional arguments --run-mesa and --mesa-path

python run.py --tinj 5 --finj 0.3 --Eej 1e51 --stellar-model /output/MESA/model --run-mesa --mesa-path /path/to/execution/directory --analytical-CSM 

The argument --stellar-model should be the output file from this MESA calculation that one would like to be using as input for CHIPS. The argument --mesa-path should specify the relative path to where the calling scripts (mk, rn) for the MESA calculation is.

For modeling Type IIn SNe using the RSG model, we strongly advise to use an analytical CSM model (reference 4) that corrects the artifical shock-compressions that arise from the adiabatic mass eruption code. This can be done with the argument --analytical-CSM. Such CSM model is already being taken into account for the stripped stars.

Using a custom pre-built opacity table

For the opacity in the eruption calculations, a simple analytical formula in Kuriyama & Shigeyama (2020) is used by default. One can instead give a custom opacity table (like those made by OPAL, AESOPUS, etc.), by adding the argument --opacity-table. There are two notes of caution:

  • The table must be rectangular with a format given as the sample in input/rosseland, and
  • when values outside the table is requested, the closest edge values are used.

Using an already obtained CSM for light curve calculation (for RSG models)

While the mass eruption calculation is running, files with names intermediateXXyr.txt, which record the envelope profile XX years after energy injection, are created. If these files are available, for calculations of the light curve one can skip the mass-eruption calculation and obtain the light curve using the code after_eruption.py.

python after_eruption.py --Eej 1e51 --stellar-model input/mesa_models_rsg/15Msun_Z0.014_preccsn.data --profile-at-cc EruptionFiles/intermediate10yr.txt --analytical-CSM

The file given as profile-at-cc argument specifies how much time elapsed between mass eruption and core-collapse. The files are produced at an interval of 1 year.

Using an already obtained CSM for light curve calculation (for stripped models)

For stripped star models, files called intermediateXXyr.txt are not created as the eruption calculations are done for timescales much shorter than a year. The extrapolation to the time specified by --tinj is done by an internal analytical calculation (see our paper). By adding the --skip-eruption argument in run.py, the code skips the eruption calculation and uses the file ``EruptionFiles/result99.txt" (which must be already generated) to model the CSM for an arbitrary --tinj.

Multi-band light curves

For the hydrogen-rich IIn models, the code can obtain multi-band light curves if ray-tracing radiation transfer is turned on. To do this, add the argument --calc-multiband when running run.py or after_eruption.py. Work is under way to develop opacity tables to enable multi-band for the Ibc models.

References:

  1. Takei, Tsuna, Kuriyama, Ko, Shigeyama (2022), ApJ 929, 177
  2. Takei, Tsuna, Ko, Shigeyama (2024), ApJ 961, 67
  3. Kuriyama, Shigeyama (2020), A&A, 635, 127 (for mass eruption)
  4. Takei, Shigeyama (2020), PASJ 72, 67 (for light curve; some features updated in Ref 1.)
  5. Tsuna, Takei, Kuriyama, Shigeyama (2021), PASJ 73, 1128 (analytical CSM model)

For other papers that use CHIPS see here

Contact

For questions, comments about the CHIPS code or possible collaboration, please email us from the following email address: chips___at___resceu.s.u-tokyo.ac.jp

Developers

Daichi Tsuna (Caltech, Univ of Tokyo)
Yuki Takei (Kyoto University, Univ of Tokyo)
Toshikazu Shigeyama (Univ of Tokyo)
Takatoshi Ko (Univ of Tokyo, RIKEN)
Naoto Kuriyama (Univ of Tokyo; past developer)

About

Open source code to unveil the Complete History of Interaction-Powered Supernovae

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •