How Does Universal Gravitation Apply in Planetary Simulation Errors?

AI Thread Summary
The discussion revolves around the application of the universal gravitation formula in a planetary simulation project. The user calculates gravitational force using the formula F = G*M_1*M_2/d^2, applying it to Earth and the Sun with specific mass values and distances. Despite initial calculations yielding large force values, the user struggles with implementing the velocity update in their simulation, particularly in converting time units correctly. After receiving feedback, the user realizes the mistake was in using days instead of seconds for initial velocity calculations. The conversation highlights the importance of precise unit conversions in physics simulations.
m3the01
Messages
3
Reaction score
0
Most likely a basic question to most, been awhile since I've done any of this.

If i remember right the formula states, F = G*M_1*M_2/d^2

where d = distance between M_1 and M_2

Im creating a planetary simulator for fun, i get the initial position of the Earth using the 7 variable Astrological Guides technique.

iniPos

I then get a position + 1 day in the future call it pos2;

Velocity = pos2-iniPos;
Im using the grav-constant 6.67E-20 km^3/kg*s^2

1)So grav_constant*M_1*M_2 = grav_const*5.9742E24*1.988435E35
= 7.923498687E35

2)The distance between the the two is approx 150 000 000, according to the formula then d^2 = 2.25E16

Force = grav_constant*M_1*M_2/d^2 = 3.52155E19 km*Kg/s^2

Huge number!

Forward Euler update shows us that the 'unit_vector' pointing towards the sun multiplied by the force should give us our update method.

updateVelVector = oldVelVector + unit_vector*force*dt

Where dt = change in time

However this doesn't work worth a damn,

Somewhere I've made a mistake and i just can't see it,

Please help!

PS i tried reducing the problem space to some number which i thought would be easier to use. I decided to decrease the distance to 1 km, basically this turns the problem into earth_mass/1.125E16 and sun_mass/1.125E16. This is wrong too, I am very stuck!
 
Last edited:
Physics news on Phys.org
m3the01 said:
updateVelVector = oldVelVector + unit_vector*force*dt

force * dt is the impulse of the force during the interval dt, which equals the change in the object's momentum (mv), not the change in velocity.
 
Could u explain a little further?

I thought the update form for velocity was

vel = oldVel + unit_vec*force*dt;
pos = oldPos + vel*dt;

Hmmm, arggg.

thanks for the help,
 
Sorry guys my mistake,

For my initial velocity i forgot,

V_i/(24*3600)

Seconds not days, arggggg!

thanks for the help,

Great forum!

Steven
 
Kindly see the attached pdf. My attempt to solve it, is in it. I'm wondering if my solution is right. My idea is this: At any point of time, the ball may be assumed to be at an incline which is at an angle of θ(kindly see both the pics in the pdf file). The value of θ will continuously change and so will the value of friction. I'm not able to figure out, why my solution is wrong, if it is wrong .
TL;DR Summary: I came across this question from a Sri Lankan A-level textbook. Question - An ice cube with a length of 10 cm is immersed in water at 0 °C. An observer observes the ice cube from the water, and it seems to be 7.75 cm long. If the refractive index of water is 4/3, find the height of the ice cube immersed in the water. I could not understand how the apparent height of the ice cube in the water depends on the height of the ice cube immersed in the water. Does anyone have an...
Thread 'A bead-mass oscillatory system problem'
I can't figure out how to find the velocity of the particle at 37 degrees. Basically the bead moves with velocity towards right let's call it v1. The particle moves with some velocity v2. In frame of the bead, the particle is performing circular motion. So v of particle wrt bead would be perpendicular to the string. But how would I find the velocity of particle in ground frame? I tried using vectors to figure it out and the angle is coming out to be extremely long. One equation is by work...
Back
Top