[0.14] Reactors & Atomic Locomotives

Topics and discussion about specific mods
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by GotLag »

Why build separate coal-fired engines? :P

Image

There are coal boilers next to each cooling tower, fed by burner inserters with a circuit condition to turn them off if the nearby reactor's core temp is > 100. The high pressure from the reactor output pumps means that the cold water bypass doesn't lower the temperature by much when the pump engines are running off the reactor. The green one-way valves prevent back-flow and don't require power to function.

tommygunner70
Inserter
Inserter
Posts: 26
Joined: Fri Mar 04, 2016 2:22 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by tommygunner70 »

now that is a damn nice set up *copies* BTW: Whats the difference between the green and blue steam engines?

Hyratel
Inserter
Inserter
Posts: 34
Joined: Sun May 15, 2016 10:35 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by Hyratel »

tommygunner70 wrote:now that is a damn nice set up *copies* BTW: Whats the difference between the green and blue steam engines?
Peak Load turbines - they have a lower priority than the blue "base load", so they aren't requested from by the power system until all other power sources have been exhausted

rhekis
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Nov 29, 2016 3:40 am
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by rhekis »

My layout isn't pretty but I'm generating around 160 MW.
Some things I've learned along the way:

* power your reactors & uranium mine with an isolated solar/steam backup grid. Thats why my turbines are so far apart.
* using nixie tubes & leds to show stats for each reactor as well as average stats for the whole plant.
* I have one breeder, 6 fission, and 3 uranium seperaation. It seems like I could do more optimization but I'm not sure how yet lol.
* If placing water tiles, don't forget to lay down concrete first and GET OUT OF THE WAY :P

Image

ReDragon
Burner Inserter
Burner Inserter
Posts: 16
Joined: Tue Apr 19, 2016 8:18 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by ReDragon »

Hello,

i'm a complete beginner with all the network stuff. What i have to setup at the combinators that my reactor works properly?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by Optera »

I'd love to use Reactors to power my Megabase (~5GW), but it takes way too much processing time for my laptop to handle.
Is there a way you could make a version that's less taxing on my old laptop?

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by GotLag »

Using vanilla water, it's not really practical to get more than 25-26 MW from one reactor as that's 300 units of water per second.

There is a workaround you might find useful. Add the following line to Reactors data.lua:

Code: Select all

data.raw["fluid"]["water"].heat_capacity = "2KJ"
This doubles the amount of energy required to heat water, but also doubles the amount of energy yielded by hot water. As a result, each boiler will still provide 390 kW of power, but each steam engine will be able to generate 1020 kW from 100°C water, instead of 510 kW. Reactors use the API to set fluid temperature rather than by consuming fuel, so they will produce the same amount of hot water as before but it will yield twice the power in turbines.

Increasing the heat capacity will of course increase this effect.

Bartus
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Feb 25, 2017 12:48 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by Bartus »

Hello,
I do not understand, if I connect my nuclear power plant to the rest of the network the available perfomance is only at 50%.
Capture d'écran 2017-02-25 13.41.09_Ink_LI.jpg
Capture d'écran 2017-02-25 13.41.09_Ink_LI.jpg (2.59 MiB) Viewed 9397 times
Capture d'écran 2017-02-25 13.41.13.png
Capture d'écran 2017-02-25 13.41.13.png (1.29 MiB) Viewed 9397 times
While if I isolate it, performance is 100%
Capture d'écran 2017-02-25 13.40.46.png
Capture d'écran 2017-02-25 13.40.46.png (2.02 MiB) Viewed 9397 times
I followed the advice of the forum and I do not understand what it is wrong with my installation.
If anyone has an idea why :)
Thank you

Edit:

I removed the pumps express and I am 100% :)
Capture d’écran 2017-02-27 à 10.31.32.png
Capture d’écran 2017-02-27 à 10.31.32.png (1.06 MiB) Viewed 9351 times

sore68
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon May 02, 2016 8:39 am
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by sore68 »

Hi I have a question

Is there a factor that determines the temperature of the water when the Reactor core temperature exceeds 100'C?
Reactor core temperature = 101'C and Reactor core temperature = 199'C have the same boiling performance?

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by GotLag »

