Jump to content

[1.0.5] Advanced Jet Engine v2.6.1 - Feb 1


camlost

Recommended Posts

Are all jet-/prop engines affected or just a few? Most (?) of the models and textures come from other mods than AJE. In that case you should edit those cfgs in ATM which affect the mod where the engines come from originally. Like Squad, B9, Firespitter etc.

OR you can just switch to DDS loader and have no more problems :)

Btw, "red hue" sounds like what I get when textures are missing. As if you have deleted squad textures that say SXT uses?

Link to comment
Share on other sites

No, to your last question. I actually figured it out. I added a custom ATM file and through it in AJE's folder, and it kept it from caching everything. Problem is increased my memory usage by about 100MB.

Link to comment
Share on other sites

FAR isn't updated yet but I've compiled some notes on 1.0 compatibility anyway (mainly for camlost's benefit):

  • Various API level things need to be updated (field names, float vs double) but they're minor and I've already made most of the necessary changes.
  • ModuleEnginesFX now inherits from ModuleEngines so EngineWrapper shouldn't be necessary anymore.
  • Compatibility with stock aero is possible, but wrapping FAR as an optional dependency looks like it would be a PITA. DaMichel figured out a way to do it, but maybe not worth worrying about for now.

EDIT: The only AJE dependency on FAR is atmospheric density, and it looks like FAR now uses stock density (barring some smoothing at the ocean surface, which if considered should be handled differently in AJE anyway), so stock aero compatibility might not be so difficult after all.

Edited by blowfish
Link to comment
Share on other sites

Update: A few more changes I identified:

  • Most pressures are given in kPa and temperatures in kelvin, so conversions are no longer necessary
  • External temperature, pressure, and density can all now be determined by querying the vessel (or even a single part) rather than FlightGlobals. This matters since temperature and density are no longer just a function of altitude.
  • A vessel now now has two temperatures, atmosphericTemperature and externalTemperature - not sure what the difference is.

Link to comment
Share on other sites

A plea: instead of sitting beside ModuleEngines, just make a new class that inherits from it. That's what ModuleEnginesFX is now. (Or inherit from that, if you prefer, that's probably better). It's really not a good idea to be force-setting a whole floatcurve every frame.

The way the stock jets behave is somewhat similar to AJE, in fact--you may be able to use the existing fields (like flowMultiplier and machHeatLimit) to good effect.

Link to comment
Share on other sites

A plea: instead of sitting beside ModuleEngines, just make a new class that inherits from it. That's what ModuleEnginesFX is now. (Or inherit from that, if you prefer, that's probably better). It's really not a good idea to be force-setting a whole floatcurve every frame.

That's could work ... do you know if Isp is set in CalculateThrust() ? Also, it would have to be ModuleEnginesFX, since many engines use that.

Link to comment
Share on other sites

On second thought, wouldn't that create issues with other mods? For instance HotRockets needs to be able to change the effects based on the part having ModuleEngines of ModuleEnginesFX.

Link to comment
Share on other sites

A plea: instead of sitting beside ModuleEngines, just make a new class that inherits from it. That's what ModuleEnginesFX is now. (Or inherit from that, if you prefer, that's probably better). It's really not a good idea to be force-setting a whole floatcurve every frame.

The way the stock jets behave is somewhat similar to AJE, in fact--you may be able to use the existing fields (like flowMultiplier and machHeatLimit) to good effect.

In that case hybrid engines like RAPIER cannot switch mod, and engineering plugins would ignore the module

Link to comment
Share on other sites

In that case hybrid engines like RAPIER cannot switch mod, and engineering plugins would ignore the module

I'm having trouble seeing why this would be true - (m is ModuleEngines) will return true for subclasses, and because of multi-mode engines, plugins can't rely on p.Modules["ModuleEngines"] to give the correct result. The way AJE does things currently relies on the first ModuleEngines or ModuleEnginesFX being the correct one, which is true for single mode engines and all of the multi-mode engines I've seen, but other plugins cannot rely on this (and it should probably be changed for robustness in AJE).

As I mentioned above though, this will interfere with mods attempting to change engine parameters via ModuleManager.

