Rocket Document

Rocket

The basic structure of a rocket document is a “Rocket” type as the root:

class openrocketdoc.document.Rocket(name)

Top level of an Open Rocket Document. A Rocket is made of stages.

Parameters:name (str) – Name of the rocket

Members:

aero_properties = None

Dictionary of aerodynamic properties, like drag and lift coefficients

description = None

A description for this design.

diameter

[m] Largest diameter of any stage on the rocket

length

[m] Get the total length of the rocket

manufacturer = None

If applicable, a manufacturer or prime contractor

mass

[kg] Get the total dry mass of the rocket

name = None

Name of this rocket

name_slug

Create a reusable slug from the engine name, useful for filenames and the like.

stages = None

List of stages that makes up the rocket.

The rocket is divided into stages:

Stage

class openrocketdoc.document.Stage(name)

One Stage of a Rocket.

Parameters:name (str) – Name of the stage.

Members:

components = None

A list of components that make up the stage.

diameter

[m] Largest diameter of any top-level component of this stage

length

[m] Get the total length of this stage

mass

[kg] Get the total dry mass of this stage

name = None

Name of the stage.

name_slug

Create a reusable slug from the engine name, useful for filenames and the like.

A stage is a collection of components:

Components:

Types of components available to describe a rocket stage:

Nosecone

class openrocketdoc.document.Nosecone(shape, shape_parameter, mass, length, **kwargs)

Nose of the rocket. Nosecones come in many shapes. See the Noseshape for nosecone shapes that can be described by this module.

In general a Nosecone is the first component in the top stage. It’s defined by a “shape”, like a cone or an ogive, and an optional shape parameter used to further define the exact shape. The very tip of the Nosecone is used as the reference location (0 coordinate) for the rest of the rocket.

Defining a Nosecone requires a shape, shape parameter, mass, and length. 0 is a valid number if mass or length is not known yet, though most properties of the nose will not be computed in that case. Diameter is an optional parameter, and is often not set directly because it depends on another part of the rocket (e.g, the overall radius of the vehicle being modeled, input later).

Parameters:
  • shape (Noseshape) – Shape of the nosecone
  • shape_parameter (float) – Many nosecone types need a unitless number – to describe their construction. See Noseshape for details
  • [kg] mass (float) – Dry mass of the nosecone
  • [m] length (float) – Tip to base (not including internal structure) length of the nosecone
**kwargs:
  • [m] diameter (float) diameter at the base
  • material_name (str) name of the main material this component is made of.
Example:
>>> from openrocketdoc.document import *
>>> Nosecone(Noseshape.CONE, 0.7, 1.2, diameter=0.254)
<openrocketdoc.document.Nosecone (0.70 kg)>

Members:

add_class_tag(newclass, newtag)

Add a new tag that is part of a tag collection (class)

Parameters:
  • newclass (str) – class that the tag is a member of
  • tag (str) – the tag to add
color

The color (if defined) of this component.

component_mass

[kg] The dry mass of just this component.

mass

[kg] The total dry mass of this component, including all subcomponents.

material_name

The name of the main material this component is made of. Example: “Aluminium” or “440 Stainless”. This is not used directly, but rather is for descriptive purposes.

name_slug

Create a reusable slug from the engine name, useful for filenames and the like.

surface_roughness

[μm] The surface roughness of the Nose

class openrocketdoc.document.Noseshape

Enum defining possible shapes of a nosecone.

BICONIC = <Noseshape.BICONIC: 3>

A Cone with a conically blunted tip

CONE = <Noseshape.CONE: 1>

A simple cone.

ELLIPTICAL = <Noseshape.ELLIPTICAL: 7>

A nose that is one half of an ellipse

HAACK_SERIES = <Noseshape.HAACK_SERIES: 11>

Cone edges are defined by minimal-drag Sears–Haack body with constant C

  • C = 1/3 for LV-Haack
  • C = 0 for LD-Haack, defined as Von Karman
PARABOLIC = <Noseshape.PARABOLIC: 8>

Similar to elliptical nose, but made of a parabola rather then ellipse

POWER_SERIES = <Noseshape.POWER_SERIES: 10>

Cone edges are defined by a set of polynomial equations.

For n = 0..1: y = R(x/L)^n

  • n = 1 is cone
  • n = 0.75 for a 3/4 power
  • n = 0.5 for a 1/2 power (parabola)
  • n = 0 for a cylinder
SECANT_OGIVE = <Noseshape.SECANT_OGIVE: 5>

An ovgive nose not tangent to body

SPHERE_BLUNTED_CONE = <Noseshape.SPHERE_BLUNTED_CONE: 2>

A Cone with a spherically blunt tip

SPHERE_BLUNTED_OGIVE = <Noseshape.SPHERE_BLUNTED_OGIVE: 6>