Correct, there's no difference in performance as long as the core is >= 100°C

Boneslayer2
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Mar 06, 2017 3:08 am
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by Boneslayer2 »

When Playing with others they get desync reports after installing reactors mod.

Desync Report:
https://dropbox.com/s/yxd1ragfs78bemf/d ... 9.zip?dl=0

I believe this is where the desync started:
353.335 Error GameActionHandler.cpp:2101: Multiplayer desynchronisation: crc test (heuristic) failed for crcTick(7906471) serverCRC(48861997) localCRC(-456755654)

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by Optera »

GotLag wrote:Why build separate coal-fired engines? :P

Image

There are coal boilers next to each cooling tower, fed by burner inserters with a circuit condition to turn them off if the nearby reactor's core temp is > 100. The high pressure from the reactor output pumps means that the cold water bypass doesn't lower the temperature by much when the pump engines are running off the reactor. The green one-way valves prevent back-flow and don't require power to function.
Thanks for sharing that design. I've incorporated steam engines into my design now as well. It will only work reliable with water heat capacity of at least 2kJ (I'm using 4kJ, according to wiki that's what water should have anyway.)
Also, thanks for the top-up valve they saved me 2 pumps/reactor. ;)
2017-03-12-09-39-59-1399944.jpg
2017-03-12-09-39-59-1399944.jpg (126.94 KiB) Viewed 9158 times
PS: Did you manage to get flow update to keep the output in your design at constant 100°C? As soon as I try to use outputs with corner pieces they are only 98-99°C.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2632
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by steinio »

Optera wrote:
GotLag wrote:Why build separate coal-fired engines? :P

Image

There are coal boilers next to each cooling tower, fed by burner inserters with a circuit condition to turn them off if the nearby reactor's core temp is > 100. The high pressure from the reactor output pumps means that the cold water bypass doesn't lower the temperature by much when the pump engines are running off the reactor. The green one-way valves prevent back-flow and don't require power to function.
Thanks for sharing that design. I've incorporated steam engines into my design now as well. It will only work reliable with water heat capacity of at least 2kJ (I'm using 4kJ, according to wiki that's what water should have anyway.)
Also, thanks for the top-up valve they saved me 2 pumps/reactor. ;)
2017-03-12-09-39-59-1399944.jpg
PS: Did you manage to get flow update to keep the output in your design at constant 100°C? As soon as I try to use outputs with corner pieces they are only 98-99°C.
Both setups look so sexy.
Do you like to share blueprints?

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by Optera »

steinio wrote: Both setups look so sexy.
Do you like to share blueprints?

Greetings steinio
Here's a bp of the revised 4x Blocks. Changed the valves to top-up valves so the starter engines don't get cold feet.
revised 4x Block

orbadon
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Mar 25, 2017 9:22 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by orbadon »

Hi

I'm running into some problems if I try to get my power from Reactor during the night.

Image
Blue is solar, orange is reactor

As you can see, the first night went well, but the second night something strange happened. Power generation from the base load turbines suddenly dropped without apparent reason. Once it reached zero, the whole base went powerless and the reactor subsequently overheated as the pump to the cooling tower was out of juice too.

My setup is (as far as I can tell) a functional copy of the one depicted in the first post:
Image

There is enough fuel available, the depleted fuel is getting transported off and there should be enough power consumption over 20%. In the night of the disaster, there was more consumption than generation.

Any ideas what I missed / what I'm doing wrong?

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by GotLag »

Are those engines also powering the pumps that move hot water into them? What happens if power demand exceeds supply?

orbadon
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Mar 25, 2017 9:22 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by orbadon »

Yes, the reactor turbines are the only power provider during the night. Afaik gears just turn slower if there isn't enough power.
Edit: hmm I think I see where you're going with this :idea:

wtfzambo
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Mar 01, 2017 7:28 pm
Contact:

Re: [0.14] Reactors

Post by wtfzambo »

