Gas Management

Some mods, made by Bob. Basically streaks every Factroio-area.

Moderator: bobingabout

Post Reply
Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Gas Management

Post by Recon777 »

Okay, so I'm trying to design a system which produces the basic four "free" gasses with the least amount of waste in the form of running machines constantly using energy. The raw material (air and water) may be free, but ideally, the machines should stop when there is enough gas in the system.

The goal is to have independent, on-demand storage of these gasses. I'm using Flow Control's custom valves because they're much less bulky and annoying than setting up pumps and combinators.

Looking at the screenshot below as a prototype, what we've got is (hopefully) guaranteed production of each type of gas until storage is full. This, of course, assumes that the sodium hydroxide byproduct doesn't clog up.

The electrolyzer on the left will run until chlorine is full because the excess hydrogen gets stored in the tank but has an overflow valve with a gas vent if there's too much.

The non-return valve on the hydrogen side is to prevent all the storage getting vented.

The electrolyzer in the middle produces both oxygen and hydrogen until the oxygen storage is full, at which point it stops running. Like before, excess hydrogen is vented.

The electrolyzer on the right is for the purpose of producing hydrogen in the event hydrogen storage runs low and both chlorine and oxygen storage is full. If hydrogen is more than 80% full, this electrolyzer shuts off. Excess oxygen which it produces is vented if there's not enough storage for it.

The chemical plant on the right will run until nitrogen is full, at which point it stops running. Excess oxygen is stored if there is room, otherwise it is vented.

As far as I can tell, independent usage of any of these gasses will result in machines kicking in and making more without getting clogged up or running needlessly.
If you happen to spot any errors or know of a more efficient way of doing this, feel free to let me know.

Image

In case anyone wants to tinker with it:

Code: Select all

0eNqdWclu2zAQ/ZWCZykQV1H5gV57L4JCtpmECC2qWpIaQf699BJbsUfkKCdvem8Wzkq/k5UbTdvZZiD378SufdOT+9/vpLdPTe323w271pB78uhGuyEZaert/uP62fmAMuQjI7bZmH/knn5kadzzbtP5J9NMcAyD8/92X1Ecg2rscC1NfDxkxDSDHaw5mnr4sPvTjNuV6YIZZ3Q/GOPy9bPph0DZ+j5gfLOXFnjyKiO78ELpx16TKxJ2JrFNb7ohfHfLoM8MGdnYzqyPPzKAj5/5hq5u+tZ3Q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SleFDnT/AYzOc4o=

Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Re: Gas Management

Post by Recon777 »

I think I already found a bug in the system. The backup hydrogen electrolyzer (on the right) should bypass the hydrogen overflow valve. Otherwise, I think it'll just run forever.

[edit] Yep. That was the issue. The whole thing seems to work, but I'll have to implement it on a large scale to see if the pipes can deliver.

Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Re: Gas Management

Post by Recon777 »

Well, I built the large-scale system. Here's some screenshots.

Naturally, I'll be adding more and bigger tanks, but I can say from the initial test that these vanilla tanks filled up "damn fast". :mrgreen:
And from what I can tell, it works correctly. Rapidly venting any one of the tanks and then letting it go will refill fairly quickly despite the others being full already.
Yet when everything is full, all the machines stop, which is important for energy consumption.
I do suspect this will have throughput issues for long distance high capacity needs such as a big solid fuel line. For those, I'll probably make gasses locally and pipe in excess as a top-up as needed.

Image

Image

Image

Image

BlackMoon
Inserter
Inserter
Posts: 42
Joined: Wed Aug 06, 2014 7:15 am
Contact:

Re: Gas Management

Post by BlackMoon »

Protip, Trains move gases/fluids around amazingly fast. You can also disable train stops based on if a fluid tank is full or not.

All the fluids can move over the same traintrack too :)

For most of my fluid movements I use 1:1 trains because they store so much, with the option of 1:2 trains.

Interesting idea having two electrolyisers, one for oxygen and one for hydrogen.
I would have tried to use combinators.

I think it could be something simple like:
(decider) If oxygen > 20k in tank, output green
(decider) if hydrogen > 20k in tank, output green
then connect two outputs together, feed to decider that is
if (green signal < 2), enable venting pumps

Alternatively, you could have it setup where if green signal < 2, enable electrolysers (Power switch? Valve on input water?) and have both tanks vent at 22k or whatever.
That way they only run when one is in demand.

<edit> tested this using pumps set to flow when tank > 1/2full from production area to tank. Works well. Can also put lights on each decider to give you an indication when one is being produced and by what area.

that said I really should switch my oxygen production to air compressors, I think..

Wait, how did you swap the outputs on your chemical factory around?

Post Reply

Return to “Bob's mods”