Constant reactor fuel usage/cycling (now a discussion)

Place to discuss the game balance, recipes, health, enemies mining etc.
malventano
Filter Inserter
Filter Inserter
Posts: 342
Joined: Thu Apr 27, 2017 4:31 pm
Contact:

Constant reactor fuel usage/cycling (now a discussion)

Post by malventano »

*edit* so long as cycling the plant is intended by the devs to be the way to increase efficiency, I've tweaked the subject line and will direct incoming readers towards the later posts in this thread. Mods please move to the relevant forum if desired. *edit*

Reactors consume fuel at a constant 200 seconds per cell regardless of the thermal demand, but the other thermodynamic properties of the system appear to be functioning normally:
- Multiple reactors heat connected systems faster
- When reactors are out of fuel, the system cools down proportional to steam/power demand.

I submitted this as a possible bug and was told this is an intended mechanic, however, this invites the player to invent obscure methods to work around the inefficiencies associated with the physically impossible 100% fuel usage of an otherwise idle reactor. One such method would be to simply build out a large 'thermal battery' by laying down a grid of heat pipes, and adding a single fuel cell to the bank of reactors occasionally - just to keep the temperature above 500C as needed for steam generation. Even without a current method of circuit network thermal monitoring, the player could simply create a timer that only inserted fuel cells into the reactors periodically.

For balancing, reactors really should consume fuel proportionally to the thermal demand (heating up, driving steam turbines, etc). This would eliminate the above acrobatics just to get around an unrealistic inefficiency.

The neighbor bonus does complicate this issue, but there is a simple workaround that actually also eliminates the potential for cheating the system. Implementing proportional fuel usage without correcting the neighbor issue would allow a player to simply build out a large grid of reactors that would have very high fuel efficiency and would, therefore, use fuel at a significantly lower rate. As a solution to that case, I propose that the fuel usage does not receive the neighbor bonus. From an implementation standpoint, this would mean that fuel usage would actually have to be inversely proportional to the effects of the neighbor bonus, meaning that one reactor providing 40MW (100% power) would consume fuel at 2 cells per 400 seconds, while a pair of neighbor bonused reactors providing the same 40MW (now only 25% of their combined 2x bonus of 160MW) would each consume one fuel cell over 400 seconds (2 total). This keeps the fuel usage proportional to the power consumption while still netting the maximum power benefits of the neighbor bonus, and actually, corrects the cheat that can currently take place by using a large bank of reactors to more quickly heat a thermal battery in surges.

Thoughts?
Last edited by malventano on Mon May 01, 2017 3:49 pm, edited 1 time in total.
Allyn Malventano
---
Want to improve fluid flow between pumps / across longer distances? Try my Manifolds mod.
Nemoricus
Fast Inserter
Fast Inserter
Posts: 240
Joined: Mon Jan 19, 2015 7:48 am

Re: Constant reactor fuel usage invites heat capacity cheating

Post by Nemoricus »

My own suggestion is that reactors start cooling off as soon as they run out of fuel, regardless of their thermal load. Since it takes a significant amount of energy to heat a reactor above the 500 C threshold needed for steam generation, this would make balancing energy demand and production more important.

Yes, heat losses to ambient are not used elsewhere in the game, but unlike the rest of the game, nuclear reactors very obviously and directly make use of heat. You can see the reactor heat up when it turns on, and you can see the heat go down if there's more demand than production. Boilers and heat exchangers, on the other hand, just consume water and output steam at a fixed temperature.

That said, I'm not particularly opposed to nuclear reactors throttling their heat production to match energy demand. Right now, they exist in a middle ground where there's a penalty to keeping them running all the time, but no penalty for letting them run out of fuel. I'd like the devs to decide whether they want managing demand vs. production to be part of nuclear power, or else remove it entirely.
posila
Factorio Staff
Factorio Staff
Posts: 5341
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by posila »

