generated html version of blog/calculating_delta_v.txtHOME

2021 day 98

Today, let's discuss how the Δv range of a spacecraft is calculated, 
using Tsiolkovsky's Rocket Equation, with specific application to Kerbal
Space Program. Konstantin Tsiolkovsky derived this equation for the range of
change in velocity available to a rocket on or before 10 May 1897. In 1903
he published Исследование мировых пространств реактивными приборами
("Exploration of Planetary Space by Means of Reaction Devices"), in which he 
correctly predicted that the exploration of outer space would be achieved
by means of rockets, chiefly powered by the combustion of hydrogen and oxygen.

Δv = vₑ⋅ln(m₀/m₁)

Here vₑ is the exhaust velocity of the rocket engine in question, m₀ is the 
initial mass and m₁ is the final mass after the rocket has run out of fuel.

Most of the time, the exhaust velocity of a rocket engine is expressed instead
as "specific impulse" Isp, which is the instantaneous impulse or change in 
momentum imparted to the vehicle per unit of fuel, measured by weight, 
expended. This formulation has the advantage that its units are seconds and 
therefore invariant over most unit systems. To convert to effective exhaust 
velocity, Isp must be multiplied by the acceleration of gravity at the earth's 
surface. To see why this works, consider that we are converting the amount
of fuel (which is inverse) from units of Newton-masses to kilograms.

The masses involved in the equation are commonly called the "wet mass" 
and "dry mass". Since the "dry mass" is equal to the "wet mass" minus the 
mass of fuel available, and the fuel is, in Kerbal Space Program at least,
measured by volume, the expanded form of the rocket equation is as follows:

Δv = Isp⋅g⋅ln(m/(m-V⋅ρ))

Where Isp is specific impulse in seconds, g is the acceleration of gravity
at the earth's surface (observe that these quantities multiply out to be
in metres per second), m is the initial mass of the entire spacecraft,
V is the volume of fuel available, and ρ is the density of the fuel.

However, for a rocket that runs on two different propellants (for example,
in KSP Liquid Fuel and Oxidizer, or in real life unsymmetric dimethylhydrazine
and nitrogen tetroxide), their densities may be different and the volumes of 
fuel may be expended at different rates. For this reason, it is better to 
define ρ as effective density, or in other words, the mass of both propellants 
that is expended per unit volume of one propellant.

In Kerbal Space Program there is a built in system that displays readouts
for Δv, but it is often incorrect, especially for air breathing or RCS
based vehicles. Calculating it yourself is relatively easy from other 
quantities displayed in game, namely, the current mass of the vehicle 
(available in the map view), the volume of fuel available, and the specific
impulse of your engines. 

The missing quantity ingame is the density of the fuel. For this I have a 
simple list of fuels and their densities:

Monopropellant           0.004  tons per litre
Liquid Fuel              0.005  tons per litre
Xenon                    0.0001 tons per litre
Liquid Fuel + Oxidizer   0.0111 tons total per litre of Liquid Fuel
Oxidizer + Liquid Fuel   0.0091 tons total per litre of Oxidizer

It is common to use multiple rocket engines on a single spacecraft. Let's
first consider that you cannot simply add up Δv from each engine. Each stage
of a rocket not only lifts itself, but its initial mass m₀ includes the mass
of the stages it is lifting. When two engines fire at once, they each lift not
only their own fuel, but also help lift the remaining fuel of the other engine.

In a staged rocket with two stages, let us consider m0 to be the initial mass
on the pad, m1 the mass after expending all fuel in the first stage, 
m2 the mass after discarding the first stage, and m3 the mass after expending
all fuel in the second stage. The correct way to calculate the total Δv is:

Δv = Isp⋅g⋅ln(m0/m1) + Isp⋅g⋅ln(m2/m3)

See how the second stage does not have to lift the remaining mass (tanks and 
engines and fins, etc) of the first stage. This is what makes staged rockets
efficient. If m1 was equal to m2, then this cancels to be the same as if the
rocket had one stage with initial mass m0 and final mass m3.

Now, let's say you have multiple engines burning at once, for the same amount 
of time, and off the same fuel tank. If they all have the same Isp, that's 
fine and we can use above equations, but what if it's different Isp's? Well, 
since Isp is defined as change in momentum per weight of fuel consumed, one 
can calculate effective Isp of two different engines running off the same fuel 
tank by their average proportioned by their fuel consumption rates r1 and r2. 

