Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Python package

on:
push:
branches: [ master, cameron/revival ]
branches: [ master ]
pull_request:
branches: [ master ]

Expand Down
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# OpenRocketEngine
# Rocket

![Python package](https://github.com/cmflannery/openrocketengine/workflows/Python%20package/badge.svg)

Tools for liquid rocket engine design and analysis.
Tools for rocket vehicle design and analysis.

## Installation

Expand All @@ -16,14 +16,14 @@ brew install gcc
sudo apt-get install gfortran

# Then install
pip install openrocketengine
pip install rocket
```

## Quick Start

```python
from openrocketengine import EngineInputs, design_engine, plot_engine_dashboard
from openrocketengine.units import kilonewtons, megapascals
from rocket import EngineInputs, design_engine, plot_engine_dashboard
from rocket.units import kilonewtons, megapascals

# Design from propellant selection (thermochemistry auto-calculated)
inputs = EngineInputs.from_propellants(
Expand All @@ -50,10 +50,20 @@ plot_engine_dashboard(inputs, performance, geometry)
- **Type-safe**: Runtime type checking with beartype
- **Units handling**: Built-in `Quantity` class prevents unit errors
- **Fast**: Numba-accelerated isentropic flow calculations
- **Visualization**: Engine cross-sections, performance curves, dashboards
- **NASA CEA**: Accurate thermochemistry via RocketCEA
- **Visualization**: Engine cross-sections, performance curves, dashboards
- **Nozzle contours**: Rao bell and conical nozzle generation with CSV export

## Modules

- `rocket.engine` - Engine design and performance analysis
- `rocket.nozzle` - Nozzle contour generation
- `rocket.units` - Physical quantity handling with units
- `rocket.plotting` - Visualization tools
- `rocket.propellants` - NASA CEA thermochemistry integration
- `rocket.tanks` - Propellant and tank sizing (coming soon)


## References

1. [GATech: Bell Nozzles](http://soliton.ae.gatech.edu/people/jseitzma/classes/ae6450/bell_nozzle.pdf)
Expand Down
16 changes: 8 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# -- Project information -----------------------------------------------------

project = "openrocketengine"
project = "rocket"
copyright = "2018, cmflannery"
author = "cmflannery"

Expand Down Expand Up @@ -106,7 +106,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = "openrocketenginedoc"
htmlhelp_basename = "rocketdoc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -132,8 +132,8 @@
latex_documents = [
(
master_doc,
"openrocketengine.tex",
"openrocketengine Documentation",
"rocket.tex",
"rocket Documentation",
"cmflannery",
"manual",
),
Expand All @@ -145,7 +145,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, "openrocketengine", "openrocketengine Documentation", [author], 1)
(master_doc, "rocket", "rocket Documentation", [author], 1)
]


Expand All @@ -157,10 +157,10 @@
texinfo_documents = [
(
master_doc,
"openrocketengine",
"openrocketengine Documentation",
"rocket",
"rocket Documentation",
author,
"openrocketengine",
"rocket",
"One line description of project.",
"Miscellaneous",
),
Expand Down
14 changes: 7 additions & 7 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Getting Started
Designing a Rocket Engine
-------------------------

What does OpenRocketEngine Do?
What does Rocket Do?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OpenRocketEngine will perform some basic calculations for rocket thrust chamber designs. Additionally,
Rocket will perform some basic calculations for rocket thrust chamber designs. Additionally,
it will be able to perform comparisions of different configurations.

This code was originally created with the intention of automating vehicle sizing trade studies.
Expand All @@ -29,17 +29,17 @@ The inputs are classified as either required or optional.

Configuration Files
~~~~~~~~~~~~~~~~~~~
openrocketengine takes a configuration file as the only input, specifying the engine propellant properties, pressures desired,
rocket takes a configuration file as the only input, specifying the engine propellant properties, pressures desired,
and geometric design choices. Right now, there is only one possible combination of parameters that all have to be included in
the config file. In the future, there may be additional options to automatically retrieve propellant properties from CEA.

Config files are usually named with the engine name and the revision number with a '.cfg' suffix. I.e. RBF-rev01.cfg.

A typical configuration file looks like the following::

# This is a test configuration file for openrocketengine
# This is a test configuration file for rocket
#
# The parameters listed here are all the known parameters that openrocketengine can take as inputs.
# The parameters listed here are all the known parameters that rocket can take as inputs.
# Refer to the official documentation for more implementation and usage details.
name RBF1
units SI
Expand All @@ -57,13 +57,13 @@ A typical configuration file looks like the following::

Running the program
~~~~~~~~~~~~~~~~~~~
openrocketengine can be fun from the command line with the command `rocket`::
rocket can be fun from the command line with the command `rocket`::

$ rocket RBF-rev01.cfg

Outputs
~~~~~~~
openrocketengine generates an output excel workbook with two sheets; one geometric parameters, and one for performance parameters.
rocket generates an output excel workbook with two sheets; one geometric parameters, and one for performance parameters.


Recommended Workflow
Expand Down
8 changes: 4 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. openrocketengine documentation master file, created by
.. rocket documentation master file, created by
sphinx-quickstart on Sun Jul 29 01:55:39 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to openrocketengine's documentation!
Welcome to rocket's documentation!
============================================

.. toctree::
Expand All @@ -19,14 +19,14 @@ Welcome to openrocketengine's documentation!
Overview
--------

OpenRocketEngine performs the calculations for simple analysis and design of rocket engines. For a
Rocket performs the calculations for simple analysis and design of rocket engines. For a
general overview of the philosophy behind designing rocket engines, refer to the `rocket propulsion
section`_ of General Body of Knowledge (GBOK).

Installation
------------

OpenRocketEngine only supports python 3.5 and above. Functionality with other python releases is
Rocket only supports python 3.5 and above. Functionality with other python releases is
untested and not guaranteed. Basic usage::

$ rocket config_file.cfg
Expand Down
2 changes: 0 additions & 2 deletions openrocketengine/examples/__init__.py

This file was deleted.

13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[project]
name = "openrocketengine"
version = "0.2.0"
description = "OpenRocketEngine - Tools for liquid rocket engine design and analysis"
name = "rocket"
version = "0.3.0"
description = "Rocket - Tools for rocket vehicle design and analysis"
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
authors = [
{ name = "Cameron Flannery" }
]
keywords = ["rocket", "propulsion", "aerospace", "engineering", "nozzle"]
keywords = ["rocket", "propulsion", "aerospace", "engineering", "nozzle", "tanks", "vehicle"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
Expand Down Expand Up @@ -37,9 +37,8 @@ dev = [
]

[project.urls]
Homepage = "https://github.com/openrocketengine/openrocketengine"
Documentation = "https://openrocketengine.readthedocs.io"
Repository = "https://github.com/openrocketengine/openrocketengine"
Homepage = "https://github.com/cmflannery/rocket"
Repository = "https://github.com/cmflannery/rocket"

[build-system]
requires = ["hatchling"]
Expand Down
56 changes: 38 additions & 18 deletions openrocketengine/__init__.py → rocket/__init__.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
"""OpenRocketEngine - Tools for liquid rocket engine design and analysis.
"""Rocket - Tools for rocket vehicle design and analysis.

This package provides a comprehensive toolkit for designing and analyzing
liquid propellant rocket engines using isentropic flow equations.
rocket vehicles, including propulsion, tanks, and structures.

Example:
>>> from openrocketengine import EngineInputs, design_engine
>>> from openrocketengine.units import newtons, megapascals, kelvin, meters, pascals
>>> from rocket import EngineInputs, design_engine
>>> from rocket.units import kilonewtons, megapascals
>>>
>>> inputs = EngineInputs(
... thrust=newtons(5000),
... chamber_pressure=megapascals(2.0),
... chamber_temp=kelvin(3200),
... exit_pressure=pascals(101325),
... molecular_weight=22.0,
... gamma=1.2,
... lstar=meters(1.0),
... mixture_ratio=2.0,
>>> inputs = EngineInputs.from_propellants(
... oxidizer="LOX",
... fuel="RP1",
... thrust=kilonewtons(100),
... chamber_pressure=megapascals(7),
... mixture_ratio=2.7,
... )
>>> performance, geometry = design_engine(inputs)
>>> print(f"Isp: {performance.isp.value:.1f} s")
"""

__version__ = "0.2.0"
__version__ = "0.3.0"

# Core engine design
from openrocketengine.engine import (
from rocket.engine import (
EngineGeometry,
EngineInputs,
EnginePerformance,
Expand All @@ -38,7 +35,7 @@
)

# Nozzle contour generation
from openrocketengine.nozzle import (
from rocket.nozzle import (
NozzleContour,
conical_contour,
full_chamber_contour,
Expand All @@ -47,22 +44,35 @@
)

# Visualization
from openrocketengine.plotting import (
from rocket.plotting import (
plot_engine_cross_section,
plot_engine_dashboard,
plot_mass_breakdown,
plot_nozzle_contour,
plot_performance_vs_altitude,
)

# Propellants and thermochemistry
from openrocketengine.propellants import (
from rocket.propellants import (
CombustionProperties,
get_combustion_properties,
get_optimal_mixture_ratio,
is_cea_available,
list_database_propellants,
)

# Tank sizing
from rocket.tanks import (
PropellantRequirements,
TankGeometry,
format_tank_summary,
get_propellant_density,
list_materials,
list_propellants,
size_propellant,
size_tank,
)

__all__ = [
# Version
"__version__",
Expand All @@ -89,10 +99,20 @@
"plot_nozzle_contour",
"plot_performance_vs_altitude",
"plot_engine_dashboard",
"plot_mass_breakdown",
# Propellants
"CombustionProperties",
"get_combustion_properties",
"get_optimal_mixture_ratio",
"is_cea_available",
"list_database_propellants",
# Tanks
"PropellantRequirements",
"TankGeometry",
"size_propellant",
"size_tank",
"get_propellant_density",
"list_propellants",
"list_materials",
"format_tank_summary",
]
15 changes: 7 additions & 8 deletions openrocketengine/engine.py → rocket/engine.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Engine module for OpenRocketEngine.
"""Engine module for Rocket.

This module provides the core data structures and computation functions for
rocket engine design and analysis.
Expand All @@ -15,7 +15,7 @@

from beartype import beartype

from openrocketengine.isentropic import (
from rocket.isentropic import (
G0_SI,
area_ratio_from_mach,
bell_nozzle_length,
Expand All @@ -31,7 +31,11 @@
thrust_coefficient,
thrust_coefficient_vacuum,
)
from openrocketengine.units import (
from rocket.propellants import (
get_combustion_properties,
get_optimal_mixture_ratio,
)
from rocket.units import (
Quantity,
kelvin,
kg_per_second,
Expand Down Expand Up @@ -182,11 +186,6 @@ def from_propellants(
... )
>>> print(f"Tc = {inputs.chamber_temp}")
"""
from openrocketengine.propellants import (
get_combustion_properties,
get_optimal_mixture_ratio,
)

# Default exit pressure to 1 atm
if exit_pressure is None:
exit_pressure = pascals(101325)
Expand Down
2 changes: 2 additions & 0 deletions rocket/examples/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"""Example scripts for Rocket."""

Loading