Places system described by Mhe, M2, Apre, epre and position r(R,galphi,galcosth) in galaxy model gal Applies SNkick Vkick and mass loss Mhe-Mns to obtain Apost, epost, and SN-imparted systemic velocity V
-
class
astro_traj.system.
System
(gal, R, Mns, M2, Mhe, Apre, epre, d, Vkick, sys_flag=None, galphi=None, galcosth=None, omega=None, phi=None, costh=None)[source]¶ Places system described by Mhe, M2, Apre, epre and position r(R,galphi,galcosth) in galaxy model gal
Applies SNkick Vkick and mass loss Mhe-Mns to obtain Apost, epost, and SN-imparted systemic velocity V
Methods
SN
()Mhe lies on origin moving in direction of positive y axis, M2 on negative X axis, Z completes right-handed coordinate system check_success
(offset[, uncer])# uncertainty in offset is 0.5 kpc by default doMotion
([backend, NSTEPS, MAX_STEP, RTOL])Second order equation ma=-grad(U) converted to 2 sets of first order equations, with e.g. energy_check
([E_thresh])Compare total energy of first and last steps to ensure conservation getVcirc
(X, Y, Z)Calculate circular velocity at X,Y,Z given potential. save_evolution
(filename)If called, will save the evolution of a given system for plotting orbital trajectory through galaxy setTmerge
([Tmin, Tmax])Calculate the inspiral time for the binary after the supernova using formulae from Peters 1964 setVxyz_0
()Here, vphi and vcosth are as galphi and galcosth, and give random direction for V_sys postSN setXYZ_0
()Convert from spherical inputs to Cartesian coordinates write_data
()# [M2, Mns, Mhe, Apre, Apost, epre, epost, d, R, galcosth, galphi, Vkick, Tmerge, Rmerge, Rmerge_proj, Vfinal, flag] -
SN
()[source]¶ Mhe lies on origin moving in direction of positive y axis, M2 on negative X axis, Z completes right-handed coordinate system
theta: angle between preSN He core velocity relative to M2 (i.e. the positive y axis) and the kick velocity phi: angle between Z axis and projection of kick onto X-Z plane
Vr is velocity of preSN He core relative to M2, directed along the positive y axis
Vkick is kick velocity with components Vkx, Vky, Vkz in the above coordinate system V_sys is the resulting center of mass velocity of the system IN THE TRANSLATED COM FRAME, imparted by the SN
Paper reference:
- Kalogera 1996: http://iopscience.iop.org/article/10.1086/177974/meta
- We use Eq 1, 3, 4, and 34: giving Vr, Apost, epost, and (Vsx,Vsy,Vsz) respectively Also see Fig 1 in that paper for coordinate system
-
check_success
(offset, uncer=0.5)[source]¶ # uncertainty in offset is 0.5 kpc by default # assume that the observer is looking down the z-axis (so the offset will be the projection of the binary on the x-y plane)
-
doMotion
(backend='dopri5', NSTEPS=10000000000000.0, MAX_STEP=31557600000000.0, RTOL=1e-11)[source]¶ Second order equation ma=-grad(U) converted to 2 sets of first order equations, with e.g. x1 = x
x2 = vx
x1dot = vx = x2 x2dot = ax = -grad_x(U)/m
-
energy_check
(E_thresh=0.001)[source]¶ Compare total energy of first and last steps to ensure conservation Ek, Ep are kinetic and potential energy
-
getVcirc
(X, Y, Z)[source]¶ Calculate circular velocity at X,Y,Z given potential. From mv2/r = -grad_r(U) FIXME: Will have to change for spiral potential, as circular velocity is assumed to be within the disk
-
save_evolution
(filename)[source]¶ If called, will save the evolution of a given system for plotting orbital trajectory through galaxy Format: [t, X, Y, Z, Vx, Vy, Vz] The initial values are saved as the first item of the file
-
setTmerge
(Tmin=0.0, Tmax=10.0)[source]¶ Calculate the inspiral time for the binary after the supernova using formulae from Peters 1964
-
setVxyz_0
()[source]¶ Here, vphi and vcosth are as galphi and galcosth, and give random direction for V_sys postSN
Initially, preSN circular trajectory Vp is the velocity vector of magnitude getVcirc, tangential to the sphere of radius R, in the R-Z plane
We get the specific circular trajectory that we want by rotating this through angle omega while staying tangential to the sphere, giving Vp_rot (Vp_rot = Vp cos(omega) + (k x Vp) sin(omega) where k is unit vector r/R where r=(x,y,z)
Specify flag=circ_test to set V0 without adding the SN-imparted velocity Specify flag=vkick_test to set the initial galactic velocity to 0, so that the velocity of the system is due solely to the supernova
-