Skip to content

ATaylorAerospace/Ion-Propulsion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

289 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Geosat

๐Ÿš€ Ion-Propulsion: Gridded Ion Thruster Suite

License: MIT Stars Languages Python C++ MATLAB Tests

A flight grade tri language (Python, MATLAB, C++) library for gridded ion thruster modeling and mission analysis, developed for space probes and GEO satellites.

Author: A Taylor

Contact A Taylor


๐Ÿš€ Introduction

This repository contains the design and simulation tools for a gridded ion thruster that meets specific requirements for space probes and GEO satellites. The suite provides parity across three languages with verified precision (1e-6 tolerance).

๐Ÿš€ High efficiency: Strive for a specific impulse (Isp) of at least 3,000 seconds for maneuvering and orbital raising.

๐Ÿš€ Low propellant consumption: Achieved through ion extraction efficiency optimization and minimized grid erosion modeling.

๐Ÿš€ Long mission lifetime: Careful material selection with grid erosion rate tracking and neutralizer performance modeling.

๐Ÿš€ High thrust-to-weight ratio: Crucial for maximizing payload capacity and achieving desired mission objectives.

๐Ÿš€ Grid optimization: Optimized grid design using Child-Langmuir law modeling to minimize ion divergence and maximize thrust generation.

๐Ÿš€ Neutralizer performance: Ensures the neutralizer effectively compensates for charge imbalance created by the ion beam.

๐Ÿš€ Thermal management: Integrated solar cell and thermal property modeling for optimal operating temperature range.

๐Ÿš€ Reliability: Designed for radiation resistance, micrometeoroid impacts, and environmental stresses.

๐Ÿš€ Compactness and integrability: Compact engine design for integration with spacecraft structure, power supply, and launch vehicle fairings.

๐Ÿš€ Testability and maintainability: Comprehensive test suites across all three languages ensure performance and readiness.


๐Ÿ›  Project Scope

The project delivers three core modules with strict cross language parity:

๐Ÿ›  dynamics: GEO/Lagrange mission profile calculations and low thrust trajectory modeling. Includes Hohmann transfer delta-v, Lagrange point estimation, spiral transfer analysis, and low thrust transfer time computation.

๐Ÿ›  propulsion: High-fidelity Gridded Ion Thruster (GIT) models. Includes ion extraction efficiency, beam voltage/current modeling, Child-Langmuir current limits, grid erosion rates (molybdenum sputtering), neutralizer performance, and power processing unit integration.

๐Ÿ›  optimization: Solvers for maximizing payload fraction (Tsiolkovsky rocket equation), minimizing propellant consumption, extending mission lifetime, and finding optimal Isp for power-constrained missions.


๐Ÿ“– Repository Structure

๐Ÿ“– python/

Python package using Hatch build system with astropy.units for all physical quantities. Constructor input validation mirrors the C++ and MATLAB implementations for cross-language safety parity. Install with pip install -e ./python. Tests run with pytest.

python/
  pyproject.toml
  src/ion_propulsion/
    dynamics/mission_profiles.py
    propulsion/thruster.py
    optimization/solvers.py
  tests/
    test_dynamics.py
    test_propulsion.py
    test_optimization.py

๐Ÿ“– matlab/

MATLAB function-based structure with modern arguments validation blocks for type safety. Run tests with runtests('matlab/tests').

matlab/
  dynamics/
    geo_transfer_delta_v.m
    lagrange_point_l1.m
    low_thrust_transfer_time.m
    spiral_delta_v.m
  propulsion/
    GriddedIonThruster.m
  optimization/
    optimal_payload_fraction.m
    propellant_mass.m
    mission_lifetime.m
    optimize_isp_for_mission.m
  tests/
    test_dynamics.m
    test_propulsion.m
    test_optimization.m

๐Ÿ“– cpp/

Standard CMake project using C++20. Built with Google Test for validation. Build instructions below.

cpp/
  CMakeLists.txt
  include/ion_propulsion/
    constants.hpp
    dynamics/mission_profiles.hpp
    propulsion/thruster.hpp
    optimization/solvers.hpp
  src/
    dynamics/mission_profiles.cpp
    propulsion/thruster.cpp
    optimization/solvers.cpp
  tests/
    test_dynamics.cpp
    test_propulsion.cpp
    test_optimization.cpp

๐Ÿ“– docs/

Documentation and reference imagery for the project.


๐Ÿ—๏ธ Build Instructions

๐Ÿ Python

cd python
pip install -e ".[test]"
pytest tests/

๐Ÿงฎ MATLAB

addpath(genpath('matlab'))
runtests('matlab/tests')

โš™๏ธ C++

cd cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
cd build && ctest --output-on-failure

๐Ÿ”ฌ Core Physics

All implementations share identical constants and equations:

Equation Formula
Tsiolkovsky Rocket Equation dv = Isp * g0 * ln(m0 / mf)
Child-Langmuir Law J_CL = (4/9) * eps0 * sqrt(2e/mi) * V^(3/2) / d^2
Specific Impulse Isp = (1/g0) * sqrt(2eVb/mi) * eta
Hohmann Transfer dv1 = v_transfer_peri - v_park
Spiral Transfer dv = sqrt(mu/ri) - sqrt(mu/rf)

๐Ÿ“Š Physical Constants

