Jump to content

Math Problem - Amount of Fuel Tanks


Recommended Posts

Hi guys.

I've been playing KSP for a while now, but I recently decided to start a new save to try to get better at the science behind all of it.

Instead of reverting every flight if it not goes the way I want it and make adjustments after that, I decided to try and calculate everything beforehand.

Yet I am having a bit of a problem, and was wondering if anyone could tell me where my algebraic errors are.

Trying to calculate how many fuel tanks the rocket needs to achieve orbit.

Setup: Command Pod Mk1 + Mk16 Parachute + TR-18A Stack Decoupler + LV-T45 Liquid Fuel Engine + n * FL-T200 Fuel Tank

Mass total: Command Pod (0.84) + Parachute (0.10) + Decoupler (0.05) + Engine (1.50) + Fuel Tank (1.125 * n) = 2.45 + 1.125 * n

Mass dry: Command Pod (0.84) + Parachute (0.10) + Decoupler (0.05) + Engine (1.50) + Fuel Tank (0.125 * n) = 2.45 + 0.125 * n

∆v = Isp ( mtot / mdry )

∆v = Isp ( 2.45 + 1.125*n ) / ( 2.45 + 0.125*n) » Replaced mtot and mdry with the weight, where "n" stands for the amount of Fuel Tanks

∆v ( 2.45 + 0.125*n) = Isp ( 2.45 + 1.125*n ) » Multiplied both sides with "( 2.45 + 0.125*n)"

∆v * 2.45 + ∆v * 0.125 * n = Isp * 2.45 + Isp * 1.125 * n » Multiplied the factors with the sums » A(B+C)=AB+AC

∆v * 2.45 - Isp * 2.45 = Isp * 1.125 * n - ∆v * 0.125 * n » Subtracted "∆v * 0.125 * n" from both sides and subtracted "Isp * 2.45" from both sides

∆v * 2.45 - Isp * 2.45 = n * ( Isp * 1.125 - ∆v * 0.125) » Got the factor out of the sums » An-Bn=n(A-B)

(∆v * 2.45 - Isp * 2.45) / ( Isp * 1.125 - ∆v * 0.125) = n » Divided both sides with "Isp * 1.125 - ∆v * 0.125)

So, if a ∆v of 4550 m/s is needed to get into an 80km orbit and the Isp of the engines are 320s; I should be able to get the amount of fuel tanks needed ("n").

n = (4550 * 2.45 - [320*9.82] * 2.45) / ( [320*9.82] * 1.125 - 4550 * 0.125) » Used 4550 for ∆v and 320*9.82 for Isp

n = 1.34164

:confused: This is all a bit messy on a forum... I did my best to get it a bit easier to read.

I know there is something wrong with it, because surely it's impossible to reach a stable orbit with only 2 FL-T200 Fuel Tanks. I'd like some help to know what I did wrong.

On a side note: I used to be good in math, that was 8 years ago. Today, KSP has given me the desire to buy my old mathbooks again. But until they arrive, I have to ask here :)

Edited by Paradox_Escape
Link to comment
Share on other sites

∆v = Isp ( mtot / mdry )

You're missing a natural log there, and a factor of g0.

∆v = Ispg0ln(mwet/mdry)

EDIT: note, g0 is 9.82 in KSP instead of 9.81.

EDIT 2: Ah, I see you compensated for g0 in your Isp value.

Edited by Supernovy
Link to comment
Share on other sites

You're missing a natural log there, and a factor of g0.

∆v = Ispg0ln(mwet/mdry)

I feel silly now... I actually noticed it before I read your post... Which makes it even worse...

Natural logarithms are tucked to far away in my head... So how do I calculate the amount of fuel needed?

EDIT 2: Ah, I see you compensated for g0 in your Isp value.

Happy I did something right :)

Link to comment
Share on other sites

Well, eln(x) = x and ln(ex) = x,

since ∆v = Ispg0ln(mwet/mdry),

∆v/Ispg0 = ln(mwet/mdry),

e∆v/Ispg0 = mwet/mdry.

From there it's more algebra, but since you know ∆v and Ispg0, you can ignore the left side.

On a side note, Ispg0 = ve, or exhaust velocity. It might simplify it a little.

From experience, I know the solution will turn out to be around 3200 KVU of propellent, perhaps a little more. You can also check your answer against this slightly more involved equation, derived by UmbralRaptor.

Link to comment
Share on other sites

If you like, I have a tool I wrote in java to do exactly this sort of math. The link is in my signature. You input the minimum TWR, minimum ∆v, and weight of the payload, and it spits the amount of fuel you will need for each type of engine, along with the minimum number of engines to achieve your stated TWR. It uses vacuum Isp for all the engines, but you can use the custom engine function to input the atmospheric Isp if you want to design a lifter.

Link to comment
Share on other sites

Its great that you are willing to do the math. Its probably best.

If you ever decide that you are spending more time doing math than you are actually building your rocket (and you want to reverse that), you might want to try using a mod: Kerbal Engineer. It is unlock-able early in the tech tree during career mode play. It seems to do a good job of calculating dV as one builds a rocket (based on Kerbin and Mun gravity; I think the other objects' displays are not reliable).

As always, this is something you can choose to use, or not. The info in the above posts is good.

Link to comment
Share on other sites

Me: "14 fuel tanks with a single engine? Never."

Javascript is disabled. View full album

That was...unexpected.

Doing the mathematics before launching (or even building) a rocket is really fun, but if you try and design a rocket using it you'll end up with that kind of thing; not the most efficient rocket ever made.

But hey, orbit!

Link to comment
Share on other sites

Me: "14 fuel tanks with a single engine? Never."

<snip>

That was...unexpected.

Doing the mathematics before launching (or even building) a rocket is really fun, but if you try and design a rocket using it you'll end up with that kind of thing; not the most efficient rocket ever made.

But hey, orbit!

You start having to worry about TWR at some point, but even with the lower-TWR T45 I'm not at all surprised. Especially since the 14 number was conservative, using atmospheric Isp.

Personally I prefer doing the math to playing the game; all I do in-game is check that my calculations work.

Agreed.

Link to comment
Share on other sites

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...