Factorio

Factorio

View Stats:
rikkitikki Jan 16, 2021 @ 10:26am
Balancing fluid production
Hi, all... I saw the earlier post on fluid flow as it related to trains but my query is a bit more general so I thought it appropriate to start a new thread...

I'm looking for general tips on how to keep the the various types of fluids flowing throughout my supply chains, especially the fluids derived from oil cracking. I always seem to be getting kinks in the works, usually because one or more of the oil products (petroleum gas, light and heavy oil) either runs out or fills to capacity so the refinery gets backed up and stops producing the other two (usually either Petroleum Gas or Lubricant, which eventually causes a Heavy Oil production stoppage). I've noticed this becomes increasingly complicated as my overall factory develops new needs for fluids (blue betls, for example, requiring lubricant). I've tried different circuit connections between various storage tanks, station enabling and pumps with limited success, usually solving the problem in the short term only to discover a loophole in my thinking that leads to another stoppage later on down the line.

What are some of the ways you guys solve this challenge?

Note: I love working with circuits but am still learning the ropes, so any suggestions along those lines I would appreciate a step by step description.

TIA
Last edited by rikkitikki; Jan 16, 2021 @ 1:16pm
< >
Showing 1-15 of 17 comments
AlexMBrennan Jan 16, 2021 @ 11:07am 
In general you build buffer tanks for the various outputs, and enable cracking if the buffer gets too full: connect a pump to the buffer tank with a circuit wire, and turn the pump on if heavy oil/light oil > 15000

I've noticed this becomes increasingly complicated as my overall factory develops new needs for fluids (blue betls, for example, requiring lubricant)

This is a hard problem because there is no inverse cracking that can turn petroleum into heavy oil - all you can do is increase science production to use up the excess petroleum.
Last edited by AlexMBrennan; Jan 16, 2021 @ 11:09am
knighttemplar1960 Jan 16, 2021 @ 1:38pm 
I do something similar to what AlexMBrennan mentioned but I have a cascade system set up down the line for each product. For heavy oil I hook up wires to the tank(s). I leave lubricant on and set a wire to the pump that leads to my heavy oil cracking set up that only turns on when Heavy oil capacity is at 75% of my total storage.

I set up light oil the same way. Making the vast majority of it into solid fuel (and later rocket fuel and then nuclear fuel). All set up with wires. The solid fuel and rocket fuel stay on. When the light oil reaches 75% of my light oil storage capacity it turns on the pump that goes to light oil cracking. My solid fuel gets used for trains, cars, and a row or 2 of boilers and steam engines since by that time I'm having power issues not having reached nuclear or having enough room for solar arrays. It also uses up the supply of solid fuel so that it doesn't back up and jam up the refinery production lines.

For petroleum gas the same thing except output is split between sulfur and plastic production lines. the pumps stay on for both plastic and sulfur but I have my petroleum storage tanks wired and when it reaches 90% of capacity it turns on a pump that takes petroleum gas to a set of chemical plants that use the excess petroleum gas to produce solid fuel. That outputs to a belt that feeds back into the solid fuel production output lines and has a splitter that is set to prioritize input from the petroleum gas side. That is only there as a stop gap to keep the refinery flowing smoothly , Very rarely does it ever kick in.
rikkitikki Jan 16, 2021 @ 1:49pm 
Originally posted by AlexMBrennan:
In general you build buffer tanks for the various outputs, and enable cracking if the buffer gets too full: connect a pump to the buffer tank with a circuit wire, and turn the pump on if heavy oil/light oil > 15000

Sounds like a good rule of thumb, thanks.

Originally posted by AlexMBrennan:

This is a hard problem because there is no inverse cracking that can turn petroleum into heavy oil - all you can do is increase science production to use up the excess petroleum.

Right, that's one reason I keep getting stuck. I know I could just flush out the tanks manually and get the system running again but I feel that is kind of cheating. (Maybe it's because I learned the game pre 1.0 before that feature was added).

I'm finding the real Catch 22 is near the end game when you want to ramp up your rocket launches but your rocket fuel production stops because your solid fuel cells have by that time filled up miles of belts with nowhere to go, shutting down your cracking upstream which you need for the light oil to make rocket fuel.