EDIT: Not sure if FindModulesImplementing<ModuleEngines>(), which is commonly used, will return correctly but I suspect that the answer is yes.

Edited by blowfish
Link to comment
Share on other sites

Is it worth keeping EngineWrapper now that ModuleEnginesFX inherits from ModuleEngines? You should just be able to use part.FindModuleImplementing<ModuleEngines>(), which will also not throw a NullRef like the current code does.

Link to comment
Share on other sites

I've noticed that in AJE, almost all jet engines would pick up thrust if you make it go fast enough. Throttling during cruise is like managing a ramjet: a bit too high, and there's a vicious cycle of increasing thrust and increasing speed that destroys the plane (or maxThrust is hit). A bit too low, and you end up settling down into a much slower cruise speed.

This is especially serious for high-speed engines like the YJ93. You easily enter into an uncontrollable thrust mania at high Mach, where even at 5% throttle the thrust levels continue to climb. Several times I had to cut fuel flow completely to save my plane from self-destruction. And no, I'm not putting too much engine on too little plane --- the static TWR is about 0.2.

Is this realistic? I think that for most engines that aren't designed for high-speed operation, making them go fast would actually reduce thrust. It's well-known, for example, that for high-bypass turbofans the static thrust is the maximum thrust. The SR-71's J58 seems to be the only engine for which the increasing thrust behavior is realistic. It's a bit ridiculous to have airliners with high-bypass turbofans overspeeding and tearing themselves apart when under full throttle.

The YJ93 should cruise at Mach 3 only under continuous afterburner, so that seems grossly unrealistic too?

Even with a maxThrust, this seems highly unrealistic: most engines gradually reduce thrust after the design speed, rather than simply starting to increase thrust more slowly.

And finally, even if all this behavior is in some sense realistic, I doubt that fuel turbopumps can simply operate at arbitrarily high fuel flow rates?

