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

More errors #9

Closed pavanvyn closed 3 years ago

pavanvyn commented 3 years ago

I found more errors in certain configurations. Version 486ab3fed243001b92a7c82ca2558de56d3711ca

1)

configuration = "[2,2]"
N_bodies = 4
masses = [3.077097805465111, 15.839702359488674, 5.517510578935515, 2.3828930195118176]
metallicities = [0.01630303006890956, 0.01630303006890956, 0.01630303006890956, 0.01630303006890956]
semimajor_axes = [0.22431991892662603, 31.90022634843763, 6576.536305682837]
eccentricities = [0.7430836382128856, 0.5204313220275024, 0.9289400466733657]
inclinations = [1.7941748834200397, 1.1646898681822524, 1.2992456528220557]
arguments_of_pericentre = [5.987315439449751, 5.74661821195682, 0.9299369122614957]
longitudes_of_ascending_node = [0.5383802291327379, 5.087132778096285, 5.68592590161848]
tend = 1.000000E+08
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

This system gives the error -

ODE_tides.cpp -- FATAL ERROR: t_V is NaN
binary_index 4 star_index 0 companion_index 1
t_V -nan 
st 1
pr 1
M 3.1982
star->convective_envelope_mass 1e-10
m 15.6046
a -0.0556011469472139
e 1.76966042663074
rp 0.042794
R 0.00936525
star->convective_envelope_radius 4.64913e-13
star->luminosity 0.0292151
k_AM 0.00590012
=============================
Printing system; N=7; integration_flag=0 size = 7
index 0 -- body -- parent 4 m 3.198203953142868 r 0.00936525 st 1 mc 0 minit 15.6046 menv 1e-10 epoch 5.9257e+06 age 274305 rc 0 renv 4.64913e-13 lum 0.0292151 Spin_freq 12429.8 Omega_crit 12398.1
index 1 -- body -- parent 4 m 15.604590298397904 r 0.0362814 st 1 mc 0 minit 15.6046 menv 1e-10 epoch -1.93714e+06 age 8.13714e+06 rc 0 renv 4.64913e-13 lum 9.84024 Spin_freq 1834.33 Omega_crit 3591.54
index 2 -- body -- parent 5 m 5.517510578935515 r 0.0131999 st 1 mc 0 minit 5.51751 menv 1e-10 epoch -1.81365e+06 age 8.01366e+06 rc 0 renv 4.64913e-13 lum 0.217252 Spin_freq 3948.53 Omega_crit 9731.83
index 3 -- body -- parent 5 m 2.382893019511818 r 0.00795339 st 1 mc 0 minit 2.38289 menv 1e-10 epoch -1.81365e+06 age 8.01366e+06 rc 0 renv 4.64913e-13 lum 0.0093551 Spin_freq 4389.84 Omega_crit 13674.2
index 4 -- binary -- parent 6 child1 0 child2 1 m 18.8028 a -0.0556011 e 1.76966 rp 0.042794 
index 5 -- binary -- parent 6 child1 2 child2 3 m 7.9004 a 31.9015 e 0.512455 rp 15.5534 
index 6 -- binary -- parent -1 child1 4 child2 5 m 26.7032 a 6557.74 e 0.929059 rp 465.212

2)

configuration = "[2,2]"
N_bodies = 4
masses = [14.224950339314399, 0.8897139647426828, 13.94306058151649, 25.529234346782907]
metallicities = [0.016552486981039515, 0.016552486981039515, 0.016552486981039515, 0.016552486981039515]
semimajor_axes = [321.64856782898676, 13.781481292380843, 6610.827792364814]
eccentricities = [0.8341440727777816, 0.5671605191088954, 0.126947856450332]
inclinations = [1.2502977473560803, 2.219627718811098, 2.428346067703022]
arguments_of_pericentre = [5.854524108992268, 6.282864677583723, 1.6957614719421723]
longitudes_of_ascending_node = [1.8960677331378781, 1.0366560788684072, 2.8757182594407933]
tend = 1.000000E+08
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

This run gets killed after stalling for a while.

3)

configuration = "[2,2]"
N_bodies = 4
masses = [10.605765840906358, 12.808546742652963, 1.5973515434842434, 8.893001415954778]
metallicities = [0.014420010133190024, 0.014420010133190024, 0.014420010133190024, 0.014420010133190024]
semimajor_axes = [1.5036199933179712, 0.5811001991526038, 291.46590663564245]
eccentricities = [0.4438059792712014, 0.46105663564734384, 0.4221648585910908]
inclinations = [1.7748346856690747, 0.40983594087210423, 1.8404934917875604]
arguments_of_pericentre = [1.8700278727270907, 0.43102394164651825, 2.2149958071719147]
longitudes_of_ascending_node = [1.4589307864827417, 4.793613840703381, 0.7013812935222983]
tend = 1.000000E+08
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

This system gives the error -

