![]() we can set dt as one day: daysec = 24.0*60*60 dt = 1*daysec The simulator will calculate a data point every dt time. The distance r will be: rx = ex - sx ry = ey - syĭefine GMm, the sun-earth gravity constant as gravconst_e: Ms = 2.0e30 # mass of sun in kg unit Me = 5.972e24 # mass of earth in kg unit G = 6.67e-11 gravconst = G*Ms*Me In Python code, assume the sun in position (0,0), earth in position (6,6): sx,sy = 0,0 ex,ey = 6,6 However, the earth’s initial velocity perpendicular to the G force pulls it away from the sun, that is why the earth can orbit the sun. When the earth is spinning around the sun, the earth is falling down to the sun. there is only a gravitation force acting on it. What about centrifugal force, why don’t you deal with centrifugal force? Because the centrifugal force is actually the result of gravitation force.In vector coordinate, we need to be very careful about directions. You will need to remove the minus sign (-) when you calculate the force put on the sun from the earth. Why there is a minus (-) sign in the gravitation equation? Because the force direction is the opposite of the distance vector r.You may have several questions in mind if it is your first time reading the equation. ![]() I drew the vector version of the equations in the above diagram.
0 Comments
Leave a Reply. |