Revision 741421cad86ffa158d5e984cf271f03bdc2b939e authored by Hanno Rein on 14 November 2023, 00:47:21 UTC, committed by Hanno Rein on 14 November 2023, 00:47:21 UTC
1 parent c990adb
Raw File
problem.py
# Import the rebound module
import rebound

# Create Simulation object
sim = rebound.Simulation()
# Add particle to rebound
sim.add( m=1. )                
sim.add( m=1e-3, a=1., e=0.1 ) # Planet 1
sim.add( a=1.4, e=0.1 )       # Massless test particle

# Output orbits in Jacobi coordinates
for o in sim.orbits(): print(o)

# Output orbits in Heliocentric coordinates
for o in sim.orbits(primary=sim.particles[0]): print(o)

# Output cartesian coordinates
for p in sim.particles: 
    print(p)
back to top