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
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.
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.
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 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
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
Documentation and reference imagery for the project.
cd python
pip install -e ".[test]"
pytest tests/addpath(genpath('matlab'))
runtests('matlab/tests')cd cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
cd build && ctest --output-on-failureAll 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) |
| 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.
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.
| Language | Framework | Tests | Status |
|---|---|---|---|
| ๐ Python | pytest | 36 | โ Passing |
| โ๏ธ C++ | Google Test | 31 | โ Passing |
| ๐งฎ MATLAB | matlab.unittest | 33 | โ Ready |
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.
๐ด Bug Fixes
optimize_isp_for_mission(Python): Wiredpower_Wandetainto 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 frombeam_voltagetoscreen_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
GriddedIonThrusterconstructor (Python): Added input validation for beam voltage, beam current, mass flow rate, grid spacing, and propellant mass. RaisesValueErroron 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.gitignorecovering Python, C++, MATLAB, and IDE artifacts.
- Goebel, D.M. and Katz, I., Fundamentals of Electric Propulsion: Ion and Hall Thrusters
- Vallado, D.A., Fundamentals of Astrodynamics and Applications
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}
}This project is licensed under the MIT License. See LICENSE for details.