Isp = (Isp1 * r1 + Isp2 * r2) / (r1 + r2)

Now, since fuel consumption rate is not available ingame, we must calculate it
from the thrusts of the two engines F1 and F2. Rate of fuel consumption by weight 
is equal to thrust divided by specific impulse. This is fairly easy to infer from
the fact that specific impulse is change in momentum per change in fuel weight.
The units of fuel consumption used are irrelevant in the above since they are 
just used as a proportion for the average.

r = F / Isp

Isp = (F1 + F2) / (F1 / Isp1 + F2 / Isp2)

Hence, the Isp of two engines working together off the same fuel tank is equal 
to the harmonic mean of their Isp's proportioned by thrust.

Now consider the situation where the two engines do not use the same fuel tank.
Since the volumes of the two may be different and the fuel consumption may be
different, we first handle the part of the burn in which both engines are 
burning, which means we need to know which engine will burn out first.

The total time that an engine can burn for is equal of course to its volume of
fuel V divided by its fuel consumption rate r. Since here r is expressed as
weight per second, we need to convert it to volume per second, and further, we
need to compute it from thrust and Isp. Hence we have:

T = V / (r / g⋅ρ)

Where T is time, r is weight of propellant per second, g is 9.81 m/s² as above,
and ρ is density of the propellant as above. Substituting in the equation for r
from above and simplifying:

T = V / ( (F / Isp) / g⋅ρ )
  = V⋅g⋅ρ⋅Isp / F

As the thrust in KSP is in kilonewtons and the densities quoted above are in 
metric tons per litre, no factors of 1000 to worry about.

Calculate T1 and T2 for your two engines and let us assume T1 is the smaller,
that is, engine 1 will burn out first. Then we can assume that for T1 seconds
both engines will be firing and then for an additional (T2 - T1) seconds 
only engine 2 will be firing.

Hence, we can calculate the amount of fuel used by engines 1 and 2 within T1, 
and then use the above equation to calculate the Isp of the two engines firing 
at once, and then solve for the Δv. Afterward, the remaining Δv from engine 2
can be calculated from the mass of the remaining fuel.

Here are some practical consequences of the above. Consider if you have an 
efficient 10 ton rocket stage with Isp 350 seconds, 150 kN of thrust and fuel 
mass 5 tons. The Δv of this stage is 2379 m/s. Now suppose you add some solid 
rocket boosters to the stage totalling 5 tons, with Isp 200 seconds, thrust as
200 kN and fuel mass 4 tons.

If you fire these boosters, discard them, then fire the main engine, the total
Δv can be calculated using the above equations as:

200 * 9.81 * ln(15/11) + 350 * 9.81 * ln(10/5)
  = 608 (first stage) + 2379 (second stage)
  = 2988 m/s

However, if you fire your boosters at the same time as the main engine, the 
total Δv is calculated with difficulty but in some steps: 

T1 = (fuel mass) * g * Isp1 / F1
   = 4 * 9.81 * 200 / 200
   = 39.24 seconds

T2 = 5 * 9.81 * 350 / 150
   = 114.45

Therefore, since for 39.24 seconds both the main and boosters will be firing,
we must calculate mass fuel usage of the main engine in that time:

m = (F⋅T1) / (Isp⋅g)
  = 150 * 39.24 / (350 * 9.81)
  = 1.714 tons

So for the T1 total mass m0 is 15 tons, and final mass 
m1 = 15 - (4 + 1.714) = 9.286. 

The harmonic mean proportioned by thrust of the Isp can be calculated:

Isp = (F1 + F2) / (F1 / Isp1 + F2 / Isp2)
    = (150 + 200) / (150 / 350 + 200 / 200)
    = 245 seconds

This is only slightly higher than the nominal Isp of the boosters, but it
is much lower than the Isp of the main engine. But how does the actual Δv

Δv1 = 245 * 9.81 * ln(15 / 9.286)
    = 1153 m/s
Δv2 = 350 * 9.81 * ln(8.286 / 5)
    = 1734 m/s
total Δv = 2887 m/s

By firing the main engine at the same time as the boosters instead of 
afterward, we lost over 100 m/s of Δv. In general, lower efficiency engines
should be fired first to maximize range.

I hope the above has been enlightening to you.

-- Oren Watson.