reboundx
reboundx copied to clipboard
Difficulties to simulate the evolution of the Earth-Moon system + Sun
Dear Developers,
I’m attempting to simulate the Earth-Moon system's evolution in various ways, but I’m encountering some issues.
Firstly, I want to include the Sun in my simulation, but I’m unsure how to do so in a realistic manner. Should I add the Sun's radius, density, moment of inertia, etc., or is it sufficient to model the Sun as a point mass with the Earth and Moon orbiting it with their respective properties?
Secondly, I tried running a simulation with the Sun as a point mass, but the results were unexpected. The Moon doesn’t seem to orbit the Earth correctly, and instead, both bodies follow unusual trajectories, which are significantly different from a similar simulation without the Sun:
sim.add(m=m_sun) # Aggiungi il Sole al centro
# Distanza Terra-Sole in AU (ad esempio 1 AU)
a_earth = 1.0
# Aggiungi la Terra con un'orbita di 1 AU intorno al Sole
Earth = rebound.Particle(simulation = sim, m=m_earth, a=a_earth, r=r_earth, hash="Earth")
#Earth = rebound.Particle(simulation = sim, m=m_earth, r=r_earth, hash="Earth")
sim.add(Earth)
moon_sma_km = 20000 # semi major axis in km
Moon = rebound.Particle(simulation = sim, primary = ps["Earth"], m=m_moon, r=r_moon, a = moon_sma_km / 1.476e8, e=0.0549, inc = inc_moon, Omega = Omega_moon, hash="Moon")
sim.add(Moon)
It seems like the Moon is unable to orbit the Earth, and they each follow separate paths. How can I resolve this issue?
Thank you in advance for your help.
Best regards, Francesco