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

quantity spin_vec[0/1/2] is NaN #19

Closed pavanvyn closed 3 years ago

pavanvyn commented 3 years ago

Version 1fb638c8f64c00c151dcd47c2894fc3884558c03

Example systems:

configuration = "[2,2]"
N_bodies = 4
masses = [25.472672442547363, 29.840431054608715, 1.578442917811624, 0.1701283229267224]
metallicities = [0.027177148943916173, 0.027177148943916173, 0.027177148943916173, 0.027177148943916173]
semimajor_axes = [73.96419622249603, 0.5468550519414457, 331.69787410952017]
eccentricities = [0.9234048754427818, 0.8599075001749081, 0.26298598653151656]
inclinations = [2.84029791686314, 1.6496060566125157, 0.5987913752691788]
arguments_of_pericentre = [4.538739296301567, 6.27932481197671, 3.9414333484223065]
longitudes_of_ascending_node = [5.543214461262542, 5.102103794424898, 3.384179592192939]
tend = 1.400000E+10
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

configuration = "[2,2]"
N_bodies = 4
masses = [0.9858421344726858, 2.2197813915714204, 32.624086808030626, 12.941314253710717]
metallicities = [0.02045373811168327, 0.02045373811168327, 0.02045373811168327, 0.02045373811168327]
semimajor_axes = [0.37311328592805276, 0.10395244202071213, 73.67556982848069]
eccentricities = [0.6440307309975877, 0.4457454703638011, 0.9024697950467355]
inclinations = [1.6153302307185153, 1.1938660511146522, 2.7900756114919387]
arguments_of_pericentre = [1.8797746705934975, 0.504944076085212, 1.881296488666065]
longitudes_of_ascending_node = [3.626528823982504, 3.1835675943716324, 5.849273516037526]
tend = 1.400000E+10
N_steps = 1000
stellar_types = [1, 1, 1, 1]
object_types = [1, 1, 1, 1]

Error message:

stellar_evolution.cpp -- evolve_stars -- ERROR: quantity spin_vec[0] is NaN
stellar_evolution.cpp -- evolve_stars -- ERROR: quantity spin_vec[1] is NaN
stellar_evolution.cpp -- evolve_stars -- ERROR: quantity spin_vec[2] is NaN
stellar_evolution.cpp -- evolve_stars -- ERROR: quantity spin_vec[0] is NaN
stellar_evolution.cpp -- evolve_stars -- ERROR: quantity spin_vec[1] is NaN
stellar_evolution.cpp -- evolve_stars -- ERROR: quantity spin_vec[2] is NaN
hamers commented 3 years ago

The error messages here were actually a red herring; the underlying problem was the eccentricity becoming too small and causing problems in tools.cpp -- from_orbital_vectors_to_cartesian(), with NaNs subsequently propagating. This should now be fixed in 2b5e77d.