A tangent ogive cone with a spherically blunted tip

TANGENT_OGIVE = <Noseshape.TANGENT_OGIVE: 4>

A nosecone defined as tangent (to body) set of ogives

VONKARMAN = <Noseshape.VONKARMAN: 9>

The Von Karman nosecone is a kind of optimzed nosecone shape. It’s formed by a Haack series (C = 0) giving minimum drag for the given length and diameter.

Bodytube

class openrocketdoc.document.Bodytube(name, mass, length, **kwargs)

A cylindrical section of the outer body of the rocket.

The main part of a rocket is going to be a long cylindrical tube.

A name, the mass and length are required. 0 is a valid number if mass or length is not known yet, though most properties of the component will not be computed in that case. Diameter is an optional parameter, and is often not set directly because it depends on another part of the rocket (e.g, the overall radius of the vehicle being modeled, input later).

Parameters:
  • name (str) – Name of the component
  • [kg] mass (float) – Dry mass of this section of body
  • [m] length (float) – Length of this section of body
**kwargs:
  • [m] diameter (float) diameter at the base
  • material_name (str) name of the main material this component is made of.
Example:
>>> from openrocketdoc.document import *
>>> Bodytube("My Tube", 1.2, 0.538)
<openrocketdoc.document.Bodytube "My Tube" (1.20 kg)>

Members:

add_class_tag(newclass, newtag)

Add a new tag that is part of a tag collection (class)

Parameters:
  • newclass (str) – class that the tag is a member of
  • tag (str) – the tag to add
color

The color (if defined) of this component.

component_mass

[kg] The dry mass of just this component.

density

[kg/m³] The average material density of the tube

mass

[kg] The total dry mass of this component, including all subcomponents.

material_name

The name of the main material this component is made of. Example: “Aluminium” or “440 Stainless”. This is not used directly, but rather is for descriptive purposes.

name_slug

Create a reusable slug from the engine name, useful for filenames and the like.

surface_area

[m²] Surface area (skin of the vehicle)

surface_roughness

[μm] The surface roughness of the Body tube.

Mass

class openrocketdoc.document.Mass(name, mass, **kwargs)

Generic mass component. This is a catch-all for internal structure that contributes to the mass model of the rocket but doesn’t serve a specific purpose to be modeled. Often you know some internal detail like a flange or flight computer that is heavy, but it doesn’t contribute to the aerodynamics. When in doubt use this. Give it a descriptive name!

Defining a Mass component requires a name and a mass. Many optional arguments can be set that are used to compute, for example, density.

Parameters:
  • name (str) – name of this mass
  • [kg] mass (float) – mass of the component
**kwargs:
  • [m] length (float) overall length of the mass
  • [m] diameter (float) greatest diameter of the mass
  • material_name (str) name of the main material this component is made of.
Example:
>>> from openrocketdoc.document import *
>>> Mass("Flight Computer", 0.0215)
<openrocketdoc.document.Mass "Flight Computer" (0.02 kg)>

Members:

add_class_tag(newclass, newtag)

Add a new tag that is part of a tag collection (class)

Parameters:
  • newclass (str) – class that the tag is a member of
  • tag (str) – the tag to add
color

The color (if defined) of this component.

component_mass

[kg] The dry mass of just this component.

mass

[kg] The total dry mass of this component, including all subcomponents.

material_name

The name of the main material this component is made of. Example: “Aluminium” or “440 Stainless”. This is not used directly, but rather is for descriptive purposes.

name_slug

Create a reusable slug from the engine name, useful for filenames and the like.

Fin

class openrocketdoc.document.Fin(name, root, tip, span, sweep=None, sweepangle=45.0, **kwargs)

A single fin.

Almost all sounding rockets have a set of fins near the base of the vehicle. This class represents a single fin. If there are multiple symmetric fins, an Finset can be used to handle replication.

Fins are assumed to be trapezoidal (Truncated delta wings). To define a fin you need to know the length of several chords. The Fin takes the Root Chord, Tip Chord and span (height) of the fin.

The fin sweep can either be defined as a distance (from the start of the fin to the beginning of the tip) or as the angle the leading edge of the fin makes with respect to the body of the rocket. Do not set both of these at the same time, rather set the one convenient for you.

Parameters:
  • name (str) – The name of this fin
  • [m] root (float) – Length of the Root Chord
  • [m] tip (float) – Length of the Tip Chord
  • [m] span (float) – Length of height of the fin away from the rocket body
  • [m] sweep (float) – (Optional) Distance from the start of the fin to the beginning of the tip
  • [°] sweepangle (float) – (Optional) Angle the leading edge of the fin makes with respect to the body of the rocket.
