Super Capt'n General: fork of Capt'n General, designed to handle supernovae boosting dark matter via elastic scattering to above galactic escape velocities.
If you use this code, you can cite arXiv:2210.09448 where it was first deployed.
Run make to compile the library on its own.
If you want the test file as well, run make supertest.x which compiles the test script in supermain.f90.
The test main file shows how to work with Super Capt'n.
The program can be run to get a velocity spectrum using the runsuper.f90 main file. To do this, edit the parameters you desire at the top of the file, then build using the make getSpectrum.x command, and finally run the new getSpectrum.x executable. The created output file includes a helpful tip in the header on how to read it into a python numpy array alongside a record of all parameters used in the run.
The structure of the runsuper.f90 main file is as follows:
- First the option to change the output file name and dark matter velocity range/resolution.
- Next, the option to change dark matter parameters such as the mass, spin, and couplings. Note that these values are input as
$\text{GeV}^{-2}$ , not$\text{cm}^2$ . You can use$c_i^\tau \approx \sqrt{4\pi\sigma},/,(\mu\hbar c)$ to get a rough translation from cross section to coupling. Also, any combination of couplings can be run at once, including the isoscalar and isovector ones. - Finally, the option to change the supernova parameters, including the local dark matter density, the ejecta mass, the local Interstellar Medium (ISM) density, the distance to the supernova, the total energy released by the supernova, the age of the supernova, the supernova type (either 1 for a TypeIa, 2 for TypeII), the pre-supernova stellar wind, and the pre-supernova stellar mass loss rate. The values we used can be found in arXiv:2210.09448.
- The rest of the script calls and runs Super Capt'n General. Feel free to modify it to suit your needs.
To facilitate modification of the code that performs the velocity calculation, it is summarised here.
The first function call is made to supercaptn_init.
This function initialises some data for the actual calculations.
It loads in all input values and converts to internal natural units.
It also loads the choice of nova into a shared variable that can be read later.
It then loads all the constants of the W functions ($W_{m}^{\tau\tau^\prime}(y)$) (see arXiv:1501.03729) into an array to be quickly read out during calculation.
It then creates a zeroed out
The next call is to populate_array_super, which can populate the array of coupling parameters.
This converts from the coupling number and isospin to the internal array indices and does error checking on the numbers chosen.
Finally supercaptn is called, which does the calculation to find the number of dark matter particles scattered for a given dark matter mass and dark matter velocity at Earth.
It first loads in the dark matter mass, velocity, and spin.
It then finds the time the dark matter scattered, and breaks out if the dark matter would have scattered before the explosion.
Next it zeros out an array of prefactors that correspond to factors that appear as
This is a module that contains useful shared parameters and functions used in the calculation. It has parameters like physical constants, isotope information, and initialisation of shared parameters and arrays. It contains the calculation for the shockwave expansion radius and velocity. It also contains generalised form factor integrals (GFFIs), which are from arXiv:1504.04378.