The only idea I have come up with is creating a 2nd refining network to use up the surplus from the first and keep "paying the debt forward" as it were, which feels a little less "cheaty" to me but at the same time seems kind of ludicrous, and certainly wasteful.
rikkitikki Jan 16, 2021 @ 2:10pm 
Originally posted by knighttemplar1960:
I do something similar to what AlexMBrennan mentioned but I have a cascade system set up down the line for each product.

Thank you for the detailed answer. I THINK I get what you mean by "cascade" but my brain is having trouble absorbing it all.. I think I will have to build it myself based on your description to really understand how it works.

Somehow I seem to be having a different experience than you where my petroleum has backed up long before I'm ready to produce a lot oft rocket fuel and actually use it. And i don't seem to be using up or need a lot of sulfur. But as I said I'll give it a try and maybe I'll understand your solution a little better.


AlexMBrennan Jan 16, 2021 @ 2:16pm 
I'm finding the real Catch 22 is near the end game when you want to ramp up your rocket launches but your rocket fuel production stops because your solid fuel cells have by that time filled up miles of belts with nowhere to go, shutting down your cracking upstream which you need for the light oil to make rocket fuel.

That should not be a problem if cracking is set up correctly. For 10 rocket parts per minute you will need 23.2 oil refineries, 5.8 chemical factories doing heavy oil cracking, and 7.5 chemical factories doing light oil cracking. If you run out of light oil then that's because you cracked it into petroleum when you shouldn't have.
Last edited by AlexMBrennan; Jan 16, 2021 @ 2:17pm
rikkitikki Jan 16, 2021 @ 2:53pm 
Originally posted by AlexMBrennan:
If you run out of light oil then that's because you cracked it into petroleum when you shouldn't have.

Ahhhh, OK. I probably was needy for more petroleum at the time but had not worked out the numbers for my rocket requirements later in the game the way you just did (because I hate working out those numbers, but very appreciative that you did it for me -- thanks!). So I probably overreacted and created too many chem plants.

It seems to me the game is very forgiving for that kind of behavior for most things, but if you aren't precise with your liquid proportions You Will Pay! :)

Last edited by rikkitikki; Jan 16, 2021 @ 2:54pm
knighttemplar1960 Jan 16, 2021 @ 8:12pm 
Originally posted by rikkitikki:
Originally posted by knighttemplar1960:
I do something similar to what AlexMBrennan mentioned but I have a cascade system set up down the line for each product.

Thank you for the detailed answer. I THINK I get what you mean by "cascade" but my brain is having trouble absorbing it all.. I think I will have to build it myself based on your description to really understand how it works.

Somehow I seem to be having a different experience than you where my petroleum has backed up long before I'm ready to produce a lot oft rocket fuel and actually use it. And i don't seem to be using up or need a lot of sulfur. But as I said I'll give it a try and maybe I'll understand your solution a little better.

If you have enemies turned on and they are set up to expand you will use a decent amount of sulfur creating explosives for rockets and artillery shells. If you don't limit the flow to the sulfur plants or the plastic plants one will back up but then the flow is diverted completely to the other instead of split between them until petroleum gas starts to back up.

When I am playing just to have fun I set up my map for a rails world and remember the settings for the resources and then switch back to default but move the resources sliders where they were for a rails world. This level of enemy aggression seems to cause me to use equal amounts of petroleum gas between sulfur and plastic.

The wires connected to the pumps leading to the cracking arrays act as a sort of IF/THEN gate. They read the contents of the storage tanks and IF they are greater than 75% of capacity THEN the pump turns on and sends the excess to the cracking array until it drops below 75%. Doing this increases the amount of the next tier of oil product being produced which can lead to a back up in the storage of that product. IF that happens THEN the pump on that set of storage tanks turns on and the excess goes to the cracking array for the next tier of oil product. When you get down to a surplus of petroleum gas you can't uncrack it but you can turn any surplus into solid fuel which you can use for power or as a component in your rocket fuel production.

Pre-nuclear power the vast majority of my solid fuel gets use by boilers and steam engines to produce power to run the expanding base since it provides more energy than coal. Once I get to nuclear power and rocket fuel the excess solid fuel in that step is being used to create rocket fuel and launch rockets instead of produce power.

