Jump to content

The "reverse rocket equation" explained


GoSlash27

Recommended Posts

NOTE:

g0 has been corrected to 9.81 in KSP's engine as of version 1.0. Please disregard the "9.82" stuff from these earlier equations.

Most of us are familiar with the rocket equation, but don't use it because it doesn't tell us anything we can't find out automatically using a mod. But did you know that you can use the same equation to answer other questions besides "How much DV will this stage make"? Questions that no mod can answer for you, and are incredibly handy to know?

In this tutorial, I will introduce the "reverse rocket equation" and show you how to use it for fun and profit.

The rocket equation, like any other, is like a machine. You put in your raw materials at one end, pull the lever, and it spits out your desired product.

In the case of the rocket equation in normal form, we put in

*Mass and number of engines-->

*Mass of fuel tanks-->

*Mass of fuel and o2-->

*Mass of payload-->

and finally

*Isp of our engines.-->

This all gets fed into the machine and we crank it by mathing. Once it's done, it spits out

--> DV.

Well, like all equations, we can reorganize things a bit and get it to spit out a different output.

Suppose, for example, you want to answer this question:

If I need to impart a certain amount of DV to a known mass using a known number and type of engine, how much will my loaded fuel tanks weigh?

Knowing the answer to that question will save you all sorts of time in the VAB, because it tells you exactly how much rocket you need to do a job.

It works like this:

Your inputs are

-DV Your required DV in m/sec

-Isp Your engine(s) specific impulse in seconds

-N The number of engines you are using

-Me The mass of the engine you are using in tonnes

-Mp The mass of the payload you must lift in tonnes

and finally

-Rfe The ratio of your tank's loaded mass to empty mass. For most liquid fuel tanks, this is 9. For other types, check the wiki.

First step is to solve for a placeholder value that we don't want to have to calculate twice;

e^[DV/(9.82*Isp)] = Rwd The required wet- to- dry ratio of your rocket (save this value)

Now for the rest of the process.

(Rwd-1)(Nme+Mp)

_______________ = Mt The mass of your required fuel tank in tonnes when empty.

(Rfe-Rwd)

Mt*Rfe = Mf The mass of your required fuel tank in tonnes when full.

Mf+NMe = Ms The mass of your stage in tonnes when full.

and finally

Ms+Mp = M The mass of your entire stage and payload.

Now... e^(yada yada) might look daunting, but it's really no big deal, so don't let that throw you.

Using a calculator, it goes like this (data in quotes, keypresses underlined)

"delta v" divided by "9.81" divided by "Isp" equals e^x MS

In the case of the Windows popup calculator, e^x is hiding under the ln key, so the process is "delta v" divided by "9.81" divided by "Isp" equals Inv e^x MS

In a spreadsheet, it might look something like this:

=2.718^($A$3/(9.81*$C$6))

Example:

I'm using a single 48-7S to inject a 12 tonne payload into orbit. I need to impart 700 M/sec DV. What tanks do I need to accomplish this and how much will it weigh as a payload for the stage that got it there?

e^(700/(9.81*350)) = 1.23

(1.23-1)(1*.1+12)

_____________ = .23*12.1/7.77 = .358. Our empty fuel tanks will weigh 358 kg

(9-1.23)

.358*9= 3.22. Our loaded tanks will weigh 3.22 tonnes

3.22+.1= 3.32. Our stage will weigh 3.32 tonnes

3.32+12= 15.3 (rounded). This assembly will present a payload of 15.3 tonnes to the preceding stage.

------------------------------------------------------------------------------------------------

Edit: the useful equation petting zoo. We'll keep everything useful we derive here for safe-keeping.

e^[DV/(9.82*Isp)] = Rwd The required wet- to- dry ratio of your rocket (save this value). We use this value in any form where we're looking for an answer involving mass.

(Rwd-1)(Nme+Mp)

_______________ = Mt The mass of your required fuel tank in tonnes when empty.

(Rfe-Rwd)

Mt*Rfe = Mf The mass of your required fuel tank in tonnes when full.

Mf+NMe = Ms The mass of your stage in tonnes when full.

Ms+Mp = M The mass of your entire stage and payload.

Rwd(NMe+Met)-NMe-Mft

