Is an epoch-based approach valid for modeling N-body systems?

In summary: The result is negative! Why? Because the step size got too small and the error in the solution was due to numerical rounding.In summary, a 3-body Newtonian system with equal masses such that velocity change at a given time epoch for a single body is given by:-Euler's method is a first order method meaning that the numerical errors scale with the step size.-If such a shift in representation for such a fundamental problem was trivial like this, I would also expect to see it around more. So what am I missing here?
  • #1
IDCS
5
0
Consider a 3-body Newtonian system with equal masses such that velocity change at a given time epoch for a single body is given by:
Qvsvr.png

I am interpreting that if
1565757011967.png
also change per epoch such that say
1565756988527.png
which means
1565757042197.png
as a component. So body state information propagates in a way that one could extrapolate this dynamic into a linear neural net to represent the entire system itself:
IL5hF.png

If such a shift in representation for such a fundamental problem was trivial like this, I would also expect to see it around more. So what am I missing here?

This is copying my post on https://physics.stackexchange.com/q...ed-approach-valid-for-modeling-n-body-systems
 
Physics news on Phys.org
  • #2
What you are calling “epoch based” is what is generally described as a numerical solution. The particular numerical solver you are describing is called Euler’s method. It is the simplest numerical differential equation solver and the first one taught in a numerical methods course. It is completely valid, but has some well known numerical instabilities, so in practice other methods are more commonly used.
 
  • #3
Regarding the other methods Dale mentions, you may want to consider using a symplectic integrator that conserves mechanical system energy. An example of a symplectic integrator is the Verlet integrator which is almost just as easy to implement as explicit Euler.

Non-symplectic integrators, like the explicit Euler, will to a varying degree change the mechanical energy of the system which, in a pure N-body system, is supposed to be conserved thus giving rise to non-physical numerical solutions. For instance, simulating a 2-body bound system with explicit Euler will produce a slowly outward spiraling trajectory instead of a closed orbit as expected.
 
  • Informative
  • Like
Likes IDCS, anorlunda and Dale
  • #4
Thank you for the answers. How about an Euler solver with sufficiently small time steps? I'd think something like Planck time would fit real world models with the speed of information travel and all that.

edit: To provide context, I am studying systems emergence and started my current most recent project on social opinion dynamics actually, so excuse the informality with some terms given my background. So it would help me a lot if you could also expand on what contexts would one go for different solvers
 
Last edited:
  • #5
IDCS said:
How about an Euler solver with sufficiently small time steps?
The Euler method is a first order method meaning that the numerical errors scale with the step size. Meaning that if you half your step size then you will half your error.

Probably the most popular Euler-like method it the Runge Kutta 4 method. That is a fourth order method, so if you half your step size your error will be 1/16 of the original error.

IDCS said:
I'd think something like Planck time would fit real world models with the speed of information travel and all that.
That would actually not be beneficial. If your step size is too small then you get numerical rounding errors.
 
Last edited:
  • #6
Dale said:
That would actually not be beneficial. If your step size is too small then you get numerical rounding errors.

I mean in a simulation context where it can be assigned any standard value, not for computing real life systems.
 
  • #7
IDCS said:
How about an Euler solver with sufficiently small time steps?

Euler is a first order method so global truncation error for a solution can be expected to scale linearly with step size. However, the work involved in producing a global solution and rounding error scales inversely with step size so there is a practical lower limit to the step size before the global error starts to increase again.

In short, explicit Euler is about the integrator with worst overall performance for many types of problems for a given solution accuracy. When comparing the computation effort involved in producing a solution with a given global error (truncation and rounding) it is quite common that higher order methods win even though they may have far more evaluations of the field (per step).

