Jump to content

[WIP] [Discussion] Basic Jet Engine -- a realistic rebalance of air-breathing engines


camlost

Recommended Posts

Hi folks,

As you know KSP's algorithm concerning air-breathing engines is incorrect. To solve the problem and bring along a believable model I've made the AJE mod (See signature). However AJE's algorithm from NASA EngineSim is not without its limitations. We have discussed about this with NathenKell and others and decided that a numerical model might serve a wider audience, requires less maintenance and easier to config for unorthodox things like SABRE and RAPIER.

Assuming inlets are spammed, the stock engines are defined by two curves: a velocity curve that is thrust vs speed, and a Isp curve that is Isp vs altitude. However in reality it is completely wrong. http://home.anadolu.edu.tr/~mcavcar/common/Jetengine.pdf

As explained here the thrust is dependent on the speed, but also greatly depends on altitude. Air density has a huge effect on thrust, and temperature has a minor effect. We must also notice that the 'velocity curve' is different under various altitudes.

640px-Tfan-thrust-map-kk-20050824.png

The Isp curve, however, does not change a lot upon altitudes, but is mainly affected by speed. Throttle and afterburners should also have an effect.

http://en.wikiversity.org/wiki/Jet_engine_performance_notes

The prototype I've made is very simple at the moment. The "maxThrust" corresponds to the sea level, while actual thrust is always proportional to air density. Isp is calculated using a new curve against speed, and has nothing to do with altitude. Since I want this to be low maintenance, the program also guess the Isp curve is nothing is defined.

However after some test-flying I've found it very difficult to balance thrust. Engines have too little thrust at high altitude due to 1) Temperature effect is neglected and 2) Thrust curve should shift toward higher speed in high altitude. As a result and due to the fact that many engines have poorly-defined curves in the first place, I had to define velocity curves for every engine and do a lot of test piloting for each one, which contradicts the point of making this mod. Also, to enable , for example, M3 flight at high altitude I have to greatly buff the speed curve to favor high speed, making the sea-level performance of the engine kind-of ridiculous.

Please share whatever your thoughts on this topic, thank you!

Link to comment
Share on other sites

I never bothered to inform myself about engines, so please excuse my ignorance. But since you posted this on the general dev board, i just go ahead with some questions :P

Hi folks,

However AJE's algorithm from NASA EngineSim is not without its limitations.

What limitations?

Moreover, what do you have in mind when stating "might serve a wider audience"? It sounds like you want to create an over performing engine so people can still build their space plane without much hassle, right?

Which leads me to my next question. You have already done AJE configs for a lot of engines. With this experience in mind, would it be possible to create an AJE configuration for a "stock-like" fictional engine?

Link to comment
Share on other sites

@DM,

1. There are too many limitations really. One that could be circumvented by a numerical model is that EngineSim assumes all parameters (like pressure ratio, turbine temperature etc) remain constant at any speed and altitude. Then some kind of hard limit has to be used to nerf the performance. For example, turbojets' max speed is limited by overheating, which seems unreal and stupid, and some people don't accept that. Another reason is that the model doesn't work for SCRAMJet, SABRE and some others things.

2. I'm not sure what Squad had in mind when they did those engines. They are 'fictional' only because the algorithm is wrong. The "Basic turbojet" for example, provides maximum thrust at 0m/s, meaning it is a high-bypass turbofan, but the isp is only 2000s, which is very low. Then because of the intakeAir bug, the actual Isp is 32000s. There are too many mistakes and arbitrary things.

It's also frustrating to see that some modders just copy-pasted the stock module, so I don't know what they want either. Kind of weird that although half the Spacecraft Exchange threads are about planes and FAR has been around for 2 years, few people asked questions regarding the general issue about air-breathing engines.

Edited by camlost
Link to comment
Share on other sites

from a simpleton's (with respect to real engine behaviours, statistics, and most of the math behind all of it) perspective... what if you simply averaged (weighted by some predefined curve perhaps, 0 defined altitude = all velocity curve; 1 defined altitude = all altitude curve) the velocity and altitude curves for thrust? wouldn't that push the actual thrust toward velocity curve at low altitudes and altitude curve at high altitudes? seems like that would allow pretty reasonable performing engines and unrealistic engines at the same time. ISP would be calculated by the plugin instead of defined in the config?

Link to comment
Share on other sites

I think you may be worrying too much about edge cases; I think it quite likely that the engines can be sorted into two groups.

1. Engines with reasonable velocity curves (and probably done by Taverius ^_^ )

2. Engines with copy-pasted SQUAD curves.

There will probably be a few that don't fit, but really, you should be safe in simply detecting each curve and replacing it, since the number of distinct curves is low, and if the curve doesn't match one you know about, then give it some reasonable-performance curve.

Link to comment
Share on other sites

@DM

...

Oh okay. I understand AJE doesn't work for SCRAMJets and SABRE at least :wink:

I guess the problem with engines is much less apparent than the oddness of stock aerodynamics for instance. And i doubt that people at Squad were familiar with the workings of jet engines when they made KSP. Who is familiar with this anyway. Probably just the engineers working on them :D

Btw this assumption "The "maxThrust" corresponds to the sea level, while actual thrust is always proportional to air density" doesn't seem to be valid. At least at the high speed end it looks more like a logarithmic dependence on air density (very roughly linear dependence on altitude). Perhaps you can use this high-speed behavior for low speeds, too.

How about you consider to make thrust a function of both, air density and velocity? Because in science a model should be as complex as needed but not any more complex. And as you say by yourself, there are some effects missing.

In addition to what Nathan said: You can probably extract some key figures like max-thrust from the stock config and then replace the rest with more reasonable stuff.

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