Open scottcoughlin2014 opened 3 years ago
diff --git a/include/bse_wrap/bse_wrap.h b/include/bse_wrap/bse_wrap.h
index 9dc5962..8a7be54 100644
--- a/include/bse_wrap/bse_wrap.h
+++ b/include/bse_wrap/bse_wrap.h
@@ -181,7 +181,7 @@ extern struct { int idum2, iy, ir[32]; } rand2_;
extern struct { long long int state[4]; int first;} taus113state_;
#endif
extern struct { int ktype[15][15]; } types_;
-extern struct { int tflag, ifflag, remnantflag, wdflag, bhflag, windflag, qcflag, eddlimflag, bhspinflag, aic, rejuvflag, htpmb, st_cr, st_tide, bdecayfac, grflag; } flags_;
+extern struct { int tflag, ifflag, remnantflag, wdflag, bhflag, windflag, qcflag, eddlimflag, bhspinflag, aic, rejuvflag, htpmb, st_cr, st_tide, bdecayfac, grflag, bhms_coll_flag; } flags_;
extern struct { int ceflag,cekickflag,cemergeflag,cehestarflag,ussn; } ceflags_;
extern struct { int pisn_track[2]; } trackers_;
extern struct { double zsun; } metvars_;
@@ -213,6 +213,7 @@ void bse_set_eddlimflag(int eddlimflag); /* Sets wind prescription (0=BSE, 1=Sta
// helium core mass of the merger product at the base of the giant branch
void bse_set_rejuvflag(int rejuvflag);
void bse_set_grflag(int grflag);
+void bse_set_bhms_coll_flag(int bhms_coll_flag);
void bse_set_kickflag(int kickflag);
void bse_set_using_cmc(void);
void bse_set_pisn(double pisn); /* Sets Pair-instability pulsations and supernoa */
diff --git a/include/cmc/cmc.h b/include/cmc/cmc.h
index a23a7e4..f216f12 100644
--- a/include/cmc/cmc.h
+++ b/include/cmc/cmc.h
@@ -1287,6 +1287,11 @@ typedef struct{
* @brief bhspinflag sets the spin magnitude for BH merger kicks(0=[BHSPINMAG], 1=Uniform(0-1)*[BHSPINMAG], 2=Belczynski2017)
*/
int BSE_BHSPINFLAG;
+#define PARAMDOC_BSE_BHMS_COLL_FLAG "If set to 1 then if BH+star collision and if Mstar > Mbh, do not destroy the star"
+/**
+* @brief If set to 1 then if BH+star collision and if Mstar > Mbh, do not destroy the star
+*/
+ int BSE_BHMS_COLL_FLAG;
#define PARAMDOC_BH_RADIUS_MULTIPLYER "Factor to multiply the radii of BHs by for collisions (default is 5, since PN breaks down at ~10M)"
/**
* @brief Factor to multiply the rdii of BHs by when they're being integrated by fewbody (saves times for BH collisions). The default is the Schwarzschild ISCO
diff --git a/include/cmc/cmc_vars.h b/include/cmc/cmc_vars.h
index 7cc96d6..1a6bb9f 100644
--- a/include/cmc/cmc_vars.h
+++ b/include/cmc/cmc_vars.h
@@ -93,7 +93,7 @@ _EXTERN_ long esc_bhstar_tot, esc_bh01_tot, esc_bh26_tot, esc_bh7_tot, esc_bh89_
_EXTERN_ double fb_bh, esc_fb_bh, esc_fb_bh_tot;
_EXTERN_ FILE *bhsummaryfile, *escbhsummaryfile, *newbhfile, *bhmergerfile;
/* BSE input file parameters */
-_EXTERN_ int BSE_CEMERGEFLAG, BSE_CEKICKFLAG, BSE_CEHESTARFLAG, BSE_CEFLAG, BSE_TFLAG, BSE_IFFLAG, BSE_WDFLAG, BSE_BHFLAG, BSE_BHSPINFLAG, BSE_REMNANTFLAG, BSE_IDUM, BSE_WINDFLAG, BSE_QCFLAG, BSE_EDDLIMFLAG, BSE_AIC, BSE_BDECAYFAC, BSE_HTPMB, BSE_ST_TIDE, BSE_ST_CR, BSE_REJUVFLAG, BSE_USSN, BSE_KICKFLAG, BSE_GRFLAG;
+_EXTERN_ int BSE_CEMERGEFLAG, BSE_CEKICKFLAG, BSE_CEHESTARFLAG, BSE_CEFLAG, BSE_TFLAG, BSE_IFFLAG, BSE_WDFLAG, BSE_BHFLAG, BSE_BHSPINFLAG, BSE_REMNANTFLAG, BSE_IDUM, BSE_WINDFLAG, BSE_QCFLAG, BSE_EDDLIMFLAG, BSE_AIC, BSE_BDECAYFAC, BSE_HTPMB, BSE_ST_TIDE, BSE_ST_CR, BSE_REJUVFLAG, BSE_USSN, BSE_KICKFLAG, BSE_GRFLAG, BSE_BHMS_COLL_FLAG;
_EXTERN_ double BSE_POLAR_KICK_ANGLE, BH_RADIUS_MULTIPLYER, BSE_BHSPINMAG;
_EXTERN_ double BSE_PTS1, BSE_PTS2, BSE_PTS3, BSE_NETA, BSE_BWIND, BSE_HEWIND, BSE_ALPHA1, BSE_LAMBDAF, BSE_MXNS, BSE_BCONST, BSE_CK, BSE_REJUV_FAC, BSE_SIGMA, BSE_SIGMADIV, BSE_BHSIGMAFRAC, BSE_BETA, BSE_EDDFAC, BSE_GAMMA, BSE_XI, BSE_ACC2, BSE_PISN, BSE_EPSNOV, BSE_ECSN, BSE_ECSN_MLOW, BSE_REMBAR_MASSLOSS, BSE_ZSUN;
/* binary stuff */
diff --git a/src/bse_wrap/bse/COSMIC b/src/bse_wrap/bse/COSMIC
index ca1b352..de1a6a2 160000
--- a/src/bse_wrap/bse/COSMIC
+++ b/src/bse_wrap/bse/COSMIC
@@ -1 +1 @@
-Subproject commit ca1b352ab9d062c851301bb98f2f8c587e5841c4
+Subproject commit de1a6a2c3d6249778949eb7f186659ebdaa3da7e
diff --git a/src/bse_wrap/bse_wrap.c b/src/bse_wrap/bse_wrap.c
index 7c41a8a..99a8c98 100644
--- a/src/bse_wrap/bse_wrap.c
+++ b/src/bse_wrap/bse_wrap.c
@@ -640,6 +640,7 @@ void bse_set_ifflag(int ifflag) { flags_.ifflag = ifflag; }
void bse_set_wdflag(int wdflag) { flags_.wdflag = wdflag; }
void bse_set_bhflag(int bhflag) { flags_.bhflag = bhflag; }
void bse_set_bhspinflag(int bhspinflag) { flags_.bhspinflag = bhspinflag; }
+void bse_set_bhms_coll_flag(int bhms_coll_flag) { flags_.bhms_coll_flag = bhms_coll_flag; }
void bse_set_bhspinmag(double bhspinmag) { snvars_.bhspinmag = bhspinmag; }
void bse_set_remnantflag(int remnantflag) { flags_.remnantflag = remnantflag; }
void bse_set_mxns(double mxns) { snvars_.mxns = mxns;}
diff --git a/src/cmc/cmc_io.c b/src/cmc/cmc_io.c
index 1868717..70c9cad 100644
--- a/src/cmc/cmc_io.c
+++ b/src/cmc/cmc_io.c
@@ -1600,6 +1600,10 @@ if(myid==0) {
PRINT_PARSED(PARAMDOC_BSE_BHSPINFLAG);
sscanf(values, "%i", &BSE_BHSPINFLAG);
parsed.BSE_BHSPINFLAG = 1;
+ } else if (strcmp(parameter_name, "BHMS_COLL_FLAG")== 0) {
+ PRINT_PARSED(PARAMDOC_BSE_BHMS_COLL_FLAG);
+ sscanf(values, "%i", &BSE_BHMS_COLL_FLAG);
+ parsed.BSE_BHMS_COLL_FLAG = 1;
} else if (strcmp(parameter_name, "EDDFAC")== 0) {
PRINT_PARSED(PARAMDOC_BSE_EDDFAC);
sscanf(values, "%lf", &BSE_EDDFAC);
@@ -1970,6 +1974,11 @@ if(myid==0) {
// default=0.0
CHECK_PARSED(BSE_BHSPINMAG, 0.0, PARAMDOC_BSE_BHSPINMAG);
+ // bhms_coll_flag
+ // If set to 1 then if BH+star collision and if Mstar > Mbh, do not destroy the star
+ // default = 0
+ CHECK_PARSED(BSE_BHMS_COLL_FLAG, 0, PARAMDOC_BSE_BHMS_COLL_FLAG);
+
//////////////////////////////////////////////////////
////// MASS TRANSFER FLAGS //////
//////////////////////////////////////////////////////
diff --git a/src/cmc/cmc_stellar_evolution.c b/src/cmc/cmc_stellar_evolution.c
index 0534d75..0ebfa22 100644
--- a/src/cmc/cmc_stellar_evolution.c
+++ b/src/cmc/cmc_stellar_evolution.c
@@ -51,6 +51,7 @@ void restart_stellar_evolution(void){
bse_set_rembar_massloss(BSE_REMBAR_MASSLOSS);
bse_set_remnantflag(BSE_REMNANTFLAG);
bse_set_bhspinflag(BSE_BHSPINFLAG);
+ bse_set_bhms_coll_flag(BSE_BHMS_COLL_FLAG);
bse_set_bhspinmag(BSE_BHSPINMAG);
bse_set_mxns(BSE_MXNS); //3 if remnantflag=1 or 2, 1.8 if remnantflag=0 (see evolv2.f)
bse_set_bconst(BSE_BCONST);
@@ -142,6 +143,7 @@ void stellar_evolution_init(void){
bse_set_rembar_massloss(BSE_REMBAR_MASSLOSS);
bse_set_remnantflag(BSE_REMNANTFLAG);
bse_set_bhspinflag(BSE_BHSPINFLAG);
+ bse_set_bhms_coll_flag(BSE_BHMS_COLL_FLAG);
bse_set_bhspinmag(BSE_BHSPINMAG);
bse_set_mxns(BSE_MXNS); //3 if remnantflag=1 or 2, 1.8 if remnantflag=0 (see evolv2.f)
bse_set_bconst(BSE_BCONST);
diff --git a/src/utils/addbinaries/addbinaries.c b/src/utils/addbinaries/addbinaries.c
index 99b78f6..21db10b 100644
--- a/src/utils/addbinaries/addbinaries.c
+++ b/src/utils/addbinaries/addbinaries.c
@@ -163,6 +163,7 @@ void assign_binaries(cmc_fits_data_t *cfd, long Nbin, int limits, double peak_a,
int BSE_QCFLAG= 2;
double BSE_SIGMA= 265.0;
int BSE_BHFLAG= 1;
+ int BSE_BHMS_COLL_FLAG= 0;
double BSE_ECSN= 2.5;
double BSE_ECSN_MLOW= 1.4;
double BSE_SIGMADIV= -20.0;
@@ -228,6 +229,7 @@ void assign_binaries(cmc_fits_data_t *cfd, long Nbin, int limits, double peak_a,
bse_set_ifflag(BSE_IFFLAG);
bse_set_wdflag(BSE_WDFLAG);
bse_set_bhflag(BSE_BHFLAG);
+ bse_set_bhms_coll_flag(BSE_BHMS_COLL_FLAG);
bse_set_remnantflag(BSE_REMNANTFLAG);
bse_set_grflag(BSE_GRFLAG);
bse_set_kickflag(BSE_KICKFLAG);
diff --git a/src/utils/setstellar/setstellar.c b/src/utils/setstellar/setstellar.c
index 7333848..8fa7e04 100644
--- a/src/utils/setstellar/setstellar.c
+++ b/src/utils/setstellar/setstellar.c
@@ -70,6 +70,7 @@ void stellar_evolve(cmc_fits_data_t *cfd)
int BSE_QCFLAG= 2;
double BSE_SIGMA= 265.0;
int BSE_BHFLAG= 1;
+ int BSE_BHMS_COLL_FLAG= 0;
double BSE_ECSN= 2.5;
double BSE_ECSN_MLOW= 1.4;
double BSE_SIGMADIV= -20.0;
@@ -135,6 +136,7 @@ void stellar_evolve(cmc_fits_data_t *cfd)
bse_set_ifflag(BSE_IFFLAG);
bse_set_wdflag(BSE_WDFLAG);
bse_set_bhflag(BSE_BHFLAG);
+ bse_set_bhms_coll_flag(BSE_BHMS_COLL_FLAG);
bse_set_grflag(BSE_GRFLAG);
bse_set_kickflag(BSE_KICKFLAG);
bse_set_zsun(BSE_ZSUN);
diff --git a/cosmic/evolve.py b/cosmic/evolve.py
index 75cfd83..f75b9d7 100644
--- a/cosmic/evolve.py
+++ b/cosmic/evolve.py
@@ -74,7 +74,7 @@ else:
INITIAL_CONDITIONS_PASS_COLUMNS = initialbinarytable.INITIAL_CONDITIONS_COLUMNS.copy()
INITIAL_CONDITIONS_BSE_COLUMNS = ['neta', 'bwind', 'hewind', 'alpha1', 'lambdaf',
- 'ceflag', 'tflag', 'ifflag', 'wdflag', 'pisn', 'bhflag', 'remnantflag', 'grflag',
+ 'ceflag', 'tflag', 'ifflag', 'wdflag', 'pisn', 'bhflag', 'remnantflag', 'grflag','bhms_coll_flag',
'cekickflag', 'cemergeflag', 'cehestarflag',
'mxns', 'pts1', 'pts2', 'pts3',
'ecsn', 'ecsn_mlow', 'aic', 'ussn', 'sigma', 'sigmadiv', 'bhsigmafrac', 'polar_kick_angle',
@@ -338,6 +338,7 @@ class Evolve(object):
_evolvebin.ceflags.cemergeflag = f['cemergeflag']
_evolvebin.ceflags.cehestarflag = f['cehestarflag']
_evolvebin.flags.grflag = f['grflag']
+ _evolvebin.flags.bhms_coll_flag = f['bhms_coll_flag']
_evolvebin.snvars.mxns = f['mxns']
_evolvebin.points.pts1 = f['pts1']
_evolvebin.points.pts2 = f['pts2']
@@ -440,6 +441,7 @@ class Evolve(object):
_evolvebin.ceflags.cemergeflag = f[i]['cemergeflag']
_evolvebin.ceflags.cehestarflag = f[i]['cehestarflag']
_evolvebin.flags.grflag = f[i]['grflag']
+ _evolvebin.flags.bhms_coll_flag = f[i]['bhms_coll_flag']
_evolvebin.snvars.mxns = f[i]['mxns']
_evolvebin.points.pts1 = f[i]['pts1']
_evolvebin.points.pts2 = f[i]['pts2']
diff --git a/cosmic/src/benchmarkevolv2.f b/cosmic/src/benchmarkevolv2.f
index d6ba042..6441aac 100644
--- a/cosmic/src/benchmarkevolv2.f
+++ b/cosmic/src/benchmarkevolv2.f
@@ -31,6 +31,7 @@
bhspin = 0.0; tphys = 0.0
zpars = 0.0; kick_info = 0.0
+ bhms_coll_flag = 0
zsun = 0.02; neta = 0.5; bwind = 0.0; hewind = 1.0
alpha1 = 1.0; lambdaf = 0.5; ceflag = 0
tflag = 1; ifflag = 0; wdflag = 0
@@ -68,6 +69,7 @@
bhspin = 0.d0; tphys = 0.d0
zpars = 0.d0; kick_info = 0.d0
+ bhms_coll_flag = 0
zsun=0.02; neta = 0.5; bwind = 0.0; hewind = 1.0
alpha1 = 1.0; lambdaf = 0.5; ceflag = 0
tflag = 1; ifflag = 0; wdflag = 0
diff --git a/cosmic/src/const_bse.h b/cosmic/src/const_bse.h
index 404e293..a9d0e19 100644
--- a/cosmic/src/const_bse.h
+++ b/cosmic/src/const_bse.h
@@ -9,10 +9,11 @@
COMMON /TYPES/ ktype
INTEGER tflag,ifflag,remnantflag,wdflag,bhflag,windflag,qcflag
INTEGER eddlimflag,bhspinflag,aic,rejuvflag
- INTEGER htpmb,ST_cr,ST_tide,bdecayfac,grflag
+ INTEGER htpmb,ST_cr,ST_tide,bdecayfac,grflag,bhms_coll_flag
COMMON /FLAGS/ tflag,ifflag,remnantflag,wdflag,bhflag,windflag,
& qcflag,eddlimflag,bhspinflag,aic,rejuvflag,
- & htpmb,ST_cr,ST_tide,bdecayfac,grflag
+ & htpmb,ST_cr,ST_tide,bdecayfac,grflag,
+ & bhms_coll_flag
INTEGER ceflag,cekickflag,cemergeflag,cehestarflag,ussn
COMMON /CEFLAGS/ ceflag,cekickflag,cemergeflag,cehestarflag,ussn
INTEGER pisn_track(2)
diff --git a/cosmic/src/mix.f b/cosmic/src/mix.f
index fee72c0..81d3afa 100644
--- a/cosmic/src/mix.f
+++ b/cosmic/src/mix.f
@@ -140,6 +140,15 @@ C ENDIF
KW = 1
M03 = M3
ENDIF
+
+ IF(bhms_coll_flag.eq.1)THEN
+ IF(K1.EQ.14.AND.K2.LT.10.AND.M2.GT.M1)THEN
+ KW = K2
+ M03 = M2
+ M3 = M2
+ AGE3 = AGE2
+ ENDIF
+ ENDIF
*
* Put the result in *1.
*
diff --git a/cosmic/tests/data/Params.ini b/cosmic/tests/data/Params.ini
index 3c0b678..898b9f1 100644
--- a/cosmic/tests/data/Params.ini
+++ b/cosmic/tests/data/Params.ini
@@ -422,6 +422,11 @@ rejuv_fac=1.0
; default=1
rejuvflag=1
+; bhms_coll_flag
+; If set to 1 then if BH+star collision and if Mstar > Mbh, do not destroy the star
+; default = 0
+bhms_coll_flag=0
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; MAGNETIC BRAKING FLAGS ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/cosmic/tests/data/initial_conditions_for_testing.hdf5 b/cosmic/tests/data/initial_conditions_for_testing.hdf5
index be5fc13..366263c 100644
Binary files a/cosmic/tests/data/initial_conditions_for_testing.hdf5 and b/cosmic/tests/data/initial_conditions_for_testing.hdf5 differ
diff --git a/docs/examples/index.rst b/docs/examples/index.rst
index 5a4669a..d713f0a 100644
--- a/docs/examples/index.rst
+++ b/docs/examples/index.rst
@@ -63,7 +63,7 @@ with `Breivik+2020 <https://ui.adsabs.harvard.edu/abs/2019arXiv191100903B/abstra
.. ipython::
- In [5]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'grflag' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014}
+ In [5]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'grflag' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014, 'bhms_coll_flag' : 0}
Once the binary is initialized and the BSE model is set, the system is evolved with the
the Evolve class, which calls the evolv2.f subroutine in the BSE source code.
@@ -124,7 +124,7 @@ You can also use the built in plotting function to see how the system evolves:
In [13]: single_binary = InitialBinaryTable.InitialBinaries(m1=85.543645, m2=84.99784, porb=446.795757, ecc=0.448872, tphysf=13700.0, kstar1=1, kstar2=1, metallicity=0.002)
- In [14]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag' : 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014}
+ In [14]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag' : 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014, 'bhms_coll_flag' : 0}
In [15]: fig = evolve_and_plot(single_binary, t_min=None, t_max=None, BSEDict=BSEDict, sys_obs={})
.. plot::
@@ -132,7 +132,7 @@ You can also use the built in plotting function to see how the system evolves:
from cosmic.sample.initialbinarytable import InitialBinaryTable
from cosmic.plotting import evolve_and_plot
single_binary = InitialBinaryTable.InitialBinaries(m1=85.543645, m2=84.99784, porb=446.795757, ecc=0.448872, tphysf=13700.0, kstar1=1, kstar2=1, metallicity=0.002)
- BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag' : 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014}
+ BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag' : 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014, 'bhms_coll_flag' : 0}
fig = evolve_and_plot(single_binary, t_min=None, t_max=None, BSEDict=BSEDict, sys_obs={})
@@ -148,7 +148,7 @@ In this case, all the action happens in the first few Myr, so let's specify a t_
from cosmic.sample.initialbinarytable import InitialBinaryTable
from cosmic.plotting import evolve_and_plot
single_binary = InitialBinaryTable.InitialBinaries(m1=85.543645, m2=84.99784, porb=446.795757, ecc=0.448872, tphysf=13700.0, kstar1=1, kstar2=1, metallicity=0.002)
- BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag' : 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014}
+ BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag' : 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014, 'bhms_coll_flag' : 0}
fig = evolve_and_plot(single_binary, t_min=None, t_max=6.0, BSEDict=BSEDict, sys_obs={})
*****************
@@ -202,7 +202,7 @@ progenitor, we expect most of the evolution to take place in the first ~60 Myr.
from cosmic.plotting import evolve_and_plot
import numpy as np
np.random.seed(5)
- BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag' : 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014}
+ BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag' : 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014, 'bhms_coll_flag' : 0}
binary_set = InitialBinaryTable.InitialBinaries(m1=[85.543645, 11.171469], m2=[84.99784, 9.67305], porb=[446.795757, 370.758343], ecc=[0.448872, 0.370], tphysf=[13700.0, 13700.0], kstar1=[1, 1], kstar2=[1, 1], metallicity=[0.002, 0.02])
fig = evolve_and_plot(binary_set, t_min=None, t_max=[6.0, 60.0], BSEDict=BSEDict, sys_obs={})
@@ -222,7 +222,7 @@ periods spaced evenly in log space.
In [17]: binary_grid = InitialBinaryTable.InitialBinaries(m1=np.ones(n_grid)*100.0, m2=np.ones(n_grid)*85.0, porb=np.logspace(3,5,n_grid), ecc=np.ones(n_grid)*0.65, tphysf=np.ones(n_grid)*13700.0, kstar1=np.ones(n_grid), kstar2=np.ones(n_grid), metallicity=np.ones(n_grid)*0.005)
- In [19]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag': 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014}
+ In [19]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'grflag': 1, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014, 'bhms_coll_flag' : 0}
In [18]: print(binary_grid)
@@ -246,7 +246,7 @@ First, print all time steps during mass transfer
In [16]: single_binary = InitialBinaryTable.InitialBinaries(m1=7.806106, m2=5.381412, porb=2858.942021, ecc=0.601408, tphysf=13700.0, kstar1=1, kstar2=1, metallicity=0.02)
- In [16]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 3.0, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [1000.0,1000.0,1000.0,1000.0,1000.0,1000.0,1000.0,1000.0,1000.0, 1000.0,1000.0,1000.0,1000.0,1000.0,1000.0,1000.0],'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'grflag' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014}
+ In [16]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 3.0, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [1000.0,1000.0,1000.0,1000.0,1000.0,1000.0,1000.0,1000.0,1000.0, 1000.0,1000.0,1000.0,1000.0,1000.0,1000.0,1000.0],'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'grflag' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014, 'bhms_coll_flag' : 0}
In [16]: bpp, bcm, initC, kick_info = Evolve.evolve(initialbinarytable=single_binary, BSEDict=BSEDict, timestep_conditions =[['RRLO_1>=1', 'dtp=0.0'], ['RRLO_2>=1', 'dtp=0.0']])
@@ -266,7 +266,7 @@ Finally, we show how to print a fine resolution only during the HMXRB stage of t
In [3]: single_binary = InitialBinaryTable.InitialBinaries(m1=85.543645, m2=84.99784, porb=446.795757, ecc=0.448872, tphysf=13700.0, kstar1=1, kstar2=1, metallicity=0.002)
- In [5]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'grflag' : 1, 'rembar_massloss' : 0.5, 'kickflag': 0, 'zsun' : 0.014}
+ In [5]: BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 2.5, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'grflag' : 1, 'rembar_massloss' : 0.5, 'kickflag': 0, 'zsun' : 0.014, 'bhms_coll_flag' : 0}
In [6]: bpp, bcm, initC, kick_info = Evolve.evolve(initialbinarytable=single_binary, BSEDict=BSEDict, timestep_conditions =[['kstar_1=14', 'kstar_2<10','dtp=0.1'], ['kstar_2=14', 'kstar_1<10','dtp=0.1']])
@@ -282,7 +282,7 @@ Below we provide an example of the same evolutionary track
started from the beginning and three different points in the evolution, once sometime between the beginning and the first object going supernova, once between the first and second supernova, and finally after both supernova.::
single_binary = InitialBinaryTable.InitialBinaries(m1=25.543645, m2=20.99784, porb=446.795757, ecc=0.448872, tphysf=13700.0, kstar1=1, kstar2=1, metallicity=0.002)
- BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 3.0, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'randomseed' : -1235453, 'grflag' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014, 'grflag' : 1}
+ BSEDict = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, 'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, 'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 3.0, 'beta': -1.0, 'tflag': 1, 'acc2': 1.5, 'remnantflag': 3, 'ceflag': 0, 'eddfac': 1.0, 'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, 'natal_kick_array' : [[-100.0,-100.0,-100.0,-100.0,0.0], [-100.0,-100.0,-100.0,-100.0,0.0]], 'bhsigmafrac' : 1.0, 'polar_kick_angle' : 90, 'qcrit_array' : [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], 'cekickflag' : 2, 'cehestarflag' : 0, 'cemergeflag' : 0, 'ecsn' : 2.5, 'ecsn_mlow' : 1.4, 'aic' : 1, 'ussn' : 0, 'sigmadiv' :-20.0, 'qcflag' : 4, 'eddlimflag' : 0, 'fprimc_array' : [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], 'bhspinflag' : 0, 'bhspinmag' : 0.0, 'rejuv_fac' : 1.0, 'rejuvflag' : 0, 'htpmb' : 1, 'ST_cr' : 1, 'ST_tide' : 0, 'bdecayfac' : 1, 'randomseed' : -1235453, 'grflag' : 1, 'rembar_massloss' : 0.5, 'kickflag' : 0, 'zsun' : 0.014, 'grflag' : 1, 'bhms_coll_flag' : 0}
for i in [3, 7, 11]:
bpp, bcm, initC, kick_info = Evolve.evolve(initialbinarytable=single_binary, BSEDict=BSEDict)
for column in bpp.columns:
diff --git a/examples/Params.ini b/examples/Params.ini
index 7f37930..ec0c6b6 100644
--- a/examples/Params.ini
+++ b/examples/Params.ini
@@ -445,6 +445,11 @@ rejuv_fac = 1.0
; default = 0
rejuvflag = 0
+; bhms_coll_flag
+; If set to 1 then if BH+star collision and if Mstar > Mbh, do not destroy the star
+; default = 0
+bhms_coll_flag=0
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; MAGNETIC BRAKING FLAGS ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
adding_bse_flag_to_cosmic.txt show_bse_flag_change.txt