C---+----+----+----+----+----+----+----+----+----+----+----+----+----+--
PROGRAM THREE_BODY
!Program: Solves for equilibrium positions of an infinitesimally
!small mass under the gravitational influence of two large
!masses in circular/near circular orbit. There are a total of
!five equilibrium positions (Joseph Louis Lagrange, 1736-1813,
!Mathematician and Physicist). The first three of these
!positions are co-linear with the two large masses (i.e.,
!"Lagrangian" points L1, L2, and L3) and are always unstable
!saddle points. The other two Lagrangian points (L4, L5) are
!located at equilateral triangle positions and are stable only if
!the largest mass is more than about 25 times the mass of the
!second largest mass. The Earth is about 81.3 times the mass of
!the Moon, meaning that L4 and L5 for the Earth-Moon system are
!stable points. The Sun is around 333,000 times more massive
!than the Earth so that the L4 and L5 points for the Earth-Sun
!system are stable. The Sun is more than 1000 times more massive
!than the planet Jupiter, meaning that L4 and L5 for the
!Sun-Jupiter system are also stable points (known historically as
!"Trojan Asteroids", including three large ones named Agamemnon,
!Achilles, and Hector). When L4 and L5 for a system are stable
!points, they're generally called "Trojan points". In reality,
!L4 and L5 points only represent centers of stability - the
!Trojan Asteroids as example are spread out around these stable
!L4 and L5 points over extended regions of space revolving about
!the Sun with Jupiter.
!
!In 1956 Polish astronomer Kordylewski discovered large
!concentrations of dust about the Trojan points L4 and L5 for the
!Earth-Moon system. In more recent years a dust ring following
!the Earth's orbit around the Sun was discovered by the DIRBE
!instrument on the COBE satellite and is related closely to the
!stable L4 and L5 Earth-Sun Trojan points. The effects of
!radiation pressure on the dust particles complicates the
!physical stability of that dust ring.
!
!Of all N-body gravitational problems, this is the most useful
!in modern space science and Earth science given satellite
!spacecraft and instrument measurement capabilities. The SOHO
!instrument has been at the Earth-Sun L1 point for many years to
!monitor solar activity on a nearly constant basis. The L1 point
!lies between the Earth and the Sun (distance from Earth is about
!930,000 mi) so that SOHO gets a clear view of the Sun 24 hours
!per day. In Earth science, L1 can be utilized 24 hours per day
!to monitor the atmosphere and ocean with an instrument looking
!backward toward the Earth. The outer L2 point for the Earth-Sun
!system is also about 930,000 mi from the Earth but with the
!Earth lying between L2 and the Sun. An instrument at L2 gets a
!24-hour view of the Earth per day with the Sun behind the Earth.
!In Earth science L2 can be used to monitor the vertical profiles
!of global temperature, ozone, etc. (using limb occultation
!method, etc.). A spacecraft at the unstable saddle points L1
!and L2 must be periodically adjusted in its orbit onboard,
!otherwise it will inevitably move away from these unstable
!equilibrium positions. The Earth-Sun L3 unstable point is
!located away from the Earth behind the Sun at a distance from
!the Sun slightly larger than the distance between the Earth and
!the Sun. The L3 point so far has had much less interest in
!science applications than L1 and L2.
!
!This three-body problem is solved by choosing the center of mass
!between the two large masses as the origin for the coordinate
!system. The acceleration of gravity then is in dominant balance
!with the sum of coriolis and centripetal accelerations for the
!small third mass at arbitrary position in circular/near circular
!orbit. The problem is solved assuming circular orbits for the
!masses although a much more rigorous approach is to include
!orbital eccentricity perturbations. The assumption of circular
!orbit is a good approximation for Sun-planet and other
!planet-satellite systems (including Earth-Moon). Distances for
!L1, L2, and L3 in this program are also approximations (but very
!good ones) for M>>m where M is the largest mass and m is the
!second largest mass.
!
!The purpose of this simple Fortran program is to have a routine
!to easily estimate the positions of the five Lagrangian points
!and to determine stability of L4 and L5. I wrote this program
!after discovering an excellent description and write-up of this
!classical three-body problem by Neil J. Cornish (with input from
!Jerry Goodman). Years ago I worked through this classical
!problem in detail and used the approach of John Danby from
!"Fundamentals of Celestial Mechanics", 1962. This was part of
!a graduate thesis in mathematics where I employed a slightly
!different vector approach with two coordinates in the plane of
!orbit and one vertical coordinate perpendicular out of the
!plane. The physics of the problem is the same for J. Danby and
!N. Cornish but the stability analyses differ.
!
!In either case, L1, L2, and L3 are always unstable saddle
!points, and stability for L4 and L5 "Trojan points" occurs only
!when the smaller of the two large masses divided by the largest
!mass is less than a "magic number" close to 4 percent. The
!stability analysis of Danby (1962) for the L4 and L5 points
!implies that m < 0.5(1-sqrt(23/27)), or m < 0.0385 = 1/25.96.
!N. Cornish yields m < 1/[25*0.5*(1+sqrt(1-4/625))], which is
!equivalent to m < 0.0401 = 1/24.96.
!
!Author: Dr. Jerry R. Ziemke
!
REAL M1,M2
WRITE(*,*)'PROGRAM: Three-body gravitational solution for two'
WRITE(*,*)' large masses and one infinitesimally small'
WRITE(*,*)' mass. This program solves for the positions'
WRITE(*,*)' of the three axial Lagrange saddle points'
WRITE(*,*)' L1, L2, and L3, and determines the stability'
WRITE(*,*)' of the two equilateral-triangular position'
WRITE(*,*)' Lagrangian points L4 and L5.'
WRITE(*,*)' '
WRITE(*,*)'Geometry of problem:'
WRITE(*,*)' (L4)'
WRITE(*,*)' X'
WRITE(*,*)' . .'
WRITE(*,*)' . .'
WRITE(*,*)' . .'
WRITE(*,*)' . .'
WRITE(*,*)' <------ S3 ------>. <-S1->.<-S2->'
WRITE(*,*)'----X--------------- M1 ------------X---- M2 ----X---'
WRITE(*,*)' (L3) . (L1) . (L2)'
WRITE(*,*)' . .'
WRITE(*,*)' . .'
WRITE(*,*)' . .'
WRITE(*,*)' . .'
WRITE(*,*)' X'
WRITE(*,*)' (L5)'
WRITE(*,*)'NOTES REGARDING ABOVE FIGURE:'
WRITE(*,*)' '
WRITE(*,*)' 1) Mass M1 > M2'
WRITE(*,*)' 2) Distance between M1 and M2 in this program is "R"'
WRITE(*,*)' 3) Circular orbits about center of mass is assumed'
WRITE(*,*)' for M1 and M2'
WRITE(*,*)' 4) X''s denote the five equilibrium Lagrange points'
WRITE(*,*)' 5) L4 and L5 are always at equilateral triangle'
WRITE(*,*)' positions at distance R from either M1 or M2'
WRITE(*,*)' and are stable only if M1 > 25*M2 (R is the'
WRITE(*,*)' distance between M1 and M2)'
WRITE(*,*)' 6) Computed distances S1,S2,S3 in program assumes'
WRITE(*,*)' that M1 >> M2 and apply very well to Earth-Moon'
WRITE(*,*)' Sun-Earth, and all other Sun-planet systems (L4'
WRITE(*,*)' and L5 are STABLE for all of these cases)'
WRITE(*,*)' '
WRITE(*,*)' '
WRITE(*,*)'Enter largest mass M1 (arbitrary units):'
READ(*,*) M1
WRITE(*,*)'Enter smaller mass M2 (same units as for M1):'
READ(*,*) M2
WRITE(*,*)'Enter separation distance R between the masses M1 and'
WRITE(*,*)'M2 (arbitrary, and may be simply in AU where one'
WRITE(*,*)'AU = 1.495E11 m):'
READ(*,*) R
ALPHA=M2/(M1+M2)
RR1=ALPHA*R
RR2=(1-ALPHA)*R
!NOTE: R1,R2,R3 BELOW APPLY FOR ALPHA << 1:
R1=R*(1-(ALPHA/3.)**0.33333333)
R2=R*(1+(ALPHA/3.)**0.33333333)
R3=R*(1+ALPHA*5./12.)
S1=RR2-R1
S2=R2-RR2
S3=R3+RR1
WRITE(*,*)' '
WRITE(*,*)'RESULTS FOR YOUR THREE-BODY GRAVITATIONAL PROBLEM:'
WRITE(*,*)' '
WRITE(*,*)'Lagrange axial points L1, L2, L3 are all UNSTABLE'
IF (M1.GT.25.*M2) THEN
WRITE(*,*)'Lagrange triangular points L4 and L5 are STABLE'
ENDIF
IF (M1.LE.25.*M2) THEN
WRITE(*,*)'Lagrange triangular points L4 and L5 are UNSTAbLE'
ENDIF
WRITE(*,*)'Distances for S1,S2,S3 (in your units chosen for R):'
WRITE(*,*)'Distance S1 from 2nd largest mass M2 to L1: ',S1
WRITE(*,*)'Distance S2 from 2nd largest mass M2 to L2: ',S2
WRITE(*,*)'Distance S3 from largest mass M1 to L3: ',S3
STOP
END