Math 2.0

Astronomy and astrophysics Definition

N-body simulation

Builds on n-body problemNewton's law of universal gravitationOrdinary differential equation

Definition

Let N≥2N \ge 2 and let G>0G > 0 be the gravitational constant. Consider point particles with masses m1,…,mN>0m_1, \dots, m_N > 0, positions xi(t)∈ℝ3x_i(t) \in \R^3 and a softening length ε≥0\varepsilon \ge 0. The gravitational N-body equations are the system of ordinary differential equations x¨i=−G∑j≠imjxi−xj(∥xi−xj∥2+ε2)3/2,i=1,…,N.\ddot x_i = -G \sum_{j \ne i} m_j \frac{x_i - x_j}{\left(\norm{x_i - x_j}^2 + \varepsilon^2\right)^{3/2}}, \qquad i = 1, \dots, N. An N-body simulation is a numerical computation that starts from given positions and velocities at time t0t_0. By a time-stepping scheme applied to this system, it produces approximations of xi(tk)x_i(t_k) and x˙i(tk)\dot x_i(t_k) at times t0<t1<t2<⋯t_0 < t_1 < t_2 < \cdots.

Remarks

For ε=0\varepsilon = 0 the equations are those of the n-body problem with Newton's law of gravitation. A positive ε\varepsilon removes the divergence of the force at close encounters; it is used when each particle stands for a cloud of matter rather than a star.

Example: the leapfrog (kick-drift-kick) scheme with step hh, which updates vi←vi+h2aiv_i \leftarrow v_i + \tfrac{h}{2} a_i, then xi←xi+hvix_i \leftarrow x_i + h v_i, then recomputes aia_i and sets vi←vi+h2aiv_i \leftarrow v_i + \tfrac{h}{2} a_i, defines an N-body simulation. Each step only uses the right-hand side of the equations, so it is a time-stepping scheme for them.

Non-example: the closed-form Kepler orbit of two bodies is an exact solution, not a step-by-step numerical computation, so it is not an N-body simulation.

Direct summation of all pairs costs of order N2N^2 operations per step. Tree codes and the fast multipole method lower this cost by approximating the forces of distant groups of particles.

Reading path

To understand this page from the ground up, read these 47 pages in order. The foundations come first.

  1. Derivative concept
  2. Differential equation concept
  3. Euclidean space object
  4. Euclidean vector concept
  5. First integral concept
  6. Function concept
  7. Hamiltonian system concept
  8. Interval concept
  9. Ordinary differential equation concept
  10. Velocity concept
  11. Fréchet derivative definition
  12. Cross product definition
  13. Ordinary differential equation definition
  14. Function of several variables concept
  15. Vector-valued function concept
  16. Classical mechanics concept
  17. Lipschitz condition definition
  18. n-body problem problem
  19. Limit of a function of several variables concept
  20. Momentum concept
  21. Partial derivative concept
  22. Solution of an ordinary differential equation definition
  23. Inertial frame of reference concept
  24. Continuity in R^n definition
  25. Differentiable function of several variables definition
  26. Partial derivative definition
  27. Initial value problem definition
  28. Newton's laws of motion statement
  29. Differentiable on an open set definition
  30. Gradient definition
  31. Higher partial derivatives definition
  32. Picard–Lindelöf hypotheses definition
  33. Iterated derivative definition
  34. Picard operator definition
  35. C^k function characterised by continuous derivatives statement
  36. Integral equation form of an initial value problem statement
  37. An iterate of the Picard operator is a contraction statement
  38. Vector field definition
  39. Picard–Lindelöf theorem statement
  40. Conservative vector field definition
  41. Classical mechanics definition
  42. Momentum definition
  43. Potential energy definition
  44. Angular momentum definition
  45. Central force definition
  46. Newton's law of universal gravitation statement
  47. N-body simulation definition

Further reading

  1. Web https://en.wikipedia.org/wiki/N-body_simulation
About this page
TagR6VKPHSWM9
URIm2://R6VKPHSWM9
Kinddefinition
WritingW0 stub
MSC85-10, 70F10, 65Z05
DefinesN-body simulation
Usesn-body problem, Newton's law of universal gravitation, Ordinary differential equation
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.