malventano wrote:the player could simply create a timer that only inserted fuel cells into the reactors periodically
That is kind of the point of the mechanic.
We want it to be possible to place nuclear reactor, slap some heat exchangers and steam turbines next to it, setup inserter putting fuel cells to the reactor and don't care about it anymore. But we also want for players who like to tinker with setups to be able to think about their "optimal" nuclear setup. In our playtest we had storage tanks for steam and inserter with condition to put a fuel cell to the reactor when steam got under certain level.

We are considering adding long warm up time to reactor (for example 10 minutes), problem with that is, reactor shutdown could cost players their base if they play with biters.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by MeduSalem »

I'll quote what I posted in the much related bug thread "Reactor consumes fuel at full power while idle".
MeduSalem wrote:Yeah well... I think even if it is an intended feature it would be great if there was a way to at least throttle the reactor... like control rods or something that may be interacted with using the Circuit Network or so.


Also the way the neighbouring system works should probably be changed too. It should be more about reaching critical mass... so every reactor within a certain radius/reach (like an area of effect) boosts all other reactors due to the increased amount of neutrons, and the other reactors then in turn boost back... rinse and repeat... with exponential increase of power output over time (without an upper limit) at increasing speed/cost of Fuel drain... and if you don't want it to get out of hand by wasting more and more Uranium you have to throttle the reactors with control rods/neutron absorbers that can be placed between reactors, effectively allowing different reactor designs. Or something like that.

At least the way it is currently it feels a bit weird... and doesn't really encourage build diversity when it comes to reactor layouts. (Yeah there's diversity when it comes to heat exchangers/steam turbines etc, but not with the reactors itself). Currently it's basically 2x2, 2x3, 2x4, 2x5, 2x6 ... and so on because of how the current neighbouring effect doesn't allow anything else.



Currently I have given up trying to control the fuel insertion of the reactors because it's not worth it when a 6 reactor core plant barely uses 120-150 U-238 per ingame hour. It will take several hundreds of hours to deplete some of the 100-200k+ Uranium patches in my map.
I want to add on the notion that trying to control the reactor fuel is currently not worth the effort/trouble one would have to go through to achieve it... because the consumption pales in comparison to medium uranium ore patches.

But even if it mattered most people still wouldn't know how to control it and also the game doesn't even tell you that the fuel has a constant depletion rate independently from the actual power consumption.


And adding additional delays to an already largely delayed system (heat pipes are delaying things extemely)... makes it only harder to get a grip on the thing.


So bottom line... just let the thing run and only design it as big as the steady peak demand requires.
Last edited by MeduSalem on Sun Apr 30, 2017 10:53 pm, edited 3 times in total.
malventano
Filter Inserter
Filter Inserter
Posts: 342
Joined: Thu Apr 27, 2017 4:31 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by malventano »

posila wrote:
malventano wrote:the player could simply create a timer that only inserted fuel cells into the reactors periodically
That is kind of the point of the mechanic.
We want it to be possible to place nuclear reactor, slap some heat exchangers and steam turbines next to it, setup inserter putting fuel cells to the reactor and don't care about it anymore. But we also want for players who like to tinker with setups to be able to think about their "optimal" nuclear setup. In our playtest we had storage tanks for steam and inserter with condition to put a fuel cell to the reactor when steam got under certain level.

We are considering adding long warm up time to reactor (for example 10 minutes), problem with that is, reactor shutdown could cost players their base if they play with biters.
I'm not sure if you guys realize this, but combining the periodic insertion of fuel with the neighbor bonus boosts make the mechanic nearly exponentially conservative on fuel usage. A small cluster of bonused reactors appears to be able to heat a grid of heat pipes significantly faster on a single fuel cell cycle than those same reactors unbonused. As it is currently, fuel cell usage is very excessive for a single idling plant (worse for multiple idling plants), while it is overly efficient for larger plants with multiple bonused reactors. The pendulum is swinging too far in both directions for it to be a balanced mechanic. I can use 1/3rd the fuel simply by intermittently operating a cluster of 2x2 reactors.

