Newtonian Simulation Of Gravity

In summary, the equation to solve for e' is a quadratic equation and requires careful attention while solving it. There is no magic needed.
  • #1
DavidZuccaro
15
0
I'm working on a computer graphics program that simulates the motion of two point masses as indicated in this diagram:
b.png

After applying the laws of conservation of momentum and the conservation of energy I am left with the following equation to solve for e':
a.png

Does anyone have any idea how to solve this for e' which is the new velocity vector after a certain delta t?
 
Physics news on Phys.org
  • #2
It is a quadratic equation. You cannot divide by vectors so you have to be careful while solving it, but there is no magic needed.
 
  • Like
Likes DavidZuccaro
  • #3
mfb said:
It is a quadratic equation. You cannot divide by vectors so you have to be careful while solving it, but there is no magic needed.
So should I break down e, e' and f into their components?
 
  • #4
I don't think you have to, apart from the last steps maybe.
 
  • #5
What about b' and c'? You consider these known?
 
  • #6
nasu said:
What about b' and c'? You consider these known?

Yes, because they can be calculated according to b' = b + eδt.
 
  • #7
I've built a small simulation of the Earth orbiting the Sun. My method was to break the force, acceleration, velocity, and position vectors into their components and then calculate each component, updating after each time step. I'm not sure if that helps you or not.
 
  • #8
Drakkith said:
I've built a small simulation of the Earth orbiting the Sun. My method was to break the force, acceleration, velocity, and position vectors into their components and then calculate each component, updating after each time step. I'm not sure if that helps you or not.

Thanks Drakkith, yes I have done that already but now I would like the simulation to conserve energy.

This simulation does not conserve energy:


This simulation does conserve energy but there is no orthogonal velocity component.

Still not sure how to solve the above equation. Should I look at the equation for angular momentum too?
 
  • #9
I just noted that your system is underconstrained - you have one equation for e' but two or three unknowns. I guess your acceleration should go in somehow.
 
  • #10
I am treating the two body system as a state system.

b, c, b', c', e, f, mb, mc are all known.

Though b' and c' are calculated by approximation according to the equation b' = b + eδt.

Hope this clarifies what I am trying to achieve. I suspect that by quantizing δt I will not be able to conserve energy and momentum?

EDIT: added e to formula.
 
Last edited:
  • #11
DavidZuccaro said:
I am treating the two body system as a state system.

b, c, b', c', e, f, mb, mc are all known.

Though b' and c' are calculated by approximation according to the equation b' = b + δt.

Hope this clarifies what I am trying to achieve. I suspect that by quantizing δt I will not be able to conserve energy and momentum?
What is a "state system"?
 
  • #12
nasu said:
What is a "state system"?

What I meant by invoking the term "state system" is a system that consists of a set of well defined states. This system consists of the following vector attributes b,c,e,f the components of which may take on the numbers representable by my computer. That is there is no quantum fuzzyness or real numbers with infinite precision in this simulation.

Hope this clarifies what I meant by "state system".

EDIT: of -> or
 
Last edited:
  • #13
DavidZuccaro said:
What I meant by invoking the term "state system" is a system that consists of a set of well defined states. This system consists of the following vector attributes b,c,e,f the components of which may take on the numbers representable by my computer. That is there is no quantum fuzzyness of real numbers with infinite precision in this simulation.

Hope this clarifies what I meant by "state system".
Not really.
Unless you are talking about a physical system whose state is described by the positions and velocities vectors.
Which is how a mechanical system is usually described.

Is you system made from physical objects or from the set of states of a physical system (made from real objects).
 
  • #14
nasu said:
Not really.
Unless you are talking about a physical system whose state is described by the positions and velocities vectors.

Yes that is what I am talking about.

nasu said:
Which is how a mechanical system is usually described.
Is you system made from physical objects or from the set of states of a physical system (made from real objects).
My system is a computer simulation similar to those that I have posted previously; the objects are obviously not actually physical objects but like physical objects . The objects obey Newton's laws of motion and gravitation; if they happen to collide then they will rebound elastically. So your latter description is more appropriate.

Do you have any suggestions as to how this equation my be solved for e' given all of the other variables may be considered as known?:

a.png
 
  • #15
I don't think you can. You have three unknowns in the equation: the magnitude of e' and the projections of e' on e and f.
Which is quite normal, isn't it? e' is a vector in 3D so you need three values to describe it.

But if you assume that you know b', c' and f' by some magic, why not take it one step further and assume e' known as well? :smile:
 
  • #16
nasu said:
I don't think you can. You have three unknowns in the equation: the magnitude of e' and the projections of e' on e and f.
Which is quite normal, isn't it? e' is a vector in 3D so you need three values to describe it.

But if you assume that you know b', c' and f' by some magic, why not take it one step further and assume e' known as well? :smile:

What you say is true, I probably haven't sufficiently explained myself... f' can be eliminated by conservation of momentum as shown above.
b' can be eliminated with this approximation b' = b + eδt. Now I could obtain e' by a similar approximation but that would result in energy not being conserved due to the inherent graininess of the approximation which is the reason why I would like to solve the above equation. I am now looking into the conservation of angular momentum to give additional constraints.
 

Related to Newtonian Simulation Of Gravity

1. What is a Newtonian simulation of gravity?

A Newtonian simulation of gravity is a mathematical model that simulates the behavior of objects under the influence of gravity, based on the laws of motion and universal gravitation proposed by Sir Isaac Newton. It is often used to predict the motion of celestial bodies such as planets, moons, and stars.

2. How does a Newtonian simulation of gravity work?

A Newtonian simulation of gravity works by calculating the gravitational force between two objects based on their masses and distance, and then using this force to determine their acceleration and subsequent motion. This is done repeatedly for all objects in the simulation, resulting in a continuous simulation of the gravitational interactions between them.

3. Is a Newtonian simulation of gravity accurate?

A Newtonian simulation of gravity is generally considered accurate for objects with known masses and distances, such as planets and moons in our solar system. However, it may not accurately simulate the behavior of objects in extreme conditions, such as near black holes or during collisions.

4. What are the limitations of a Newtonian simulation of gravity?

A Newtonian simulation of gravity assumes that all objects are point masses with no size or shape, and that they have a continuous and constant gravitational force. This does not accurately reflect the complexities of real-world objects, and can lead to inaccuracies in simulations.

5. What are some real-world applications of a Newtonian simulation of gravity?

A Newtonian simulation of gravity is commonly used in space programs and astronomy to predict the motion of celestial bodies. It is also used in computer graphics and video games to create realistic simulations of planetary systems and other gravitational interactions.

Similar threads

Replies
14
Views
1K
Replies
4
Views
1K
Replies
7
Views
887
  • Classical Physics
Replies
2
Views
1K
  • Mechanics
2
Replies
53
Views
3K
Replies
22
Views
2K
  • Mechanics
Replies
10
Views
2K
Replies
6
Views
1K
Back
Top