Skip to content

Latest commit

 

History

History
287 lines (221 loc) · 7.87 KB

File metadata and controls

287 lines (221 loc) · 7.87 KB

Usage

Installation

git clone https://github.com/SidRichardsQuantum/Celestial_Dynamics_Iteration_Methods.git
cd Celestial_Dynamics_Iteration_Methods

The R examples use base R. The optional Python helper celestial_systems/three_body/figure_8_solution.py requires packages listed in requirements.txt:

python -m pip install -r requirements.txt

Common Commands

Run all validation checks:

Rscript tests/run_all_tests.R

Run three-body validation only:

Rscript tests/validate_three_body.R

Run two-body validation only:

Rscript tests/validate_two_body.R

Regenerate every example plot and companion trajectory animation:

Rscript run_all_examples.R

Regenerate the Sun-Earth all-method comparison only:

Rscript examples/comparisons/sun_earth_all_methods.R

Regenerate generated result tables, conservation diagnostics, runtime benchmarks, convergence plots, the plot manifest, the results index, and the method comparison dashboard:

Rscript analysis/generate_results.R

Update the committed artifact size/dimension baseline after intentional plot or dashboard changes:

Rscript analysis/update_artifact_baseline.R

Open the generated local results index in a browser:

analysis/generated/index.html

The published GitHub Pages version is:

https://sidrichardsquantum.github.io/Celestial_Dynamics_Iteration_Methods/

Regenerate two-body plots only:

Rscript examples/two_body_examples/run_all_two_body_examples.R

Regenerate n-body plots only:

Rscript examples/n_body_examples/run_all_n_body_examples.R

Regenerate three-body plots only:

Rscript examples/three_body_examples/run_all_three_body_examples.R

Run examples from the repository root so their source(...) paths resolve correctly.

Run the experimental near-periodic three-body search:

Rscript experiments/find_three_body_solution.R

This search is intentionally exploratory. It performs a small randomized search over symmetric equal-mass initial conditions and writes a candidate plot to images/three_body/experiments/candidate_solution.png.

Example Usage

Projectile trajectory:

source("examples/projectile_trajectories/projectile_example.R")

Euler Method Trajectory

Sun-Earth all-method comparison:

source("examples/comparisons/sun_earth_all_methods.R")

Sun-Earth All Methods

Earth-Moon system using Euler's method:

source("examples/two_body_examples/earth_moon_examples/earth_moon_euler.R")

Earth and Moon

Equal-mass figure-8 three-body solution:

source("examples/three_body_examples/special_solutions/three_earths.R")

Three Earths

Four-body Sun-Earth-Mars-Jupiter example:

source("examples/n_body_examples/sun_earth_mars_jupiter.R")

Sun-Earth-Mars-Jupiter

Special four-body rotating square:

source("examples/n_body_examples/special_solutions/rotating_square_four_body.R")

Rotating Square Four-Body

Project Structure

Celestial_Dynamics_Iteration_Methods/
├── README.md
├── USAGE.md
├── THEORY.md
├── RESULTS.md
├── constants.R
├── run_all_examples.R
├── analysis/
│   ├── generate_results.R
│   ├── update_artifact_baseline.R
│   └── generated/
│       ├── artifact_baseline.csv
│       ├── convergence_summary.csv
│       ├── earth_moon_method_summary.csv
│       ├── index.html
│       ├── method_summary.csv
│       ├── method_comparison_dashboard.html
│       ├── n_body_conservation_summary.csv
│       ├── plot_manifest.csv
│       ├── runtime_benchmark.csv
│       └── three_body_special_summary.csv
├── .github/
│   └── workflows/
│       ├── pages.yml
│       ├── r-validation.yml
│       └── regenerate-plots.yml
├── celestial_systems/
│   ├── plotting/
│   │   └── plot_style.R
│   ├── two_body/
│   │   ├── plot_two_body.R
│   │   ├── two_body_helpers.R
│   │   ├── two_body_method_registry.R
│   │   ├── two_body_euler.R
│   │   ├── two_body_heuns.R
│   │   ├── two_body_midpoint.R
│   │   ├── two_body_runge_kutta.R
│   │   └── two_body_velocity_verlet.R
│   ├── n_body/
│   │   ├── four_body_initial_conditions.R
│   │   ├── n_body_helpers.R
│   │   ├── n_body_runge_kutta.R
│   │   ├── n_body_velocity_verlet.R
│   │   └── plot_n_body.R
│   └── three_body/
│       ├── choreography_initial_conditions.R
│       ├── circular_restricted_three_body.R
│       ├── euler_collinear_initial_conditions.R
│       ├── figure_8_initial_conditions.R
│       ├── figure_8_solution.py
│       ├── lagrange_initial_conditions.R
│       ├── plot_three_body.R
│       ├── sitnikov_problem.R
│       └── three_body_runge_kutta.R
├── examples/
│   ├── comparisons/
│   ├── n_body_examples/
│   │   ├── run_all_n_body_examples.R
│   │   └── special_solutions/
│   ├── projectile_trajectories/
│   ├── two_body_examples/
│   │   ├── run_all_two_body_examples.R
│   │   ├── earth_moon_examples/
│   │   └── sun_earth_examples/
│   └── three_body_examples/
│       ├── README.md
│       ├── run_all_three_body_examples.R
│       ├── general/
│       ├── perturbations/
│       ├── restricted/
│       └── special_solutions/
├── images/
│   ├── analysis/
│   ├── n_body/
│   ├── projectile/
│   ├── two_body/
│   └── three_body/
├── experiments/
│   └── find_three_body_solution.R
├── iteration_methods/
└── tests/
    ├── helpers_three_body.R
    ├── run_all_tests.R
    ├── validate_plot_generation.R
    ├── validate_restricted_three_body.R
    ├── validate_special_solutions.R
    ├── validate_two_body.R
    └── validate_three_body.R

Generated Artifacts

Plots are generated artifacts, but this repository keeps representative PNGs under images/ so the markdown result pages render directly. Trajectory examples also write companion HTML canvas animations next to the PNGs. If an example is changed, run the relevant example runner and then run:

Rscript tests/validate_plot_generation.R

The GitHub Actions workflow R validation runs tests/run_all_tests.R on pushes and pull requests. The Regenerate plots workflow is manual; it runs run_all_examples.R, regenerates analysis artifacts, validates the outputs, and uploads regenerated image and analysis directories as artifacts. The Deploy GitHub Pages workflow regenerates plots, animations, and analysis artifacts, validates them, and publishes a static site containing analysis/generated/, images/, and the top-level markdown documents.

The generated comparison dashboard is written to:

analysis/generated/method_comparison_dashboard.html

The generated results index is written to:

analysis/generated/index.html

The plot manifest and artifact baseline used by validation are written to:

analysis/generated/plot_manifest.csv
analysis/generated/artifact_baseline.csv

Representative generated animations include:

images/two_body/sun_earth/sun_earth_runge_kutta.html
images/three_body/special_solutions/three_earths.html
images/n_body/sun_earth_mars_jupiter.html