Jump to content
  • 0

[BUG] Jet engines drawing fuel through decouplers first


Captain Sierra
 Share

Question

Overview:

All jet engines, including the RAPIER regardless of mode, draw fuel from across decouplers and, additionally, draw fuel from tanks separated by decouplers first.

Symptoms:

Fuel is drawn from tanks that are segregated by decouplers without the presence of a fuel line. This is highly detrimental to airbreathing SSTO spaceplanes attempting to deliver fuel-containing payloads to orbit. Below is a test craft which represents a cargo-containing SSTO and demonstrates the detriments of this.

Repro Steps:

  1. Build
bcDiBLi.png
To build:

  1. Place Mk2 cockpit as root
  2. Add large mk2 cargo bay
  3. Add bicoupler
  4. Add two RAPIER engines on the bicoupler
  5. Place 1.25m stack decoupler inside bay
  6. Place Mk1 jet fuel tank on decoupler
  7. Secure craft with launch clamps
  8. Varify the RAPIERs are in the first stage and everything else is not


  9. zWGWK05.png
  10. Launch, throttle up, and stage once.
  11. Upon RAPIER flameout, inspect fuel quantities of both tanks. They should look like cdcedWJ.png


    Other Applicable Info:
    As evidenced by my UI, I tested this in a heavily modded 1.0.3 version of KSP running on DX11. I received assistance verifying this issue's continued presence in vanilla 1.0.4 from other forumers in the KSP forum Steam group (shoutout to those guys for that).
    Spike sent me his screenshot evidence viewable here.


    Update:
    So apparently not even fuel lines can prevent this issue:
    AAC00376D3B40C2AE312A16C62FF080D5677568C
    Image courtesy of the Steam group guys.


    UPDATE 2:
    Following thread merge confusion, this thread is now exclusively related to jet engines drawing from decoupler separated tanks before others. Fixing other problematic "features" of this flow mode change is the topic for another thread (which I very much intend to start in Suggestions later). There's also another thread (that's somewhat old now) reporting the same problem which you can view here.
    This issue specifically appears to be related to how the fuel search is working. Unlike normal liquid engines, the search is done only once and is done relative the root part, not the engine. It targets tanks which will be decoupled first, and tanks that wont be decoupled at all last (this was designed originally for monopropellant). If your root part is not on your payload, the game treats your payload as a drop tank.

It should look like

on the runway.

Edited by Captain Sierra
Rebranding to more-correct bug.
Link to comment
Share on other sites

Recommended Posts

  • 0

if you do normal tank decoupler tank (no cargo bay) does it still do it? makes me wonder if its due to cargo bay working around the normal stack shape

in which case makes me wonder if crossfeed to false on cargo bay fixes it

either case, lock tank contents

Link to comment
Share on other sites

  • 0
if you do normal tank decoupler tank (no cargo bay) does it still do it? makes me wonder if its due to cargo bay working around the normal stack shape

in which case makes me wonder if crossfeed to false on cargo bay fixes it

either case, lock tank contents

Cargo bays don't do anything special with the part tree. Unity sees no difference between using the cargo bay or a bicoupler in this scenario (at least thats what my approaching 2000 hours and very limited Unity experience tells me).

Yes definitely lock tank contents, but if the scenario is a lander with many tanks buried under other parts, that gets harder. Locking of tank flow should be toggleable via AG.

Link to comment
Share on other sites

  • 0

Well, I hate to inform you guys but this is actually by design rather than a bug.

With 1.0 came a change in the fuel flow mode for jet engines and rapiers (i.e. "air breathers") in that they basically pull fuel from all over. And a product of that fuel flow method is that, not only do they pull fuel from all over, but fuel attached behind lower stages (i.e. behind a decoupler) is consumed first. That means what you are demonstrating in this thread is the way it's designed to function (suck fuel from things that are scheduled to be jettisoned).

Why was this done? Well, it's part of the master plan to make controlling the Center of Mass easier. Except (in my opinion) it causes way more problems and doesn't help with CoM control much at all, unless you have a very (very) simple design. In my opinion, one of the most common uses for a space plan (which typically uses jets) is to deliver probes or payloads to space. This fuel flow mode ensures that any payload connected in the bay via a decoupler will be consumed first, which is (in all likely hood) the opposite of what is desired.

