MauveCloud / Ic2ExpReactorPlanner

A planner for nuclear reactors in the popular Minecraft mod IndustrialCraft2 Experimental.
GNU General Public License v2.0
180 stars 30 forks source link

Miscalculated total vent cooling #36

Closed KrisBigK closed 5 years ago

KrisBigK commented 5 years ago

00230C0A140D0C140D2306230C0D0C0D0C1400230C0D0C0D0C0D0C000C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D14000C000C0A140D0C0A This fluid design runs 9 secs on and 5 secs off with an initial heat of 6600. I didn't share it in the forum because it is worse compared to the second one. In this design, 16 OC vents are used and they are the only component that can pull heat. Since the rod is surrounded by reflectors, the total vent cooling should be 16 36=576 instead of 592 shown in the planner. Also, 9 896=(9+5) * 576, which confirms that it vent 576 heat. I tested it in-game with 9/5 cycle and it runs perfectly.

Another (more complex) example: 0B230B0A140D0C0D122306230C0D0C0D0C0A0B230C0D0C0D0C0D0C0B0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D140A140D140A140D0C0A runs 5 sec on and 2 sec off with an initial heat of 6600 In this design, total vent cooling should be 4 5+17 36+8=640, instead of 649. 5 896=(5+2) 640, confirming my calculations again.

This affects a lot on designing MOX fluid reactors since I have to manually calculate all the venting by myself. It seems that the reactor stability part shown in the planner isn't affected by this.

A question: Why does these two designs have different efficiency despite having the same fuel rods?

MauveCloud commented 5 years ago

16 OC vents are used and they are the only component that can pull heat

Technically, this is true, at least for the first design. However, in both designs, you have component heat exchangers which allow heat to be transferred from the OC vents to the advanced heat vents, which you're neglecting to consider in your manual calculations. Otherwise, what is the point of including the advanced heat vents? Admittedly, the simulator claims that both designs can run with the advanced heat vents removed, and that the first design can even run on a 5/2 cycle despite only having 540 vent cooling (which is especially confusing). Edit: that was with default settings for the suspend/resume temps, which wait for the reactor to cool down completely before resuming, and that definitely isn't appropriate for a MOX fluid reactor.

total vent cooling should be 16 * 36=576

That assumes that all the OC vents are surrounded by component vents, but there are 6 OC vents with less than 4 adjacent component vents, making this less accurate than you probably expected.

As far as the efficiency, that's calculated by dividing the heat outputs (for a fluid reactor) or EU outputs (for an EU reactor) by that of the simplest stable design (one uranium rod with a heat vent adjacent) and the total number of fuel rods. This means that efficiency for a fluid reactor often depends more on the vent configuration (and pulse configuration) than the fuel rods.

Also, 9 896=(9+5) 576, which confirms that it vent 576 heat. I tested it in-game with 9/5 cycle and it runs perfectly.

By "runs perfectly", do you mean that the reactor stays at the same temperature throughout the cycle? I must admit I'm skeptical of that. Could you please record a video demonstrating this and post a link to it?

Edit: with temperature control disabled in the simulator, it says the reactor max temperature for the first design is 9984, which is scarily close to exploding. One little hiccup in the server (whether internal or remote), like a brief lagspike, could turn that reactor into a crater. Increasing the tickrate with a mod (like you mentioned in the forum) could easily make it more vulnerable to such hiccups.

MauveCloud commented 5 years ago

Update: the max temperature of 9984 I mentioned was from the planner checking after every component, instead of at the end of the reactor tick (like the mod actually does). Once I changed that, the max temperature reported as 9480, which is only a risk of replacing pieces of the outer hull with lava rather than exploding.

Note, however, that the 592 was calculated by adding up the peak usages of each vent - you can get the average venting by halving the average HU/s output, to get 575.575, pretty close to the 576 you were expecting (I think the discrepancy can be accounted for by the unofficial cooldown time after the quad MOX rod depletes). Perhaps I can clarify this in the output.

KrisBigK commented 5 years ago

there are 6 OC vents with less than 4 adjacent component vents

For a MOX fluid reactor, the OC vents have to be balanced, which means that an OC vent can vent 36 heat with the heat exchanger and the advanced vent. As far as I know, an unbalanced OC vent will cause trouble in a MOX fluid reactor. I have already considered that when I was designing it.

do you mean that the reactor stays at the same temperature throughout the cycle?

No, but I mean it won't explode. The temperature goes like a tide in which it goes up when the reactor is on and down when the reactor is off. For a highest efficiency MOX fluid reactor, it has to be pulsed since there is no way to vent 896 heat in 1 sec.

One little hiccup in the server (whether internal or remote), like a brief lagspike, could turn that reactor into a crater. Increasing the tickrate with a mod (like you mentioned in the forum) could easily make it more vulnerable to such hiccups.

