[MOD 0.16] Realistic Reactors

Topics and discussion about specific mods

Re: [MOD 0.16] Realistic Reactors

Postby IngoKnieto » Mon Jul 09, 2018 12:51 pm

Light wrote:
IngoKnieto wrote:I really like both of these two ideas, because currently you have no reason to operate a reactor above 500 degrees.


I will disagree with this. The blueprint I showed previously uses Bob's Mk2 turbines which require the reactors to reach >900 degrees to maintain 100% load with dozens of Mk2 exchangers. This is greatly pushing the limits of an overheating situation which is why the cooling loop activates above 950 and scram at 980, which isn't a large margin for error should something go wrong. It took many tries to fine tune the system to avoid wasting precious heat through cooling towers or hitting scram too early (wasting precious fuel) but it's a very compact and powerful setup when it's well primed by providing 1.9GW instead of the 1.2GW vanilla limit using the same number of buildings. At 100% load the cooling towers should never have to run if it's balanced perfectly, resulting in a 100% efficient power system that trumps the rest.

A larger scale vanilla build could also use >900 heat for the same effect, despite vanilla games often needing far less power than a heavily modded game. Yet I find that it's worth the effort anyway since you shouldn't waste heat with your cooling towers that could be providing far more power for you, vanilla or otherwise. Losing efficiency by wasting heat makes reactors worse then other power production options if set up quite poorly.

It's pushing that thermal limit without exploding the reactor to obtain every single MW possible that's the fun challenge, even if you don't think you need it. That's what ultimately drew me to this mod.


Right, I forgot about modded heat exchangers and turbines ;) And obviously you have to go above 500 degree depending on the size of the heat pipe network.

But what effect in a larger scale vanilla build do you mean? Four connected reactors (for example) currently always produce 560 MW, it doesn't matter if you run them at 600° or 900° (as long as all connected heat exchanger reach at least 500° of course). So the power output is always the same, or am I seeing something wrong here?
IngoKnieto
Long Handed Inserter
Long Handed Inserter
 
Posts: 68
Joined: Mon Oct 03, 2016 9:29 am
Location: Stuttgart, Germany

Re: [MOD 0.16] Realistic Reactors

Postby ownlyme » Wed Jul 11, 2018 12:16 am

almost done but the temperature display on the reactor entity always resets to 15° after replacing it...
you got any idea?

todo:
- adding a setting to toggle between special fuel cells and always scaling output
- implementing the check for fuel type or setting active
- localization for all reactor levels
- remove the debug messages that output the reactor temperature before and after replacing

see you tomorrow
Attachments
RealisticReactors_1.0.3.zip
(325.06 KiB) Downloaded 3 times
ownlyme
Inserter
Inserter
 
Posts: 48
Joined: Thu Dec 21, 2017 8:02 am

Re: [MOD 0.16] Realistic Reactors

Postby IngoKnieto » Wed Jul 11, 2018 10:30 am

Nice job :)
I love the way you add the 100 reactor entities, I still can't believe I didn't think of this when I first made the mod...

I found a couple of issues with your version:
1. your "reactor bonus formula" in line 540
a) I don't understand it. How exactly are you calculating the bonus level here?
b) it contains a bug, when core temp < 500 it produces a negative output crashing the game
2. The bonus level check only works for connected reactors, a single reactor is not checked.
3. The reactor picture of the 100 added reactors is a little bit off to the south (-> maybe that is a compatibility issue with the SqueakThrough mod)
4. Meltdown doesn't work anymore - when the reactor reaches 1000° the game crashes
I could not reproduce the issue with the temperature display, both the signal and the dispaly on the right side worked for me.

I fixed 1 and 2, see the attached version. Since I didn't understand your calculation I redid the reactor leveling like this:
- a reactor at 500° or below produces 40 MW, that is level 1
- a reactor at 1000° produces 140 MW, that is level 100
- reactor power output is linear between 500° and 1000° following the formula: y = 99/500 * x -98 (where y is the reactor level, and x is the core temperature)
- each connected running reactor adds bonus levels (if the reactor is attached to 3 others, then a level bonus of 25 is added).
So for example a reactor operating at 700° would be level 40, and if it is connected to 3 others, it would get 25 bonus levels to a total of level 65 (producing about 104 MW). That level is currently shown in the neighbour bonus signal.

It probably needs some balancing, but like this it worked for me. Also I didn't notice any perfromance impact (I tested with 10 reactors). Let me know what you think of this solution.


In general I think we need to take care of a few points, before publishing this as a new version.
- Currently this version would break existing save games. If we can, we should avoid this.
- All 100 added reactors need to be added in the SqueakThrough mod, otherwise it'l be incompatible.
- I want to add settings that remove the vanilla reactor and make it possible to disable the check for connected reactors temporarily (see known issues).
- Also blueprinting does not work correctly, the wires to the circuit interface are not included in the blueprint (but I have no idea why).
Attachments
RealisticReactors_1.0.3.zip
(325.41 KiB) Downloaded 4 times
IngoKnieto
Long Handed Inserter
Long Handed Inserter
 