So the problem is that I can build a "fix" for this, except it's actually working exactly as designed. It's actually not the decoupler's fault, it's how the fuel flow mode works for the engine. So I'm stuck in sort of an odd spot on this "fix."

Cheers (or not...)

~Claw

Link to comment
Share on other sites

  • 0
-long quote snip-

I actually knew this going in, but a "feature" that makes your life harder instead of easier against its design more often than not, to me, is the definition of a bug, intentional or otherwise.

Additionally, decouplers explicitly state they do not allow fuel crossfeed, but this is not respected. When the game tells you something, then contradicts that, ... you see where I'm going.

Lastly, if I wanted fuel to flow across decouplers, I'd use a fuel line. Thats how we did it way back when.

I acknowledge the all-tank fuel draw would be fine if it were per-stage. That part of this new fuel flow mode is not bad, just the lack of respect for decouplers.

Also I knew going into this I'd have to fight to call this a bug, but I believe I've made a solid enough case to document this as a problem, intentional feature or otherwise.

Link to comment
Share on other sites

  • 0

Well, please don't take my posting to mean "don't bring this up."

I would say it is working as intended (so not a bug), but it is valid feedback that I happen to agree with. It's might be working, but isn't necessarily achieving the most useful results. Simply (as you point out) makes it harder to deal with, and not easier.

Cheers,

~Claw

Link to comment
Share on other sites

  • 0

It will but then it will fall back to the old behavior where fuel is not consumed evenly from all tanks. In my opinion the fuelCrossFeed = False from the stack decouplers should be respected, the radial decouplers don't have this line anymore so they still would work for mounting drop tanks. Or even better make all the decouplers/pylons switchable for allowing cross feed or not.

It's clearly a bug from my point of view because stacked decouplers "fuelCrossFeed = False" is ignored completely with jet engines.

Link to comment
Share on other sites

  • 0
It will but then it will fall back to the old behavior where fuel is not consumed evenly from all tanks

Good, that's what OP (and I) want. It's easier to manage fuel flow and mass distribution around a vessel when A, you know the cargo isn't changing weight, B, decouplers and fuel lines are respected and C, you don't have to fiddle around with every tank to pump fuel around where you want it.

Link to comment
Share on other sites

  • 0

This is a very difficult thing for them to improve without making significant changes to the resource flow code. The STACK_PRIORITY_SEARCH mode makes it necessary to use fuel lines or other tricks to get fuel through (or from) surface attached parts like wings and can drain unevenly but using the existing STAGE_PRIORITY_FLOW mode used by monoprop and xenon for the jet engines has various issues that don't appear to have been considered in enough depth before the change (or it, presumably, wouldn't have been made). What should really have been done is to create a detailed description of a new flow mode for jet engines that completely specifies how it should behave and then implement it. While in the area, the same should also be done for fuel cells (they also draw LF/O using the monoprop flow mode which can cause issues) and ISRU convertors, probably defining several new flow modes that could be selected in the VAB (e.g. just parent part, user specified tank, same stage only, fuel lines only etc.). However, this would be a fairly significant chunk of work and, given that the existing flow modes do generally work pretty well once you understand them (except for some odd effects like asymmetrical flameout due to part placement order), and the amount of other things to be worked on, I can understand why the developers have been reluctant to spend time in this area...

Link to comment
Share on other sites

  • 0

Having fuel be consumed evenly is great, but this should respect the "NO FUEL CROSSFEED" property of decouplers. Leave it to the player to add a fuel line if they wish to bypass the no crossfeed property; that way, everyone wins. Fuel is consumed evenly, unless you don't want it to be.

Link to comment
Share on other sites

  • 0
Well, I hate to inform you guys but this is actually by design rather than a bug.