binary_evolution.cpp -- handle_mass_transfer_cases -- ERROR: t_MT = nan; a 1.51987 e 0.46048 R_Lc 0.599562 x 1.8535 E_0 nan 

4)

configuration = "[2,2]"
N_bodies = 4
masses = [24.028002450633135, 5.424563409803646, 2.761589046240006, 12.75282280725989]
metallicities = [0.013879815952003946, 0.013879815952003946, 0.013879815952003946, 0.013879815952003946]
semimajor_axes = [25.422147872812605, 3.0990529280790575, 2054.9262925007934]
eccentricities = [0.727431546566552, 0.5610129004052001, 0.8752639158022109]
inclinations = [0.915042492257424, 0.08114248791422286, 0.8029112225963015]
arguments_of_pericentre = [2.6041072099556115, 0.8010991006190188, 5.281902603019346]
longitudes_of_ascending_node = [0.37547007211639055, 2.2008189035172423, 5.778884167237088]
tend = 1.000000E+08
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

This run, for some reason is not recognizing the Particle object's attributes - luminosity, stellar_types, radius, X, Y, Z, etc. However, it does run fully and gives the final masses.

hamers commented 3 years ago

These issues should now have been resolved (81206ba0b4f9a45cfb2833df51e06a049503efa3).

Note for the record: cases 2, 3 and 4 occurred only with 10x the default stellar number density (0.1 pc^{-3}).

pavanvyn commented 3 years ago

Version 81206ba0b4f9a45cfb2833df51e06a049503efa3

Some errors still persist, and new ones occur as well.

1.

configuration = "[2,2]"
N_bodies = 4
masses = [1.6735505253177734, 1.6839305889950111, 8.611600739878861, 1.8549842410922597]
metallicities = [0.02284210438107218, 0.02284210438107218, 0.02284210438107218, 0.02284210438107218]
semimajor_axes = [0.3634176069149888, 2.3792436941724926, 48.8376645639339]
eccentricities = [0.8915749226168921, 0.6610504449126802, 0.731409542904619]
inclinations = [2.6657938825361263, 0.37826174756793735, 1.5859424603743038]
arguments_of_pericentre = [1.007008802809456, 2.129817433055617, 3.2252051361642042]
longitudes_of_ascending_node = [0.8703110714989465, 1.2355684385562054, 5.75474997466236]
tend = 1.000000E+08
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

Error (similar to previous)

ODE_tides.cpp -- FATAL ERROR: t_V is NaN
binary_index 4 star_index 2 companion_index 3
t_V -nan 
st 5
pr 1
M 10.4368
star->convective_envelope_mass 7.36421
m 3.35748
a 48.9426387742665
e 0.732325325851969
rp 13.1007
R 0.825756
star->convective_envelope_radius 1.99795
star->luminosity 7.68814
k_AM 0.0107309
=============================
Printing system; N=5; integration_flag=0 size = 5
index 0 -- body -- parent 3 m 1.673549683428403 r 0.00711571 st 1 mc 0 minit 1.67355 menv 1e-10 epoch -2.44602e+07 age 2.49306e+07 rc 0 renv 4.64913e-13 lum 0.00195428 Spin_freq 2569.32 Omega_crit 13541.7
index 1 -- body -- parent 3 m 1.683931430884382 r 0.0071337 st 1 mc 0 minit 1.68393 menv 1e-10 epoch -2.44601e+07 age 2.49306e+07 rc 0 renv 4.64913e-13 lum 0.00200769 Spin_freq 2600.25 Omega_crit 13532.3
index 2 -- body -- parent 4 m 10.436806824150965 r 0.825756 st 5 mc 3.0726 minit 10.4635 menv 7.36421 epoch -2.41868e+07 age 2.46572e+07 rc 0.00207067 renv 1.99795 lum 7.68814 Spin_freq 0.126898 Omega_crit 27.0512
index 3 -- binary -- parent 4 child1 0 child2 1 m 3.35748 a 0.363318 e 0.94824 rp 0.0188055 
index 4 -- binary -- parent -1 child1 2 child2 3 m 13.7943 a 48.9426 e 0.732325 rp 13.1007 

2.

configuration = "[2,2]"
N_bodies = 4
masses = [1.0523704896241064, 9.394866525973374, 7.246890042773284, 8.937386463635159]
metallicities = [0.02157271266410451, 0.02157271266410451, 0.02157271266410451, 0.02157271266410451]
semimajor_axes = [2.772958655217249, 3.9299929025654885, 91.43055897712141]
eccentricities = [0.8171631309777608, 0.5888209277274923, 0.6781804882541845]
inclinations = [0.6823922373776746, 1.2665421260475151, 1.4996360211182573]
arguments_of_pericentre = [0.4475039213879, 1.1059361924830737, 1.2628673662970789]
longitudes_of_ascending_node = [3.9153561953303053, 0.6792924530287836, 0.18218014105213795]
tend = 1.000000E+08
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

