Jump to content

How does KSP calculate ISP for engines?


-ctn-

Recommended Posts

Okay, so I've been learning some of these rocket equations in my spare time. And I've come up on a brick wall.

Let's say I have an engine I want to make for the game, and I know the thrust and ISP I want it to have. But in the config files, you can input the thrust and fuel consumption rate values.

The equation for fuel consumption is Thrust (in newtons) / (gravity * ISP ). Otherwise known as Thrust / exhaust velocity.

So if I use this equation on one of KSP's engines, let's say the O10 monopropellant engine, the number I get does not match the stats in game.

Thrust = 20 kN

Isp = 250 s

and fuel rate = 2.04/s.

If I use the real world equation, I get: 8.15.

I've tried it with several engines but it never matches up...

Link to comment
Share on other sites

There's an extra conversion -- units of LF/Oxidizer/Mono are "volumetric", rather than mass.

20 kN /(250 s *9.80665m/s²) == 0.0081577 tonnes per second

Note that the "density" of monoprop is 0.004 tonnes/l

0.0081577/0.004 == 2.0394324 units/s

Link to comment
Share on other sites

Err, still having problems with this. For example - I have an engine I made for a mod. In the config file, I put 0.93 for engine fuel ratio. In game however, the stats say "5.09" for fuel consumption and ISP of 250 s.

Thats exactly what ISP I want, however for future reference, what is the extra calculation there? None of the config files seem to match up to what the fuel ratio is in-game.

Link to comment
Share on other sites

The ratio isn't an actual ratio, but a weighting factor. As best I can tell, KSP adds them all up, then uses the ratio value over the sum. (A notable example is the ion engine)

I was also asking, because I was wondering about the details of your modded engine (eg: is it the O-10 just with that number changed, or...?).

Link to comment
Share on other sites

Over the sum of what? Thrust / atmosphere curve?

My engine was just the o-10 with a different FX and changed values. Ratio was changed to 0.93 and thrust to 50. In game, it says 50kN, isp of 250 s and fuel rate of 5.09 / s

Link to comment
Share on other sites

"Ratio" of that propellant supply over the sum of all other "ratios." Things should only get messy if you have multiple propellants of varying densities.

Since the engine still only burns monopropellant, that's 0.93/0.93 == 1

mass flow == thrust/(g0*Isp) == 50/(9.80665*250) == 0.0020394 tonnes/s

"volumetric flow" == mass flow/density * proportion == 0.0020394/0.004*1 == 5.0986 units/second

Link to comment
Share on other sites

Well, that's helpful to know... But sorry, I may be missing something. In the configuration files, you can only specify RATIO and THRUST. So how does KSP calculate fuel flow and ISP from only these two values?

Link to comment
Share on other sites

Isp *is* specified (at 0 atm, 1 atm, and some higher amount where it hits 0.001 s) in the CFG files. eg:


atmosphereCurve
{
key = 0 250
key = 1 120
key = 4 0.001
}

250 s at 0 atm, 120 s at 1 atm, 0.001 s at 4 atm. Interpolation is messy.

Link to comment
Share on other sites

Isp *is* specified (at 0 atm, 1 atm, and some higher amount where it hits 0.001 s) in the CFG files. eg:


atmosphereCurve
{
key = 0 250
key = 1 120
key = 4 0.001
}

250 s at 0 atm, 120 s at 1 atm, 0.001 s at 4 atm. Interpolation is messy.

Haha, you've got to be kidding me.

Thank you so much for your help and patience!

Link to comment
Share on other sites

There's an extra conversion -- units of LF/Oxidizer/Mono are "volumetric", rather than mass.

20 kN /(250 s *9.80665m/s²) == 0.0081577 tonnes per second

Note that the "density" of monoprop is 0.004 tonnes/l

0.0081577/0.004 == 2.0394324 units/s

AFAIK the units are actually mass (one unit of LF or oxidizer is 5 kg, but units of monoprop and xenon have different values. Can't remember how solid fuel is handled.

However, RealFuels does have volumetric units (liters for everything).

Link to comment
Share on other sites

Interpolation is messy.

A bit, but not too complicated. It's a standard cubic spline, keyed from values and slopes. The slopes are computed by taking average from the two neighbors. Just in case anyone is curious.

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