That's why I believe the solution is to 1) make fuel usage proportional to heat load and 2) make fuel usage immune to the neighbor bonus. This solution would let the reactor system 'make sense'. The player would still be presented with a challenge as they would need to scale up fuel cell production proportionally with power consumption, while still getting the max power output gains associated with the neighbor bonus. Nerfing heat pipe capacity or reactor warmup times only breaks the physics further as opposed to simply addressing the root issue, which is that fuel use should be proportional to heat demand.
Allyn Malventano
---
Want to improve fluid flow between pumps / across longer distances? Try my Manifolds mod.
malventano
Filter Inserter
Filter Inserter
Posts: 342
Joined: Thu Apr 27, 2017 4:31 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by malventano »

MeduSalem wrote:And adding additional delays to an already largely delayed system (heat pipes are delaying things extemely)... makes it only harder to get a grip on the thing.

So bottom line... just let the thing run and only design it as big as the steady peak demand requires.
Except that the warmup delays currently make sense. It takes time for power to heat a thermal mass. Agreed that there should not be arbitrary *additional* delays though.

The issue with 'just letting it run' is that if the player mines x amount of fuel, but then the base goes idle / uses lower power, fuel consumption should not continue as if the base was under full load. This forces the player to mine uranium as a temporal mechanic, as opposed to a power demand mechanic. Player should be able to look at the size of an ore patch and tell if it is enough to make enough megawatt-hours to do x amount of work (just as they can with steam engines and a coal patch). Currently the size of the uranium patch only determines how long the reactors can operate for regardless of the amount of power made. It's especially confusing to folks like myself who have actually operated reactors. They don't just consume fuel at the full rate with no steam demand (that would melt it down actually).
Allyn Malventano
---
Want to improve fluid flow between pumps / across longer distances? Try my Manifolds mod.
malventano
Filter Inserter
Filter Inserter
Posts: 342
Joined: Thu Apr 27, 2017 4:31 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by malventano »

posila wrote:In our playtest we had storage tanks for steam and inserter with condition to put a fuel cell to the reactor when steam got under certain level.
Huh, that does work, and so long as enough heat pipes are added to prevent the reactors from hitting 1000C with a round of fuel cells, looks like that is the most efficient way to run the reactor plants. It does still feel like a cheat since fuel usage gets *so* efficient when toggling a cluster of reactors, but if that was a method actively employed during your playtest, I guess it's not considered a cheat after all.
Allyn Malventano
---
Want to improve fluid flow between pumps / across longer distances? Try my Manifolds mod.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by MeduSalem »

posila wrote:In our playtest we had storage tanks for steam and inserter with condition to put a fuel cell to the reactor when steam got under certain level.
What I would like to know in that respect is how many Storage Tanks it required to make it actually possible to overcome the 200s fuel usetime. I'd say a lot.

Doing the math now... For a single reactor that would be...

Reactor output: 40 MW
Steam Turbine output: 5.8 MW
Amount of Turbines: 40 / 5.8 = ~6.9

Steam consumption per Turbine: 60/s
Total Steam consumption per second: 6.9 * 60/s = 414/s
Total Steam consumption per 200 seconds: 414/s * 200s = 82800

Amount of Storage tanks: 82800 / 25000 = 3.3

So you need at least 3.3 Storage tanks per 40 MW reactor output. Probably 4 or even more would be a good number to go to have a buffer due to the time it takes for the reactors to heat up again and also due to pipe pressure problems and unequal distribution of the Steam in the tanks/pipes.

For a 800 MW (2x3) power plant that would then be 4 * 800MW / 40MW = 80 Storage Tanks.

Well quite a lot. No wonder it didn't quite work with my pathetic 40 Storage Tanks... I only had half of what it required.

Did I make any mistakes in the calculation?
Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by Aeternus »

