Small nuclear controll

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Ancalagon
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu May 04, 2017 9:39 pm
Contact:

Small nuclear controll

Post by Ancalagon »

I would like my entire base to run on nuclear power, my power setup is scaled to deal with the highest expected load (currently 2 nuclear reactors is enough).
However, I do not like that the energy from the reactor is wasted if not all energy is used. To remedy this, I added storage tanks that store the hot steam.

I would like for a way to feed one fuel rod to each reactor if the steam is low and the reactor is finished with the previous rod.

I get the very basics of circuits, and managed to make a counter that counts up to 200s (12000 ticks), and creates a pulse. If steam levels are low, this pulse will trigger one fuel rod being inserted into the reactor.
This works in not wasting energy, but has the obvious flaw that if steam was not low at the pulse, it will have to wait 200s for it to be checked again. If the steam runs out during this time, power goes out.

Ideally I want the circuit to check the steam levels all the time once the 200s has expired, and not before.
kingarthur
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Small nuclear controll

Post by kingarthur »

cant you just tell the inserter to input a fuel rod if the steam is below a certain amount in the tank and have the timer delay the inserter long enough to give the reactor time to refill the tank above the amount of steam that triggers the inserter
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Small nuclear controll

Post by Deadly-Bagel »

You're in need of an AND condition, and you need to understand exactly what they are before working out the logic.

First condition: Steam < X
Second condition: It has been at least 12000 ticks since last Fuel Rod was inserted

You'll want a Decider for each of these conditions outputting something like T=1, with the Inserter working when T=2. The second condition is a bit trickier, especially if you want to get it exact due to the 1-tick delay between combinators but I think tweaking the 12000 value to 11996 or whatever is required should work.

Set up the two Deciders, then you need to know when the last rod was inserted. Easy enough, set the Inserter to pulse contents, but what to connect it to...? You don't want the counter constantly ticking up, eventually it will overflow and reset to negative, and you want to keep the steps as low as possible. This topic has some detail on timers that ought to do the job.
Money might be the root of all evil, but ignorance is the heart.
User avatar
AileTheAlien
Filter Inserter
Filter Inserter
Posts: 375
Joined: Sat Mar 11, 2017 4:30 pm
Contact:

Re: Small nuclear controll

Post by AileTheAlien »

I assume from these answers, that it's not possible to read the number of fuel rods that are currently in the reactors?
Serenity
Smart Inserter
Smart Inserter
Posts: 1017
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Small nuclear controll

Post by Serenity »

I'd also be interested to see how this works. Also just to learn more about how to use circuit conditions. People have been posting blueprint strings of giant power and enrichment plants. And that's fine of course, but it's impractical for learning the basics and then using those as a starting point for your own designs.
happynev
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Aug 09, 2016 4:24 pm
Contact:

Re: Small nuclear controll

Post by happynev »

to know the number of fuel cells in the reactor you could count the inserted ones and subtract the depleted cells coming out?
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Small nuclear controll

Post by Deadly-Bagel »

Yeah but each reactor requests 5 fuel cells I think so that's at least 1000 seconds to consume them, plus up to 200 seconds for the rod currently being consumed which is 20 minutes total, and that's the minimum. So the number in the reactor doesn't particularly help.

Nor is it particularly accurate. When you insert a fuel cell, it immediately generates a depleted fuel cell even before actually burning through it. Logically this doesn't make any sense but it's how the game logic works, the fuel cell is consumed instantly so generates the depleted cell instantly. But basically this means you can have "zero" fuel cells in a reactor that will still burn for over 3 minutes, and it can't be used as an indicator to insert the next fuel cell.

The basics of circuits aren't complicated, there should be some decent YouTube tutorials which should help you understand some of the simpler setups.
Money might be the root of all evil, but ignorance is the heart.
urza99814
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Dec 10, 2016 12:57 am
Contact:

Re: Small nuclear controll

Post by urza99814 »

Is the counter really necessary?