Example:
>>> from openrocketdoc.document import *
>>> Fin("My Fin", 0.5, 0.24, 0.4, sweepangle=45.0)
<openrocketdoc.document.Fin "My Fin">

Members:

add_class_tag(newclass, newtag)

Add a new tag that is part of a tag collection (class)

Parameters:
  • newclass (str) – class that the tag is a member of
  • tag (str) – the tag to add
color

The color (if defined) of this component.

component_mass

[kg] The dry mass of just this component.

mass

[kg] The total dry mass of this component, including all subcomponents.

material_name

The name of the main material this component is made of. Example: “Aluminium” or “440 Stainless”. This is not used directly, but rather is for descriptive purposes.

name_slug

Create a reusable slug from the engine name, useful for filenames and the like.

root = None

[m] The Root Chord of the Fin

span = None

[m] Height of the fin away from the rocket body

sweep

[m] The Distance from the start of the fin to the beginning of the tip.

sweepangle

[°] Angle the leading edge of the fin makes with respect to the body of the rocket.

tip = None

[m] The Tip Chord of the Fin

Finset

class openrocketdoc.document.Finset(name, fin, number_of_fins, **kwargs)

A set of identical fins, set symmetrically around the vehicle.

For convince and “Don’t Repeat Yourself” sake, a identical, symmetric set of fins can be defined as a single “finset”. Build a single Fin object, and pass that to the constructor of this class along with the number of fins, and the full finset is built for you.

Parameters:
  • name (str) – Name of the component
  • fin (Fin) – A single Fin object to be repeated as part of the set
  • number_of_fins (int) – Number of fins in the set
Example:
>>> from openrocketdoc.document import *
>>> a_fin = Fin("My Fin", 0.5, 0.24, 0.4, sweepangle=45.0)
>>> Finset("Fins", a_fin, 3)
<openrocketdoc.document.Finset "Fins" (3 fins)>

Members:

add_class_tag(newclass, newtag)

Add a new tag that is part of a tag collection (class)

Parameters:
  • newclass (str) – class that the tag is a member of
  • tag (str) – the tag to add
color

The color (if defined) of this component.

component_mass

[kg] The dry mass of just this component.

fin

A single fin prototype. Update this to update all fins to a new fin object.

mass

[kg] The total dry mass of this component, including all subcomponents.

material_name

The name of the main material this component is made of. Example: “Aluminium” or “440 Stainless”. This is not used directly, but rather is for descriptive purposes.

name_slug

Create a reusable slug from the engine name, useful for filenames and the like.

number_of_fins

The number of fins in the finset.

Engine

class openrocketdoc.document.Engine(name)

The business end of the rocket.

This class can define either the bulk properties of the engine (like total thrust and Isp) or define a thrustcuve as a function of time. If a thurstcuve is provided then the bulk numbers are computed from the curve. If no curve is provided then a simple thrustcuve (flat) is computed.

Test if the class is constrained (that is, enough information is provided to fully solve a thrustcurve) using Engine.constrained (returns a boolean)

Parameters:name (str) – Name of this engine.

Members:

I_total

[N·s] Total impulse of the engine over a nominal burn. Either computer from a thrust curve, or can be set directly to use in computing desired performance.

Isp

[s] Average Specific Impulse (Isp) of the engine. Either computed from a thrust curve or can be set directly and used to compute theoretical performance numbers based on chemistry.

V_e

[m/s] Effective velocity (average) of the exhaust gasses of the engine.

constrained

Is the system fully described?

Return type:boolean
diameter

[m] Diameter of the engine system

length

[m] Length of the engine, be that the actual length of a self-contained solid motor, or the whole system length of a liquid fuel system tanks and all.

m_frac

[unitless] Mass fraction of the engine system. The ratio of the loaded mass of the engine system and the empty weight. Often an important figure of merit in designing a rocket.

m_init

[kg] Initial weight of the engine system, including propellent.

m_prop

[kg] Mass of the propellent in a loaded engine. This is total mass of the fuel and oxidiser.

name_slug

Create a reusable slug from the engine name, useful for filenames and the like.

Example:
>>> from openrocketdoc.document import *
>>> engine = Engine("My Rocket Motor 12")
>>> engine.name
My Rocket Motor 12
>>> engine.name_slug
my-rocket-motor-12
nar_code

The NAR code for a rocket motor is a letter code for the total impulse.

nar_percent

What percent of the NAR impulse class is the motor

t_burn

[s] Burn time. The time that it takes to burn all the propellent in a nominal burn. Either computed from a thrust curve or can be set directly for computing desired performance.

thrust_avg

[N] Average thrust of the motor over the length of it’s nominal burn. Either computed from a thrust curve, or can be set directly to use in computing desired performance.

thrust_peak

[N] Peak thrust during a nominal burn.