Yea, you did not factor in to subtract the load that is already on the turbines. You're not dumping 40MW into storage... you're dumping 40MW minus factory power draw into storage. And you're also not pulling 40 MW from storage, you're pulling whatever your factory is pulling from it. For early times, it's an option. But lateron, as you get more reactors, the neighbour bonus makes shutting one off problematic as the neighbour bonus to the adjacent reactors also poofs - so instead of losing 40MW, you are losing 120 (dual reactor) or 200 (quad reactor). And -that- kind of energy buffering would need excessive amounts of steam tanks. Not saying it can't be done, but it seems... impractical just to save a bit of nuclear fuel. Could be me but I've not had any shortages of Uranium Ore.
JimiQ
Inserter
Inserter
Posts: 32
Joined: Tue May 13, 2014 9:52 am
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by JimiQ »

I am actually liking this new mechanic a lot. The euforia I got when I first figured out the correct way to inout fuel into reactor was awesome. I am using wire to tank and when volume is lower than 1k then inserter would insert one piece of fuel into reactor. It's pretty easy to setup actually.
malventano
Filter Inserter
Filter Inserter
Posts: 342
Joined: Thu Apr 27, 2017 4:31 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by malventano »

Yeah actually the buffering with a steam tank is the way to go. You don't need that many of them because the reactors / steam turbines kick back on immediately as they were at standby temperature (500C) and start refilling the buffer tank. Some rough calculations showed that even at 480MW you get a few seconds of full power from a single tank of steam. Flow rate issues aside, that's enough time to get a round of fuel cells loaded into the reactors. I'm triggering on the higher end (<20,000) of a single buffer tank to give me plenty of time to turn the heat back on.

I've been able to successfully sync up the loading such that all reactors are always operating simultaneously, so no bonus issues to speak of either.
Allyn Malventano
---
Want to improve fluid flow between pumps / across longer distances? Try my Manifolds mod.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by MeduSalem »

Aeternus wrote:Yea, you did not factor in to subtract the load that is already on the turbines. You're not dumping 40MW into storage... you're dumping 40MW minus factory power draw into storage. And you're also not pulling 40 MW from storage, you're pulling whatever your factory is pulling from it. For early times, it's an option. But lateron, as you get more reactors, the neighbour bonus makes shutting one off problematic as the neighbour bonus to the adjacent reactors also poofs - so instead of losing 40MW, you are losing 120 (dual reactor) or 200 (quad reactor). And -that- kind of energy buffering would need excessive amounts of steam tanks. Not saying it can't be done, but it seems... impractical just to save a bit of nuclear fuel. Could be me but I've not had any shortages of Uranium Ore.
Well, yeah I didn't factor in the actual power draw. I thought about the situation when the Factory is in idle mode with almost negligble power draw. That might happen exactly when the Reactors got fresh fuel... so you will have to store ALL the Steam Power into the storage tanks or otherwise the Fuel cells would become wasted if the Factory remains idle throughout the entire 200s fuel consumption time.


Also I didn't think about shutting down a single reactor, but about shutting them down all at once. So either all of them do something or none... So the neighbour bonus is much easier to control.
malventano wrote:Yeah actually the buffering with a steam tank is the way to go. You don't need that many of them because the reactors / steam turbines kick back on immediately as they were at standby temperature (500C) and start refilling the buffer tank. Some rough calculations showed that even at 480MW you get a few seconds of full power from a single tank of steam. Flow rate issues aside, that's enough time to get a round of fuel cells loaded into the reactors. I'm triggering on the higher end (<20,000) of a single buffer tank to give me plenty of time to turn the heat back on.
Yeah, I noticed that they are instantly back on today... I didn't see that happening the last few days because I was always suffering from the directional heatpipe bugs... I only see it now that I rebuilt all the heatpipes dragging them outward from the reactors.
Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by Aeternus »