I've got a nuclear setup running with two reactors that seems much simpler. I can't find the numbers right now but I think I remember reading that one fuel rod will provide about one storage tank full of steam. Less if that steam is being consumed by your factory at the same time obviously. So build three of them (or more...I use 12, but for only two reactors three should be fine). Feed the first reactor if the steam level falls below ~10k. You'll want to override the stack size to 1, although it's still probably going to insert two or three before the steam level comes back up, but that's OK -- you have enough room to buffer the full output from two fuel rods even if your base isn't consuming any of it. Then you set the second reactor's inserter a bit below that -- maybe 8k, so the second reactor only feeds if the first reactor is already running and the steam level is still falling.

Like I said, I have WAY more buffer than I need, because I'm planning to just keep expanding with more reactors...but mostly my steam levels never go below 10k and never above 12k. With only three tanks and the same power consumption (~40MW) you might see it go as high as 18k but probably not much more. Only downside is the tanks take up some space, but so would a bunch of combinators...
Braidcutter
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Apr 20, 2016 7:10 pm
Contact:

Re: Small nuclear controll

Post by Braidcutter »

So, after fiddling a bit I managed a real dopey solution. I had a series of problem with my RS latches. If the run condition flipped during a reactor cycle it would insert a new core before the old one was complete. Or it would not start until the next next phantom cycle would begin.

Things I learned:

Have slightly more turbines then you need. And put your tank(s) on the far side of the turbines. That way if the plant hits capacity for a long while no steam can make it the end of the line to trigger a halt.

You actually don't need many tanks. I you have enough heat exchangers for your setup your reactors won't hit max temp(where waste begins) while running. Even as they burn off their last core. Reactors take more then a single fuel unit to go from 500-1000.

Branch off your thermal pipes from the reactor to the farthest exchanger, you need at minimum 1 tap for every gigawatt. Don't bother surrounding your reactors with pipe.

As for the timers/latch My combinator-fu is strictly yellow belt, so to was my solution.
Attachments
Reactor Loading.jpg
Reactor Loading.jpg (394.61 KiB) Viewed 6127 times
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Small nuclear controll

Post by Deadly-Bagel »

So, turns out, 0.15.7 includes a fix for this so used fuel cells are output only when all the fuel is consumed.

This means you can do this extremely simply, link the output Inserter to your steam tanks with some condition [Steam] < X and also pulse contents, then also link it to the input inserter with [Used Fuel Cell] > 0 (stack size 1) so every time a cell is taken out, a new one is put in.
Money might be the root of all evil, but ignorance is the heart.
Braidcutter
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Apr 20, 2016 7:10 pm
Contact:

Re: Small nuclear controll

Post by Braidcutter »

Deadly-Bagel wrote:So, turns out, 0.15.7 includes a fix for this so used fuel cells are output only when all the fuel is consumed.
Probably should turn off factorio and let it update more often then.
t-lor
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Tue Apr 25, 2017 9:28 pm
Contact:

Re: Small nuclear controll

Post by t-lor »

Just curious, why are u all so concerned with fuel usage ?
I only mined a few very small uraniuam patches, and i got like 16k worth of uranium 235 out of it.
Thats enough fuell cells to last me a lifetime, not to mention i have like a 1M uranium patch untouched :P
Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Small nuclear controll

Post by Aeternus »

Probably because using more reactors then you need is more fuel efficient (due to the neighbour bonus), but keeping 8 reactors on full burn for a load of less then 300MW is not exactly fuel efficient.

I've solved the issue myself by defining a few hold conditions for my reactors. I've set the fuel inserter to stack size 1, and read the hand contents in hold mode. I also read the contents of the passive chests that hold the spent fuel.
The condition for the Fuel Inserter is "Red signal = 0"
- On fuel insertion the fuel cells are detected on the hand of the inserter. This starts a 200 second countdown and outputs "Red signal = 1" to the red circuit network. As of 0.15.7 you can omit the timer and simply use a latch, resetting it when you detect the spent fuel cell being ejected. Either way works.
- The reactors heat up. The heat exhangers produce more steam then the turbines need. This slowly fills 4 storage tanks per 10 turbines (which is a low amount, but that's fine - I do not store all that energy in a steam tank). Once the measured steam tank hits 23000 liters of steam, a simple latch flicks "Red signal = 1" until the steam tank drops below 19000 again, which clears the latch. The steam tank will fill all the way to capacity, and any excess heat is stored by the reactors and heat exchangers until enough energy is used so that the heat exchangers stop working - which causes the steam buffer to drop. If the plant is under maximum load, the latch will never trigger since the buffer doesn't refill - this means fuel will be put into the reactor at the 200 second interval - no downtime.
- Another red signal is when the spent fuel cells start to accumulate (I test all provider chests with >2000 as value). Means you've got an issue with your spent fuel cell reprocessing which will jam the system.

Using this I'm currently at 8 reactors for a 350ish MW load, and wasting not a single joule from those fuel cells :)
Ancalagon
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu May 04, 2017 9:39 pm
Contact:

Re: Small nuclear controll

Post by Ancalagon »

I originally posted because I was stuck with the implementation, not the higher level idea of how things should work.

Why being concerned with fuel usage? Because, like most people who play Factorio, I want things to be as optimized as possible.

After fiddling around a bit with it, I came up with the following setup:

Code: Select all

0eNrtWduOmzAQ/Rc/VlBhA9kN2u1X9K1aRQ5Mdi2BQcZsG0X8ew002XC3yWWlti+JHJvxzJxzxmNyQNu4gEwwLlFwQCxMeY6CHweUs1dO4+o3uc8ABYhJSJCFOE2qUQQhi0DYYZpsGacyFai0EOMR/EIBLq1ZA1Qw+ZaAZOGwDVK+WAi4ZJJB41E92G94kWxBqE1OphKIWJHYEEMohbKXpTGojbI0Vw+nvHJBGbQ9C+3Vl3IOqSi5WszqYA8IVx8CovNtmBoRtZKJsGCyHtZhnU2v2tO1x68CgHftYK9r6KUsz4wdQyIz2enH5H71m6iIiipiogmq8TzlUqTxZgtv9J2pp9UjH2Y3ajpipwzsmMjlZgayHc2lzXgOQkINVUUWSSvmKDDSDARtdkdf1ENpIbNi1iYvwhiosAXQsCZAqQ9PlUYLkWp2MO2uXtbdKVL3U47NUv7Hpl6+35mQhfrl5FGzwqZ8L98Yf20n3akGSUZF7WmAvk1kfcwyvIM4t53tlacFl5udSJMN48oYCqQowAAXV1cXpLfwiOe81a4Yvelpv7tVe/qxM15PW8POzLyvRz1vIfXw/ahXIdGVeot1z8u1fnfCYTzKuMH1mjD6pnXbMQPysrI9mPYjmvbtK/dgZr0LpE9GYFgZqYl8Qh1vUtECgCyW08BxPCimHY1zEzVh3wSbbul7GAHnwbBdM+/WVnosefwAJaFxbMc0yfrbu63te2w4bnRiw3XU2D/RL6qCg/GvFzeZn16sMHEcR79ejanwu1GX6RqpgeidGFUDYXLyHyFw/vecl7YAjlkLMNvq4Zn5mUsk1pQtxst6xRswZlaxOVR2jAR5BVqdOtXrnIJ9JV+JUZovAzBZBjj+6wC/0y1iPX1F7At9ASGGiKb5mgK7S28Z/8IlQ0PBppV+tBJ7i+4ZN9DlLi6UoydvftLeeznfqTumltSeFtTWs4uLeXUdzva0KHxNLPxFWHzGoTjeQz3fG5CLu1xvulSuhiqaqpZ1joKzfxwspFrBvMZg5XnEd9ZrsvLK8jerk3YL
It's not perfect, but it does the job. I failed to get the input signal to be a single pulse, it's usually 3 or 4, so I had to correct the timer value. Not ideal, but functional.

The change that makes the used up fuel cell only be output after it's finished makes everything much more straight forward, and renders the whole question effectively void.
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Small nuclear controll

Post by impetus maximus »

Deadly-Bagel wrote:So, turns out, 0.15.7 includes a fix for this so used fuel cells are output only when all the fuel is consumed.
wow. all the time i put into getting an on demand reactor, and now that circuit is useless. :|
thanks for the heads up.
Post Reply

Return to “Gameplay Help”