When I get a chance I'll sort through my old save files and see if I can grab a few screen shots.
Drum Jan 17, 2021 @ 2:45am 
This is what i do;
[1] Place oil-refinaries and leave 3 rows of space free on both sides (for beacons later on).
[2] Use advanced oil production.
[3] Guide heavy-oil through a pipe with factories that make lubricant.
[4] Extend the heavy-oil pipe and turn the remaining to light-oil by using the ‘Heavy-oil-cracking option in the chemical plant’, and feed the acquired light-oil back into the light-oil network.
[5] Connect a buffer-tank to the light-oil, and place a pump that only starts pumping when the tank holds 15000 light-oil. Use these new pumped-line to turn excess light oil in petroleum by using the Light-oil cracking. In the chemical plant.

[5b] Try to balance plastic/sulfur production by placing chemical plants on both side of 1 petroleum-line. Later on it is better to make dedicated factories for both products.

Step [1] to [5] will ensure you will make as much lubricant and petroleum as possible and should ensure the factory to keep working all the time since petroleum is used for plastic. In rare cases your oil-factory will grind to a halt, and in order to prevent this you can add solid-fuel production.

[6] Connect the Petroleum- , Light oil- and heavy-oil-network to buffertanks, and connect a pump to each of them. Connect the pump to the tank with a wire, and set the pump to activate when you reach 20.000 fluid in that tank.
[7] Connect those 3 lines to chemical plants which use these liquids to turn into solid fuel. (Be aware for pure solid-fuel production it is better to feed heavy-oil into chemical plants instead of turning it into petroleum, so don’t use step [3] to [5] if solid fuel is your main goal)
[8] Connect the 3 lines of solid-fuel onto a belt-balancer to make sure this line can not lock up. Use the solid fuel for your power production, use make rocket fuel. I prefer the last to feed a starting train-network.
[9] In step [6] we have added 1 light-oil pump to a buffer tank, but we need another which activates when there is 18.000 light oil in the tank. We use this light-oil line to turn solid fuel into rocket fuel.
[10] Later on you can place production modules in the factories, and place speed-beacons.

Step [6] to [9] ensure that your oil-factory keeps working, and makes sure that 70~80% of your pipeline is filled with heavy-oil, light-oil and petroleum. This is what it would look like:

https://steamcommunity.com/sharedfiles/filedetails/?id=2364785218
MC Dirty Wet Jan 17, 2021 @ 3:19am 
Probably already answered but every reply is many paragraphs so I can't really read them, but a good plan is this:

1. Have heavy, light, and the gas go into storage tanks before being pumped out to the production buildings that need them.
2. For heavy and light oil, after the storage tanks, but before the pipes leading to the production buildings, have a pumps that divert flow to crackers. The outputs for these crackers should go into the appropriate storage tanks.
3. Use wires/circuitry to make the pump that sends heavy oil to the crackers only do it if you have more heavy oil than light oil in the storage tanks. Do the same for the light oil pump: make it only pump if you have more light oil than petroleum gas.

This will keep the ratios roughly even, assuming you have enough crackers AND enough refineries. If you get too much heavy oil, it will crack it into light, and if you have too much light it will crack it into petroleum gas. If you have too much petroleum gas it will stop cracking light etc.

If one tank fills up production won't stop so long as you have fluid in the other tanks, because it means production has fluid to use. The only real issue is when at least one tank fills up while at least one of the others is empty or not being filled up fast enough. If heavy fills up and light is empty, you need more heavy->light crackers. If light fills up and petroleum gas is empty, you need more light->petroleum gas crackers. If heavy is empty you probably just need more oil refineries. You can also just look at your crackers and see if they are all on. If they are all on consistently and the tank with the resource they are trying to fill is not filling, it means you don't have enough crackers.

It is also possible to simply not consume enough petroleum gas. Assume a setup where no petroleum gas is consumed... the petrol gas tank will just fill up while heavy and light is continuously consumed, and you will be out of luck because petrol gas cannot be turned into anything else. This is less a problem with coal liquefaction and more a problem with advanced oil processing mixed in with basic oil processing resulting in an overproduction of petroleum gas. This is a very unlikely problem as petroleum gas is used in way more stuff than light and heavy oil, but can be a problem if you are refining oil close to where you need light and heavy and can't move the petroleum gas fast enough. Just get rid of oil refineries on basic oil processing and use coal liquefaction when you get it, or get the petrol where you need it.
rikkitikki Jan 17, 2021 @ 12:36pm 
Great advice, everyone. Thank you. I appreciate everyone's detailed descriptions, and Drumatiko thanks for the screenshot. I like the orderly way you (and apparently many other people) create product "blocks' for easy tracing and diagnostics, vs. my more scattered deployment based on where the crude is coming from.