renhanxue wrote:
NastyEbilPiwate wrote:What's the optimal ratio of reactors/reprocessors to get the "A combination of fission and breeding yields over 110 reactor cycles with no surplus, given the right balance" that's mentioned on the mod page?
If I'm counting things right, if you reprocess as far as you can:
One fission cycle nets you +0.25 depleted uranium and -0.5 enriched fuel
One breeder cycle nets you -2 depleted uranium and +1 enriched fuel
One uranium ore enrichment cycle nets you +7 depleted uranium and +1 enriched fuel, but takes 15 seconds rather than 10 like the other two

From this it follows that two fission to one breeder is actually fuel neutral but leaves you with a shortage of 1.5 depleted uranium per cycle that you have to make up for somehow.

If I'm doing my numbers right (very possibly not) I think the perfect ratio with everything running full speed is 3 uranium enrichment plants to 10 breeder reactors to 24 fission reactors to God knows how many reprocessing and MOX enrichment plants, but that's, uh. A bit impractical, maybe? Maybe you should just use circuits to turn on/off breeders/uranium enrichment plants as needed (exactly when to do this is left as an exercise to the reader).

I've come up with this setup after seeing your post, remade the calculations and so far I've been pretty happy with it. It produces a huge amount of energy with very little uranium ore consumption and little product in excess.
The whole thing is balanced out according to my calculations, which might not be 100% accurate, but I'm pretty sure they are (will post them below anyway).

The setup consists of:
  • 16 Fusion reactors
    1 Breeder reactor
    5 Chemical plants 2 (from bob's mods, as well as the other machines) for MOX (Uranium separation)
    17 Chem plants 2 for Nuclear Reprocessing
    1 Assembling Machine 4 for Enriched Nuclear Fuel Production (this one is enough to feed more than one setup, lesser machines can be used)
    1 Chem plant 2 for Slurry (I have 2 in the screenshot, but actually only one is needed for lvl 2 plants)
It produces up to ~425 MW of pollution free energy with an uranium ore consumption of less than 30 ores / minute. The circuit network setup is the one suggested by the mod's author and so far I had 0 shutdowns or overheating problems. Actually, the cooling towers don't even need to turn on, for some reason.

Following, my calculations:

Key:

ENF: Enriched Nuclear Fuel
SNF: Spent Nuclear Fuel
DU: Depleted Uranium
Pu: Plutonium
Slurry stays Slurry.

Reprocessing everything as we get:

Fission cycle:
(I've excluded the H2SO4 from the calculations because that one is easy to produce and isn't important for balancing purposes).

Code: Select all

1ENF -> 1SNF
         |
        8SNF -> 1Pu + 4Slurry
                 |        |
                 |        8Slurry -> 1ENF + 7DU
                 1Pu + 3DU -> 4ENF
Balancing the whole thing out like a chemical reaction we get:

Code: Select all

16ENF -> 16SNF
           |
          16SNF -> 2Pu + 8Slurry
                     |        |
                     |        8Slurry -> 1ENF + 7DU
                    2Pu + 6DU -> 8ENF
Which simplyfied gives us that 16 Fission cycles return +1DU and -7ENF. So one cicyle gives us +1/16DU and ~ -0,5ENF.
Every 16 Fission cycles we need 16 Nuclear Reprocessing cycles, 2 Enriched Nuclear Fuel Production cycles, and 1 MOX.

Breeder cycle:

Code: Select all

1ENF + 7DU -> 1Pu + 7SNF
               |    |
               |    8SNF -> 1Pu + 4Slurry
               |             |         |
               |             |        8Slurry -> 1ENF + 7DU
               |            1Pu + 3DU -> 4ENF
              1Pu + 3DU -> 4ENF
Balancing the whole thing out like a chemical reaction we get:

Code: Select all

16ENF + 112DU -> 16Pu + 112SNF
                  |        |
                  |      112SNF -> 14Pu + 56Slurry
                  |                  |         |
                  |                  |        56Slurry -> 7ENF + 49DU
                  |                14Pu + 42DU -> 56ENF
               16Pu + 48DU -> 64ENF
Which simplyfied gives us that 16 Breeder cycle return -202DU and +127ENF. So one cycle gives us -12,625DU and ~ +8ENF.
Every 16 Breeder cycles we need 14 Nuclear Reprocessing cycles, 30 Enriched Nuclear Fuel Production cycles, and 7 MOX.

Therefore, one breeder cycle is enough to provide enough ENF to feed 16 fission cycles. The outcome of this balance nets us:
~ 0ENF ~ -12DU
We need to compensate this consumtion of DU else the whole thing turns off. 2 Chemical plants 2 for MOX were added, which brings the balance to:
~ +2ENF ~ 0DU.
I've also setup a small circuit network condition to make these work only when the DU in my system is < 2k.

Now, my mod setup may be different than yours, for example if you're not using Bob's mods you will need a different amount of factories, depending on their speed.
For example: 16 Fission cycles require 16 Nuclear Reprocessing cycles, which I compensate with 16 Chemical plants 2 (that have speed 2). But if you only have vanilla chem plants, you would need 32 (at full power, 1 fission cycle lasts 10 seconds, and 1 nuclear rep. cycle lasts 20).
How many factories are needed for MOX, Nuclear Reprocessing and Enriched Nuclear Fuel Production will be left as an exercise to the reader.
Besides that, feel free to ask any questions.
PS: the small pumps I used to feed water to the reactor and to the steam engines are small pumps MK3 (bob's mods). For some reason, the express pump by flow control doesn't work for me, even if suggested by mod's author.


Pics below

Vegemeister
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Sun Dec 04, 2016 9:18 pm
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by Vegemeister »

I'm playing Factorio on integrated graphics, and the game is already memory-bandwidth-bound to start with, so I have to worry about performance more than many of you. As my atomic-powered factory grew, it started dipping below 60 UPS (well, 59.9) at times. At first I was able to stave off the problem by switching my power plant to a combinator-free, pump-free design, and instead keeping a close eye on the power graph to make sure demand was comfortably between 20-100% of capacity.

At 50 reactors, that was no longer good enough. I turned on show_time_used_percent in the debug menu, and found that mod-Reactors itself was fluctuating between 3 and 4 milliseconds of execution time per update. Switching to solar would eliminate the problem, but that's not nearly as cool as atomic power. So I started tinkering.

I wasn't able to find anything online about using a profiler on a loaded Factorio mod, so I wrapped Factorio's --benchmark command line option in a bash script, and threw together some very ugly python to measure the performance across git commits.

I was able to considerably reduce the CPU usage of this mod, from ~3 ms/update to ~0.5 ms/update, as measured by the debug info with the GUI on. Changes were as follows:
  1. Time between full reactor updates increased from 5 ticks to 30 ticks.
  2. Reactor thermal mass increased and power increment/decrement decreased by a factor of 6, to preserve the control dynamics.
  3. Partial updates (which set the coolant temperature) run once every 5 ticks instead of on every tick.
  4. Coolant tank volume increased from 500 units to 2000 units, in order to counteract temperature sag from not running partial updates as frequently.
The benchmarks didn't have super-good test-retest consistency (always improvement, though), but here's a fairly representative run. The difference isn't as big as with the GUI on, because the headless benchmark means the simulation isn't competing with the iGPU for memory bandwidth:

Code: Select all

Commit   avg ms  min ms  max ms  Message
0076654    5.21    4.36   15.52  Update fluid temperature less often.
ef8d545    5.98    4.75   15.97  Refactor looping constructs.
5db3dd3    5.97    4.70   16.16  Update reactors less often.
7c81f64    6.66    5.42   16.50  Unix line endings.
7048c62    6.62    5.36   16.45  Initial commit
I don't know much about Factorio mod packaging/versioning and I don't want to step on anyone's toes, so I'm not gonna post a zip. But here's a patch:

Code: Select all

diff --git a/control.lua b/control.lua
index b20b17e..04b7df4 100644
--- a/control.lua
+++ b/control.lua
@@ -14,7 +14,8 @@ SIGNAL_REACTOR_TARGET = {type="virtual", name="signal-reactor-target"}
 SIGNAL_REACTOR_STOP = {type="virtual", name="signal-reactor-stop"}
 SIGNAL_REACTOR_STOPPING = {type="virtual", name="signal-reactor-stopping"}
 
-TICKS_PER_UPDATE = 5 -- each reactor and cooling tower gets updated once every 5 ticks
+TICKS_PER_UPDATE = 30 -- each reactor and cooling tower gets updated once every 30 ticks
+TICKS_PER_QUICK_UPDATE = 5 -- coolant temperature gets set once every 5 ticks
 UPDATES_PER_SECOND = 60 / TICKS_PER_UPDATE
 
 MAX_POWER = 26000 -- kilowatts
@@ -23,8 +24,8 @@ MIN_POWER =
   ["fission-reaction"] = MAX_POWER * 0.2,
   ["breeder-reaction"] = MAX_POWER * 0.2
 }
-POWER_INCREMENT = MAX_POWER / UPDATES_PER_SECOND / 10 -- 10 seconds to max from zero
-POWER_DECREMENT = MAX_POWER / UPDATES_PER_SECOND / 10 -- 10 seconds to zero from max
+POWER_INCREMENT = MAX_POWER / UPDATES_PER_SECOND / 60 -- 60 seconds to max from zero
+POWER_DECREMENT = MAX_POWER / UPDATES_PER_SECOND / 60 -- 60 seconds to zero from max
 CRAFTING_INCREMENT =
 {
   ["fission-reaction"] = 1 / 50 / UPDATES_PER_SECOND / MIN_POWER["fission-reaction"],
@@ -33,7 +34,7 @@ CRAFTING_INCREMENT =
 AMBIENT_TEMP = 15
 OPERATING_TEMP = 150
 SCRAM_TEMP = 200 -- overheat trigger temp
-REACTOR_MASS = 2000
+REACTOR_MASS = 12000
 
 function init_global()
   global = global or {}
@@ -304,6 +305,9 @@ end
 
 function update_reactor(index)
   local reactor = global.reactors[index]
+  if not reactor then
+    return
+  end
   
   -- update core
   if reactor.scram then
@@ -413,20 +417,15 @@ function update_tower(index)
 end
 
 script.on_event(defines.events.on_tick, function(event)
-  for i,_ in pairs(global.reactors) do
+  local quick_offset = (event.tick % TICKS_PER_QUICK_UPDATE) + 1
+  for i=quick_offset, #global.reactors, TICKS_PER_QUICK_UPDATE do
     quick_update_reactor(i)
   end
-  local index = (event.tick % TICKS_PER_UPDATE) + 1
-  while index <= #global.reactors do
-    if global.reactors[index] then
-      update_reactor(index)
-    end
-    index = index + TICKS_PER_UPDATE
+  local offset = (event.tick % TICKS_PER_UPDATE) + 1
+  for i=offset, #global.reactors, TICKS_PER_UPDATE do
+    update_reactor(i)
   end
-
-  index = (event.tick % TICKS_PER_UPDATE) + 1
-  while index <= #global.towers do
-    update_tower(index)
-    index = index + TICKS_PER_UPDATE
+  for i=offset, #global.towers, TICKS_PER_UPDATE do
+    update_tower(i)
   end
 end)
diff --git a/prototypes/entities.lua b/prototypes/entities.lua
index 860fdda..f64bbae 100644
--- a/prototypes/entities.lua
+++ b/prototypes/entities.lua
@@ -168,7 +168,7 @@ reactor_boiler =
   selection_box = {{-1.5,-1.5},{1.5,1.5}},
   fluid_box =
   {
-    base_area = 50,
+    base_area = 200,
     pipe_covers = pipecoverspictures(),
     pipe_connections =
     {
@@ -474,4 +474,4 @@ data:extend({
   cooling_tower_steam,
   turbine,
   peak_turbine
-})
\ No newline at end of file
+})

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.14] Reactors & Atomic Locomotives

Post by Optera »

I love how reactors uses a somewhat realistic way to heat up water and handles reactors powering up/down with all the control through circuit network.
However it's no surprise that coding all that in lua takes quite a lot of cpu time. Especially on low spec potatoes like mine.

Scaling Reactors up to power my bigger bases was impossible (using higher water heat capacity to get 1GW per reactor felt silly)
So what I did was remove scripts from reactors turning them into ordinary assemblers and set the recipes to output 100°C hot water. I lost all the niece combinator control logic, but they scale up on my potato to produce 20+ GW.
recipe
Maybe you could provide an "official" dumbed down version for us potato users GotLag. ;)

Post Reply

Return to “Mods”