List of useful custom expressions

From OpenRocket wiki
Revision as of 06:29, 10 March 2021 by Jddj (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

↑ Back to Contents

The current User's Guide is very much a work in progress, any help would be greatly appreciated!
If you'd like to contribute something, just hit the 'Edit' tab at the top.

The purpose of this page is to serve as a repository for useful custom expressions. For general information about how to use custom expressions in OpenRocket, see the users guide, section 9.

Rocket dynamics[edit]

Basic properties of the physics of rocketry and kinematics. Can be quite useful from an educational point of view. Download all rocket dynamics expressions (.ork)

Kinetic energy (Ek)[edit]

The energy in Joules (J) which the rocket possesses due to its translational motion. See [1] Equation:

0.5 * m * Vt^2

Gravitational potential energy (Egp)[edit]

The energy in Joules (J) which the rocket possesses due to its position in a gravitational field. The zero point is defined to be at mean sea level. Equation:

m * g * h

Chemical potential energy (Ecp)[edit]

The chemical energy stored in the propellant. Equation:

mp * 500000

Here a representative figure for the potential energy of a solid rocket fuel of 500 kJ/kg is used.

Momentum (p)[edit]

The magnitude of the translational momentum vector. See [2] Equation:

m * Vt

Angular momentum (L)[edit]

The magnitude of the angular momentum vector of the rocket about the roll axis. In Newton-meter-seconds (Nms). See [3] Equation:

Ir * dΦ

Mass ratio (mr)[edit]

The ratio of the current mass to the launch mass. Equation:

m / m[0]

Specific impulse (Isp)[edit]

A measure of how efficient a rocket is in in turning propellant flow into thrust. Specific impulse is relative to the earth-weight of propellant and has units of seconds (s). See [4]. Equation:


This gives the overall specific impulse for the flight. Note: you are probably mostly interested in the final value that this converges to. Future versions of openrocket may allow a quantity to be calculated only at the end of the flight.

Effective exhaust velocity (Ve)[edit]

Average exhaust speed along the axis of the engine. In m/s. Equation:


Tsiolkovsky delta-V (Tdv)[edit]

Gives the maximum change in speed of the rocket (m/s) in the ideal case of no external forces. Equation:



Download all aerodynamic expressions (.ork)

Note that some of these expressions depend on variables such as the center of pressure location and angle of attack which are only defined after launch guide clearance and before recovery device deployment.

Air Density (ρ)[edit]

Density of the air (kg/m^3). Equation:

P/(287.05* T)

Gamma (γ)[edit]

This is the ratio of specific heats for dry air. Gamma is technically a variable that changes with temperature, though for most purposes a value of 1.4 suffices. Equation:


Corrective moment coefficient (Ccm)[edit]

A coefficient proportional to the corrective force that the rocket creates in response to a disturbance. See [5] Equation:

Vt^2*Ar*(Cn/α)*(Cp-Cg)*(P/(287.058*T)) / 2 

Natural frequency (fnat)[edit]

The frequency at which the angle of attack of the rocket will oscillate following a disturbance. See [6] Equation (in Hz):


Damping moment coefficent (Cdm)[edit]

A coefficient proportional to the rate at which any osculations resulting from a disturbance will die away. It is the sum of a propulsive damping term and a aerodynamic damping term. See [7]

This property can not be expressed as a custom expression, but is available as a simulation listener. To obtain this quantity, add the following simulation listener to your simulation settings for one or more of your simulations. Note that you don't actually have to run the simulation yet, just add it to at least one simulation.


Damping ratio (ζ)[edit]

A dimensionless quantity proportional to the rate of decay of oscillations and independent of the rocket velocity. As the damping ratio tends to 1 the system is critically damped and oscillations tend to zero. In the presence of constant crosswind some oscillation reduces weathercocking and overall a good balance is achieved with damping ratios between .05 and .3. See [8] for more details.


Note: requires damping moment listener

Dynamic pressure (Q)[edit]

A pressure term (Pa) associated with the flow of a gas. It is proportional to the aerodynamic stress on the rocket. See [9]. Note this is the usual version for incompressible flow.


0.5 * Vt^2 * P / (T*287)

This is an extended version of the dynamic pressure equation that should hold at all speeds. It requires gamma to function. (Pa): Equation:

0.5* γ* P*(M^2)

Max-Q (Qm)[edit]

Simply the maximum dynamic pressure experienced during the flight.



Note: with this and the later expressions, you are probably mostly interested in the final value of this at the end of the simulation.

Max-Q time (tQm)[edit]

The time (in seconds) after launch when the forces on the rocket are the greatest.



High-Q duration (tQh)[edit]

The total time (in seconds) during the flight for which the dynamic pressure on the rocket is within 90% of the maximum.



Stagnation Temperature (Ts)[edit]

This is the temperature experienced by the rocket at high speeds. Requires gamma. (K) Equation:



These expressions are related to instrumentation you might have flying on a rocket. Download all instrumentation expressions (.ork)

Filtered acceleration (Af)[edit]

Emulates an accelerometer with some low pass filtering (.5 s time constant) and a given upper saturation level (30 m/s^2).


uclip( mean(At[t-.5:]), 30 )

Note: you may also want to break this up into acceleration Ax, Ay, Az.

Radio path loss (PL)[edit]

The loss or attenuation due to distance in dB of a radio signal transmitted from the rocket to launch site. Here the radio frequency is given in MHz, 100 MHz in this example.


20 * log10(.0418 * sqrt(Px^2+Py^2+h^2) * 100)

Rocket design[edit]

Download all rocket design expressions (.ork)

Heating rate (Rh)[edit]

This estimates the rate of heat transfer in watts (W) due to friction from the air to the rocket. It is derived by using the drag force to get the change in momentum of a column of air around the rocket and from this the work done by the air on the rocket. It should be roughly proportional to velocity.



This could be a starting point to further analysis taking into account the geometry and material of the rocket to find the temperature distribution. Or it could be used for an experimental test.

Total heating (Ht)[edit]

Simply integral of heating rate gives total heat transferred in Joules (J) Equation:



These are mostly just for fun

Lorentz factor (γ)[edit]

Expression which appears in several equations in special relativity. Equation:

1/sqrt(1 - (Vt^2 / 299792458^2 ))

Relativistic mass (mrel)[edit]

The mass of an object in motion (kg)


Relativistic energy (Er)[edit]

The total energy of a moving body in J

sqrt( (m*299792458^2)^2 + (m*Vt*299792458^2)^2)

↑ Back to Contents