# How to calculate the required force necessary for orbit

1. ### Ameise

3
Hello,

I am working on a software application which will require me to generate objects in orbit around other objects.

Now, this is my belief, and I am asking for correction if I am wrong---

If given two objects, O1 and O2, with masses M1 and M2, and I want to make O2 orbit O1 at an orbit at distance r with eccentricity e, will this work:

force_for_orbit = (G * ((M1 * M2) / r^2)) * (e + 1)
velocity = force_for_orbit / M2

and the vector for velocity would need to be a perfect right angle (either direction) from the vector for the direction of the gravitational force towards M1, or in other words, the vector for velocity would need to lie tangent to the curve that would be generated by the orbit?

My belief is that a force that is equal to the force being applied by gravity but being applied 90 degrees opposing to it will cause the object to move in a circle, IE with eccentricity of 0. Because multiplying by 0 will not work, I add to make it work... if e becomes greater and greater it will still work until > 1 which escapes gravity.

Thank you!

2. ### A.T.

6,466
Judging by your nickname you speak German. This might help you:
http://de.wikipedia.org/wiki/Kosmische_Geschwindigkeiten

To get a circular orbit (e = 0) you need a speed (perpendicular to radial direction):
$$v_1 = \sqrt{\frac{ G M_1 }{r}}$$

For an elipse (0 < e < 1):
$$v_1 < v < v_1 \sqrt{2}$$

### Staff: Mentor

The Newtonian gravitational force between two objects is always [itex]GM_1M_2/r^2[itex]. The eccentricity of the orbit is not a part of the equation. Neither is the velocity.

To make an object orbit with some non-zero eccentricity you need to give it an initial velocity that either (a) has a non-zero component parallel to the radial vector, or (b) has a magnitude different from the circular orbit velocity.

4. ### Ameise

3
The reason that I added eccentricity was that I am trying to form a linear equation in which I can set the parameters for mass AND eccentricity and get a result that my application can use. Being that it is technically a 3d simulation, all of my work is done using vectors (technically matrices, but vectors would be the basis of velocity), and the velocity would obviously be (force / mass) * direction_vector.

If I applied my equation, what would be the result of it?

My equation roughly becomes when written better:

gravity = (G * ((M1 * M2) / r*r))
force = gravity * (e + 1) //not proper physics, but I think that it should generate the proper effect?
velocity_vector = right_angle(gravity_Vector) * force / M2

5. ### rcgldr

7,696
One issue that crops up is that a force changes both the shape and the average radius of an orbit. It's more efficient if the direction of the force is perpendicular to gravity, using velocity changes to change the total energy (kinetic plus gravitational potential) and path. You'll need at least two bursts, the first one creating an ellipitcal orbit with some amount of kinetic and gravitational potential energy, the second one adjusting the shape of the orbit as well as making the final total energy adjustment.

There is math to optimize the required force (or fuel) to get from one circular orbit to another circular orbit:

http://en.wikipedia.org/wiki/Hohmann_transfer_orbit

Last edited: Aug 7, 2009
6. ### A.T.

6,466
But what does it need as the result? The start velocity perpendicular to radial direction? You could try linear interpolation with the formulas from post #2:

$$v = (1 + e(\sqrt{2} - 1)) \sqrt{\frac{ G M_1 }{r}}$$

I doubt that it is that simple. The eccentricity is probably not linear to the initial velocity. But if it just has to look good...

### Staff: Mentor

What are you trying to accomplish, Ameise? If you are trying to build a realistic 3DOF simulation you need to use a realistic model of gravity: Newton's law of gravity is pretty close to correct for most planetary applications. In Newtonian mechanics, the gravitational force depends on distance and nothing else. In an elliptical orbit the force is not constant.