Skip to content

Getting started

Logo

pdm-managed Python version Copier build docs tests Code Coverage Journal article

A prototype of a predictive engineering model (PEM) of a Hall thruster. Integrates sub-models from multiple disciplines to simulate a Hall thruster operating in a vacuum chamber. Uses uncertainty quantification techniques to extrapolate model predictions to a space-like environment.

⚙️ Installation

Ensure you are using Python 3.11 or later. You can install using pdm:

pip install --user pdm
git clone https://github.com/JANUS-Institute/HallThrusterPEM.git  # or download the source from releases
cd HallThrusterPEM
pdm install --prod

hallmd uses the HallThruster.jl Julia package. Please see their docs for setting up Julia and installing. Alternatively, you may run the provided install script, which will install both Julia and HallThruster.jl. From the root directory, run the following command (assuming python is available on your path)

Linux/Mac

curl -sSL https://raw.githubusercontent.com/JANUS-Institute/HallThrusterPEM/refs/heads/main/scripts/install_hallthruster.py | python -

Windows

powershell -c "Invoke-WebRequest -Uri https://raw.githubusercontent.com/JANUS-Institute/HallThrusterPEM/refs/heads/main/scripts/install_hallthruster.py | python -"
This will create a fresh Julia environment called hallthruster_<VERSION> (where <VERSION> is the latest version of HallThruster.jl) and install HallThruster.jl there. You can also use pdm to run this workflow and specify a specific julia and HallThruster.jl version.

pdm run scripts/install_hallthruster.py --julia-version=X.XX.X --hallthruster-version=V.VV.V

📍 Scripts used for publications

See the scripts folder for workflows for data generation, parameter inference, and analysis using hallmd. This directory also contains information needed to replicate the results in our publications.

📍 Standalone usage

Below, we demonstrate how to use hallmd to run HallThruster.jl on a simple config file.

import matplotlib.pyplot as plt

from hallmd.models import hallthruster_jl

config = {
    'discharge_voltage': 300,
    'anode_mass_flow_rate': 5e-6,
    'background_pressure_Torr': 1e-5,
    'propellant': 'Xenon',
    'domain': [0, 0.08]
}

outputs = hallthruster_jl(thruster='SPT-100', config=config)

ion_velocity = outputs['u_ion']
grid = outputs['u_ion_coords']

fig, ax = plt.subplots()
ax.plot(grid, ion_velocity)
ax.set_xlabel('Axial location (m)')
ax.set_ylabel('Ion velocity (m/s)')
plt.show()

🗂️ Project structure

📁 HallThrusterPEM
├── 📁 docs/
├── 📁 scripts/           # Scripts for building predictive engineering models (PEMs)
   ├── 📁 pem_v0/        # PEM v0 coupling of cathode -> thruster -> plume
   ├── 📁 pem_v1/        # PEM v1, same coupling but updated models and parameterization
   └── 📁 pem_mcmc/      # Internal package for MCMC inference
├── 📁 src/hallmd         # Python package source code root
   ├── 📁 models/        # Python wrappers for sub-models
   ├── 📁 data/          # Experimental data
   ├── 📁 devices/       # Device information (thrusters, equipment, etc.)
   └── 📄 utils.py       # Utility functions
├── 📁 tests/             # Testing for Python package
└── 📄 pdm.lock           # Frozen dependencies file

For more info on building PEMs with hallmd, see the scripts.

🏗️ Contributing

See the contribution guidelines.

📖 Reference

[1] Eckels, J. et al., "Hall thruster model improvement by multidisciplinary uncertainty quantification," Journal of Electric Propulsion, vol 3, no 19, September 2024.

Funding declaration

Funding for this work was provided by NASA in part through the Joint Advanced Propulsion Institute (JANUS), a NASA Space Technology Research Institute, under grant number 80NSSC21K1118, as well as in part through a NASA Space Technology Graduate Research Opportunity grant 80NSSC23K1181. This research was additionally supported in part through computational resources provided by Advanced Research Computing at the University of Michigan.

📖 References

[1] Eckels, J. et al., "Hall thruster model improvement by multidisciplinary uncertainty quantification," Journal of Electric Propulsion, vol 3, no 19, September 2024.

Made with the copier-numpy template.