Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Orbital Trajectory Traversal & Velocity Decomposition in Polar Coordinates

A high-precision Computational Physics simulation package in Python for modeling satellite orbital trajectories in polar coordinates ((r, \theta)), analyzing radial and azimuthal velocity decomposition, and tracking conserved physical quantities.


📌 Project Overview

This project solves the equations of motion for a satellite orbiting a central gravitational field using polar coordinates:

  • Position Vector: (\mathbf{r} = r \mathbf{u}_r)
  • Velocity Decomposition: (\mathbf{v} = \dot{r} \mathbf{u}r + r \dot{\theta} \mathbf{u}\theta = v_r \mathbf{u}r + v\theta \mathbf{u}_\theta)
  • Acceleration in Polar Coordinates: (\mathbf{a} = (\ddot{r} - r \dot{\theta}^2)\mathbf{u}r + (r \ddot{\theta} + 2\dot{r}\dot{\theta})\mathbf{u}\theta)
  • Central Force Equations: $$\ddot{r} = \frac{v_\theta^2}{r} - \frac{\mu}{r^2}$$ $$\dot{v}\theta = -\frac{v_r v\theta}{r}$$

🛠️ Project Structure

orbital_trajectory/
│
├── main.py                   # Main simulation runner & pipeline entry point
├── physics_model.py          # Differential equations & physics laws in polar coordinates
├── solvers.py                # Adaptive DOP853/RK45 ODE numerical integration engine
├── utils.py                  # Logger setup, path management, and CSV exports
├── config.py                 # Dataclasses & JSON configuration validator
├── requirements.txt          # Third-party Python package dependencies
├── README.md                 # Project documentation & usage guidelines
│
├── inputs/
│   └── config.json           # Simulation parameters (initial state, mu, ODE options)
│
└── outputs/
    ├── csv/                  # Output tidy data table (simulation_results.csv)
    ├── images/               # 4 high-resolution publication plots (PNG 300 DPI)
    └── logs/                 # Detailed execution logs (simulation.log)

🚀 Quick Start Guide

1. Install Dependencies

Ensure Python 3.10+ is installed, then install requirements:

pip install -r requirements.txt

2. Run Simulation

Execute main.py from project root:

python main.py

📊 Outputs Generated

  1. CSV Table (outputs/csv/simulation_results.csv):
    • Timesteps, polar states ((r, \theta, v_r, v_\theta)), Cartesian states ((x, y, z, v_x, v_y, v_z)), Kinetic/Potential/Total Energy, and Angular Momentum.
  2. Visualizations (outputs/images/):
    • orbital_trajectory.png: 2D trajectory plot with central body marker.
    • state_variables.png: 4-panel time series of (r(t), \theta(t), v_r(t), v_\theta(t)).
    • phase_space.png: Phase space diagram of (v_r) vs (r).
    • energy_error.png: Fractional energy error over time on logarithmic scale.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages