def simulation(par): saturn_a, saturn_e = par rebound.reset() rebound.integrator = "whfast-nocor" rebound.min_dt = 5. rebound.dt = 1. # These parameters are only approximately those of Jupiter and Saturn. sun = rebound.Particle(m=1.) rebound.add(sun) jupiter = rebound.add(primary=sun, m=0.000954, a=5.204, anom=0.600, omega=0.257, e=0.048) saturn = rebound.add(primary=sun, m=0.000285, a=saturn_a, anom=0.871, omega=1.616, e=saturn_e) rebound.move_to_com() rebound.init_megno(1e-16) rebound.integrate(1e3 * 2. * np.pi) return [ rebound.calculate_megno(), 1. / (rebound.calculate_lyapunov() * 2. * np.pi) ] # returns MEGNO and Lypunov timescale in years
def simulation(par): saturn_a, saturn_e = par rebound.reset() rebound.integrator = "whfast" rebound.integrator_whfast_safe_mode = 0 rebound.dt = 5. # These parameters are only approximately those of Jupiter and Saturn. rebound.add(m=1.) rebound.add(m=0.000954, a=5.204, anom=0.600, omega=0.257, e=0.048) rebound.add(m=0.000285, a=saturn_a, anom=0.871, omega=1.616, e=saturn_e) rebound.move_to_com() rebound.init_megno(1e-16) rebound.integrate(5e2*2.*np.pi) # integrator for 500 years return [rebound.calculate_megno(),1./(rebound.calculate_lyapunov()*2.*np.pi)] # returns MEGNO and Lypunov timescale in years
def simulation(par): saturn_a, saturn_e = par rebound.reset() rebound.integrator = "whfast-nocor" rebound.min_dt = 5. rebound.dt = 1. # These parameters are only approximately those of Jupiter and Saturn. sun = rebound.Particle(m=1.) rebound.add(sun) jupiter = rebound.add(primary=sun,m=0.000954, a=5.204, anom=0.600, omega=0.257, e=0.048) saturn = rebound.add(primary=sun,m=0.000285, a=saturn_a, anom=0.871, omega=1.616, e=saturn_e) rebound.move_to_com() rebound.init_megno(1e-16) rebound.integrate(1e3*2.*np.pi) return [rebound.calculate_megno(),1./(rebound.calculate_lyapunov()*2.*np.pi)] # returns MEGNO and Lypunov timescale in years