Using iteration to orbit dual suns - losing energy

In summary: Can you explain in more detail what you mean by 'TE rate of change becomes less'? Does it go down slower, or does it stop going down altogether?
  • #1
Rapidrain
31
0
Using iteration I've got a satellite flying around two gravity sources. (See picture)

When using the iteration over a 100 times I see that TE, total energy slowly sinks so I need to make a correction after each iteration to insure that TE is constant.

Trouble is I have several possibilities :

Example : at the start I have :
PE = -100 KE = 125 => TE = 25

after one iteration I have TE = 20 (a quite exaggerated difference in this example)
I have lost 5 Joules.

to compensate :
A should I increase the KE by 5, increasing the magnitude of the velocity by sqrt(5)?

B should I increase the PE by moving the satellite a bit farther away from the GS bodies?

C should I split the difference evenly? Each should compensate 2.5 Joules.

D should I split the different 4:5 or 5:4 due to the different sizes of PE and KE?

Maybe I need a Math professor for this one.
 

Attachments

  • Two Gravity Sources.jpg
    Two Gravity Sources.jpg
    13.6 KB · Views: 431
Astronomy news on Phys.org
  • #2
Which method do you use to calculate your iterations?
Can you track where the error comes from?

Increasing the velocity can be tricky - add velocity in which direction? In the same way, shift the body in which direction?
 
  • #3
>>Which method do you use to calculate your iterations?

I found by way of another entry in this forum a link to a site where
'Euler Implicit' and 'Euler Explicit' and 'Euler Semi-Implici' were described

http://www.physics.udel.edu/~jim/Ordinary%20Differential%20Equations/The%20Implicit%20Euler%20Method.pdf

http://web.mit.edu/10.001/Web/Course_Notes/Differential_Equations_Notes/node3.html

http://en.wikipedia.org/wiki/Semi-implicit_Euler_method

I use the semi-implicit method so :
where I first calc the position :

newPos = oldPOs + time*oldVelocity

Then I use the old velocity and new accelleration to find the new velocity.
All done with 2 dimensional vectors.

newVel = oldVel + time*newAccelleration

the websites said p(k+1) = p(k) + time*v(k)
v(k+1) = v(k) + time*acc(k+1)

>>Increasing the velocity can be tricky - add velocity in which direction? In the same way, shift the body in which direction?

I do not alter the direction in any way, just multiply the scaler value of the magnitude of the vecotr.

In the picture I put one gravity source at a position and got (not using iteration) a beautiful ellipse. However I take two gravity sources and place them each at the same position (each with half the original mass) and when using iteration I expect the same curve.

A point at the top at Y = 380.0 should be met after 198 iterations. I always come to it in this example at 379.5.

Now the punchline : when I try to get more accuracy by increasing the speed and thereby increasing KE by the amount of energy it loses in TE in each iteration,
then the inaccuracy increases to 383.7 ! instead of 380.0.

My attempt to increase accuracy has decreased accuracy.
 

Attachments

  • Perfect Ellipse.jpg
    Perfect Ellipse.jpg
    19.9 KB · Views: 457
Last edited by a moderator:
  • #4
Why do you expect more accuracy with increased speed? Do you get a better accuracy with a reduced time step?
Maybe you can test other integration methods.

Did you try A or B? Do they help?
 
  • #5
Rapidrain said:
When using the iteration over a 100 times I see that TE, total energy slowly sinks so I need to make a correction after each iteration to insure that TE is constant.

What you really need to do is

1) reduce the number of iterations so that the TE is constant
2) If 1) doesn't work consider using another differencing scheme (i.e. Runga-Kutta)

Adding things post-hoc to get the numerics to work usually ends up not working very well.

Also, one thing to do is to try to look at the energy with smaller time steps. If you use small time steps and your energy is still going down at the same rate, then this isn't an issue with the difference scheme. It could be a bug in the way that energy is being calculated.
 
  • #6
>>1) reduce the number of iterations so that the TE is constant

Reducing the number of iterations does not cause the TE to become constant.

>>Also, one thing to do is to try to look at the energy with smaller time steps.

Smaller times steps = increasing number of iterations.

Done that, the TE rate of change becomes less, goes down at a slower rate,

but I am looking for an iteration algorithm which is more accurate.

>>It could be a bug in the way that energy is being calculated.

The energy is calculated in the same manner, always.

*****************

I'll look into Runga-Kutta
 

1. How does using iteration help with orbiting dual suns?

Iteration is a mathematical process that involves repeating a calculation multiple times to arrive at a more accurate result. When orbiting dual suns, using iteration can help to account for the gravitational pull of both suns and calculate a more precise orbit trajectory.

2. Can using iteration lead to the loss of energy during orbit?

Yes, using iteration to orbit dual suns can result in the loss of energy. This is because each iteration involves recalculating the orbit trajectory, which requires additional energy input from the spacecraft. Over time, this can lead to a decrease in overall energy levels.

3. Are there any benefits to using iteration for orbiting dual suns?

Yes, there are several benefits to using iteration for orbiting dual suns. It allows for a more accurate calculation of the orbit trajectory, which can help prevent collisions with other objects in space. It also allows for adjustments to be made in real-time to account for any changes in the gravitational forces of the dual suns.

4. How is energy loss managed when using iteration for orbiting dual suns?

Energy loss can be managed by implementing efficient propulsion systems and regularly monitoring and adjusting the spacecraft's orbit trajectory. Additionally, scientists can also incorporate energy-saving techniques, such as using gravitational assists from other celestial bodies, to help conserve energy during the orbiting process.

5. Are there any limitations to using iteration for orbiting dual suns?

While iteration can provide more accurate results for orbiting dual suns, it is not a perfect solution. It can be time-consuming and requires constant monitoring and adjustments. Additionally, there may be unforeseen factors, such as solar flares or other celestial events, that can affect the orbit trajectory and lead to energy loss despite the use of iteration.

Similar threads

Replies
44
Views
3K
  • Astronomy and Astrophysics
Replies
18
Views
3K
Replies
2
Views
758
Replies
17
Views
2K
Replies
9
Views
2K
  • Introductory Physics Homework Help
Replies
3
Views
8K
  • Introductory Physics Homework Help
Replies
5
Views
1K
  • Classical Physics
Replies
7
Views
1K
Replies
32
Views
649
Back
Top