N-Body Simulation - Google Project Hosting

Download Report

Transcript N-Body Simulation - Google Project Hosting

Brief history and
development of the
n body problem
Jeff Kaplan
Lance Min
Tom Yohannan
Newton’s laws and deterministic
universe
Newtonian mechanics
argues that the physical
matter of the universe
operates according to
Newton’s laws
 With the atomic nature of
the matter, predicting
every event in the
universe should be as
possible as predicting how
the billiard balls with
move on a table, only with
more number of balls.

Deterministic universe and the nbody problem

Given the initial positions and velocities of
N number of objects that attract one
another by Newton’s law of gravitation,
determine their configuration at any time
in the future
The 3-body problem before Poincaré


During the 18th century,
mathematicians began to
realize the impossibility of
finding a closed solution in
terms of elementary
functions.
Clairaut succeeded in
predicting the date of the
perihelion passage of Halley’s
comet within 1 month, which
was exactly the margin
allowed by the approximation
method.
Poincaré and the chaos
competition honoring the 60th birthday of
Oscar II, King of Sweden and Norway
featured the 3-body problem
 Poincaré did not succeed in solving the
problem, but the ideas he presented in his
work were so revolutionary that he was
awarded the prize for the competition
anyways

The 3-body problem in the 20th century
Karl Sundham
 Stephen Smale
 Richard Feynman
 Wang Qiu Dong

Solutions and Methods

If we have N masses, then the force on any one
is the sum of the forces exerted on it by all the
others. This gives us the nonlinear system of
second-order differential equations
Two Body Problem



To solve, write in form of Keplar’s equation
In N=2 case, x=x1-x2 with k constant m1+m2
Two body motions are similar conic sections,
and in periodic case, ellipses.
Langrange’s 3-body solution





Found simple periodic solution in 1772
start by placing the three masses at the vertices
x01,x02, x03 of an equilateral triangle whose center
of mass, m1*x01 +m2*x02+m3*x03 is the origin.
Identify the plane of the triangle with the complex
plane, so that x0i belongs in C. Take any solution
L(t) to the planar Kepler equation where the
Kepler constant k is a certain rational expression
in the three masses mi
The Lagrange solutions are xi(t) = L(t)*x0i

Each mass moves in
an ellipse in such a
way that the triangle
formed by the three
masses evolves by a
composition of
instantaneous dilations
and rotations and
hence is equilateral for
all time.
Euler’s 3-body solution


For the Euler solutions start by placing the three
masses on the same line with their positions x0i
such that the ratios rij=rik of their distances are
the roots of a certain polynomial whose
coefficients depend on the masses
Take any solution L(t) to Kepler’s equation (2)
where the Kepler constant is a certain rational
expression in the masses mi.


The Euler solutions
are xi(t) = L(t)x0i
At every instant the
masses are collinear,
and the ratios of their
distances remain
constant.
Figure Eight Solution and
Calculus of Variations



S is called the action. It is a number with the dimensions of (Energy) * (Time). S
depends on L, and L in turn depends on the function x(t). Given any function
x(t), we can produce the number S.
Problems: Unless the space of paths used is restricted, the minimum of the
action will be achieved where all bodies are infinitely separated with zero
velocity. The difficulty is overcome by imposing certain symmetries on the path
space to make the action functional coercive, which guarantees to achieve a
minimum which will be the desired solution.
A second difficulty arises in trying to ensure the minimizing path avoids
collisions. Collisions are instants in the time when the potential energy becomes
infinite; yet the action of a path with collisions may in general remain finite, so
special care needs to be taken to ensure that the minimizer is a collision-free
orbit and hence a genuine solution curve of the system of differential equations

1970, Gordon successfully applies
variational calculus to the 2-body problem,
showing that Keplerian orbits are actionminimizing;
Figure eight solution

2000, Chenciner and Montgomery use the principle of
least action to prove the existence of a solution to
the equal-mass three-body problem in which all three
bodies chase each other around a figure-eight. They
do this directly by constructing a "test path" of three
bodies that has the figure-eight geometry, then
showing it has lower action than any possible orbit
which includes collisions. (Since their path without
collisions has lower action than any collision path,
this proves that whatever solution minimizes the
action has no collisions.)
The Figure Eight


With period T, then x2(t) = x1(t
-T/3) and x3(t) = x1(t-2T/3). This
says that the three bodies travel
the same planar curve, phase
shifted from each other by onethird of a period. This curve has
the form of a figure eight.
The double point of the figureeight curve is at the origin. This
is also the center of mass. The
figure eight has the reflectional
symmetries of the x-y axes.
N-Body Simulation
The Program

Features:



Simulates 2-N gravitationally interacting
bodies (tested for 2-4 bodies)
Displays results graphically
Saves initial conditions to file for easy
replay of results
Development of The Program

Coded in C++



Initially Developed In Linux environment
Ported to PC for presentation
Graphics Implemented With:


OpenGL
OpenGL Utility Toolkit (GLUT)
Implementation of The Physics

Vector Class

Data type with all the characteristics of
vectors:





Vector Addition/Subtraction
Multiplication by a Scalar
Dot and Cross Product Calculations
Magnitude Function
Simplifies coding by allowing us to use
vector algebra!
Implementation of The Physics

Star Class

Object with the characteristics of a simple
particle for a gravitational simulation:





Position Vector
Velocity Vector
Acceleration Vector
Mass
Allows us to keep track of each body
efficiently
Simulation of the Physics

Acceleration calculated on each body j:
aj =
Σ ( – G * Mk / rk2 * rk/|rk| )
For all bodies k, where k ≠ j
Simulation of the Physics

Path of Bodies Numerically Integrated
with Euler’s Method:
vi+1 = vi + ai * Δt
xi+1 = xi + vi * Δt
Where i is each successive step
Results


When Simulated for Path of Planets:
Paths appear correct.
However more extreme conditions and
variation of time-step shows a
divergence from the solution


This Results from Euler’s method
Using a Runge-Kutta Integration method
would solve this problem.
Sources












Nate Robins – OpenGL – GLUT for Win32
http://www.xmission.com/~nate/glut.html
http://www.ams.org/notices/200105/fea-montgomery.pdf
http://merganser.math.gvsu.edu/david/reed03/projects/salomne/
http://www.ams.org/new-in-math/cover/orbits1.html
“NON-PLANAR MINIMIZERS AND d-ROTATIONAL SYMMETRY IN THE N-BODY
PROBLEM”, MATTHEW SALOMONE AND ZHIHONG XIA (not yet published)
Barrow-Green, Poincare and the Three Body Problem, American Mathematical Society, 1997
http://members.fortunecity.com/kokhuitan/nbody.html
http://en.wikipedia.org/wiki/Determinism
http://www.mathjmendl.org/chaos/
http://www.math.washington.edu/~hampton/Lagrange.html
“A Minimizing Property of Keplerian Orbits”, William B. Gordon, American Journal of
Mathematics, Oct. 1977
“A remarkable periodic solution of the three-body problem in the case of equal
masses”, A. Chenciner and R. Montgomery, Annals of Mathematics, 2000.