With 1.0 came a change in the fuel flow mode for jet engines and rapiers (i.e. "air breathers") in that they basically pull fuel from all over. And a product of that fuel flow method is that, not only do they pull fuel from all over, but fuel attached behind lower stages (i.e. behind a decoupler) is consumed first. That means what you are demonstrating in this thread is the way it's designed to function (suck fuel from things that are scheduled to be jettisoned).

Why was this done? Well, it's part of the master plan to make controlling the Center of Mass easier. Except (in my opinion) it causes way more problems and doesn't help with CoM control much at all, unless you have a very (very) simple design. In my opinion, one of the most common uses for a space plan (which typically uses jets) is to deliver probes or payloads to space. This fuel flow mode ensures that any payload connected in the bay via a decoupler will be consumed first, which is (in all likely hood) the opposite of what is desired.

So the problem is that I can build a "fix" for this, except it's actually working exactly as designed. It's actually not the decoupler's fault, it's how the fuel flow mode works for the engine. So I'm stuck in sort of an odd spot on this "fix."

Cheers (or not...)

~Claw

Having to take issue with the bolded parts of your quoted text.

Firstly, the fuel tank in the OP's example plane is in FRONT of the decoupler. By your definition it should not be doing what it's doing. Note my example below. This is basically the same thing except for the arrangement of the stack nodes (the cargo bay having two bottom and top stack nodes because of the way it works). This works correctly and is doing what it is supposed to be doing

o8AcIFqh.jpg?1

Also, the point isn't to control center of mass, it's supposed to ensure that resources are drawn from the current stage first and ONLY look outside the current stage if resources are no longer available in the current stage. That's the intended behavior and the OP's example is not behaving according to intended behavior.

Link to comment
Share on other sites

  • 0
Well, please don't take my posting to mean "don't bring this up."

I would say it is working as intended (so not a bug), but it is valid feedback that I happen to agree with. It's might be working, but isn't necessarily achieving the most useful results. Simply (as you point out) makes it harder to deal with, and not easier.

Cheers,

~Claw

Yeah I understand. You're fully aware its an entirely undesirable mechanic, but hesitant to "fix" what technically isnt broken, even if it is detrimental. I cant say I know what its like to be in that position, but I can definitely understand your bind.

Also the part you interpret as "dont bring this up" was not geared towards you. I fully expected Sal or one of the other game-mechanic-savvy mods to pop in and dismiss this for being not a bug, and in that case I'd defnitely have to fight to keep my bug report.

If it's fuel flow for the engines, is the fix as simple as changing that in the config? I'll grant you it's working as intended, but the intention is undesirable. It's like if they coded vessels to explode once they reached 80 km.

It is as simple as removing that line from the .cfg (which reverts them to standard liquid fuel engine behavior), but a) I want to keep the even tank draining, and B) we the players should not have to edit our game files to avoid bad development decisions (this IMHO being a relatively poorly thought through one at best).

Good, that's what OP (and I) want. It's easier to manage fuel flow and mass distribution around a vessel when A, you know the cargo isn't changing weight, B, decouplers and fuel lines are respected and C, you don't have to fiddle around with every tank to pump fuel around where you want it.
Having fuel be consumed evenly is great, but this should respect the "NO FUEL CROSSFEED" property of decouplers. Leave it to the player to add a fuel line if they wish to bypass the no crossfeed property; that way, everyone wins. Fuel is consumed evenly, unless you don't want it to be.

Totally agree.

A software bug is an error, flaw, failure, or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.

Fuel crossfeeding across a part which explicitly states it does not allow certainly seems to match this, though as I understand what's going on under the hood, there technically isnt any code malfunction here. Whether or not we can declare this a bug is highly dependent on how we frame the issue.

- - - Updated - - -

Having to take issue with the bolded parts of your quoted text.

Firstly, the fuel tank in the OP's example plane is in FRONT of the decoupler. By your definition it should not be doing what it's doing. Note my example below. This is basically the same thing except for the arrangement of the stack nodes (the cargo bay having two bottom and top stack nodes because of the way it works). This works correctly and is doing what it is supposed to be doing

http://i.imgur.com/o8AcIFqh.jpg?1

