# Is there a non brute-force algorithm for finding the combination of rocket components to maximize delta-v for a certain launch mass?

Let's say we want to build a rocket that has the maximum amount of delta-v in deep space, but its launch mass has to be less than some number. We have a finite list of rocket components that can be used to build the rocket, such as engines, fuel tanks, stage separators, etc, and know all the details about each component such as mass, fuel capacity, thrust, etc.

Is there a non brute-force algorithm that can tell us exactly what combination of the rocket components will make the rocket have the highest delta-v possible while staying under a certain launch mass?

When I talk about a brute-force algorithm, I mean simply trying out every possible combination of rocket components whose total mass and fuel is under the limit, and then seeing which one has the highest delta-v.

• This is a KSP question, isn't it? :) Feb 18, 2016 at 12:47
• For sequential stages, a good rule of thumb is to keep the ratio of full mass to dry mass in every stage at approximately the golden mean. For a set of assumptions (constant ISP, constant TWR of engines, no gravity loss, etc) this is even a precise solution. Feb 18, 2016 at 13:25
• @Rikki-Tikki-Tavi: By dry mass you mean what remains plus the upper stages and their fuel? 'cause it's definitely best to minimize dry mass of any discarded stage in relation to the fuel it carries, and golden ratio in relation of stage vs its fuel is way too much dry mass and too little fuel.
– SF.
Feb 18, 2016 at 22:07
• @Rikki-Tikki-Tavi, where do you get the golden ratio as a "precise solution" to this problem? Feb 18, 2016 at 22:38
• @SF Yes, the mass at separation is meant by "dry mass". Feb 19, 2016 at 13:45

Outside of games like Kerbal Space Program, application for such an algorithm is limited, because components like tanks and interstages are geneally purpose-designed and built for a particular rocket, rather than being selected off-the-shelf.

However, your problem description strongly hints that you're talking about KSP, so I'm going to run with that. I don't believe there's a general magic algorithm for optimal rockets, but there are several heuristic shortcuts that can allow you to reduce the size of the brute force search space. Wikipedia has some relevant hints on optimal staging.

Take the initial mass limit divided by the payload mass to get the overall mass ratio you're working with. For an n-stage rocket, the nth root of the overall mass ratio gets you a stage-to-stage mass ratio target; now you can break the problem down into building individual stages that fit approximately those target numbers.

For example, if your payload is 10 tons, your launch mass limit is 200 tons, then a 2-stage rocket should have a $\sqrt 20 = 4.472$ stage mass ratio; 10 tons payload, 45 tons 2nd stage+payload; 200 tons 1st+2nd+payload. Thus your first stage would be aiming at 155 tons, and your second 35 tons. You'd probably want to give some wiggle room to each stage search, say +/- 20% of the mass target.

Brute force search for an individual stage is pretty straightforward. Iterate over the engine types available, figure out how many of that engine you need to give the stage-plus-upper-stages better than 1:1 initial thrust-to-weight ratio, allocate the remaining mass after engines and decoupler to tankage, compute the stage ∆v, repeat and sort, discard the low performers. There might be better solutions using heterogenous engines (e.g. 1 of engine X and 2 of engine Y) it's up to you if you want to accept that complexity in the search.

Then you just take each combination of high-performing stages that remain under the mass limit and find the winner.

• I was thinking more along the lines of having a large list of theoretical components that differ from each other in small increments, like by 1 kg in mass or 1 cm in length, to simulate designing a real rocket. Feb 18, 2016 at 15:52
• In the real rocket case, optimizing for cost is vastly more important than optimizing for launch mass, and the tradeoffs are weird; using an existing engine is cheap, commissioning an upgrade of an existing engine is less cheap, but designing an all new engine is expensive. If there's an existing engine of 200kN and an existing engine of 400kN, and your analysis says the ideal engine is 250kN, cost might drive you to select the 400kN engine and build a larger stage around that, rather than seek the mass-optimal solution. Feb 18, 2016 at 16:03
• I think the cost point is spot on. That said, I do have a loose recollection that there is an equation, or system of equations, perhaps attributable to lagrange that helps with the mass optimisation, if you were set on it. I did a quick search and found this: ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19660005481.pdf but I cant imagine that an analytical approach will carry you that far, it seems reasonable you'd have to resort to a numerical optimisation to deal with the atmosphere, differing thrust/weight per stage etc. Feb 18, 2016 at 22:19
• @Puffin: I doubt Lagrange (1736 – 1813) really projected mass optimization for rockets. Although lots of classical physics equations are directly derived from his calculus methods (especially ones for motion in potential field, like gravity of a planet) so I wouldn't be surprised his methods were adapted for the purpose.
– SF.
Feb 19, 2016 at 14:15