Total energy of a system cycles?

Started by
64 comments, last by ury 18 years, 4 months ago
Quote:Original post by rever
When i did the calculations for 2 points i got the energy still changin but not so much as when i had 10 points.


i was talking about letting them fall together: ie convert all your potential energy into kinetic.

if you test a stable orbit, both kinetic and potential energy are kindof static anyway, so flaws in your calculations are harder to see.
Advertisement
i did let them fall togeather, but there prolly is some error that when they are togeather division by zero or close to 0 what increases the speeed by a whole lot....after that the energy doesn;t change at all.
Well, I agree that your counter should run as
i=0..(n-1)
j=i..n

Mostly, I'm concerned with this line:

 //Calculate total momentum dMomentum=dMomentumX+dMomentumY+dMomentumZ;


This is definitely wrong it should be this:
dMomentum=sqrt( dMomentumX*dMomentumX + dMomentumY*dMomentumY + dMomentumZ*dMomentumZ );

We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
Quote:Original post by rever
i did let them fall togeather, but there prolly is some error that when they are togeather division by zero or close to 0 what increases the speeed by a whole lot....after that the energy doesn;t change at all.


You shouldn't reach that point, because the potential energy function should be measured as a definite integral of the gravitational force between two points. The potential energy V(r) = -G * M * m / r; The reading is meaningless except as a difference; for instance V(r) - V(r');

You should never has a condition where r=0, because the planets should get no closer than the sum of the radii. So your potential energy between two objects is best evaluated like this:

V(r) - V(radius1 + radius2) = -G*m1*m2 * ( 1/r - 1/(rad1+rad2) );
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
Quote:Original post by erissian
This is definitely wrong it should be this:
dMomentum=sqrt( dMomentumX*dMomentumX + dMomentumY*dMomentumY + dMomentumZ*dMomentumZ );


No, it doesn't really matter. The momentum in each axis is conserved independently. In reality, the momentums shouldn't be added together at all. Each should be viewed separately. Each should be constant for the system. Their sum and the sum of their squares are physically meaningless quantities that should also be constants. You could add energy to momentum and expect that to be a constant too. It just doesn't mean anything.
Quote:Original post by Anonymous Poster
Quote:Original post by erissian
This is definitely wrong it should be this:
dMomentum=sqrt( dMomentumX*dMomentumX + dMomentumY*dMomentumY + dMomentumZ*dMomentumZ );


No, it doesn't really matter. The momentum in each axis is conserved independently. In reality, the momentums shouldn't be added together at all. Each should be viewed separately. Each should be constant for the system. Their sum and the sum of their squares are physically meaningless quantities that should also be constants. You could add energy to momentum and expect that to be a constant too. It just doesn't mean anything.


If you look at his code, you'll see that these aren't derivates, but the values for momentum. He is trying to find the total momentum for the system in which case the simple summation is wrong, and it does matter.

Even if he were seeking the derivates, it would be important to properly evaluate the total momentum vector, because a solar system is a rotating system. Momentum vectors only conserve independently in systems with independant rectilinear forces. Because this system has all bodies orbiting the center of mass of the system, you cannot wash your hands of proper evaluation.

If the number is meaningless, then it should not have been included in the first place, but it is exactly what he is trying to evaluate. Please read the thread more carefully.
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
The total momentum vector in a three dimensional space consists of three quantities, one for each dimension. The momentum vector is constant. Each component of the momentum vector is constant. Therefore each can be considered separately when checking to see how well the simulation conserves momentum.

The length of the momentum vector should also be constant, but it may be more helpful to look at the components instead, which are also constant.
Quote:Original post by erissian
Quote:Original post by Anonymous Poster
Quote:Original post by erissian
This is definitely wrong it should be this:
dMomentum=sqrt( dMomentumX*dMomentumX + dMomentumY*dMomentumY + dMomentumZ*dMomentumZ );


No, it doesn't really matter. The momentum in each axis is conserved independently. In reality, the momentums shouldn't be added together at all. Each should be viewed separately. Each should be constant for the system. Their sum and the sum of their squares are physically meaningless quantities that should also be constants. You could add energy to momentum and expect that to be a constant too. It just doesn't mean anything.


If you look at his code, you'll see that these aren't derivates, but the values for momentum. He is trying to find the total momentum for the system in which case the simple summation is wrong, and it does matter.

Even if he were seeking the derivates, it would be important to properly evaluate the total momentum vector, because a solar system is a rotating system. Momentum vectors only conserve independently in systems with independant rectilinear forces. Because this system has all bodies orbiting the center of mass of the system, you cannot wash your hands of proper evaluation.

If the number is meaningless, then it should not have been included in the first place, but it is exactly what he is trying to evaluate. Please read the thread more carefully.


its generally a good idea to speak in a more humble manner when you are wrong.
Tone is so hard to convey in text.

So then genuinely, please explain my error so I don't repeat it.
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
'He is trying to find the total momentum for the system in which case the simple summation is wrong, and it does matter.'

thats not what hes trying. hes trying to see if momentum is conserved. momentum has direction aswell as magnitude. looking at the length of the momentum vector is equally incomplete as looking at its sum. it should be conserved in all directions.

This topic is closed to new replies.

Advertisement