I ran at least 60,000 sec without problems while the game is running at ~600 TPS. The game even stopped (without me opening the game menu) for about 2 sec when my hard disk is reading the data (I heard it accelerating) and it don't have a problem. I tested that in a singleplayer world and I'm not sure about multiplayer.

the 592 was calculated by adding up the peak usages of each vent. Perhaps I can clarify this in the output.

I don't think that is the correct way of calculating the total vent cooling. You definitely should do that.

IC2 test world - MOX_1151.zip IC2 test world - MOX_1277.zip

The reactor is at x=-586, y=18, z=-53. It should be running when you go into the game. Here is my mod list: DebugServerInfo-1.12.2-1.0.5 industrialcraft-2-2.8.111-ex112 jei_1.12.2-4.13.1.225 TickrateChanger-Mod-1.12.2 torohealth-1.12-11

MauveCloud commented 5 years ago

I don't think that is the correct way of calculating the total vent cooling. You definitely should do that.

As far as "effective" or average vent cooling, that can already be determined for a fluid reactor by dividing the HU/s output by 2. The peak vent outputs are still useful in determining if a design has superfluous vents.

there is no way to vent 896 heat in 1 sec.

Really? I think this design technically will, though you'd probably have to use automation to replace the OC vents several times, and admittedly since they pull more heat from the core than they vent, the core won't stay hot enough for a MOX fluid reactor: 00230B140B0D0D0D0D2306230B0D0D0D0D0D00230D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D

KrisBigK commented 5 years ago

However, in both designs, you have component heat exchangers which allow heat to be transferred from the OC vents to the advanced heat vents, which you're neglecting to consider in your manual calculations. Otherwise, what is the point of including the advanced heat vents

The point is that no matter how much the adv vent can vent, as long as the vents can vent a total of 16 heat/s/OC vent (not counting the 20 that is vented by the OC vent), the OC vents won't be broken. Hence, even if the adv vent can vent 100 heat/s, the vent cooling is still the same - only the OC vent can pull heat from the reactor.

Really? I think this design technically will, though you'd probably have to use automation to replace the OC vents several times, and admittedly since they pull more heat from the core than they vent, the core won't stay hot enough for a MOX fluid reactor: 00230B140B0D0D0D0D2306230B0D0D0D0D0D00230D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D

First, no heat exchanger is needed - the reactor heat vent pulls 5 and vents 5. If this design is used, then it need an extra fluid reactor to repair the vents to get the heat ouput completely. Inserting damaged vents into a fluid reactor is most likely unintended, so after this is fixed then your design cannot output at maximum efficiency. I have already made a use for that by using 131313131313131313131313232323131313131323060606231313131323060606231313131313232323131313131313131313131313 that pulls the core heat exchangers out at a durability of 1040 (79.2% damage) for the reactor to maintain below 85% heat (probably a lower durability is possible), and then put them into fluid reactors to extract heat, but I haven't shared that before because I'm quite sure that it will get fixed once I share it. I didn't build that in my SSP world for this reason.

I don't think that is the correct way of calculating the total vent cooling. You definitely should do that. As far as "effective" or average vent cooling, that can already be determined for a fluid reactor by dividing the HU/s output by 2.

Calculating effective total vent cooling in that way will cause it to be lower than the actual number. 0302130C09120D0C0A03000C0D0C0D0C0D12030C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D110D120D120D120D11 For this design to achieve its effective total vent cooling, the OC vents and heat exchangers in the bottom must heat up, and in that time the reactor output is reduced, so it will be lower. I tested that in-game.

EDIT: I made a gif of its warming process ezgif-2-9465320c5987 and a graph of the HU output per second in first 40 secs image image It is so tiring to input all these numbers by hand. I'm really looking forward to this being added. Also, you should make it to output CSV in a specific range. I just realized how crazy it is to have 5 million of those dots.

MauveCloud commented 5 years ago

First, no heat exchanger is needed - the reactor heat vent pulls 5 and vents 5.

I was trying to design a reactor that could theoretically vent exactly 896 heat :) , which the reactor heat vent would not help with.

Calculating effective total vent cooling in that way will cause it to be lower than the actual number.

Okay, now I think I finally see what you're getting at. I originally wrote the planner for the 1.7.10 builds of IC2, and I confess I haven't done much testing of fluid reactors with the 1.12.2 builds, which apparently show different output. I'm getting a headache trying to figure out the difference from looking at decompiled code, so I will need some help.

@Chocohead could you please explain what's going on with the in-game displayed HU/s output? Is it bugged and really HU/t (edit: I guess it would need to have been HU/t before for that to make sense 😕 ), or have the HU to EU conversions been nerfed? Also, does the HU/s output depend on coolant fluid type? afaik, the base mod only has one coolant fluid type, but I can at least tell it allows others to be supported, and I think there are some addon mods in development that are planning to add their own coolants.