Wait... are you talking about pulse loading when storage drops below a certain level? Since reactors and steam tanks react slowly, that'd require a timed delay. How do you control it?
SR latch it? Reset the latch when steam falls below a certain level AND a spent fuel rod was ejected from the reactor? Probably a double latch would be needed:
- One to keep track of spent rods being swapped for fresh ones to prevent loading excess amounts (reset on loading, set on a spent rod being ejected).
- And one to keep track of when steam falls below a certain level, reset to not fill the reactor when steam is above a certain amount.

Merge the two via logical AND and you could in theory control fuel utilization without needing humongous buffers of steam - you just need to be able to absorb 40 second differences between production and consumption in the levels you set - easy enough if you add a tank at the end of your turbine rows. And if feeding the reactors is done by connecting the feeding inserters to a single reactor's fuel rod ejection, they'd remain in sync, fixing the neighbour bonus issue. Yea, that could work quite neatly so long as temperatures don't decay below 500dgr in the reactors/heatpipes.

I suppose the real exploit in this is the all-or-nothing behaviour of the heat exchangers, which refuse to produce steam with lower temperatures then 500dgr, even if the turbines can produce power at lower performance levels with lower temperature steam - this prevents the stored heat in the reactors from being siphoned off, and keeps the steam in the tanks at 500 dgr at all times.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by MeduSalem »

Aeternus wrote:Wait... are you talking about pulse loading when storage drops below a certain level? Since reactors and steam tanks react slowly, that'd require a timed delay. How do you control it?
Well currently I don't do anything special... I know it could probably be done with an S-R Latch (tried that, but I couldn't get it to work reliable, so I gave up on that).

Instead what I'm doing is just checking if the storage tank is below the threshold and set the inserter stacksize to 1.. And I'm using requester chests to deliver only 1 item (the provider chests also contain only 1 item). The delay for the robots to bring in the new fuel cell is enough for the reactors to recover and fill the tanks above the theshold again before a 2nd full cell arrives and could be entered. (In certain situations it still happens but I can live with that) :D

I know it's ugly... but it works for now. I just don't feel like doing mind-boggling combinator stuff. I like it the old fashioned way.

I surely wish that the reactor would be connectible to the circuit network to read its contents. Then I would be doing it with Circuit Network... but I won't until reading the contents is a thing. It's just not worth the trouble, like you wrote yourself. I just don't want to have to deal with keeping track of if there's a fuel cell inside the reactor already or not. I don't think that I should have to do that just because the game is not giving me the information I need.


But you could try to implement your described method using the two S-R Latches... I would surely take a look at it. I tried to do it in a similar way you described but somehow I just failed.
JimiQ
Inserter
Inserter
Posts: 32
Joined: Tue May 13, 2014 9:52 am
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by JimiQ »

Aeternus wrote:Wait... are you talking about pulse loading when storage drops below a certain level? Since reactors and steam tanks react slowly, that'd require a timed delay. How do you control it?
SR latch it? Reset the latch when steam falls below a certain level AND a spent fuel rod was ejected from the reactor? Probably a double latch would be needed:
- One to keep track of spent rods being swapped for fresh ones to prevent loading excess amounts (reset on loading, set on a spent rod being ejected).
- And one to keep track of when steam falls below a certain level, reset to not fill the reactor when steam is above a certain amount.

Merge the two via logical AND and you could in theory control fuel utilization without needing humongous buffers of steam - you just need to be able to absorb 40 second differences between production and consumption in the levels you set - easy enough if you add a tank at the end of your turbine rows. And if feeding the reactors is done by connecting the feeding inserters to a single reactor's fuel rod ejection, they'd remain in sync, fixing the neighbour bonus issue. Yea, that could work quite neatly so long as temperatures don't decay below 500dgr in the reactors/heatpipes.

I suppose the real exploit in this is the all-or-nothing behaviour of the heat exchangers, which refuse to produce steam with lower temperatures then 500dgr, even if the turbines can produce power at lower performance levels with lower temperature steam - this prevents the stored heat in the reactors from being siphoned off, and keeps the steam in the tanks at 500 dgr at all times.
I am putting 1 fuel (condition on insterter into box, that goes into reactor) into reactor when steam in one tank is below 1k. When steam is over 1k insterter will put 1 fuel from full box into box that goes into reactor. It's 2 chest system
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by MeduSalem »

JimiQ wrote:I am putting 1 fuel (condition on insterter into box, that goes into reactor) into reactor when steam in one tank is below 1k. When steam is over 1k insterter will put 1 fuel from full box into box that goes into reactor. It's 2 chest system
That's an epic idea. Nearly all Problems solved. Adopted it immediately. Simple solutions are still the best. :D

Only problem I see now is if the power plant is insufficient of keeping up with the power demand. Then it might not be able to get enough steam to the tanks to get above the threshold again... which prevents fuel cells from being entered to the chest. That might be solved when allowing the insertion of fuel cells if the amount of Steam keeps dropping further (like a second, even lower threshold to detect power plant insufficiency)... and if it keeps dropping below that it again allows insertion of fuel cells... that way it can recover at the cost of 6 full cells/reactor... but still better than a brownout.

Being able to read the reactor contents would still be more favorable though.
malventano
Filter Inserter
Filter Inserter
Posts: 342
Joined: Thu Apr 27, 2017 4:31 pm
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by malventano »

MeduSalem wrote:
JimiQ wrote:I am putting 1 fuel (condition on insterter into box, that goes into reactor) into reactor when steam in one tank is below 1k. When steam is over 1k insterter will put 1 fuel from full box into box that goes into reactor. It's 2 chest system
That's an epic idea. Nearly all Problems solved. Adopted it immediately. Simple solutions are still the best. :D
...and here I was all proud of myself for finally getting an edge trigger working on a tank level input. I'd been wanting to sort that for ages, and now this genius idea shows up! Heh.
MeduSalem wrote:Only problem I see now is if the power plant is insufficient of keeping up with the power demand.
Thing is that when cycling the reactors, they become even more efficient if/as you overbuild them, so you should almost never be that unprepared for a brownout.
Allyn Malventano
---
Want to improve fluid flow between pumps / across longer distances? Try my Manifolds mod.
Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Constant reactor fuel usage invites heat capacity cheating

Post by Aeternus »

Even simpler: Just add a damned clock. That's what I'm doing after mucking around endlessly with trying to feed fuel after the spent fuel cartridge ejected, trying the one-for-one method I was successful at with barelling oil. Kept getting reactors that loaded more then required - until I figured out... that the spent fuel cartridge for a fuel cell being loaded into a reactor is ejected immediately, instead of... you know... when the fuel is actually spent... :x Frustration was experienced.
Fuel consumption rate is constant. One fuelcell every 200 seconds, no known method of slowing down or speeding up that process. What goes in is gone in a predictable timeframe. So I'm using that timeframe :)
There are some nice, simple clock designs on the Wiki but I'm gonna add a kludge of my own... I call it the BeltClock - for cases where the Circuit System doesn't maintain it's 60Hz rate. Could have solved this whole thing but instead got sidetracked with how fast an item zips around on a circular belt. But that's for another topic. I'll finish the latchwork tomorrow. Basic plan is this:
- A 200 second timer starts as soon as fuel is inserted, locking out additional insertions for the duration.
- Once the timer expires, tank levels are evaluated. If more steam is needed, fuel is inserted and the timer is restarted. (Other hold conditions may hold the timer too of course)
- If no more steam is needed, no fuel is inserted and the clock is held.
- Once more steam is needed and the clock is idle, fuel is inserted immediately and the timer starts anew.
Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Constant reactor fuel usage/cycling (now a discussion)

Post by Aeternus »

MeduSalem wrote:But you could try to implement your described method using the two S-R Latches... I would surely take a look at it. I tried to do it in a similar way you described but somehow I just failed.
A jojo as suggested by JimIQ isn't a good idea if the system is continuously strained, priming it for fuel rod insertion won't happen if the system never recovers to the high treshold. That's dangerous because no fuel means the plant will eventually be starved. Fueling should be a continuous automatic process that can be paused when the reactors aren't needed.
The system is fidgety however. The reactors don't eject a spent fuelrod -after- being done burning that fuel, but as -part of the fueling process-. Which means that if you want to use the spent fuel rod as the "signal" for refueling, you're going to need an extra unit of fuel in the reactors. This is also problematic for recovering from cold standby. One cell is immediately turned into a spent rod, and a second fuel cell is loaded. It also means that shutting the reactors down will take longer since the extra cell will keep on being consumed.

Finally, got it working the way I want to. Decided on a simpler "don't insert fuel if the red signal is up" strategy, then defined a number of conditions that sets that signal:
- Last fuel insertion <200 seconds ago. Means the reactors are still burning their current fuel, so no additional needed.
- The spent fuel cell count is too high. Means there is a capacity issue at the spent fuel reprocessing that needs to be handled. Note that you can safely set this to 2k or so since the provider chests have some buffer capacity.
- Steam buffer is nearing full capacity. This means that no extra energy is needed from the reactor for a while. Note that the reactors and heat pipes themselves have a significant energy capacity as well. You can get away with a very small steam buffer and a very early reactor trigger (count one tank, water <21000 -> use fuel, water >24000 lock out fuel
This system doesn't need any special starting conditions for the reactor - if you've got additional fuel in there already, the system will add fuel every 200 seconds until the energy buffered in the Steam Tank reaches the threshold, then it shuts fuel insertion off and the plants will continue to burn whatever is still in them. This might de-sync the reactors briefly if you've recently added any.

How we do this:
Image
Steam buffer check to see if more energy is needed: Simple latch does the trick. I took the design from the wiki: A Decider with water > 22k as parameters, outputs red signal with value 1. Input are the steam tank and the adjacent Aritmathic Combinator, which takes the output of the Decider. It multiplies Red signal by 4000 and outputs this as water, back to the Combinator. This triggers the latch, setting Red Signal at water >22k in the tank, and clearing it at water <18k (22k-4k).
Image
Spent fuel cell count is done by putting all the chests that receive the spent fuel on a circuit, then testing "Spent Fuel Cell > 3000" at a single Decider. Again, output Red signal.
[Edit] Realised only after writing this that the stack count for fuel is 50, so chests can hold 2.4K at most. I've set it to >2000 now.
The Constant Combinator in the bottom of the screen is for manually holding the plant idle. For testing mainly. Also, the lamps above the Combinators are wired to light up if the condition on which they've triggered sets the Red signal.

And finally: The fuel cell counter. This one gave me the biggest headache, but I got it in the end :). Here's how:
Image
- The Inserters that insert fuel into the reactors are set to report their hand content. Only one really needs to do this, but it doesn't matter how many do. All Inserters feeding fuel into the reactor however need to be set to use a stack size of one and insert only if Red Signal = 0.
Image
This signal gets read at the counters. A bit of a mess, but Mad MS Paint skills show what deciders do what, I hope.
- Decider 1 reads the fuel signal and sets H to 1 (it connects to the Big Pole for this).
- Decider 2 holds this signal by looping it's output back to input, since the Fuel Cell signal itself won't remain constant. The (H)old signal is used for the timer. It is 1 as long as the Hold signal is up.
- Decider 3 reads if the (H)old signal is up, if yes, outputs Red to the Inserters at the reactors, basically holding off fuel insertion. This Decider insulates the timer from the rest of the controls. It connects to the Big Pole.
- Decider 4 is the counter. It reads Each and adds those values, outputting T (Timer). Since the Combinators cycle at 60 pulses per second, and the fuel cells are used every 200 seconds, the timer needs to be 12000 pulses long. The input and output are bridged with the green wire to create the incremental timer. Once it reaches 12000 pulses, it loops back to 0 and starts counting again. Which brings us to:
- Decider 5 reads <=1, which means the 2 minutes are up and the reactors will need new fuel to continue to produce energy. The hold signal needs to be cleared.
- Arithmatic 6: Since I can't output negative numbers, I need to multiply the H from Decider 5 by -1 in order to clear the Hold signal. This gets added to Decider 2's Green input. The timer meanwhile will have cycled 4 more pulses and gets stalled at T=4, but that's not a problem. If you -really- want to account for this set Decider 4 to 12004 instead of 12k blank - but if you're that time sensitive you'll have to take into account the time the Inserters need to insert the fuel as well.

Failure conditions, because I like to assume worst case scenarios :) :
- Plant carries no load (energy buffers remain at maximum): Minimal energy expended from some inserters and combinators. Fuel usage minimal, plant shuts energy production down when it's energy reserves are at capacity. This condition is handled. If you want to toss this thing in standby in favor of a solar array, this will work for you. If you want to use 8 reactors and a bigger buffer (steam or heatpipe, your pick) to be more fuel efficient, have at it. This system can be expanded to any amount of reactors.
- Plant is overloaded/at maximum capacity (energy buffers remain low): The latch for the steam tanks will not block fuel insertion. A new fuelcell is inserted every 200 seconds. Minimal/no reactor offline time. This condition is handled, though brownouts may still happen.
- No nuclear fuel available. The latch to insert fuel remains open until fuel is supplied to any one reactor. This means that other reactors won't receive fuel until another 200 seconds have passed. This throttles the reactors due to fuel starvation and makes the whole system inefficient due to the loss of the neighbour bonus. Could be handled by measuring the fuel reserves and setting another Red flag if they fall below a threshold, but I'm not bothering, fuel production isn't exactly a problem in my world.
- Spent fuelrod storage full. I test for that by measuring the chests where they get ejected into and set a redflag if there's >2k (which is less then the content of one full chest)
- Steam tanks run dry due to insufficient water: System interprets this as high power utilization and will spend maximum fuel. Not handled - provide sufficient water to refill the tanks. System will automatically recover if water supply is restored, with some fuel wasted. Could be handled by checking the tanks before the heat exchangers, if they're dry, you've got bigger problems then reactor fuel consumption (and should just not insert fuel anymore).
- Blackout recovery after nuclear fuel outage. My plant has a chemical pre-heater that can bypass the heat exchangers or be bypassed to the heat exchangers. If the heat exchangers fail, the Turbines get supplied with 165 dgr steam. Should be sufficient to power the inserters that feed fuel to the reactors to restart the entire system. Haven't tested it but I'm considering it handled.

Some final thoughts:
- It took well over 15 minutes for the heat in the heat exchangers/reactors to dissipate after shutting off all the reactors, and for the heat exchangers to shut down. That seems long, and suggests there's a serious amount of energy stored in the heat pipes. My factory draws 116 MW on average at it's current size. Needs testing, but is a 3x3 grid of heatpipes more energy dense then a tankfull of 500 degree steam? What -is- the energy capacitance of a heatpipe per tile?
- The heat exchangers in the top left corner of my plant were still 750 degrees, while the rest of the system including the offline reactors were at 550. Unidirectional heatpipe is unidirectional I guess. But that's a known glitch.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Constant reactor fuel usage/cycling (now a discussion)

Post by MeduSalem »

Nice Aeternus... I knew it could be done in such a way...

Would you care to share the blueprint string of the plant? Or provide the savegame? :D


... I also found out why I couldn't get my setup to work... why my latches refused to work: viewtopic.php?t=45633 ... seems like there was a bug where sometimes if signals are cleared the combinators didn't care and still continued to output the signal. Basically it was impossible to reset the latch. I had that bug, but it didn't realize it was a bug due to lack of experience with such contraptions. (Like I said, I like my contraptions simple and straight forward) xD
Post Reply

Return to “Balancing”