The common thread that I'm hearing, albeit with different variations, is the idea of saving up the light and heavy oil in buffers then using wires so that further cracking downstream happens only if you have an excess. I was trying to regulate everything by having combinators compare outputs near the top of the pipestream (so more like EITHER/OR rather than IF/THEN) but of course that still means you can run completely out of a product as opposed to first ensuring a surplus as a condition prior to production. Funny how such a simple idea eluded me, but that's why I love this discussion forum! Thanks again, all!
Drum Jan 17, 2021 @ 1:18pm 
You're welcome :steamthumbsup:
knighttemplar1960 Jan 17, 2021 @ 3:11pm 
This is a pre-beacon megabase that my wife and I were working on.

Crude oil comes into the refinery and gets processed in advanced oil processing:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365539978
Heavy oil gets processed into lubricant or cracked into light oil if it exceeds 75% of storage capacity:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365540007
Light oil gets made into solid fuel:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365540032
Then Rocket Fuel:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365540053
Then Nuclear fuel:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365540083
If it exceeds 75% of storage capacity it gets cracked into petroleum gas:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365540097
Petroleum gas gets made into Plastic:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365540116
and sulfur:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365540141
Sulfur gets made into sulfuric acid, batteries, and explosives:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365540166
and products get shipped in and out here:
https://steamcommunity.com/sharedfiles/filedetails/?id=2365540188
I never did put the safety relief valve of converting petroleum gas into solid fuel in this base because I never got to a point where I was backed up on petroleum gas. Especially so when we started launching rockets.
Last edited by knighttemplar1960; Jan 17, 2021 @ 3:12pm
ouch67 Jan 19, 2021 @ 11:55pm 
I'll throw in my setup too, might help more people with more examples.

But like has been said before, if you have too much of something then just change it to something else.

https://steamcommunity.com/sharedfiles/filedetails/?id=2367838293

My Red wire logic setup is as follows:

Heavy oil gets made into lubricant always until lubricant tank is full. If heavy oil is over 24k in one tank then it gets converted into light oil via a power switch.

Light oil always makes solid fuel but the arms only will output the cubes onto the belts if light oil is over 24k. If it is over 24k it will also be converted into gas via a power switch.

Gas always gets made into solid fuel, like the light oil it will only be put onto belts if a tank is over 24k.

My early game iron and copper furnaces always get converted into steel production and some brick production mid to late game once I get the electric furnaces. And Since solid fuel is essentially a free bi-product of oil, I always keep the steel furnaces going all the way through the end of the game just so I can vent off any access oil products. And it greatly saves on the power grid as you can imagine.
jonbrave Jan 20, 2021 @ 1:39am 
I feel like throwing in my latest play-through solution, ready to be criticized/shot down in flames! :)

I am not nearly as clever/dedicated as the posters above! So simple solution. Previously I have used tanks & circuits to regulate. This time I simply organized so that the pipe for Heavy runs through Lubricant before it goes to Cracking to Light, and the pipe for Light runs through Solid Fuel/Rocket Fuel before it goes to Cracking to Petrol. And I seem to do only Plastics + Sulfur from Petrol.

All I can say this seems to be working just fine in practice. No bottlenecks, no shortages. No tanks, no logistics :)
Purpleganja Jan 20, 2021 @ 9:11am 
Originally posted by jonbrave:
I feel like throwing in my latest play-through solution, ready to be criticized/shot down in flames! :)

I am not nearly as clever/dedicated as the posters above! So simple solution. Previously I have used tanks & circuits to regulate. This time I simply organized so that the pipe for Heavy runs through Lubricant before it goes to Cracking to Light, and the pipe for Light runs through Solid Fuel/Rocket Fuel before it goes to Cracking to Petrol. And I seem to do only Plastics + Sulfur from Petrol.

All I can say this seems to be working just fine in practice. No bottlenecks, no shortages. No tanks, no logistics :)

I do my cracking without wiring too. I make fluid "priority splitter" to send only surplus to the crackers. Simply have your fluid pass through a tank and exit on the high priority side with a pump and the low priority side with a couple of pipes before the next input and next to nothing will go to the low priority side before the other side backs up.
< >
Showing 1-15 of 17 comments
Per page: 1530 50

Date Posted: Jan 16, 2021 @ 10:26am
Posts: 17