Also, the point isn't to control center of mass, it's supposed to ensure that resources are drawn from the current stage first and ONLY look outside the current stage if resources are no longer available in the current stage. That's the intended behavior and the OP's example is not behaving according to intended behavior.

I didnt even catch that in Claw's post. Yes, you basically hit my point on the head. This is the problem, this is the bug, and this is what needs fixing.

Link to comment
Share on other sites

  • 0
Well, I hate to inform you guys but this is actually by design rather than a bug.

I recommend that anyone unhappy with this feature votes for the feedback issue on the bug tracker.

But as Claw explains this is intentional, and jet engines including the Rapier will draw from all tanks on a stage by stage basis, starting with the lowest stage, just as RCS thrusters will.

As can be seen here, the fuel flow with a jet matches the drain seen with RCS and monoprop, with the last stage in the construction "tree" being the first stage that fuel is drawn from.

Javascript is disabled. View full album

Any tanks lower in the tree, such as droptanks or cargo, will be drawn from first, and the only way to prevent this is to use the right click context menu to disable fuel flow from tanks that are intended as payload.

Please note that if fuel is draining from upper tanks through decoplers first then either something has gone wrong with the build and KSP does not realize there's a decoupler in the way, KSP has found a path due to other parts or the top of the craft was added to a common booster stage (or it's the fuel Kraken).

I still think fuel flow should be controllable via action group instead.

Link to comment
Share on other sites

  • 0
Having to take issue with the bolded parts of your quoted text.

Firstly, the fuel tank in the OP's example plane is in FRONT of the decoupler. By your definition it should not be doing what it's doing. Note my example below. This is basically the same thing except for the arrangement of the stack nodes (the cargo bay having two bottom and top stack nodes because of the way it works). This works correctly and is doing what it is supposed to be doing

http://i.imgur.com/o8AcIFqh.jpg?1

Also, the point isn't to control center of mass, it's supposed to ensure that resources are drawn from the current stage first and ONLY look outside the current stage if resources are no longer available in the current stage. That's the intended behavior and the OP's example is not behaving according to intended behavior.

My post was,when 1.0 came,they changed this behavior with 1.0.3.I still think the "fuelcrossfeed = false" argument should be respected.Also i tried to use docking port(disabling fuel crossfeed) instead of decoupler,when starting engine uper tank starts immediately losing fuel,fuel is getting consumed even thru engine.And this can't be right.

Link to comment
Share on other sites

  • 0

Experimenting with this more and in greater detail.

I want to further stress what I said earlier: STAGE_PRIORITY_FLOW draws EVENLY from every possible resource in the current stage. By no possible definition can the payload fuel tank be considered the current stage. Even if somehow according to flow rules the resource system thought it WAS in the current stage, it's drawing ONLY from the payload and is ignoring the bicoupler tank. Think about that a minute

This only happens to things in the cargo bay btw.

I moved the tank to the top node and it still happened. (not surprised)