Of course, if you do not require your solutions to be accurate at all (for example, if its purpose is an "artistic" animation of planet and you don't care about conservation of mechanical system energy) then the explicit Euler may be what you want. But if you do require some level of accuracy I would still recommend that you look into higher order symplectic methods like the mentioned Verlet method (which really is quite easy to implement).
 
  • Like
Likes Dale and IDCS
  • #8
IDCS said:
I mean in a simulation context where it can be assigned any standard value, not for computing real life systems.
Even in a simulation it would not be beneficial. Suppose I am doing something absurdly simple like using the Euler method to calculate the position as a function of time for a particle moving in 1 dimension at a constant velocity. So ##x(0)=1## and ##v(t)=x’(t)=1##. Using Euler’s method we get ##x(t+h)\approx x(t)+x’(t) * h##

So, for ##h=1## we get ##x(1)=1+1*1=2##. That is perfect, no errors.

Now, what happens for ##h=1.6 \ 10^{-35}##? We get ##x(1.6 \ 10^{-35})=1+1*1.6 \ 10^{-35}##. That seems fine at first glance, but on my computer the machine precision is only about ##2.2 \ 10^{-16}##. So this number is rounded off to 1. So we get ##x(1.6 \ 10^{-35})=1##.

Because of roundoff error, we can’t even calculate the position of a particle moving at constant velocity, a calculation that has 0 truncation error.
 
  • Like
Likes Filip Larsen
  • #9
Dale said:
So, for ##h=1## we get ##x(1)=1+1*1=2##. That is perfect, no errors.

Now, what happens for ##h=1.6 \ 10^{-35}##? We get ##x(1.6 \ 10^{-35})=1+1*1.6 \ 10^{-35}##. That seems fine at first glance, but on my computer the machine precision is only about ##2.2 \ 10^{-16}##. So this number is rounded off to 1. So we get ##x(1.6 \ 10^{-35})=1##.

What I was trying to see was what kind of issues can potentially arise when one decides to treat unit values like Planck units as integers. Say for instance, if one adopts a lattice model with unit time to be a single epoch and a unit length an arbitrary speed of information travel per epoch such that the change in object state reaches to other objects only in distance / unit length steps. One issue I see then is one would have to deal with fractional values for distance and time that were supposed to be unit values and the model would no longer be a lattice. Not to mention the bigger issue of model losing its realism by being classical at that scale.
 
  • #10
IDCS said:
what kind of issues can potentially arise when one decides to treat unit values like Planck units as integers
Well, the biggest issue is that we have no physics theories that work that way.
 
  • #11
Dale said:
Well, the biggest issue is that we have no physics theories that work that way.

How come? Lattice models are all the rage with the kids these days, one would think someone would formulate one for gravitational systems
 
  • #12
IDCS said:
How come?
Unfortunately, I don’t know the technical difficulties involved.
 
  • #13
IDCS said:
What I was trying to see was what kind of issues can potentially arise when one decides to treat unit values like Planck units as integers.

It is somewhat hazy to me what kind of theoretical or practical insight you are seeking, but if you are "just" talking about practical numerical issues in rescaling your problem so unit length and time is on the Planck scale, then, as also implied by Dale mentioning of precision, you need to use a numerical number library that allows you to represent and maintain the full precision you desire during calculations. Not that I think it would make any practical sense to solve an N-body problem with Planck scale precision.

I am not in position to comments on how much sense a lattice model would make on a theoretical level for an N-body solver, but for practical numerical work on big N-body problems it may make computational sense to use approximations that have some similarity with being lattice-like, like for instance octrees as used in Barnes-Hut simulation (I am only aware of this solver type, but do not have any practical experience with it).
 

1. What is an epoch-based approach for modeling N-body systems?

An epoch-based approach is a method used in computational simulations of N-body systems, where the system is divided into smaller time intervals or epochs. This allows for a more accurate representation of the system's dynamics, as the interactions between particles can be calculated more frequently.

2. How does an epoch-based approach differ from other modeling methods?

An epoch-based approach differs from other modeling methods, such as the direct integration method, in that it breaks the simulation into smaller time intervals. This allows for a more accurate representation of the system's dynamics, as the interactions between particles can be calculated more frequently.

3. What are the advantages of using an epoch-based approach for modeling N-body systems?

There are several advantages to using an epoch-based approach for modeling N-body systems. These include increased accuracy due to more frequent calculations, the ability to handle complex systems with large numbers of particles, and the ability to easily incorporate external forces into the simulation.

4. Are there any limitations to using an epoch-based approach for modeling N-body systems?

While an epoch-based approach has many advantages, it also has some limitations. One limitation is that it can be computationally expensive, as the simulation must be run for multiple epochs. Additionally, the accuracy of the simulation can be affected by the size of the time intervals chosen.

5. How can an epoch-based approach be applied in real-world scenarios?

An epoch-based approach can be applied in a variety of real-world scenarios, such as modeling the orbits of celestial bodies, simulating the behavior of molecules in a chemical reaction, or predicting the movement of particles in a fluid. It can also be used in engineering and physics simulations to study the behavior of complex systems.

Similar threads

Replies
3
Views
644
  • Quantum Physics
Replies
1
Views
928
Replies
10
Views
2K
  • Sci-Fi Writing and World Building
Replies
21
Views
1K
  • Mechanical Engineering
Replies
2
Views
989
Replies
8
Views
1K
  • Beyond the Standard Models
Replies
5
Views
2K
  • Mechanical Engineering
Replies
3
Views
2K
Replies
1
Views
587
  • Introductory Physics Homework Help
Replies
5
Views
875
Back
Top