Jump to content

Staging Optimally


Cunjo Carl

Recommended Posts

Staging Optimally
A spreadsheet planner and conversation place.

We've all been there. After all the hours building a launcher to put X tons in obit, you want to make sure that payload can do just as much as kerbally possible! But it's hard to know exactly how many stages to put in the thing, and how large to make each. If your stages are too small, you're wasting deltaV pushing around extra decouplers and engines, but if your stages are too big, you're wasting deltaV pushing around empty fuel tanks!


So where's the magic happy balance inbetween? Now you can find out*!
*Software provider does not assume liability for engineers trying to saw engines in half to achieve "The most optimum ratio!!"

 

At the moment, there are 2 programs which can find the optimum relative sizes of stages for your rocket:

 

One option is @IncongruousGoat's C# & .NET automatic version available here: Github Link! It'll suggest engines for you:

lbesisr.png

 

The other option is a GoogleDoc spreadsheet program, which you can also use as a planner. More info on that follows:
 

image.png   image.png


Instructions:

1. Open the doc, and make your own sheet by clicking the "down" arrow by the "Template" tab at the bottom, and click the duplicate button. Rename your sheet and you're set to play around!

2. Write in the names of each stage your rocket will have, and the TWR they'll need as well as their engine specs (see the ksp wiki for a quick reference).

3. Then for the stage's scale, type in a guess of 1 (scale is just a convenient measure of size). Down below you'll see a huge field full of information for how changing this scale for each stage will change the final rocket's efficiency. Simply make the best changes, and soon enough you'll have the very optimum of rockets!

 

Notes:

The template has a rocket already loaded in so you have something to work from. Here's a picture!

Spoiler

51c.png

The spark and terrier stages somehow ended up missing some utilities and fuel, so I evened it out a bit later. Still, that's where the little TWR discrepancy on stage 2 comes from. Other than that, it all matches up great!

 

The underlying math doesn't care how big your rocket is, or what order the stages are in, but if you give it your payload mass and stage order, it'll read out how big each stage should be and how many engines it should have. The optimum efficiency tends to be fairly broad, so there's typically plenty of wiggle room to choose a slightly-sub-optimal scale to get a whole number of engines. You can also tweak the TWR requirements if you really want to see a whole number of engines at an optimum :) . IRL just round the sucker :cool:

It handles asparagus staging and drop tanks, because I figure'd it'd be fun! It doesn't handle weird fuel tanks that don't have a 1/9 ratio, but I can add that in if it's desired?

This system does scoot mass around between stages to let more efficient stages cover for less efficient ones. You'll notice if you have a particularly inefficient engine (thud), the optimizer will tell you the most efficient scale for that stage is so small it has a negative deltaV. This means that it would be better deltaV-wise to not even give those engines fuel tanks... that's sad, thud. Sorry.  Whatever, I'm using them anyway! If you don't want to optimize a certain stage, you don't need to. The solver will optimize all the rest around it.

 

Final Thoughts:

Please let me know if it winds up being confusing in any way. I'd like to make it convenient and intuitive, but I have a peculiar design aesthetic by nature. I encourage community additions and am happy to share the math behind the calculator. There's also ongoing development thread for the underlying math here, and I'll be making a tutorial thread on how the system works in a few weeks.

Huge thanks to co-conspirators @Abastro and @IncongruousGoat who helped with the math development!   If this stuff happens to be your jam, please kick them a like in posts here and here. Thanks!

 

Oh, once again, I'm flagging the good banana mod banana @Vanamonde in case another board is better. I'm planning to make a separate tutorial thread for the actual how-to stuff, but if tutorials is the best place, I can always roll the two threads into one? In any case, let's see where we end up. Brace for warp drive!

Edited by Cunjo Carl
Link to comment
Share on other sites

Ah, point of order... I ended up switching to C# and .NET, since it was much easier to get around my problems with .NET than it was to find a C++ UI library I could actually use (insert licensing issues here).

It does mean that it won't be available for Mac, and that I'll have to set up Mono and recompile for Linux if anybody wants it for that.

EDIT: I have been made aware that things compiled for Linux with Mono will run on MacOS. So that won't be a problem.

Edited by IncongruousGoat
Link to comment
Share on other sites

46 minutes ago, IncongruousGoat said:

It does mean that it won't be available for Mac, and that I'll have to set up Mono and recompile for Linux if anybody wants it for that.

Not really. A C# assembly built using VS should run just fine with the mono runtime on both Linux and MacOS. In my experience running the ckan client the UI is occasionally a bit twitchy on Mac, but it definitely works. 

Link to comment
Share on other sites

Just now, stibbons said:

Not really. A C# assembly built using VS should run just fine with the mono runtime on both Linux and MacOS. In my experience running the ckan client the UI is occasionally a bit twitchy on Mac, but it definitely works. 

That's good to hear. I don't have much experience writing things that have UIs, so a lot of this has been foreign ground for me.

Link to comment
Share on other sites

All right. I've got an initial release out for the solver program. There's still a lot of room for improvement, but I think I can safely say I've gotten a basic version working on Windows.

The release can be found here: https://github.com/tmaxthomas/KSP-optimum-stage-calculator/releases/tag/v1.0

Any and all comments and suggestions for improvement are welcome.

Link to comment
Share on other sites

2 hours ago, Cunjo Carl said:

@IncongruousGoat The CS/.NET RTE just finished downloading, and hopefully I can give it a shot tonight! Would you like to send me any pictures or things to put in topic? Now I finally got a moment to rearrange the topic, I think it's fine as is, just if you want.

Here's a screenshot of a sample input, just to give people an idea of what kind of output the program produces from what kind of input: http://imgur.com/lbesisr

Feel free to put it in the post, or to not put it in the post. It's just an example I threw together with about a minute of fiddling with inputs until it produced something interesting.

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