Newtonian Simulation Of Gravity

AI Thread Summary
The discussion focuses on simulating the motion of two point masses using Newtonian physics, specifically addressing the calculation of a new velocity vector (e') after a time increment (delta t). The user is attempting to solve a quadratic equation for e' while ensuring energy conservation in their simulation. They have broken down relevant vectors into components but are struggling with the underconstrained nature of their system, as multiple unknowns complicate the solution. The conversation also touches on the concept of a "state system," clarifying that it refers to a system defined by specific positions and velocities, akin to physical objects governed by Newton's laws. The user is considering incorporating angular momentum conservation to impose additional constraints for solving the equation.
DavidZuccaro
Messages
15
Reaction score
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
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
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?
 
I don't think you have to, apart from the last steps maybe.
 
What about b' and c'? You consider these known?
 
nasu said:
What about b' and c'? You consider these known?

Yes, because they can be calculated according to b' = b + eδt.
 
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.
 
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?
 
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.
 
Back
Top