Constant Value Unit
g0 9.80665 m/s^2
mu_earth 3.986004418e14 m^3/s^2
R_earth 6.371e6 m
GEO_radius 42164.0e3 m
epsilon_0 8.854187817e-12 F/m
e_charge 1.602176634e-19 C
m_xenon 2.18e-25 kg

Cross-language precision verified to 1e-6 tolerance.


๐Ÿ”ง API Conventions

All three language implementations enforce the same API contracts. Key conventions to note when calling functions across languages:

๐Ÿ”ง geo_transfer_delta_v(r_park_km) โ€” The r_park_km parameter is the parking orbit altitude above Earth's surface in kilometres (not the full orbital radius). The function adds R_earth internally. For example, pass 200.0 for a 200 km LEO parking orbit.

๐Ÿ”ง child_langmuir_current() โ€” Computes space-charge-limited current density using V_total = V_screen + |V_accel|. The accelerator grid voltage is treated as a positive magnitude in the formula regardless of the sign convention used at construction time.

๐Ÿ”ง Input Validation โ€” All three languages validate constructor and function inputs. Beam voltage, beam current, mass flow rate, grid spacing, and propellant mass must all be positive. Python raises ValueError, C++ raises std::invalid_argument, and MATLAB uses arguments blocks with {mustBePositive}.

๐Ÿ”ง optimize_isp_for_mission() โ€” The optimizer is power-constrained: thrust is computed as F = 2ยทฮทยทP / (Ispยทgโ‚€) and the solver searches for the Isp that maximises the resulting payload fraction. Both the power_W and eta parameters are active in the objective function across all three implementations.


๐Ÿงช Test Summary

Language Framework Tests Status
๐Ÿ Python pytest 36 โœ… Passing
โš™๏ธ C++ Google Test 31 โœ… Passing
๐Ÿงฎ MATLAB matlab.unittest 33 โœ… Ready

๐Ÿค Contributing

Contributions are welcome. When submitting changes, please observe these project standards:

๐Ÿค Cross-language parity: Any physics function added or modified in one language must be reflected in all three (Python, C++, MATLAB) with identical constants, formulas, and API conventions. Verify results match to 1e-6 tolerance.

๐Ÿค Input validation: All constructors and functions that accept physical parameters must validate inputs. Beam voltages, currents, masses, and distances must be positive. Follow the existing pattern: Python uses ValueError, C++ uses std::invalid_argument, MATLAB uses arguments blocks.

๐Ÿค Unit safety: Python functions must return astropy.units.Quantity objects. C++ and MATLAB functions document units in docstrings and header comments.

๐Ÿค Build artifacts: The repository includes a .gitignore for Python (__pycache__, *.egg-info, .pytest_cache), C++ (build/, *.o, *.so), and MATLAB (*.mexa64, *.asv) artifacts. Do not commit generated files.

๐Ÿค Tests: Every new function requires unit tests in all three languages. Run the full test suite before submitting.


๐Ÿ“‹ Changelog

v1.1.0 โ€” 2026

๐Ÿ”ด Bug Fixes

  • optimize_isp_for_mission (Python): Wired power_W and eta into the objective function. Previously these parameters were accepted but unused, causing the optimizer to return pure Tsiolkovsky fractions instead of power-constrained results. Now matches the C++ implementation.
  • child_langmuir_current (MATLAB): Corrected voltage variable from beam_voltage to screen_grid_voltage + |accel_grid_voltage|, restoring cross-language parity with the Python and C++ implementations.

๐ŸŸก API Alignment

  • geo_transfer_delta_v (MATLAB): Aligned input convention to take parking orbit altitude above Earth's surface (km), matching Python and C++. Previously took the full orbital radius (km). MATLAB test updated accordingly.

๐ŸŸก Robustness

  • GriddedIonThruster constructor (Python): Added input validation for beam voltage, beam current, mass flow rate, grid spacing, and propellant mass. Raises ValueError on non-positive values, matching the guards in C++ (std::invalid_argument) and MATLAB ({mustBePositive}).

๐ŸŸข Housekeeping

  • constants.hpp (C++): Fixed documentation comment referencing "Rust" โ€” corrected to "MATLAB".
  • .gitignore: Added repository-wide .gitignore covering Python, C++, MATLAB, and IDE artifacts.

๐Ÿ“– References

  • Goebel, D.M. and Katz, I., Fundamentals of Electric Propulsion: Ion and Hall Thrusters
  • Vallado, D.A., Fundamentals of Astrodynamics and Applications

๐Ÿ“– Citation

If you use this repository in your research, please cite it as:

@misc{ATaylor_IonPropulsion_2026,
  author       = {A. Taylor},
  title        = {Ion Propulsion: Tri-Language Gridded Ion Thruster Suite},
  year         = {2026},
  url          = {https://github.com/ATaylorAerospace/Ion-Propulsion/},
  note         = {Accessed: YYYY-MM-DD}
}

๐Ÿ“– Contact

Contact A Taylor


๐Ÿ“– License

This project is licensed under the MIT License. See LICENSE for details.

About

GEO spacecraft propulsion optimization library covering Hohmann transfers, J2 perturbations, Hall-Effect and ion thruster trade studies, and station-keeping budgets, implemented in Python and MATLAB

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors