Complete oil processing - conditions

Post all other topics which do not belong to any other category.
Post Reply
zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Complete oil processing - conditions

Post by zOldBulldog »

As part of moving to 0.17 I am revisiting my Oil processing plant and I thought it would be a good idea to write down the conditions I use for the pumps that feed various processes. I figure that it could be helpful to beginners and I might even get some "improvement suggestions" from the experts. All of the numbers shown are 1 fluid tank (24k).

Heavy Oil to Lubricant: Always (will *correctly* clog up when not needed)
Heavy Oil to Light Oil: Heavy > 20k (save up to 20k reserve for Lubricant, rest to Light)
Heavy Oil to Solid Fuel: Heavy > 23k

Light Oil to Solid Fuel: Always (as it is now needed for Blue science)
Light Oil to Petroleum: Light > 20k (save up to 20k reserve for Solid Fuel, rest to Petroleum)

Petroleum to Plastic: Always
Petroleum to Sulfur: Always
Petroleum to Solid Fuel: Petroleum > 23k

Sulfur to Sulfuric: Always
Sulfuric to Batteries: Always
Solid Fuel to Rocket Fuel: Always, up to chest with X slots full (for trains)

Plant outputs: Lubricant, Sulfuric, Plastic, Solid Fuel, Rocket Fuel, Batteries.

Shutdown conditions:
- If *only* Lubricant is consumed Petroleum or Light Oil will get full, refineries will stop, and no more Lubricant gets produced. But that is pretty unlikely as the other products are typically in demand.
- If any other single product is the only one being produced there should be no shutdown and the refineries should run full blast as long as there is demand.
- If there is zero demand I expect the tanks to fill up to at least 20k.

I hope this is useful to beginners. And to experts I ask... do you see any flaws in this?

SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: Complete oil processing - conditions

Post by SyncViews »

zOldBulldog wrote:
Tue Mar 26, 2019 4:30 pm
Heavy Oil to Solid Fuel: Heavy > 23k
You are slightly better off converting heavy oil to light, and then solid fuel in terms of resource usage.

You need 20 heavy oil to get one solid, and 10 light oil.

40 heavy oil can be cracked into 30 light oil, so 80 heavy oil gives 60 light and that is 6 solid fuel instead of 4.

If you use productivity modules then even better.


Otherwise, it is fairly rare to produce more gas directly then you need in the refineries as you need lots of plastic and a fair amount of acid. So usually I won't make solid fuel from gas at all. If you find yourself needing lots of the heavier oils (e.g. for lubricant, or lots of flamethrowers) a bit of coal liquefaction or occasionally even using basic oil processing can work.

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Complete oil processing - conditions

Post by zOldBulldog »

SyncViews wrote:
Tue Mar 26, 2019 4:44 pm
zOldBulldog wrote:
Tue Mar 26, 2019 4:30 pm
Heavy Oil to Solid Fuel: Heavy > 23k
You are slightly better off converting heavy oil to light, and then solid fuel in terms of resource usage.

You need 20 heavy oil to get one solid, and 10 light oil.

40 heavy oil can be cracked into 30 light oil, so 80 heavy oil gives 60 light and that is 6 solid fuel instead of 4.

If you use productivity modules then even better.
Look at the conditions: The heavy to solid is only for overflow, when heavy reaches 23k. But heavy goes to light at 20k.

So, solid fuel is being produced from light, and only in extreme conditions is it produced from heavy or petroleum, to prevent refinery shutdown.

SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: Complete oil processing - conditions

Post by SyncViews »

zOldBulldog wrote:
Tue Mar 26, 2019 5:26 pm
SyncViews wrote:
Tue Mar 26, 2019 4:44 pm
zOldBulldog wrote:
Tue Mar 26, 2019 4:30 pm
Heavy Oil to Solid Fuel: Heavy > 23k
You are slightly better off converting heavy oil to light, and then solid fuel in terms of resource usage.

You need 20 heavy oil to get one solid, and 10 light oil.

40 heavy oil can be cracked into 30 light oil, so 80 heavy oil gives 60 light and that is 6 solid fuel instead of 4.

If you use productivity modules then even better.
Look at the conditions: The heavy to solid is only for overflow, when heavy reaches 23k. But heavy goes to light at 20k.

