Configuration files¶
Introduction¶
The cosmic-pop command-line executable cannot run without a configuration file. Each of the sections below lists inputs for COSMIC’s modified version of BSE. Each input has a description of the allowed values and an example of what that section might look like in the INI format; recommended default settings for many parameters are given after their description in boldface.
The buttons below link to the most recent stable and unstable default inifiles for COSMIC.
How to use this page¶
Reference guide - this page is a great reference for every setting available in COSMIC and explains each of the options.
Interactive config generator - it can also be used interactively to generate your very own configuration file or BSE settings dictionary for use in running COSMIC. In each of the following sections you can edit the values of the parameter and the files at the end of the page will update in turn for you to copy. Enjoy configuring COSMIC!
All available settings¶
Filters¶
Filters
Settings that filter the data returned by COSMIC simulations
binary_state
Filter for the final state of the binaries you wish to retain
Default: [0, 1]
timestep_conditions
Pick specific time resolutions to print at targeted stages of the binary evolution.
Default: dtp=None
Sampling¶
Sampling
Settings that change how the initial binary population is sampled
sampling_method
Select which models to use to generate an initial sample of binary parameters at Zero Age Main Sequence
Default: independent
primary_model
Model for sampling primary masses
[Only used when sampling_method = independent
]
Default: kroupa01
porb_model
Model for sampling orbital periods
[Only used when sampling_method = independent
]
Default: sana12
ecc_model
Model for sampling eccentricity
[Only used when sampling_method = independent
]
Default: sana12
qmin
Minimum mass ratio for sampling the secondary mass
[Only used when sampling_method = independent
]
Default: -1
m2_min
Minimum secondary mass for sampling
[Only used when sampling_method = independent
]
Default: 0.1
binfrac_model
Model for sampling binary fraction
[Only used when sampling_method = independent
]
Default: 0.5
SF_start
Sets the time in the past when star formation initiates in Myr.
Default: 13700.0
SF_duration
Sets the duration of constant star formation from ``SF_start`` in Myr.
Default: 0.0
metallicity
Sets the metallicity of the stellar population.
Default: 0.02
Convergence¶
Convergence
Settings that control the convergence of the simulation run with cosmic-pop
convergence_params
A list of parameters you would like to verify have converged to a single distribution shape when running cosmic-pop from the command line.
Default: [mass_1, mass_2, porb, ecc]
convergence_limits
Specifies limits for parameters included in the convergence_params
list.
Default: {}
pop_select
Selects the stage of the evolution at which you would like to check for convergence.
Default: formation
apply_convergence_limits
Whether to filter the binary population (including the bcm, bpp, initC, and kick_info DataFrames) to only contain the binaries that satisfy the constraints from convergence_limits.
Default: False
match
Provides the tolerance for the convergence calculation and is calculated as \({\rm match} = \log_{\rm 10} (1 - {\rm convergence})\)
Default: -5.0
Random Seed¶
Random Seed
Settings that control the random number generation used
seed
Sets the seed for the random number generator (for numpy.random.seed()
)
Default: 42
Binary physics¶
Binary physics
Settings that control the binary physics in the simulation
Timesteps
pts1
Sets the timestep modifier for main sequence stars (dtp *= pts1
)
Default: 0.001
pts2
Sets the timestep modifier for Giant Branch (GB, CHeB, AGB, HeGB) stars (dtp *= pts2
)
Default: 0.01
pts3
Sets the timestep modifier for HG, HeMS stars (dtp *= pts3
)
Default: 0.02
Metallicity
zsun
Sets the metallicity of the Sun which primarily affects stellar winds.
Default: 0.014
Stellar Winds
windflag
Selects the model for wind mass loss for each star
Default: 3
eddlimflag
Adjusts the dependence of mass loss on metallicity for stars near the Eddington limit (see Grafener+2011, Giacobbo+2018).
Default: 0
bwind
Binary enhanced mass loss parameter
Default: 0.0
hewind
Helium star mass loss parameter
Default: 0.5
beta
Wind velocity factor. \( v_{\rm wind}^2 \propto \beta\), see Hurley+2002, Eq. 9.
Default: 0.125
xi
Wind accretion efficiency factor, which gives the fraction of angular momentum lost via winds from the primary that transfers to the spin angular momentum of the companion.
Default: 0.5
acc2
Bondi-Hoyle wind accretion factor where the mean wind accretion rate onto the secondary is proportional to acc2
. See Hurley+2002, Eq. 6.
Default: 1.5
Common-envelope
Note: there are cases where a common envelope is forced regardless of the critical mass ratio for unstable mass transfer. In the following cases, a common envelope occurs regardless of the choices below:
- contact: the stellar radii go into contact (common for similar ZAMS systems)
- periapse contact: the periapse distance is smaller than either of the stellar radii (common for highly eccentric systems)
- core Roche overflow: either of the stellar radii overflow their component's Roche radius (in this case, mass transfer from the convective core is always dynamically unstable)
alpha1
Common-envelope efficiency parameter which scales the efficiency of transferring orbital energy to the envelope. See Hurley+2002, Eq. 71.
Default: 1.0
lambdaf
Binding energy factor for common envelope evolution. The initial binding energy of the stellar envelope is proportional to \(1 / \lambda\). See Hurley+2002, Eq. 69.
Default: 0.0
ceflag
Selects the model to set the initial orbital energy (choose whether to use total mass of the stars instead of the core masses)
Default: 1
cekickflag
Selects which mass and separation values to use when a supernova occurs during the CE and a kick needs to be applied.
Default: 2
cemergeflag
Determines whether stars that begin a CE without a distinct core-envelope boundary automatically lead to merger in a CE. These systems include: kstars = [0,1,2,7,8,10,11,12].
Default: 1
cehestarflag
Uses fitting formulae from Tauris+2015 for evolving RLO systems with a helium star donor and compact object accretor. NOTE: this flag will override cekickflag
if set
Default: 0
qcflag
Selects model to determine critical mass ratios for the onset of unstable mass transfer and/or a common envelope during RLO. NOTE: this is overridden by qcrit_array
if any of its values are non-zero.
Default: 1
qcrit_array
User-defined values for critical mass ratios for the onset of unstable mass transfer and a common envelope during RLOF.
Default: [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]
Natal kicks
kickflag
Sets the particular natal kick prescription to use. Note that sigmadiv
, bhflag
, bhsigmafrac
, aic
, and ussn
, which are described below, are only used when abs(kickflag)=1
. Positive values use the Pfahl+2002 prescription for handling natal kicks.
Default: 1
sigma
Sets the dispersion in the Maxwellian for the SN kick velocity in km/s
Default: 265.0
bhflag
Sets the model for how SN kicks are applied to BHs, where bhflag != 0 allows for velocity kick at BH formation
Default: 1
bhsigmafrac
Sets a fractional modification which scales down sigma for BHs. This works in addition to whatever is chosen for bhflag, and is applied to sigma before the bhflag prescriptions are applied
Default: 1.0
sigmadiv
Sets the modified ECSN kick strength
Default: -20.0
ecsn
Allows for electron capture SNe and sets the maximum He-star mass (at core helium depletion) that will result in an ECSN
Default: 2.25
ecsn_low
Sets the low end of the ECSN mass range
Default: 1.6
aic
Sets the model for accretion induced collapse SN natal kicks
Default: 1
ussn
Reduces kicks according to the sigmadiv selection for ultra-stripped supernovae, assumed to happen if a He-star undergoes a CE with a compact companion
Default: 1
pisn
Allows for (pulsational) pair instability supernovae and sets either the model to use or the maximum mass of the remnant.
Default: -2
polar_kick_angle
Sets the opening angle of the SN kick relative to the pole of the exploding star
Default: 90.0
natal_kick_array
Array of dimensions (2,5) which takes user input values for the SN natal kick, where the first row corresponds to the first star and the second row corresponds to the second star and columns are: [vk, phi, theta, mean_anomaly, rand_seed].
Default: [[-100.0, -100.0, -100.0, -100.0, 0.0], [-100.0, -100.0, -100.0, -100.0, 0.0]]
Remnant mass
remnantflag
Determines the remnant mass prescription used for NSs and BHs.
Default: 4
mxns
Sets the boundary between the maximum NS mass and the minimum BH mass
Default: 3.0
rembar_massloss
Determines the prescriptions for mass conversion due to neutrino emission during the collapse of the proto-compact object
Default: 0.5
wd_mass_lim
Determines if the maximum white dwarf mass is limited to the chandraekhar mass during merger induced collapse
Default: 1
Remnant spin
bhspinflag
Uses different prescriptions for BH spin after formation
Default: 0
bhspinmag
Sets either the spin of all BHs or the upper limit of the uniform distribution for BH spins (see bhspinflag)
Default: 0.0
GR Orbital Decay
grflag
Turns on or off orbital decay due to gravitational wave emission
Default: 1
Mass transfer
eddfac
Eddington limit factor for mass transfer.
Default: 1
gamma
Angular momentum prescriptions for mass lost during Roche-lobe overflow at super-Eddington mass transfer rates
Default: -2
don_lim
Determines the rate of mass loss through Roche-lobe overflow mass transfer from the donor star
Default: -1
acc_lim
Limits the amount of mass accreted during Roche-lobe overflow
Default: -1
Tides
fprimc_array
Controls the scaling factor for convective tides. Each value in the array is set individually for its associated kstar. The relevant equation is Hurley+2002 Eq. 21.
Default: [2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0,2.0/21.0]
White dwarfs
ifflag
Activates the initial-final white dwarf mass relation from Han+1995 Equations 3, 4, and 5.
Default: 1
wdflag
Activates an alternate cooling law found in the description immediately following Equation 1 in Hurley & Shara 2003. Equation 1 gives the BSE default Mestel cooling law.
Default: 1
epsnov
Fraction of accreted matter retained in a nova eruption. This is relevant for accretion onto degenerate objects; see Section 2.6.6.2 in Hurley+2002.
Default: 0.001
Pulsars
bconst
Sets the magnetic field decay timescale for pulsars following Section 3 of Kiel+2008.
Default: 3000
ck
Sets the magnetic field decay timescale for pulsars following Section 3 of Kiel+2008.
Default: 1000
Mixing variables
rejuv_fac
Sets the mixing factor in main sequence star collisions. This is hard coded to 0.1 in the original BSE release and in Equation 80 of Hurley+2002 but can lead to extended main sequence lifetimes in some cases.
Default: 1.0
rejuvflag
Sets whether to use the orginal prescription for mixing of main-sequence stars (based on equation 80 of Hurley+2002) or whether to use the ratio of the pre-merger He core mass at the base of the giant branch to the merger product's He core mass at the base of the giant branch
Default: 0
bhms_coll_flag
If set to 1, then the star is not destroyed in a BH+star collision if \(M_{\rm star} > M_{\rm BH}\)
Default: 0
Magnetic Braking
htpmb
Activates different models for magnetic braking
Default: 1
Miscellaneous
ST_cr
Activates different convective vs radiative boundaries
Default: 1
rtmsflag
Flag for calculating the radius at the end of the main sequence.
Default: 0
Generated data¶
The following files are generated by the interactive configuration generator above. They are updated in real time as you change the values of the parameters above.
INI file¶
Use the buttons below to toggle whether to include explanatory comments in the INI file.
INIFILE HERE
Python BSE settings dictionary¶
BSE dictionary HERE