Jump to content

KSP 1.0 ISP Engine Values


Recommended Posts

Alright. With KSP 1.0 having hit, does anyone have any details on how to get engine parameters now?

The specific parameter that prompted this question is ModuleEngines.maxThrust

In KSP .90 this was a KSPField that had the Max Thrust of an engine at 100% throttle. (Mainsail always reported 1500 thrust for this value.)

In KSP 1.0 I have no clue what this field means. It is no longer a KSPField and it always reports a value of 1376 for the mainsail, both on the pad at KSC and in orbit.

I did find the .finalThrust value which appears to be current thrust of the engine as displayed on the part right-click menu but that's it, anything else continues to escape me.

Now, I think that in theory I can take the .finalThrust and divide it by the .actualThrottle to get what my thrust should be at 100% throttle, but that seems a very clunky way to be doing this. (.actualThrottle is the current throttle, .requestedThrottle being the current throttle setpoint, these two values can differ due to spooling lag time.)

Anyone have any thoughts?

D.

Link to comment
Share on other sites

Okay.

While the KER stuff is exactly the math I am looking for, the actual method I want to use is ModuleEngines.GetEngineThrust().

However, that is a protected method so I can't access it. :/

Therefore I'm going to go with ModuleEngines.finalThrust / ModuleEngines.currentThrottle to get max thrust.

Not the exact way to do it, but close enough and it's only one line of code as opposed to several to re-do the math myself.

D.

edit: Blah, that doesn't work. Throttle off (so zero) throws a NaN which screws everything up, guess I'm doing the math.

Edited by Diazo
Link to comment
Share on other sites

been experimenting with this... seems 'max thrust' is your in atmosphere value and your vacuum value is determined in relation to your isp value and the 'third key' (previously there were key 0=vacuum isp and key 1=atmosphere isp)

example i tried to alter the ion engine to better isp and slightly higher thrust of 12000 and 10 respectively(i edit almost all of it because my laptop cant handle 300 part ships, 200 for that matter)

anyway i went into game and my ion had 1200 vac thrust...

this is when i noticed the third key... it had a value of... key 1.2 .0001 or something to that effect... i changed it to key 1.2 .0002 and the vac thrust changed to 120 ... so i dont got the correlation nailed down yet but thats my two cents...

Link to comment
Share on other sites

Within the CFGs, the "Max Thrust" is now the ASL thrust, rather than VAC thrust. For instance the Mainsail still has 1500 VAC thrust, just as before, but the CFG value is now 1379.032258, which is simply 1500 * 285 / 310, or (VacThrust * ISP[1atm] / ISP[0atm]).

Link to comment
Share on other sites

Okay, this is actually kind of ugly.

The actual max thrust of an engine is as follows:

ModuleEngines.maxFuelFlow * ModuleEngines.g * ModuleEngines.atmosphereCurve.Evaluate((float)(ModuleEngines.vessel.staticPressurekPa * PhysicsGlobals.KpaToAtmospheres)

Note that this code returns 100% throttle, you have to modify the .maxFuelFlow value for other throttle settings.

I'm not sure what ModuleEngines.g does, but the math needs it. (Thank you KER for that tidbit, I am aware I don't fully understand the math around ISP.)

The .atmosphereCurve.Evaluate requires the current pressure in Atmospheres so the math there converts from kPa to Atm.

So ya, the correct way to do it. A lot messier then it used to be, but not horrendous either.

D.

edit: The third key in the part.cfg files is how fast ISP drop off in higher pressures.

Key 0 is the vaccumm ISP

Key 1 is the 1 Atm ISP (KSP launch pad.)

Key 9 is the ISP at 9 Atm of pressure, it's mostly linear between Key 1 and this I believe. (Mainsail has a Key 9 0.001 value in there.)

Edited by Diazo
Link to comment
Share on other sites

thanks makes some sense is your quoted code line from ker... (im assuming kerbal engineer)

i dont use it im just trying to change values in cfg files and i dont recognize it.... the vac thrust * key1 isp / key0 isp =max thrust is working for me... now to figure out how to make my ion not need 152 electric a minute lol...

Link to comment
Share on other sites

Has anyone figured heatProduction yet? In .90 I could scale it to give scaled engines the same overheating behavior as the original size. Now KSP ignores the scaling, just like maxThrust. For maxThrust the solution was to scale maxFuelFlow instead. Is there a similar change for heat?

Do the values make sense to anyone? Without scaling, large engines heat up faster and further, to the point that a 5m basic jet will explode on the pad when running long enough at full thrust. So it seems like a relative quantity. Still the value seems to go up for larger engines, though there is no obvious pattern (Ant=8, skipper=306, mainsail=180, KR-2L=70).

Link to comment
Share on other sites

heatProduction is now scaled by the part's thermal mass (as well as the internal generation factor). So assuming the latter is 1 (it's not, it's something like 0.03) then heatProduction=1 literally means "this engine produces enough heat per second to raise its temperature 1 K per second".

Yet increasing 0.02t of mass 1K means waaaaay less energy than increasing 6t of Mainsail. And that heat (the energy, not the temperature) conducts outward.

Link to comment
Share on other sites

heatProduction is now scaled by the part's thermal mass (as well as the internal generation factor). So assuming the latter is 1 (it's not, it's something like 0.03) then heatProduction=1 literally means "this engine produces enough heat per second to raise its temperature 1 K per second".

Yet increasing 0.02t of mass 1K means waaaaay less energy than increasing 6t of Mainsail. And that heat (the energy, not the temperature) conducts outward.

Ah so this is why large engines (which tend to have high TWR) usually have large heatProduction. Now this starts to make sense.

So scaled engines (with preserved TWR) should all start heating up at the same speed. When some heat is built up, small parts should emit their heat more easily (more surface/mass), so large ones get hotter. This might explain what I see for TweakScaled engines.

Link to comment
Share on other sites

  • 1 month later...

use formula vacuum thrust x atmosphere isp(1) / vacuum isp (0) = max thrust... just reverse engineer the problem so that vac and max thrust remain the same...

example vac thrust(100) x atm isp(100) / vac isp(100) = max thrust 100

or vac thrust(100) x atm isp(1000) / vac isp(1000) = max thrust 100

gets tricky when vac thrust or isp is greater than atm thrust or isp

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