_____________________ = Mp The largest payload mass a rocket can carry and still make it's DV requirement

(1-Rwd)

Rwd(Mp+Met)-Mp-Mft

___________________ = N The maximum number of engines you can use and still get there.

Me(1-Rwd)

Edited by GoSlash27
Link to comment
Share on other sites

Now... I know what you're thinking:

Yeah, but I could just go into the VAB and stack tanks on until I have enough and it'll tell me that!

Ah, but here's what it won't tell you:

If you build a spreadsheet with all the engine types and their values, you could plug in the job you need to do and have it spit out these answers for every engine at the same time.

Using these answers, you can tell at a glance which engine will yield the lightest overall stage for your particular job.

And knowing the mass of the assembly, it can recommend how many engines you need to use, then recalculate based on the new engine mass.

Likewise, knowing the cost of the parts, a spreadsheet can tell you at a glance which option is the least expensive.

You could do that and take careful notes in the VAB, but it's gonna take an awfully long time to do it that way.

This is just one weapon in the arsenal of what rearranging the rocket equation can do for you...

Link to comment
Share on other sites

Dear Doctor Slashy, my rocket*cough* a friend of mine has a vehicle with known engines, structural and fuel mass - how can I, er, he work out the maximum payload it can launch to orbit or push through another manoeuvre requiring a specified dV?

