Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Collinear Lagrange Point Solutions in the Circular Restricted Three-Body Problem with Radiation Pressure using Fortran

super-linter human-only code

A Fortran collinear Lagrange points calculator.


Table of Contents

Background

ForCLaP (Fortran Collinear Lagrange Points) is a Fortran command line application demonstrating Newton-Raphson convergence on collinear solutions to the circular restricted three-body problem. Optional displacement of the collinear Lagrange points due to radiation pressure, relevant to small bodies such as asteroidal dust particles, is incorporated.

ForCLaP assumes a traditional three-body system with a large, central primary (m1), a smaller secondary (m2) and an infinitesimal tertiary mass (m3). ForCLaP accepts a user-input value for the m1/m2 mass ratio of the system. Use of a mass ratio within the Routh value limit, is enforced however.

ForCLaP also accepts a user-input value for a ratio of solar radiation pressure to gravitational force experienced by m3, β. This allows simulation of a luminous primary such as the Sun, but ForCLaP can just as easily be used for simulation of a non-luminous primary, such as planet, with an input ratio, β, of zero.

Collinear Lagrange point solution calculation is done with a Newton-Raphson algorithm. The program therefore inherits limitations of that algorithm. The algorithm can suffer runaway solution divergence, for example, but ForCLaP explicitly flags this and provides graceful algorithm termination. For algorithm convergence, iteration continues until the solution and the Newton derivative are both stable to four significant figures.

Locations of the Collinear Lagrange Points in the Circular Restricted Three-Body Problem with Radiation Pressure

Formulas for the locations of the collinear Lagrange points L1, L2 and L3 are given below. Symbol definitions and explanatory theory are given in [1].

L1

$$ \begin{eqnarray} f(r_2) &=& \frac{r_2^5 - 3r_2^4 + 3r_2^3 - \beta r_2^2}{-r_2^5 + 2r_2^4 - r_2^3 + r_2^2 - 2r_2 + 1} - \frac{m_2}{m_1}\\ f'(r_2) &=& \frac{-r_2^8 + 4r_2^7 - 3\beta r_2^6 - (7 - 2\beta)2r_2^5 + (26 - \beta)r_2^4 - 24r_2^3 + (9 - 2\beta)r_2^2 - 2\beta r_2}{r_2^{10} - 4r_2^9 + 6r_2^8 - 6r_2^7 + 9r_2^6 - 12r_2^5 + 9r_2^4 - 6r_2^3 + 6r_2^2 - 4r_2 + 1}\nonumber \\ \end{eqnarray} $$

L2

$$ \begin{eqnarray} f(r_2) &=& \frac{r_2^5 + 3r_2^4 + 3r_2^3 + \beta r_2^2}{-r_2^5 - 2r_2^4 - r_2^3 + r_2^2 + 2r_2 + 1} - \frac{m_2}{m_1}\\ f'(r_2) &=& \frac{r_2^8 + 4r_2^7 + (6 + 3\beta)r_2^6 + (14 + 4\beta)r_2^5 + (26 + \beta)r_2^4 + 24r_2^3 + (9 + 2\beta)r_2^2 + 2\beta r_2}{r_2^{10} + 4r_2^9 + 6r_2^8 + 2r_2^7 - 7r_2^6 - 12r_2^5 - 7r_2^4 + 2r_2^3 + 6r_2^2 + 4r_2 + 1}\nonumber \\ \end{eqnarray} $$

L3

$$ \begin{eqnarray} f(r_1) &=& \frac{-r_1^5 - 2r_1^4 - r_1^3 + (1 - \beta)r_1^2 + (1 - \beta)2r_1 - \beta + 1}{r_1^5 + 3r_1^4 - 3r_1^3} - \frac{m_2}{m_1}\\ f'(r_1) &=& \frac{-r_1^6 - 4r_1^5 - (2 - \beta)3r_1^4 - (1 + \beta)14r_1^3 - (1 - \beta)(26r_1^2 + 24r_1 + 9)}{r_1^8 + 6r_1^7 + 15r_1^6 + 18r_1^5 + 9r_1^4}\nonumber \\ \end{eqnarray} $$

Key Files

File Notes
src/forclap.f90 Fortran program.

Software Requirements

Software Notes
Fortran Details here. Free and proprietary compilers available.

Tip

Is Fortran already installed? It's sometimes bundled with other software. Strawberry Perl, for example, includes GNU Fortran (GFortran). Installation can be checked from the command line. E.g., for GFortran on Linux, macOS or Windows:

gfortran --version

Quality Assurance

ForCLaP has been tested in the following environments.

Windows 11, GFortran 14.3.0
Type Component Version
Platform Operating system Windows 11, 26H2 (OS Build 26300.9550)
Software GNU Fortran 14.3.0
Windows 11, GFortran 16.2.0
Type Component Version
Platform Operating system Windows 11, 26H2 (OS Build 26300.9550)
Software GNU Fortran 16.2.0, run from MSYS2 version 20260611, UCRT64 shell

Getting Started

Compilation

Program source code requires compilation on the target system with a Fortran compiler. E.g., for GFortran:

gfortran src/forclap.f90 -o forclap -fimplicit-none

GFortran Compiler Flags

Compiler Flag Notes
-o Name of the output file.
-fimplicit-none Forces all variables to be declared.

Execution

The compiled Fortran program should be executed from a command line. Execution syntax for some example command lines is given below.

Bash, Windows PowerShell

./forclap

Windows Command Prompt

forclap

Acknowledgements

Microsoft Copilot [2] was used as a licensing management aid.

References

  1. T. N. Stenborg, "Collinear Lagrange Point Solutions in the Circular Restricted Three-Body Problem with Radiation Pressure using Fortran", in Astron. Data Anal. Softw. Syst. XVII, in Astronomical Society of the Pacific Conference Series, vol. 394, R. W. Argyle, P. S. Bunclark and J. R. Lewis, Eds., 2008, pp. 734–737.
    View PDF   View at publisher   SciX

  2. Microsoft Copilot. (2026). Microsoft. Accessed: 24 September 2026. [AI model output, Microsoft Copilot application (cloud‑based service)] Available: Download the Microsoft Copilot app.

Citation

Citation details are available by clicking Cite this repository in the GitHub sidebar.

License

This repository is licensed under the BSD-3-Clause license. Details are available in the LICENSE file.

About

A Fortran collinear Lagrange points calculator.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages