Self Scaling Infinitely Extendable Nuclear Reactor
Goal
I wanted to design a reactor which has the following properties:
- Easily extendable as my base grows.
- Doesn't overproduce power to not waste nuclear fuel cells.
- Warns when the maximum power output of the reactor is reached.
- The reactor should not be affected by power outages. E.g. it should be robust to not enough power being available and still produce as much power as possible without shutting down.
I got heavily inspired by the 1TW reactor (https://forums.factorio.com/viewtopic.php?t=56192) which I did like because it is a extendable design. I however completely redid the reactor control.
Layout
The basic components of the reactor are as follows:
Nuclear Reactor Sections
The nuclear reactor has a dedicated power grid which must not be connected to any other power grid.
Nuclear Reactor Dedicated Power Grid
Blueprint
The blueprint book can be found here: NuclearReactorBlueprint.txt
Initial Placement
- Place the "Initial Reactor" blueprint
- Place the "Initial Turbines Left" blueprint to the left of the reactor. Make sure the pipes connect. Connect the green cable running at the top.
- Place the "Initial Turbines Right" blueprint to the right of the reactor. Make sure the pipes connect. Connect the green cable running at the top.
- Make sure the large output power poles are connected.
- Use the "Reactors" blueprint to extend the reactors as much as you want. Place with one reactor overlap.
- Use the "Heat exchangers" blueprint to extend the reactor. Overlap the heat pipes.
- Use the "Turbines Left" and "Turbines Right" blueprints to extend the reactor. Make sure the pipes connect and place with one row overlap.
- Manually place two nuclear fuel cells in each of the 6 initial reactors.
- Manually place one nuclear fuel cells in all remaining reactors.
The Warning signal will go off until reactor reached a stable power level. Don't be worried this is perfectly normal. Once the alarm goes away, make sure that every reactor is either running or is not running and has exactly one used fuel cell in its output. As this is essential for scaling the reactor up and down.
Roboports for reactor extension can be placed on the water canal between the heat exchangers and the turbines. Just make sure to not block any of the offshore pumps.
Roboport Placement
Extending
- Use the "Reactors" blueprint to extend the reactors as much as you want. Place with one reactor overlap.
- Use the "Heat exchangers" blueprint to extend the reactor. Overlap the heat pipes.
- Use the "Turbines Left" and "Turbines Right" blueprints to extend the reactor. Make sure the pipes connect and place with one row overlap.
- Manually place one nuclear fuel cells in all freshly placed reactors.
Issues
The design has a couple of downsides I want to mention that I couldn't fix:
- You have to ensure that the chests next to the reactors always contain at least one nuclear fuel cell. If not it is possible that the used fuel cell is removed without a new one being inserted. Shouldn't be a problem though if you setup an alarm for the case that your nuclear fuel cell production falls short.
- There is no really nice place for roboports. When placing them on the water canal the Roboports are powered by the dedicated power grid. When extending the reactor it can happen that the Roboports don't get enough power. This means building is slower, but will finish eventually.
- You have to place the reactor on a large lake to make it truly extensible.
- The reactor will scale itself up very quickly, but scaling down can take a while.
Inner workings
The reactor uses the following circuit network signals:
- M: Number of turbine blocks
- N: Number of Reactor rows
- G: Number of active turbine rows
- L: Number of active reactor rows
- A: Accumulator charge of the "Power Network Load Sensor"
- Steam: Amount of stored steam in the first turbine row (top left and top right)
Reactor control
There are two mechanisms for controlling the reactors power output. The first uses the accumulator labeled as "Power Network Load Sensor" in the first picture of this post.
The lamps marked with "2" show the current charge level of the accumulator. The clock marked with "1" gives of a signal every 2 seconds at which the charge level of the accumulator is checked. When this signal goes off, the difference of the last known charge level stored in the memory cell "3" is computed via "4". This gives the change in charge level since the last check. If you have a lot of accumulators in your base it is possible that you need to increase the clock time so a difference can actually happen. My base has 135 MJ of stored energy (for laser turret spikes) and it works just fine there. If the accumulator charge (Signal A) drops below 99 percent, checked in "6", and the change of the accumulator charge is negative, checked in "7", the signal to scale up on level will be set. The clock "9" is the central clock for reactor level changes. Every 4 seconds the logic in "10" will check if a change is required and forward accordingly. Scaling the reactor will reset the clock, thus the next check will happen 4 seconds later. By that time the reactor either produces enough power to have charged the accumulator back up again, or it will scale up again. If the accumulator charge "A" reaches 0, checked by "8", the reactor will always scale up.
Accumulator based reactor control
The accumulator based control is very fast and only responsible for scaling the reactor up in case there is not enough power available.
The second form of reactor control is based on the amount of stored steam. There are significantly more turbines than would be required to consume all steam from the heat exchangers. This means if to much power is consumed, the amount of stored steam will slowly decrease. If there is however to much power output, the amount of stored steam will slowly increase.
Steam based reactor control
The lamps marked with "1" display the amount of stored steam (in 5% steps). The clock "2" is also used for the steam based checking. The logic in "3" checks the steam level every 5760 ticks (approximately 1.6 minutes). If the steam level is to high (more than 90%) the reactor will scale down on level. This is checked in "4". If the steam level is to low (less than 60%) the reactor will scale up one level. This is checked in "5". Every change in reactor level resets the clock "2". This means both accumulator based and steam based changes will reset to 0 and check again after their respective time limit. The memory cell in "6" stores the current reactor level until the next change. The reactor level is stored as the number of active turbine rows G. The number of active reactor rows L is derived from that value. The logic in "7" limits the reactor level to possible values by checking G against the lower limit 1 and the upper limit M. Finally the logic in "8" computes the number of active reactor rows L from G. By using the following formula: L = max( max(0, (G * 400) - 481) / 320 + 1, 2)
400 kW is the number of consumed power per row of turbines. 320 kW is the number of produced power per row of reactors. At least 2 rows of reactors will be active at any given time. This means the base minimum power of the reactor is 480 kW. Instead of 480, 481 are substracted to take advantage of integer division to round the result up with the +1 at the end.
Short example. Say you want to divide by 4 and round up the result. Normal integer division would be like this:
- 1 / 4 = 0
- 2 / 4 = 0
- 3 / 4 = 0
- 4 / 4 = 1
- 5 / 4 = 1
- etc.
But we want to round the result to the next full number (ceil). So:
- (1 - 1) / 4 + 1 = 1
- (2 - 1) / 4 + 1 = 1
- (3 - 1) / 4 + 1 = 1
- (4 - 1) / 4 + 1 = 1
- (5 - 1) / 4 + 1 = 2
- etc.
Rounding up is required so we get the least number of reactors required to full fill the power need. Otherwise we would sometimes fall one reactor row short.
Turbine block control
Turbine block control
The control for the turbine block is quite simple. The pump "1" is enabled if G is greater than 0. Then (G - 1), computed in "2", is passed to the next row of turbines. This way the turbine rows can be extended without the need to change the circuit logic in every row. The constant combinator at the end of every turbine block outputs M = 1. This way the reactor control unit knows how many turbine blocks there are.
Reactor row control
Reactor row control
The reactor row control is also quite simple. The inserter "1" is set up to insert a single nuclear fuel cell into the reactor whenever the inserter "2" removes an empty fuel cell. Both inserters have a stack size limit of 1. This is also why you manually need to place a single fuel cell in each newly placed reactor. As the first consumed full cell triggers the system. The inserter "2" is enabled if L is greater than 0. (L - 1), computed in "3", is then passed onto the next reactor row. Just as for the turbine blocks this makes the design extendable without the need to change the circuit network conditions for every reactor row. The constant combinator "4" outputs N = 1. This way the reactor control unit knows how many reactor rows there are.
Conclusion
I currently have a version of this reactor running that outputs 5 GW (which powers my entire 500 SPM base). I have not run into any UPS issues yet, so I can't tell at what point UPS becomes an issue with this design. In my current base both scaling the power output up and down works nicely.
Let me know if this design is useful to you and if you intend on using it. If you prefer using solar panels, I hope that the detailed explanation of the design at least gives a good idea of what can be done with circuit networks in Factorio. Other c&c welcome as well.
submitted by
No comments:
Post a Comment