Jump to content

Fuel crossfeed rules?


Recommended Posts

The KSP wiki doesn't seem to include any comprehensive article on fuel crossfeed. Can anyone explain the rules, if in fact there is a consistent set of rules? I've been experimenting and I'm starting to wonder.

For example these configurations allow all engines to take from the central fuel tank first:

TKTQ38P.png4tZ16LY.pngya3W2dU.png

But for some reason this doesn't, and instead uses only the radial tanks:

ypwk43I.png

Also I can't explain why this doesn't work:

eOYK8a4.png

And I had a hypothesis as to why this doesn't work:

wAZG2ot.png

but it was contradicted by some of the above tests.

And this doesn't work:

TbWLR1j.png

despite the fact that the engine and fuel tank have the same relative configuration as one of the earlier, working tests. In fact this lead me to a test that seems to prove that not only the connections between components matter, but that the positioning of components within the vehicle's heirarchy also matters.

PVr9lDq.pngpsTyVHu.png

These two images are of two separate vehicles, where the only difference is the order in which the parts were added. Despite the identical connections between components the vehicles function differently. My initial hypothesis was that engines only take fuel from components higher up in the hierarchy, but that was disproven when I did manage to built a vehicle with an engine taking fuel from a sibling component.

So my questions are: is there some way of understanding fuel crossfeed that reveals a coherent and consistent system, or does fuel crossfeed involve a bunch of bugs and part specific idiosyncrasies that eliminate all hope for such consistency? If the latter, has experience with previous releases given any indication that this issue has received work in the past and is likely to improve with future releases?

Link to comment
Share on other sites

They mostly all make sense. Fuel can't flow "up" the hierarchy; it only flows down (unless you add fuel flow lines). Also, fuel can't flow through probe cores or other command modules.

The second picture is the only odd one, where the wrong tank is being drained first. I'll test some things out in KSP eventually and see if I can figure out what's going on.

Link to comment
Share on other sites

It seems that two issues go on. First of all, as TheDarkStar mentioned, fuel will by default only flow down the nodal hierarchy, not up.

Second, it looks like fuel is only pulled from the default attachment point. In #2, those FLT-400's have their default attachment point attached to x-feed capable girders. In #4, their default attachment point is empty. In #5 you have multiple problems. The quad connector is mounted upside down. Yes, it's x-feed compatible but its default fuel entry (the top) is connected to the very engine that is demanding the fuel. There are four tanks connected to it, but not to the point where fuel is supposed to be coming from.

At least I THINK that is what is going on.

Link to comment
Share on other sites

Each engine does a depth-first recursive scan of the ship for fuel it needs. If it uses two fuel types (liquid fuel/oxidizer), it does two separate scans, one for each fuel type.

The scan starts on the engine body, i.e. the engine part itself.

Result of the scan is list of fuel tanks from which the engine draws fuel evenly (i.e. the same amount from each)

Rule 1: Each part can be only visited once, If it is visited for second time in particular search it returns empty list

Rule 2: Part performs scan on start of every fuel pipe ending in it. This scan is done in order in which pipes were installed. Then it makes an union of fuel tank sets each pipe scan returned and returns this list if it is not empty. If the list is empty, we go to further rules.

Rule 3: If the part is not crossfeed capable, it returns empty list

Rule 4: Part performs scan on each of its axially mounted neighbors (mounted through "green balls" in VAB). Most parts have two, hubs have six. Couplers (bicoupler, tricoupler, ...) are exception, they only scan the "single point" one, skip the points on the side where multiple points are. Again, the part creates union of scan lists from each of its neighbor and if it is not empty, returns this list. If the list is empty, we go to further rules.

Rule 5: If the part is fuel container for searched type of fuel (i.e. it has capability to contain that type of fuel and the fuel type was not disabled) then:

Rule 5a: If the part contains fuel of searched type, it returns itself

Rule 5b: If the part doesn't contain fuel of searched type (is empty container), it returns empty list

Rule 6: If the part is radially attached to another part and it is child of that part in the ship's tree structure, it scans its parent and returns whatever the parent scan returned.

Edit: I made a Fuel Flow Tutorial with some more details and experiments. I think it may come handy in the future.

Edited by Kasuha
Link to comment
Share on other sites

The third image in my original post shows a part pulling fuel from a point other than it's default attachment point.

So far, it's true, I haven't been able to get fuel to flow 'backwards' through a quad-coupler, but that seems to be part specific as fuel can flow backwards through the other parts I've tried E.g. flowing up instead of down through a structural fuselage.

Link to comment
Share on other sites

Only radial attachment scan cares about which part is parent and which part is child. Axial attachments are scanned in any direction. And fuel has no problem being drawn through probe cores and any other fuel crossfeed capable parts.

If you attach an engine radially to the middle of a fuel tank stack, it will draw the fuel from both ends of the stack, too. If you use the hub part which has six attach points, fuel can be drawn from all of them as long as you use a pipe to draw the fuel out of the hub.

Edited by Kasuha
Link to comment
Share on other sites

Thanks, Kasuha, that's exactly the sort of thing I'm hoping checks out. It seems like the rules you show will depend a lot on exactly how the depth first traversal works. Already it's clear that, if your rules are accurate, the traversal doesn't necessary visit all the connected parts. If it did then a centrally connected engine could take fuel from radially connected tanks. Anyway I'll have to take a closer look and test out these rules. Thanks again.

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