So, solid fuel is being produced from light, and only in extreme conditions is it produced from heavy or petroleum, to prevent refinery shutdown.
That heavy->solid still needs chemical plants though. If heavy is filling up and need more solid, you can build both heavy->light and light->solid.

Ellestrata
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Feb 20, 2019 1:47 pm
Contact:

Re: Complete oil processing - conditions

Post by Ellestrata »

Your system is uncannily similar to the one I've used in 0.17, basically exactly the same, and I can confirm that it works really well!

The only real difference is that I don't turn Heavy > Solid Fuel...I think you're better off using extra H>L plants than H>SF (as the previous response iterates) just for the extra value in Light Oil. Turning the extra L>SF gives no greater chance of shutdown. That said, there's something comforting in having those kind of fail-safes in place, even if they're technically unnecessary, and the value difference is probably minimal (haven't done the maths...yet).

Serenity
Smart Inserter
Smart Inserter
Posts: 1000
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Complete oil processing - conditions

Post by Serenity »

I like to save a little light and heavy for flamethrower ammo and flame turret fuel. But you don't need much. The pipes to the turrets will consume more than the turrets themselves

So I only make lubricant and crack heavy if heavy >10k or something like that. And only consume light oil if I have some. Most of the time it will run since you rarely consume much of it for those purposes.
With lubricant you could of course argue that lube should have priority over flamethrower ammo, but I don't think it matters in practice

I also have some chem plants making solid fuel from petroleum just in case. Not sure about the conditions here. Petroleum backup shouldn't really halt the system if you keep cranking out modules, so at the moment I have it set to turn on if there isn't enough light oil, so the SF from petroleum can make up the difference. Maybe not the best idea...
Giving priority to petroleum (via splitter priorities) and only cracking petroleum when there is too much of it is certainly an option too
So, solid fuel is being produced from light, and only in extreme conditions is it produced from heavy or petroleum, to prevent refinery shutdown.
But if you have an excess of heavy oil it's better to crack that to light oil instead. You still turn it into SF, but the cracking is more resource efficient
Last edited by Serenity on Tue Mar 26, 2019 9:08 pm, edited 2 times in total.

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Complete oil processing - conditions

Post by zOldBulldog »

@Ellestrata, you are completely right. It is better to have extra Heavy to Light chem plants and the Heavy to Solid conversion is only a safety net. As a matter of fact it hardly ever gets triggered except during the short time between researching Oil and Advanced Oil processing. Even in my micro-chem plant below it hardly ever gets triggered (EDIT: I was just looking at the fluid tank volume lights after posting and indeed... every tank is max-full except the Heavy Oil, so the 23k condition for Heavy to Solid is obviously not triggered).

@Serenity, I agree. If you need flamethrower ammo you definitely want a condition like yours to ensure there is some heavy always available for it.

Thanks everyone, I am glad no serious problems were found in those conditions. Below is the resulting micro-chem plant I was working on. It is a "make everything" in the least possible amount of space. Obviously it does not attempt to produce volume or keep perfect ratios, but it does attempt to be as efficient as it can for the minimal volume levels that it handles.
mchem.jpg
mchem.jpg (866.21 KiB) Viewed 7645 times

Italian Cuisine
Inserter
Inserter
Posts: 24
Joined: Sat Mar 02, 2019 1:24 pm
Contact:

Re: Complete oil processing - conditions

Post by Italian Cuisine »

Mine is super simple, with just 3 circuit decisions on pumps:
  • If Heavy > Lube, make lube
  • If Heavy > Light, crack
  • If Light > Petroleum, crack
I used to have fiddly numeric tuning parameters like the above posts, but this Just Works and in my opinion works even better than more complex solutions.

This system simply seeks to maintain the same levels of all the above fluids. If I have enough inflow and chemical plants, those 3 pump decisions keep all the fluids at 24k; any less than that signals that it needs to expand, after which it will return all levels to 24k.

Things like solid fuel and sulfuric acid just draw what they need without conditions. Those 3 rules ensure there's enough light oil and petroleum available upstream.

Here's what I call my "fluid flower" to monitor levels, both visually and through the circuit network, arranged to be able to draw any fluid out in any direction fairly easily:
Screenshot from 2019-03-26 16-51-48.png
Screenshot from 2019-03-26 16-51-48.png (522.57 KiB) Viewed 7582 times
It's not spaghetti!

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2420
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Complete oil processing - conditions

Post by BlueTemplar »

Cool !
Serenity wrote:
Tue Mar 26, 2019 7:30 pm
I like to save a little light and heavy for flamethrower ammo and flame turret fuel. But you don't need much. The pipes to the turrets will consume more than the turrets themselves

So I only make lubricant and crack heavy if heavy >10k or something like that. And only consume light oil if I have some. Most of the time it will run since you rarely consume much of it for those purposes.
With lubricant you could of course argue that lube should have priority over flamethrower ammo, but I don't think it matters in practice
Pipes don't "consume" fluids. It also depends on the length of your pipes...

Weapons should *always* have priority over everything else, for obvious reasons.
(Also, using processed instead of raw oil in flame turrets might not be the best idea, for safety and logistic reasons...)
BobDiggity (mod-scenario-pack)

Serenity
Smart Inserter
Smart Inserter
Posts: 1000
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Complete oil processing - conditions

Post by Serenity »

BlueTemplar wrote:
Wed Mar 27, 2019 10:03 am
Pipes don't "consume" fluids. It also depends on the length of your pipes...
Not literally, but the pipes have pretty huge fluid boxes that fill up. So if you place a tank with a bit of oil at a wall for example it will empty into the pipes without ever having fired

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2420
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Complete oil processing - conditions

Post by BlueTemplar »

Sure, but it doesn't really matter, as the fluid consumers are "underground" ( = fill up with all the fluids they can get their grubby pipes on)
BobDiggity (mod-scenario-pack)

LFarquaad
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Mar 10, 2019 2:24 pm
Contact:

Re: Complete oil processing - conditions

Post by LFarquaad »

BlueTemplar wrote:
Wed Mar 27, 2019 10:03 am
(Also, using processed instead of raw oil in flame turrets might not be the best idea, for safety and logistic reasons...)
Well, since oil processing keeps the same amount of fluids as the crude oil (or even more with productivity modules in refineries), and considering that heavy/light oil deals more damage than crude oil, it seems worth the effort. I use heavy oil since it isn't really worth cracking it into light for the 5% additional damage.

I don't see the safety reason not to do it except if you are really low on oil. And even if that's the case, you might decide to go for coal liquefaction, in which case I suppose you will appreciate to have your turrets already consuming heavy oil. I suppose switching oil type later would be a mess with fluid mixing prevention now.

Aside from that, I also do like Italian Cuisine:
Italian Cuisine wrote:
Tue Mar 26, 2019 11:18 pm
Mine is super simple, with just 3 circuit decisions on pumps:
  • If Heavy > Lube, make lube
  • If Heavy > Light, crack
  • If Light > Petroleum, crack
(though I'm not sure I did it for lube)

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2420
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Complete oil processing - conditions

Post by BlueTemplar »

Because there's no risk of one oil product backing up and running out of refined oil for turrets if you take the crude oil directly at the pump instead of taking the refined oil out of the refinery.

Also, I'm wondering how much the extra damage even helps with oil consumption, considering that flame turrets mostly seem to do damage via the fires the burning oil leaves around...

But you're right, this is more for switching reasons - I generally want to have flame turrets up and running ASAP (and not much to do with 0.17 fluid touching prevention).
BobDiggity (mod-scenario-pack)

User avatar
Krazykrl
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Tue May 02, 2017 11:08 pm
Contact:

Re: Complete oil processing - conditions

Post by Krazykrl »

I would personally always use Crude oil in my flamethrower turrets. Refined products for Flamethrower Turrets don't really help much, since even un-upgraded Flamethrowers utterly demolish biters. Using pure crude also lets you do something like a solar powered electricity isolated flamethrower setup, where you use solar to power the few pumpjacks you would need for a large number of turrets.

...

As for processing, I always put pumps on either side of the tanks.
  • A pump fed via a tank can output about 4629 fluid/sec to an adjacent tank, transferring 25000 fluid in exactly 5.4 seconds (I measured 324 ticks.)
  • Forcing a "vacuum" on the product side of the refineries helps as you get more of them due to the spiky flow and distance throughput problems.
  • Running a pump at the exit of the read tank can force-feed anything downstream, I find forcing fluid via pumps like this substantially increases the reliability of the entire fluid complex.
Otherwise, you're depending solely on the buildings themselves forcing fluid into a pipe, which would slowly equalize a tank at the other end.

...

Limiting production is pretty much standard for me too.
  • Crude is always forced to flamethrower turrets. Crude > 1000 gets pushed to refineries.
  • Heavy is always forced to a moderate sized buffer of lubricant for belt production. Heavy > 1000 gets cracked.
  • Light is always forced to solid fuel. Light > 1000 gets cracked.
  • Petrol is always forced equally to acid and plastic. Petrol > 1000 gets turned to solid fuel, and is prioritized over Light-Solid fuel.
Currently (pre-fluid-rework), I use a fluid balancer of my own design to split fluids between Sulfur and Plastic equally. It consists of 3 tanks, some pumps, and 2 arithmetic combinators. There is 1 input tank, which feeds 2 pumps which feed the 2 output tanks. The output tanks are wired each to a single combinator, the combinators are set to "petrol * 1 -> Acid" and "petrol * 1 -> Plastic". The pumps between the input and output tanks are set to "Acid >= Plastic" and "Plastic >= Acid" and are wired to both combinator outputs simultaneously.

User avatar
T-A-R
Fast Inserter
Fast Inserter
Posts: 171
Joined: Tue May 22, 2018 4:20 pm
Contact:

Re: Complete oil processing - conditions

Post by T-A-R »

Usually some rs-latches avoid the problem that prodction is continiously stuttering around the switch points. By using combinators, or a simple belt loop i usualy start cracking around 20k and stop when 5k is reached again. Especially when you are toggling your beacons this comes in handy.

Italian Cuisine
Inserter
Inserter
Posts: 24
Joined: Sat Mar 02, 2019 1:24 pm
Contact:

Re: Complete oil processing - conditions

Post by Italian Cuisine »

BlueTemplar wrote:
Thu Mar 28, 2019 8:43 am
Because there's no risk of one oil product backing up and running out of refined oil for turrets if you take the crude oil directly at the pump instead of taking the refined oil out of the refinery.
Backed up production never causes an outage in the "heavy>light, light>petrol" conditions. The only real problem is running out of fluid because your fluid production scale is too small, not because of backups preventing refining.

LFarquaad wrote:
Thu Mar 28, 2019 12:03 am
(though I'm not sure I did it for lube)
Right, the lube level decision isn't strictly necessary at that level once everything is up and running, but when I first start making blue transport stuff, I tend to want it to have equal or higher priority than cracking if resources are initially scarce.
It's not spaghetti!

Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Complete oil processing - conditions

Post by Hannu »

I have only conditions than heavy oil cracking starts when heavy oil level in tank is over 20 k and end when it decreases below 15 k. Same for light oil, respectively. There is always something to make lubricant and solid fuel. That RS-operation is only technical overengineering, crack if level > 20k would work as well in practice.

I have now a small starter base, about 0.5 science per second, launched 50 rockets and built large belt based railworld intended to 500 science per minute and have had no problems with oil products. My system would stop to produce heavy oil and lubricant without other load than building, but I have kept science running to keep production on.

Italian Cuisine
Inserter
Inserter
Posts: 24
Joined: Sat Mar 02, 2019 1:24 pm
Contact:

Re: Complete oil processing - conditions

Post by Italian Cuisine »

One thing that always bugged me is piping light oil inbetween heavy->light->petroleum cracking, and where the deciding pump for light cracking should be. This is still focusing on a pre-beacon game stage.

It'd be nice if heavy cracking placed its output right into the light cracking, but if the light cracking is not enabled, the pump would prevent the heavy cracking output from flowing out and feeding the factory.

So yesterday, I had the light bulb come on to put the pump on the water instead of on the light oil:
Screenshot from 2019-04-03 16-32-56.png
Screenshot from 2019-04-03 16-32-56.png (296.35 KiB) Viewed 6956 times

This way, the light oil generated by heavy cracking can freely flow back out into the system, without the light oil condition pump blocking it, while still being nice & compact.

Of course, you could implement the decision via power switches, but I think this is easier and simpler.
It's not spaghetti!

Post Reply

Return to “General discussion”