Flow through split pipes

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Flow through split pipes

Post by JasonC »

When you put a fork in a pipe, does the flow split evenly to both sides?

For example, let's say im producing heavy oil but not nearly enough to saturate the pipe. And I have the pipe going to both making solid fuel and making lubricant. Will it go to both equally, or is there a preference depending on pipe layout?
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

Rockstar04
Fast Inserter
Fast Inserter
Posts: 171
Joined: Sun Feb 17, 2013 4:31 pm
Contact:

Re: Flow through split pipes

Post by Rockstar04 »

I'm not 100% sure, but it may depend on the length of the pipe after the fork. If those are equal then I would assume it is divided mostly equally.

twepy
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Tue Apr 28, 2015 6:19 pm
Contact:

Re: Flow through split pipes

Post by twepy »

As far as my knowledge goes there is no guarantee that liquids are divided equally at splits or perhaps better said that all chemical plants with a demand gets equal parts of heavy oil.

Personally I prefer to prioritize lubricant production over fuel block production, by giving the chemical plant which produces lubricant direct access to heavy oil, it can always produce if there is a demand for lubricant as i dont use a storage tank for lubricant. The fuel block producing plant get access through a pump, which is wired to the heavy oil storage tank with a signal wire. Next i set on the pump a condition that it should run when heavy oil is above 500 (heavy oil > 500) and now fuel block production will only run on the excess heavy oil.

BlakeMW
Filter Inserter
Filter Inserter
Posts: 950
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: Flow through split pipes

Post by BlakeMW »

As a rule if the split is very symmetrical the flow will tend to also be symmetrical, but if on one side the pipe is shorter the flow will probably favor the shorter pipe (in terms of distance to consuming plant).

It is possible to do a passive split using storage tanks - tanks act as "resistors" they impede the flow of liquid, if you have a pipe split between two tanks because of tank resistance it will always find it easier to enter the less full tank and so the flow will be split between each tank.

Image

That is an example of a passive split setup, petroleum comes from the north, it is split between two tanks which deliver it fairly to the sulfur and plastics plant. This passive split technique is probably the best if you want all of a liquid to be available for use but don't want any consumer getting (completely) starved. Solutions using small pumps tend to give absolute priority to one consumer and involve storing up a buffer of unusable liquid (unless the priority consumer actually needs it), although often that is what you want.

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Flow through split pipes

Post by JasonC »

Thanks all!
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Flow through split pipes

Post by XKnight »

BlakeMW wrote:As a rule if the split is very symmetrical the flow will tend to also be symmetrical, but if on one side the pipe is shorter the flow will probably favor the shorter pipe (in terms of distance to consuming plant).

It is possible to do a passive split using storage tanks - tanks act as "resistors" they impede the flow of liquid, if you have a pipe split between two tanks because of tank resistance it will always find it easier to enter the less full tank and so the flow will be split between each tank.

Image

That is an example of a passive split setup, petroleum comes from the north, it is split between two tanks which deliver it fairly to the sulfur and plastics plant. This passive split technique is probably the best if you want all of a liquid to be available for use but don't want any consumer getting (completely) starved. Solutions using small pumps tend to give absolute priority to one consumer and involve storing up a buffer of unusable liquid (unless the priority consumer actually needs it), although often that is what you want.
In fact, this is not true. Liquid splitting is performed sequentially, it means first split will produce slightly bigger output than second, second split will be bigger than third and so on.

Example. Tank with 1250 water inside is connected with 2 empty pipes:
First pipe will receive (1250/2500 - 0 / 10) * 10 * 0.4 = 2 units of water
Second pipe - ((1250 - 2)/2500 - 0/10) * 10 * 0.4 = 1.9968 units
These operations are performed at the same game-tick.
Plot
The only way I found to split liquid evenly is to use pumps.

BlakeMW
Filter Inserter
Filter Inserter
Posts: 950
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: Flow through split pipes

Post by BlakeMW »

I'm only interested in what works well enough in practice and experimentally. For example the passive split tanks works well enough for ensuring neither plastics nor sulfur plant get completely starved. Having designs be highly symmetrical works a lot better than an asymmetrical design, for example if you put 2 offshore pumps into one pipe, then split that pipe and put it through two strings of 14 boilers, then rejoin the pipes, this will usually work if the split and join is completely symmetrical, but if it is even slightly asymmetrical it usually completely breaks down and most the water goes via one string of boilers.

Here is an example:
Symmetrical design works fine, 100% of boilers operate.
Image

Asymmetrical design results in water heavily favoring one string and only about 67% of boilers run:
Image
(If the difference isn't obvious, I move the outlet pipe up 2 units)


I don't really care to speculate too much why the game hates the asymmetrical design, but I suspect that to optimize performance the game caches "rivers" of flow through pipe systems and has future flow take the path of least resistance which earlier flow took so if one path is substantially shorter than another path the flow favors the shorter path.

Note: Order of pipe placement is relevant because it determines simulation order, so the above slightly asymmetrical design can actually work properly if the pipes are placed in a certain order. But pipe placement order generally only provides a small bias to the simulation, if a design is good it should work and if it's bad it should not work regardless of pipe placement order.

Post Reply

Return to “Gameplay Help”