Simulation and Modeling (CSCI 3010U)
Faculty of Science, Ontario Tech University
http://vclab.science.ontariotechu.ca
Check Course Canvas for Due Date
The goal of this lab is to simulate the moon orbiting around earth. The provided Python code implements such a simulation. You are asked to ascertain if this simulation has any errors. Of course the simulation makes many simplifying assumptions; however, it shouldn’t have any glaring errors. You are also asked to determine if the moon’s orbit is stable. If the orbit is unstable, one of two things will happen. Either the moon will escape earth’s gravitational pull or it will come crashing down. Neither options are desireable. If the orbit is unstable, can you find a way to make it more stable?
We assume that earth and moon each exerts an attractive force on each other that can be determined as follows: \[ F = G \frac{m_{\text{moon}} m_{\text{earth}}}{r^2}, \] where \(r\) is the distance the between the earth and the moon. Force acts along the line joining two centers. \(G\) is gravitational constant. Relevant quantities are listed in the Python code.
Find the starter code here.
Via Blackboard.