(I've noted that this behavior seemed to become much worse after the "engine code redo" on GitHub; my gigantic turbofans used to decrease thrust gradually until there was an equilibrium with the drag, now they decrease thrust a bit until ~0.5 mach, then just turn into huge ramjets again)

Edited by miyuruasuka
Link to comment
Share on other sites

I'm making a common inlet hybrid engine which is inspired by SR72, rapier and ramjet share a shock cone inlet, and make it sure only one among those are airbreathing at once. Saying if rapier is airbreathing then ramjet is shut down, and vice versa. But this mod doesn't detect that and both of the engines have insufficient inlet space all the time. Any suggestion?

Link to comment
Share on other sites

I'm making a common inlet hybrid engine which is inspired by SR72, rapier and ramjet share a shock cone inlet, and make it sure only one among those are airbreathing at once. Saying if rapier is airbreathing then ramjet is shut down, and vice versa. But this mod doesn't detect that and both of the engines have insufficient inlet space all the time. Any suggestion?

2.0.4 doesn't support having two different AJEModules on the same engine - they will both select the same ModuleEngines(FX). The way this works is being reworked so that the module (now ModuleEnginesAJEJet) inherits from ModuleEnginesFX and this will be possible.

Link to comment
Share on other sites

I've noticed that in AJE, almost all jet engines would pick up thrust if you make it go fast enough. Throttling during cruise is like managing a ramjet: a bit too high, and there's a vicious cycle of increasing thrust and increasing speed that destroys the plane (or maxThrust is hit). A bit too low, and you end up settling down into a much slower cruise speed.

This is especially serious for high-speed engines like the YJ93. You easily enter into an uncontrollable thrust mania at high Mach, where even at 5% throttle the thrust levels continue to climb. Several times I had to cut fuel flow completely to save my plane from self-destruction. And no, I'm not putting too much engine on too little plane --- the static TWR is about 0.2.

Is this realistic? I think that for most engines that aren't designed for high-speed operation, making them go fast would actually reduce thrust. It's well-known, for example, that for high-bypass turbofans the static thrust is the maximum thrust. The SR-71's J58 seems to be the only engine for which the increasing thrust behavior is realistic. It's a bit ridiculous to have airliners with high-bypass turbofans overspeeding and tearing themselves apart when under full throttle.

The YJ93 should cruise at Mach 3 only under continuous afterburner, so that seems grossly unrealistic too?

Even with a maxThrust, this seems highly unrealistic: most engines gradually reduce thrust after the design speed, rather than simply starting to increase thrust more slowly.

And finally, even if all this behavior is in some sense realistic, I doubt that fuel turbopumps can simply operate at arbitrarily high fuel flow rates?

(I've noted that this behavior seemed to become much worse after the "engine code redo" on GitHub; my gigantic turbofans used to decrease thrust gradually until there was an equilibrium with the drag, now they decrease thrust a bit until ~0.5 mach, then just turn into huge ramjets again)

What gigantic turbofan? You cannot argue against AJE's realism solely based on how your vehicle flies, you know?

Link to comment
Share on other sites

I've had plenty of planes (especially if really over-engined) that would smoothly accelerate to Mach 0.5-0.8 as you would expect, and then accelerate from there to Mach 4 or 5 in about a quarter second, with the engine exploding along the way.

I only noticed it on the J58, though. It's been a few months since I messed with it, but a small plane with two J58s would work just fine at high altitude and afterburner, and would work just fine at low altitude and mil power, but would produce near-infinite thrust at low altitude and afterburner. I'd have almost two seconds to reduce throttle from 101% mil thrust before the engine exploded due to high Mach, but MUCH less time at full burner.

This is too far removed to really be a bug report, obviously, since it's been months since I fired up Kerbal. I just wanted to affirm that the issue is or was real, at least at one time, and in combination with who-knows-how-many other mods.

Actually, I remember poking around the engine definitions and playing with the EngineSim applet a bit, and I seem to remember finding that EngineSim didn't include any modeling for afterburners except for the case of zero-bypass turbojets. That might be the root of it.

Edited by NonWonderDog
Link to comment
Share on other sites

2.0.4 doesn't support having two different AJEModules on the same engine - they will both select the same ModuleEngines(FX). The way this works is being reworked so that the module (now ModuleEnginesAJEJet) inherits from ModuleEnginesFX and this will be possible.

No, I didn`t mean that a single part with two engine mode. I attached rapier AND ramjet into shock cone inlet. Will it make difference?

Link to comment
Share on other sites

What gigantic turbofan? You cannot argue against AJE's realism solely based on how your vehicle flies, you know?

A simple test with AJESolverTester would make it very clear: no matter what parameters you put in, as you increase speed thrust increases without bound.

This is also a problem with NASA EngineSim, though. I wonder whether there is some approximation being made by the thrust-calculating code that has diverging error as speed increases.

Also, it's not just "my vehicle", but a large number of vehicles I've built. Even vehicles that do work to real-life spec (for example, a MiG-21 clone I built) experience this problem if I give it a push with a rocket over Mach 2.0: the SNECMA turbojet would suddenly start going faster and faster, and you just can't get it to stop: cutting throttle doesn't work since the engine spools down slower than the thrust increases.

By "gigantic turbofan" I mean the CFM whatever. It does dramatically reduce thrust as you get up to around 500 km/h, but starts picking up thrust afterwards. If you disable overheating, you can get it to produce as much thrust as you like by simply boosting it to supersonic speeds: it will then self-sustain, producing more and more thrust until the plane falls apart due to aerodynamic forces.

Essentially, my subsonic airliners would fall apart due to Mach effects if I don't reduce throttle as I speed up. I remember that in real life, airliner's maximum level-flight speed is limited by thrust + drag, not overheating or airframe integrity.

Edited by miyuruasuka
Link to comment
Share on other sites

Then how do you propose the engines would work? What evidence do you have to defend that? IRL, planes don't get hypersonic because of a number of reasons, not necessarily lack of thrust. I get many reports about how planes fly unrealistically, but how a plane flies is not something I can work on, only thrust and Isp.

Essentially, my subsonic airliners would fall apart due to Mach effects if I don't reduce throttle as I speed up. I remember that in real life, airliner's maximum level-flight speed is limited by thrust + drag, not overheating or airframe integrity.

I find that very hard to believe. Either you don't have correct mods installed, or you're not flying a real replica.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...