Posts: 68
Joined: Mon Oct 03, 2016 9:29 am
Location: Stuttgart, Germany

Re: [MOD 0.16] Realistic Reactors

Postby ownlyme » Wed Jul 11, 2018 2:26 pm

this is very weird, did you deactivate the old mod?
for me the meltdown worked, (the white cloud that damages you if you are inside it if thats correct? before i only used the explosion tweak :D)

you're right, in the reactor bonus formula i forgot a math.max
math.floor(math.max(0,reactor.core.temperature-500)/5 * (1+reactor_bonus/10) )
i thought the bonus level should have been multiplicative, but maybe your implementation makes more sense.
i think you forgot to apply math.floor on the reactor level for rounding

are you sure it breaks existing games? i tried it with a savegame with a level 1 reactor running and it simply migrated.
(thats why i maintained the old entity names)

i think the wire blueprinting doesnt work because the interface is script-created and the blueprint doesn't place it.

i have an idea for the temperature reset, maybe we can add a heat accumulator under the reactor thats connected to it, with a high heat transfer, while making the reactor heat buffer smaller maybe?
i will try it in 2 hours when im back, i'm currently on the rush sorry :D
see you later
ownlyme
Inserter
Inserter
 
Posts: 48
Joined: Thu Dec 21, 2017 8:02 am

Re: [MOD 0.16] Realistic Reactors

Postby ownlyme » Wed Jul 11, 2018 6:04 pm

hmm i tried your version and it seems to explode just normally
but i noticed that we have to calculate the temperature based on 75 levels because i only added 100 entities (you can pass 0 there)
(btw are you a mathematician ? your formulas look very complicated :D)

i'm afraid there is no solution to make the temperature reset smoother, adding a heat pipe with any properties and changing the reactor heat buffer to anything doesn't seem to have any effect on the speed the temperature resets to normal..
the only option i see is replacing the reactors slower, maybe +0.5 seconds is enough, but i'm curious how much heat gets lost by replacing the reactor.
maybe we have to go the other way with periodically refueling the reactor.
i attached the mess i made for testing, if you wanna try it yourself.
Attachments
RealisticReactors_1.0.4.zip
(326.2 KiB) Downloaded 3 times
Last edited by ownlyme on Wed Jul 11, 2018 9:46 pm, edited 2 times in total.
ownlyme
Inserter
Inserter
 
Posts: 48
Joined: Thu Dec 21, 2017 8:02 am

Re: [MOD 0.16] Realistic Reactors

Postby IngoKnieto » Wed Jul 11, 2018 9:37 pm

Hm, strange, my game crashed on the meltdown, but I didn't copy the error. Also I think you are right - this version shouldn't break existing save games - however it did that for me, but I didn't copy that error either. Anyway, I test that tomorrow again...

The formulas are actually not that complicated. I bet we both learned this in school somewhere around 9th or 10th grade. :)
Here is what I used to refresh my memory (it's in German however...): https://www.youtube.com/watch?v=AqaHHNTWLvk That's really all mathematical knowledge which is in this update.

What exactly are you planning on changing with the internal heat accumulator? What's that supposed to do?
If you make changes please keep in mind that I already started including the settings and fixes mentioned earlier, so keep track of whatever you are changing...
IngoKnieto
Long Handed Inserter
Long Handed Inserter
 
Posts: 68
Joined: Mon Oct 03, 2016 9:29 am
Location: Stuttgart, Germany

Re: [MOD 0.16] Realistic Reactors

Postby ownlyme » Wed Jul 11, 2018 9:51 pm

yeah i didnt really change anything except the reactor level formula

local reactor_temp_level

reactor_temp_level = math.max(0,reactor.core.temperature-500)/20*3 --linear leveling, 500°=lvl 0, 1000°=lvl 75 (500/6.66 = 75)

local reactor_level = math.floor(reactor_temp_level + ((reactor_bonus*25/3)-(25/3)))

(level 0 is valid, in the replacer function theres an explicite check for 0 and -99 (starting)
level 0 is the normal "realistic-reactor" entity without number (because i had to keep that one for savegame compatibility)

i created a request in the modding-interface-requests forum, maybe they will add an api that makes it easier.

maybe they will add something like that, a staff member replied:
"I'd like to request this to be implemented as properties of (a new newly created) LuaHeatEnergySource."
ownlyme
Inserter
Inserter
 
Posts: 48
Joined: Thu Dec 21, 2017 8:02 am

Previous

Return to Mods

Who is online

Users browsing this forum: -G-, Bilka, eryk121191, TheSAguy and 13 guests