It occurred to me that maybe the top/bottom stack nodes are playing a role here so I played with the part file and arranged it so that the inner stack nodes were top/bottom and outer ones were top2/bottom2. (technically top/top2 and bottom/bottom2 occupy the same space; it's only their attachment order and order they appear in the part file that govern where things attach)

I arranged it so that the inner top was the NODE_STACK_TOP and attached the decoupler and tank there. The fuel flow system should have been tricked into thinking that the tank really was part of the next stage and not drawn from it. (bottom of decoupler attached to the top stack node. I even changed the cargo bay inner/outer identifiers to match) And it still draws from that tank first without touching the bicoupler at all. There is something very wrong going on here.

Link to comment
Share on other sites

  • 0
Firstly, the fuel tank in the OP's example plane is in FRONT of the decoupler. By your definition it should not be doing what it's doing. Note my example below. This is basically the same thing except for the arrangement of the stack nodes (the cargo bay having two bottom and top stack nodes because of the way it works). This works correctly and is doing what it is supposed to be doing

The STAGE_PRIORITY_FLOW mode is supposed to group tanks according to which stage they are in. This basically comes down to how many decouplers are found when searching up the part tree from the tank to the root part. I suspect the OP has the root part somewhere in his jet stage which will cause the fuel to be drained from the upper stage tank (and only that tank) at first. Simply changing the root part to be the pod at the top should make it behave as expected.

Also, the point isn't to control center of mass,

I remember reading posts that explicitly said that the reasons the jet flow mode was changed were to make CoM balancing easier and to allow fuel flow from and through wings, so that is entirely his point.

it's supposed to ensure that resources are drawn from the current stage first and ONLY look outside the current stage if resources are no longer available in the current stage. That's the intended behavior and the OP's example is not behaving according to intended behavior.

It is not supposed to ensure that resources are drawn from the "current stage", it is supposed to draw resources from the tanks that will be decoupled earliest in the staging sequence. If the root part is in a part of the vessel that gets decoupled then the mechanic doesn't work as expected.

The code that works out which tanks to draw resources from already uses a significant amount of CPU for large vessels and modifying it to explicitly check for the presence of a decoupler or other "no cross feed" part between the tank and the part using the resource would make it significantly worse (and would limit the current potential there is for optimisations to the code).

I'm not saying that I agree with jets using this flow mode, I didn't really have any problems with the original flow (it helps if you completely understand how the flow works) but then I never really built any really large or complex planes. One thing that may be significant now is the extra drag caused by the fuel lines you would need for certain designs.

Link to comment
Share on other sites

  • 0
The STAGE_PRIORITY_FLOW mode is supposed to group tanks according to which stage they are in. This basically comes down to how many decouplers are found when searching up the part tree from the tank to the root part. I suspect the OP has the root part somewhere in his jet stage which will cause the fuel to be drained from the upper stage tank (and only that tank) at first. Simply changing the root part to be the pod at the top should make it behave as expected.

Well,if you build a house,you build it from bottom up,when you build a rocket in KSP,you build it from top down.My root part in OP is the cockpit!Like i said,they improved the fuell flow with "resourceFlowMode = STAGE_PRIORITY_FLOW" in 1.0.3-1.0.4,But still,when the bottom stage runs out of LF it start to drain fuel from upper stage through decoupler and engine attached to upper stage tank.

Link to comment
Share on other sites

  • 0

THe core of the problem is that the search is being run one time based on part tree, not relative the active engine like for standard liquid rockets. if the query was done based on engine position (and possibly if it respected occlusion), it could be made to work (but this is technically a bandaid fix for a poorly planned design decision).

Link to comment
Share on other sites

  • 0
Well,if you build a house,you build it from bottom up,when you build a rocket in KSP,you build it from top down.My root part in OP is the cockpit!Like i said,they improved the fuell flow with "resourceFlowMode = STAGE_PRIORITY_FLOW" in 1.0.3-1.0.4,But still,when the bottom stage runs out of LF it start to drain fuel from upper stage through decoupler and engine attached to upper stage tank.

I'm not aware of any changes to the fuel flow in 1.0.3/1.0.4. You said in your OP:

When i launch the craft,engines immediately starts draining fuel from upper stage fuel tank despite there is decoupler between stages.

...but are now saying that this happens after the bottom stage has run out of fuel.

Link to comment
Share on other sites

  • 0
Having to take issue with the bolded parts of your quoted text.

Firstly, the fuel tank in the OP's example plane is in FRONT of the decoupler. By your definition it should not be doing what it's doing.

My comment was in regard to another post, but two threads have now been merged. The words I posted are not for the general case, but were specifically addressing the other setup. Sorry for the confusion.

Cheers,

-Claw

Link to comment
Share on other sites

  • 0
Whoops, my mistake, threads de-merged, there's two different issues here.

Okay I'm confused now. There's comments in my thread that read like their out of context, and general confusion. I appreciate the de-merge, but now I got a mess to untangle.

EDIT:

To update:

This new fuel flow mechanic is an intentional change, but it causes the detrimental side effect of draining upper stages before lower stages due to how the part tree check works. This thread is specifically about the draining through decouplers first. There exists another thread about getting the mechanic reverted in general elsewhere. I'm updating the OP with this info.

Edited by Captain Sierra
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
Answer this question...

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

 Share

×
×
  • Create New...