(Just thought you'd like to put another twist of the equation in the same place ...)

Link to comment
Share on other sites

Great thread idea, Slashy. For those interested in making their own spreadsheets, I have a mostly complete part list available in xlsx format here.

Pecan, I use Wolfram Alpha for solving that problem, just enter this, substituting your values for everything but p, the payload mass:

dV = Isp * g * ln((mwet+p)/(mdry+p))

Wolfram will do the rearranging of the equation for you (that one's a bit of non-trivial algebra) and spit out the answer.

The other option is to make that formula in your spreadsheet and use the "goal seek" function to set dV to the required value by varying p.

Link to comment
Share on other sites

Rearranging the equation means that *anything we use as an input* can instead be used as the output!

We've used DV as the output (how much DV will this rocket make) and now we've used Mt as the output (how much tankage do I need for this rocket).

Let's take a look at a couple more options.

N: How many LV-Ns can I hang on the back of this ship and still make it to Duna and back?

Mp: How much mass can my space tug get to Laythe?

I imagine there's even more variations that could be useful, but these 2 are questions I've tackled by rearranging the equation.

So... how do we do this? Warning: Maths ahead...

Link to comment
Share on other sites

RIC - it's simpler than that since there's only one variable left with all those knows; how much can I lift/manoeuvre. I already have it in my LV spreadsheet but can't remember where I got it from off the top of my head.

Link to comment
Share on other sites

Pecan, funny you should mention that.

solving for payload is exactly what I'm about to cover in this example, but I don't recommend using it for payload to orbit.

The payload is limited by thrust as well as DV, and the rocket equation doesn't account for thrust. You could well end up with the correct DV, but not enough thrust to lift off the pad.

I recommend using this equation for ops in zero G where the acceleration isn't so critical.

Best,

-Slashy

Link to comment
Share on other sites

...The payload is limited by thrust as well as DV...

Exactly - my spreadsheet does a parallel calculation of TWR, since it's a simple equation, so if the thing says I can lift 200t but with a TWR of 0.5 then, obviously thrust is the determining factor for launches. Point is that launch is only a special case of 'manoeuvre' :-) (... and let's not even get into all the nightmares about drag, gravity-turn, etc. for which we know there is no determinate 'solution').

ETA: Sorry for butting-in while you're still writing this, by the way. I thought the OP was all we were getting, I should have just let you get on with it ^^.

Link to comment
Share on other sites

So how to the mathing for rearranging the rocket equation:

DV=9.82Isp*ln(Rwd) in it's standard form.

Since our desired output is hiding inside the "Rwd" part, we need to isolate that.

First, we get the "9.81Isp" away from it by dividing both sides.

DV/(9.82*Isp)= ln(Rwd)

Now, to get inside of a log, we have to raise e (approx 2.718) to it's power. And we can't just do it to one side, so...

e^(DV/9.81Isp)= Rwd.

Now... Rwd has an alter- ego. Aside from meaning e^(DV/9.82Isp), it also means the total mass of our ship when wet divided by the total mass of our ship when dry.

Rwd= (NMe+Mp+Mft)/ (NMe+Mp+Met) where Mft= the mass of our full tanks and Met is the mass of our empty tanks

We need to isolate this for "Mp", assuming we already know the rest. Algebra- infested waters ahead...

Move the denominator to the left

Rwd(NMe+Mp+Met)=NMe+Mp+Mft

Distribute on the left

RwdNMe+RwdMp+RwdMet=NMe+Mp+Mft

Get everything not related to Mp on the left and everything related to Mp on the right.

RwdNMe+RwdMet-NMe-Mft=Mp-RwdMp

Tidying up a bit on the left and extracting Mp on the right

Rwd(NMe+Met)-NMe-Mft = Mp(1-Rwd)

And finally...

Rwd(NMe+Met)-NMe-Mft

_____________________ = Mp

(1-Rwd)

Now... we could tidy this a bit more, since our full tanks are always a known ratio to our empty tanks, but this should suffice.

Edited by GoSlash27
Link to comment
Share on other sites

If you're into python, I've got this as the engine.burnMass function in my scripts. One of the earlier functions I wrote, because it's such a useful relation.

g0 is 9.82 in KSP. So you're about 1 part in 1000 off with your estimates.

You've got a bunch of variables in there that are complicating things -- all you need is the Isp, the dry mass not including empty tanks, and the deltaV. Whether the dry mass is "payload" or "engines" or "Jeb, what are you doing hanging off the side?" is not relevant. So your relation comes down to:

drymass * (Rwd - 1) / (Rfe - Rwd)

And it's valid only if Rfe > Rwd. Otherwise, you need to stage.

Link to comment
Share on other sites

So as an example of this form:

I have a mass mover consisting of a jumbo 64, a single LV-N and 1.6T of assorted stuff.

How much payload can it haul and still make a DV of 6,600 m/sec?

e^(DV/9.81Isp)= Rwd.

e^(6600/(9.81*800)= 2.319

Rwd(NMe+Met)-NMe-Mft

_____________________ = Mp

(1-Rwd)

2.319(1*2.25+4)-1*2.25-36

_______________________ = Mp

(1-2.319)

14.49-2.25-36/(-1.319) =Mp

-23.76/-1.319 = 18.0 tonnes. Removing our 1.6t of gear leaves 16.4 tonnes of payload.

Hmm... I'm gonna have to rework this. I must've goofed somewhere, 'cuz that ain't right.

I'll figure out what I gacked up and revise it...

*edit* Got it. Had a case of number dyslexia :blush: The equation is good to go.

Edited by GoSlash27
Link to comment
Share on other sites

If you're into python, I've got this as the engine.burnMass function in my scripts. One of the earlier functions I wrote, because it's such a useful relation.

g0 is 9.82 in KSP. So you're about 1 part in 1000 off with your estimates.

You've got a bunch of variables in there that are complicating things -- all you need is the Isp, the dry mass not including empty tanks, and the deltaV. Whether the dry mass is "payload" or "engines" or "Jeb, what are you doing hanging off the side?" is not relevant. So your relation comes down to:

drymass * (Rwd - 1) / (Rfe - Rwd)

And it's valid only if Rfe > Rwd. Otherwise, you need to stage.

That's true, but we need the extra variables for what we're doing. If we're running a spreadsheet or (God forbid) doing it by hand, we don't have a hook to populate that.

And the correct g0 is, indeed 9.82. All of the equations should reflect that.

RIC,

Boy, does it ever! I *hate* posting equations in here!

Dispatcher,

That would be epic! I don't know how to code, though. Maybe someone with those skillz can make it happen someday.

Best,

-Slashy

Edited by GoSlash27
Link to comment
Share on other sites

This is what I do in my spreadsheet. I also have cells displaying the TWR and duration of the burn, which can be pretty useful for certain burns (I'm looking at you, LV-N).

It's quite strange to look through someone else's maths and see how differently they conceptualise things.

A few points I would like to make.

If setting up a spreadsheet, you may want to include a cell for additional mass. If you have an SAS module or other stuff in a stage below the payload it will affect delta-V slightly.

If you want to use the LFB KR-1x2 engine (The 2.5m engine with fuel tank). You can take the mass of the engine as 6 tonnes and then the full/empty mass ratio will still be 9 (assuming you use =/> 32t of fuel). You could altrnatively have mass as 10t and have a "large" number as your full/empty mass ratio (the "large" "number" is "infinity", but excel doesn't really like that, 1000 is probably high enough). This option allows you to calculate how much fuel you need if you are going to use a partially empty tank.

The latter method is also the best method for calculating delta-v from solid rocket boosters. Use the engine mass as the dry mass of the booster and a full/empty ratio of 1000(ish).

Link to comment
Share on other sites

So since I've outlined the process of reformatting the equation, I won't bother doing it again here.

Solving for number of engines:

e^(DV/9.82Isp)= Rwd

Rwd(Mp+Met)-Mp-Mft

___________________ = N The number of engines

Me(1-Rwd)

ex. "Mommy, are we there yet"??

I've got a mass-mover made of a Jumbo 64. It's hauling 80 tonnes of junk to monitor the lonely space potato (2,300 m/sec DV).

How many engines can we hang on it and still make it?

e^(2300/(9.82*800)) = Rwd

1.34= Rwd

1.34(80+4)-80-36

_______________ = 4.50

2.25(1-1.34)

We can use 4 engines and still make it. If we try 5, we'll be lost in space.

Link to comment
Share on other sites

This is a very good thread showing the versatility of the Dv formula. I`ve learned something today. Any chance of you putting up your spreadsheet?

On a related note, I have had a look at Taverts "Mass-optimal engine type vs delta-V, payload, and min TWR" julia code and updated my personal copy to have the right values for the current set of engines. It seems to use these formulas heavily. For a desired TWR it puts out a graph showing the best engine to use at a particular payload mass/Dv combo.

As you say, it is very versatile.

Edited by John FX
Link to comment
Share on other sites

This is a very good thread showing the versatility of the Dv formula. I`ve learned something today. Any chance of you putting up your spreadsheet?

On a related note, I have had a look at Taverts "Mass-optimal engine type vs delta-V, payload, and min TWR" julia code and updated my personal copy to have the right values for the current set of engines. It seems to use these formulas heavily. For a desired TWR it puts out a graph showing the best engine to use at a particular payload mass/Dv combo.

This is the TWR 2 Vacuum one for example

*pic*

I`m not wanting to reduce the value of what you are posting here, more trying to show what can be done with the formula.

As you say, it is very versatile.

I've been following what you're doing with that julia code, and I'm very thankful you're bringing it back for us. It's an awesome resource!

Best,

-Slashy

Link to comment
Share on other sites

Man, this forum needs more robust equation formatting, like TeX or something.

A) Feel free to support the Latex petition

B) Write a message to KasperVld. Already talkted to him about LaTeX as a response to his request for forum improvement suggestions, but at the moment LaTeX has a low priority. Support from more people might change that.

Link to comment
Share on other sites

This is a very good thread showing the versatility of the Dv formula. I`ve learned something today. Any chance of you putting up your spreadsheet?

https://mega.co.nz/#!AIoTGY7Z!Q--KTO6dfywTc4n7gsQRSh3EClFjgdnhwaJpvaARiwI

That should link to the spreadsheet (although it's not inconceivable that I have made a hash of it). The highlighted cells are the ones that contain formulae and so should not be messed with. I have included a table for asparagus staging as well, although it just tells you the delta-v obtained from 6x symmery asparagus staging with the input you choose, rather than telling you how much fuel to use.

Basically, you need to choose an appropriate engine, input its stats, the required delta-V and the local gravity (if applicable) and it will tell you the minimum amount of fuel required (assuming full fuel tanks). You then put in the amount of fuel you are actually going to use, generally round up to the next most convenient number, and it tells you the delta-V you have, your TWR and the duration of your burn.

It's worth noting that you design from the last stage to the first, so if you are planning a return trip to the mun, the first stage you calculate for is from Mun to Kerbin (If you don't plan on staging on the way back).

Link to comment
Share on other sites

  • 3 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...