Metadata-Version: 2.5
Name: propulpy
Version: 0.2.0
Summary: Rocket motor design and inverse-design library, built to complement RocketPy.
Project-URL: Homepage, https://github.com/UltraLuminics/PropulPy
Project-URL: Issues, https://github.com/UltraLuminics/PropulPy/issues
Author: UltraLuminics - Universidad Nacional de Colombia
License-Expression: MIT
License-File: LICENSE
Keywords: internal ballistics,nozzle,optimization,propulsion,rocketpy,rocketry,solid rocket motor
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Requires-Dist: matplotlib>=3.7
Requires-Dist: numpy>=1.23
Requires-Dist: rocketpy>=1.8
Requires-Dist: scipy>=1.10
Provides-Extra: cad
Requires-Dist: cadquery>=2.4; extra == 'cad'
Provides-Extra: cantera
Requires-Dist: cantera>=3.0; extra == 'cantera'
Provides-Extra: dev
Requires-Dist: pre-commit>=3.5; extra == 'dev'
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
Requires-Dist: pytest>=7.4; extra == 'dev'
Requires-Dist: pyyaml>=6.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Provides-Extra: docs
Requires-Dist: myst-parser>=2; extra == 'docs'
Requires-Dist: numpydoc>=1.6; extra == 'docs'
Requires-Dist: pydata-sphinx-theme>=0.15; extra == 'docs'
Requires-Dist: sphinx>=7; extra == 'docs'
Provides-Extra: optim
Requires-Dist: pymoo>=0.6; extra == 'optim'
Provides-Extra: yaml
Requires-Dist: pyyaml>=6.0; extra == 'yaml'
Description-Content-Type: text/markdown

# PropulPy

**Rocket motor design and inverse design, built to complement [RocketPy](https://github.com/RocketPy-Team/RocketPy).**

*Diseño y diseño inverso de motores cohete, como complemento de RocketPy.*

RocketPy answers *"how does this rocket fly with this motor?"*.
PropulPy answers the inverse question: **"which motor — with exact dimensions — do I need to meet my goals?"**

| Layer | What it does |
|---|---|
| **Forward model** | Design (propellant, grains, nozzle, chamber) → `F(t)`, `Pc(t)`, `ṁ(t)`, `m(t)`, ready for RocketPy |
| **Inverse design** | Objectives + constraints (apogee, impulse, Isp, exit pressure, thrust profile, manufacturing limits) → grain, nozzle and chamber geometry |

Ambient conditions come from a `rocketpy.Environment`, so motors can be
evaluated at any launch site and date.

> ⚠️ **Pre-alpha.** Foundations only (v0.1 in progress). APIs will change.

## Status

| Module | State |
|---|---|
| `nozzle.isentropic`, `ConicalNozzle` | ✅ |
| `Propellant`, `SaintRobert`, `PiecewiseSaintRobert`, `KNSB` | ✅ |
| `grains.BATES`, `EndBurner`, `Finocyl`, `Star`, `Chamber` | ✅ |
| `AmbientConditions` (float or `rocketpy.Environment`) | ✅ |
| `SolidMotor.simulate()`, `SolidMotor.from_ric()`, `MotorResults`, `to_rocketpy()`, `.eng`/`.ric`/`.csv` export | ✅ |
| `analysis.checks` (`check_motor_design`, safety audit) | ✅ |
| `design.nozzle` (`dimension_nozzle`, trajectory optimization) | ✅ |
| `flight` & `design.mission` (`MotorRequirements`, RocketPy apogee check, `find_grain_length_for_apogee`) | ✅ |
| `cad` (`MotorGeometryBuilder`, parametric 3D STEP AP214 & STL export via CadQuery) | ✅ |

## Quick start

```bash
git clone https://github.com/UltraLuminics/PropulPy.git
cd PropulPy
pip install -e ".[dev]"
pytest
```

```python
from propulpy import BATES, KNSB, AmbientConditions
from propulpy.nozzle import ConicalNozzle

prop = KNSB(cstar_efficiency=0.95)
grain = BATES(diameter=38e-3, core_diameter=12.5e-3, length=62e-3)
nozzle = ConicalNozzle(throat_diameter=5.88e-3, exit_diameter=13.8e-3, efficiency=0.90)

kn = 2 * grain.burn_area(0.0) / nozzle.throat_area
pc = prop.equilibrium_pressure(kn)
pa = AmbientConditions(101325.0).ground_pressure
print(f"Kn = {kn:.1f}, Pc = {pc/1e5:.1f} bar, F = {nozzle.thrust(prop.k, pc, pa):.1f} N")
```

## Units

SI everywhere internally (m, Pa, kg, s). Helpers in `propulpy.units` convert at the boundaries.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md). Developed by **UltraLuminics**, Universidad Nacional de Colombia, inspired by the work of Projeto Jupiter (USP) on RocketPy.

## License

[MIT](LICENSE)