KrisBigK commented 5 years ago

I think that changing the unit displayed in the simulation from HU/s to HU/t can solve the problem. 1376*20=27520, which is about the average output displayed in-game.

KrisBigK commented 5 years ago

I was trying to design a reactor that could theoretically vent exactly 896 heat :)

This one should vent 896 heat. I set the initial heat of the heat exchangers and the heat vent to 60% damage, so that they won't heat up. 0D2313(h2bc)14(h2bc)09(hgo)0D0D0D0D2306230B0B0D0D0D0D0D230D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D

Is it bugged and really HU/t (edit: I guess it would need to have been HU/t before for that to make sense confused ), or have the HU to EU conversions been nerfed?

With my 1384 design and stirling generators, I got around 692 EU/t. It seems that the heat output displayed in game is correct, and the HU-EU conversion hasn't been nerfed.

MauveCloud commented 5 years ago

In v2.3, simulation will display HU/t.

KrisBigK commented 5 years ago

As far as "effective" or average vent cooling, that can already be determined for a fluid reactor by dividing the HU/s output by 2.

I thinked about this again, since the output of the design that I showed earlier stabilizes about half way through the cycle at 27680HU/s. Divide that by 40 and you get 692, which should be the "effective" vent cooling. I'm not certain if this is a coincidence, but this should be an easy way to calculate "effective" vent cooling. 0302130C09120D0C0A03000C0D0C0D0C0D12030C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D110D120D120D120D11

KrisBigK commented 5 years ago

I have a question: What does the two numbers of Total vent cooling mean? I'm going to assume the right one as the peak vent cooling, but what is the left one? How is it calculated? 0302130C09110D0C0A03000C0D0C0D0C0D12030C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D110D120D120D120D11|fsn image

MauveCloud commented 5 years ago

Actually, the left one is the "peak usage" and the right one is the theoretical maximum cooling. However, looking back at the original requests for this from a few years ago (#5 and https://forum.industrial-craft.net/thread/10998-ic2-experimental-reactor-planner/?postID=184130#post184130 ), I now realize they never fully clarified what this should mean - Omicron indicated it should be similar to how Talonius's planner showed it, but I no longer have a copy of the standalone planner to decompile, I can't reach the server for it, and https://web.archive.org/ doesn't help with this (it hits some sort of redirect, then says the page isn't archived). Omicron's profile shows s/he hasn't been active on the forum since 2017, but if you and Chocohead can come to consensus on what this should mean, I can change it.

KrisBigK commented 5 years ago

Instead of changing it, I think that you should add it, so that there won't be some false bug reports because people might not know the change. Maybe others have a copy of the (decompiled) old planner that you can ask for. I don't have time now, and I'll be back 11 hours later.

MauveCloud commented 5 years ago

Instead of changing it, I think that you should add it

Um... that statement only confuses me further. It seems like you're asking me to add something that's already there (albeit poorly defined/explained).

Edit: as far as the old planner, I found a link to an archived copy in the thread for it ( https://forum.industrial-craft.net/thread/7812-reactor-planner-for-v1-106/?postID=206956#post206956 )

MauveCloud commented 5 years ago

Okay, here's what the old planner looks like with that design: OldPlannerComparison

If I bump up the Initial Hull Temperature to 200, the "Vent Cooling" changes to "692 (694)", matching what my planner shows - I'm guessing that Talonius's planner did not take into consideration the possibility of heat being transferred from the fuel rods to the core first, then vented during later ticks (and as for that overclocked heat vent I captured the tooltip of - CSV data from my planner shows low output for the first 8 ticks, then 20 for the 9th tick, and some fluctuation, but it mostly stays at 20 after that). It also changes the "Excess Cooling" to 4 suddenly, which doesn't make sense to me.

KrisBigK commented 5 years ago

0302130C09140D0C0A03000C0D0C0D0C0D12030C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D110D120D120D120D11|fsn image Some manual calculations again. I divided the vents into separate sections for easier calculation. I also replaced the heat exchanger at row 0 column 5 with a component heat exchanger for easier calculation because I found out that it did not pull heat from the reactor. Bottom: 9 20 + 17 4 = 248 Middle: 8 36 = 288 Upper section: 2 36 = 72 Upper right section: 2 * 36 + 4 = 78 Total: 248 + 288 + 72 + 78 + 8 = 694, and subtracted by 2 unused cooling according to Talonius's planner, and that gets 692.

MauveCloud commented 5 years ago

I've adjusted how values for heating and cooling are calculated and displayed during simulations, which I'm hoping will be more informative.