Error

evolve.cpp -- evolve -- ROOT occurred; setting t = t_out; t 382415 t_out 382415
=============================
Printing system; N=7; integration_flag=0 size = 7
index 0 -- body -- parent 4 m 1.052370496802118 r 0.00440045 st 1 mc 0 minit 1.05237 menv 0.0268551 epoch -5.51329e+10 age 5.51333e+10 rc 0 renv 0.00108061 lum 0.000236992 Spin_freq 1158.87 Omega_crit 22081
index 1 -- body -- parent 4 m 9.394305514218793 r 0.0180209 st 1 mc 0 minit 9.39428 menv 1e-10 epoch -142016 age 542016 rc 0 renv 4.64913e-13 lum 1.24447 Spin_freq 2744.74 Omega_crit 7960.6
index 2 -- body -- parent 5 m 7.246890042773284 r 0.0154205 st 1 mc 0 minit 7.24689 menv 1e-10 epoch -141999 age 541999 rc 0 renv 4.64913e-13 lum 0.523575 Spin_freq 3302.22 Omega_crit 8832.97
index 3 -- body -- parent 5 m 8.937386463635159 r 0.017484 st 1 mc 0 minit 8.93739 menv 1e-10 epoch -141999 age 541999 rc 0 renv 4.64913e-13 lum 1.05685 Spin_freq 2847.57 Omega_crit 8124.99
index 4 -- binary -- parent 6 child1 0 child2 1 m 10.4467 a 2.77309 e 0.988581 rp 0.0316651 
index 5 -- binary -- parent 6 child1 2 child2 3 m 16.1843 a 3.92999 e 0.388731 rp 2.40228 
index 6 -- binary -- parent -1 child1 4 child2 5 m 26.631 a 91.4325 e 0.681632 rp 29.1091 
root_finding.cpp -- RLOF true for body 1; p->check_for_RLOF_at_pericentre 1; p->RLOF_flag 1
root_finding.cpp -- handle_roots -- RLOF occurred
stellar_evolution.cpp -- evolve_stars -- ERROR: quantity luminosity is NaN
Exiting on fatal error

3.

configuration = "[2,2]"
N_bodies = 4
masses = [14.224950339314399, 0.8897139647426828, 13.94306058151649, 25.529234346782907]
metallicities = [0.016552486981039515, 0.016552486981039515, 0.016552486981039515, 0.016552486981039515]
semimajor_axes = [321.64856782898676, 13.781481292380843, 6610.827792364814]
eccentricities = [0.8341440727777816, 0.5671605191088954, 0.126947856450332]
inclinations = [1.2502977473560803, 2.219627718811098, 2.428346067703022]
arguments_of_pericentre = [5.854524108992268, 6.282864677583723, 1.6957614719421723]
longitudes_of_ascending_node = [1.8960677331378781, 1.0366560788684072, 2.8757182594407933]
tend = 1.000000E+08
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

configuration = "[2,2]"
N_bodies = 4
masses = [11.779220996270663, 11.393110841345997, 1.0732481689095434, 1.3195620606322318]
metallicities = [0.010626900137068525, 0.010626900137068525, 0.010626900137068525, 0.010626900137068525]
semimajor_axes = [0.28328610488396033, 1.2634857530557717, 847.0585667635995]
eccentricities = [0.8137403770731343, 0.4700313958562989, 0.593647759582871]
inclinations = [0.7684686267113823, 2.5970372276044293, 1.4407989743641327]
arguments_of_pericentre = [0.7227426367739267, 6.245830051855696, 2.774944615584452]
longitudes_of_ascending_node = [5.750819089708168, 0.9612187303340176, 6.222277197987441]
tend = 1.000000E+08
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

configuration = "[2,2]"
N_bodies = 4
masses = [4.560431467481001, 3.2317279405230916, 8.14477364280762, 0.13038370753828227]
metallicities = [0.016163593804359895, 0.016163593804359895, 0.016163593804359895, 0.016163593804359895]
semimajor_axes = [0.10206149623729109, 78.8989474277978, 9940.11137445268]
eccentricities = [0.7297984561253982, 0.7420443456843769, 0.5439122128853318]
inclinations = [2.1246102807939584, 1.5544824590892976, 0.6442135472165944]
arguments_of_pericentre = [0.06126799410226726, 3.5792218021964524, 2.6924144669694496]
longitudes_of_ascending_node = [3.9029846885454536, 5.277611928917766, 2.8214261140940016]
tend = 1.000000E+08
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

These systems stall for a long time. I am not sure if they run eventually, however.

hamers commented 3 years ago

1 and #2 from the last post should have been fixed in 816bfbf151389ae330ba9315f2e796d1c0c88e97, as well as most of the stalling systems. If some of the stalling systems turn out to be real errors (after running for a long time), please open a new issue.