Skip to content

HInJang/Computer-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Computer-Simulation

A Python-based orbital simulation of the solar system. This project uses numerical integration methods (Beeman, Euler, and Symplectic Euler) to model the orbits, total energy, and planetary alignments of celestial bodies in a simplified solar system.

πŸ“ Project Structure

  • planet.py: Defines the Planet class and handles position, velocity, and acceleration updates.

  • solar.py: Runs the main simulation logic, visualization, energy calculations, and analysis.

  • parameters-solar.txt: Input data file containing simulation parameters and solar system data.

πŸš€ Features

  • Orbital Simulation: Animates planetary orbits using matplotlib.

  • Energy Analysis: Compares total energy conservation between Beeman and Euler-based methods.

  • Planetary Alignment Detection: Detects alignment based on angular thresholds.

  • Orbital Periods: Compares simulated vs. actual orbital periods using regression analysis.

πŸ§ͺ How to Run

 python solar.py 
  • Upon execution, the simulation will:

  • Display animated planetary orbits

  • Plot orbital periods and regression fit

  • Visualize energy conservation over time (Beeman vs. Euler)

  • Detect and display planetary alignments

πŸ“˜ Numerical Methods Used

  • Beeman Integration

  • Direct Euler Method

  • Symplectic Euler Method

βš™οΈ Requirements

Install dependencies with:

 pip install numpy matplotlib seaborn scikit-learn  

πŸ“Š Data Source

Planetary data taken from: NASA JPL Horizons System (see parameters-solar.txt for details)

⚠️ Notes

Units: AU (astronomical units), MβŠ• (Earth mass), yr (Earth year)

Conversion factors included for energy output in SI units (Joules)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages