hamers / mse

Multiple Stellar Evolution -- A Population Synthesis Code for Multiple-Star Systems
GNU General Public License v3.0
9 stars 4 forks source link

apsidal_motion_constant.cpp -- ERROR #5

Closed pavanvyn closed 3 years ago

pavanvyn commented 3 years ago

I have been running my custom code for randomly generated parameters (while checking for proper values of semi-major axes, masses and metallicities). The following parameters, are thus, very random -

configuration = "[2,2]"
N_bodies = 4
masses = [7.692620887411417, 42.76798396758461, 40.64553793350696, 12.057569043812478]
metallicities = [0.02649954172569116, 0.012814905599314315, 0.002473080642553742, 0.007022191275437818]
semimajor_axes = [5.050106477176275, 144.261944580885, 1215.5796316956648]
eccentricities =  [0.23987555486249884, 0.49304674164813916, 0.11993551412336234, 0.26816414144104966]
inclinations = [2.643398245158917, 1.219303456138767, 1.6285303742502966]
longitudes_of_ascending_node = [0.31748334346942136, 4.233797061352631, 2.474914893060231]
arguments_of_pericentre = [2.643398245158917, 1.219303456138767, 1.6285303742502966]
tend = 100000000.0
N_steps = 5000
stellar_types = []
object_types=[]

I get an error in the result. The last few lines are as follows -

============================= Printing system; N=5; integration_flag=0 size = 5 index 1 -- body -- parent 5 m 34.364326215942668 r 4.4733 st 2 mc 13.5133 minit 38.4782 menv 1e-10 epoch -237698 age 5.24738e+06 rc 0.00523881 renv 4.64913e-13 lum 106.562 Spin_freq 3.89307 Omega_crit 3.89307 index 2 -- body -- parent 4 m 38.957624084151227 r 0.138984 st 1 mc 0 minit 38.9573 menv 1e-10 epoch -95655.7 age 5.10534e+06 rc 0 renv 4.64913e-13 lum 125.642 Spin_freq 140.422 Omega_crit 756.886 index 3 -- body -- parent 4 m 12.044496890932491 r 0.02039 st 1 mc 0 minit 12.0445 menv 1e-10 epoch -4656.5 age 5.01434e+06 rc 0 renv 4.64913e-13 lum 3.11482 Spin_freq 2318.42 Omega_crit 7489.43 index 4 -- binary -- parent 5 child1 2 child2 3 m 51.0021 a 149.37 e 0.899173 rp 15.0605 index 5 -- binary -- parent -1 child1 1 child2 4 m 85.3664 a 2447.84 e 0.414925 rp 1432.17 apsidal_motion_constant.cpp -- ERROR: AMC is -0.00142689 index 2 kw 1 m 38.9576 age 5.10534e+06 (END)

hamers commented 3 years ago

Problem was that a merger occurred, and the apsidal motion constant routine consequently failed. This should now be fixed (5bb40834b5c3916db760230d9d9533d03bd329af).