Reactor Calculator App Questions

  • I'm starting to develop a little application for IC2's new Nuclear Reactor, which would simulate an entire cycle and give an output as to how it did in the end. I'm basing most of my information on Alblaka's tutorial... though there's still a few things I still need to figure out.


    Now, I'm not exactly good enough at Java to be able to dev it there, however I'm using a system called BYOND which has a good underlying structure to help me work this out.



    I'm letting the user pick out exactly how many additional Reactor Chambers they've added onto the reactor, and whether or not they are surrounding it in air or water. I'm automatically assuming that they're trying to maximize cooling with either substance, digging out whatever dirt/stone they need to to get the air/water underneath the reactor. I'm also assuming that, if they have a Chamber, they're connecting the cable to the Chamber instead of the Reactor itself.


    One thing I'm questioning is exactly what the "3 by 3 sphere" is centered on... is it on the Nuker? And does it just mean that the external cooling elements are just one block away in any direction from the Nuker? Does that mean that the Reactor Chambers actually sit inside this "sphere"? Do Chambers have "spheres" of their own?


    Another thing is what's exactly considered a "cooling element." I know the regular cooling elements are considered one - Coolant Cell, Reactor Plating, and Heat Dispersers... but do water and ice count as "cooling elements" too, even if they're only one use? Do they have heat values of their own? Do they perform their checks once a pulse?


    Hopefully, with this I can better understand the new Nuker, and with that I can create a program that hopefully can work out the vitals of the Nuker before it's built.

  • On outward cooling: the reactor only considers the 3x3x3 cube with itself in the middle. Yes, Reactor Chambers are included in this cube (if any), but they do have 2 cooling per chamber, as opposed to 0.25 per air block or 1 per water block. No, the chambers do not have their own cooling cubes.


    On cooling elements: do remember that Reactor Plating only cools 0.1 heat/cycle, not 1 heat like Coolant Cells. Also, I am not sure on how much Heat Dispersers cool down. However, Water and Ice are NOT traditional cooling elements. All they do is extract excess heat from the reactor hull and vaporize immediately. They can only work if the reactor hull is not enough to vaporize them.

  • Blast it, I've found more questions to ask.


    For the Reactor Plating, it says that it distributes heat to nearby heat-absorbing items, including other Plating which distributes it again. There's a few things I'm curious about - how much does it distribute at most per pulse? If one Plating pulses, does it pass the heat to the second Plating and waits for it to pulse, or does it effectively force a pulse with the no-other-Plating modifier? If the latter, can other Plating pulse again, thereby sending some heat back to the first Plating, and forcing it to pulse with modifier again?


    Also with pulses, is there any sort of order that the items pulse in? I'm planning to have the Nuclear Cells pulse first, then Reactor Plating/Heat Dispersers, then Coolant, then finally check with the one-time use stuff and perform outward cooling, all in "reading" order - left to right, top to bottom. Is this the best way to do it, or is there a better way?


    And then there's Breeding. Assuming that speed cleanly doubles at every 3000 (that is, 4x at 6000, and 8x at 9000) how many pulses does a Depleted Cell need at heat under 3000 to be refined? Where does the produced heat (1 heat per pulse, apparently) go? And where does the supposed heat catalyst come from, the hull?


    For the Heat Dispersers, which occurs first? The transfer from/to nearby components, or from/to the hull itself?

    • Official Post

    I'll take a shot at this since I've written one myself in Perl. (You probably don't want it. It has no real UI, it's just a quick mock-up of the underlying code. Works, though.)

    • A nice shortcut to external cooling is 1 + 2*chambers + (26-chambers). Assumes each surrounding cell is water, as you did. The exception of course is if there are no extra chambers, they'll have to use one of those cells up for a cable. But it sounds like you already got that part.
    • As Viktor said, only the three you listed count as true cooling elements. They're the only ones that uranium cells will consider when generating heat.
    • Reactor plating will, assuming it has any cooling elements around it, divide out the entire heat pulse it receives. It will round up to make the amount evenly divisible by pulling heat from itself (if there is no heat to be pulled, it'll make some up - I don't know off hand if it sticks at zero or goes negative when it does that).
    • When a reactor plating receives a pulse from a uranium cell, it spreads the heat without the "no more pulses" flag. Receiving it from any other source (another plating or a disperser), the flag is set, and the pulses it sends out go directly to the stored heat of whatever it sends it to. So in the case of two plates next to each other, the original pulse and the second pulse would be the only two which occurred.
    • All items are currently processed in a single loop, in reading order I think.
    • Enrichment of depleted cell in a 3000-heat reactor takes about 20,000 uranium pulses. It's based on a random chance, so mileage may vary slightly, but for simulation purposes it can be modeled as a constant increase.
    • The one heat per pulse that the depleted and enriched cells output goes straight to the reactor hull.
    • The system heat for the purposes of breeding is measured from the reactor hull.
    • Dispersers interact with nearby components first, then balance with the hull.

    Hope that helps, good luck with the simulator!

  • ...I might as well come out with a teeny preview of how it looks...



    In any case, I'm letting the user decide just how many Chambers are added and whether it's air-cooled or water-cooled (meaning it's gotta change the "outward cooling" amount).



    Thanks to Drashian, I think I might have enough information to work out the code. As I said before, I'm using the BYOND System to create this app, which most likely means that you'll have to get the system yourself to use the app. I'll see if I can't try to get it to work on it's own, though.


    Hopefully, by the end, I can get it to spit out a large amount of the vitals of the reactor design - efficiency, heat generated and dissipated, energy generated, destroyed items, whether or not any of the Depleted Isotope Cells were refined enough within a single cycle, and probably most importantly, if the reactor itself would be destroyed with such a layout.

  • how about also code some premade designes in, and give what class the reator is. that will be great.


    btw this is a awesome idea :thumbup:

  • I like the idea of class, efficiency and EU/s output calculators, but I'm not sure about premade designs.

    Same. The premade designs, no, I prefer the Trial and Error method of finding what works.

  • Same. The premade designs, no, I prefer the Trial and Error method of finding what works.


    By Premade designs, I think that the idea is to include a few save files, which you can load to get a sample. I do not expect them to be optimal,. and will complain if they are, but I think they ought to be included. If you want to try to make a design that is better, then get to your trial&error. But if you are a newbie Nuclear-engineer, I think having some working samples so you can see how a reactor works is an excellent idea.

  • Found a few more questions...


    • Enrichment of depleted cell in a 3000-heat reactor takes about 20,000 uranium pulses. It's based on a random chance, so mileage may vary slightly, but for simulation purposes it can be modeled as a constant increase.


    What's exactly considered a "uranium pulse"? Since a Uranium Cell lasts for 10,000 Reactor Pulses, are you saying it takes 2 Uranium Cells to enrich a Depleted Cell on low heat?


    On outward cooling, what amount of outward cooling is granted to a tile that isn't air or water or a Reactor Chamber, like a cable, dirt, planks, or stone?

  • Found another question to ask in regard to breeding.



    What's exactly considered a "uranium pulse"? Since a Uranium Cell lasts for 10,000 Reactor Pulses, are you saying it takes 2 Uranium Cells to enrich a Depleted Cell on low heat?


    Sounds right. Each reactor pulse is 1 second, and each 3k heat doubles the rate of Enrichment, so I think that it is 40,000 uranium pulses as the default, 20k at 3k heat, 10k at 6k heat, and 5k at 9k heat, etc

    • Official Post

    Exactly, on 3000 heat it should take 2 fresh uranium cells to enrich a single depleted one. For outward cooling, anything that's not water or air provides precisely zilch. Nearby fire and lava are particularly bad, they actually reduce outward cooling (although never to the point where the reactor gains heat from the outside). The cooling values for those are -2 (fire) and -3 (lava) if you want them. I guess they might be useful in rare situations for creating an exactly temperature-stable reactor, so there you go.

  • Ah, I have already thought about creating a reactor-simulator, but I guess you were faster ;)


    Concerning the plating: I think Alblaka statet in his guide that plating will distribute “fair heat” and save the amount which they are not able to dissipate for the next reactor pulse.

  • Exactly, on 3000 heat it should take 2 fresh uranium cells to enrich a single depleted one. For outward cooling, anything that's not water or air provides precisely zilch. Nearby fire and lava are particularly bad, they actually reduce outward cooling (although never to the point where the reactor gains heat from the outside). The cooling values for those are -2 (fire) and -3 (lava) if you want them. I guess they might be useful in rare situations for creating an exactly temperature-stable reactor, so there you go.


    Alright, I see what it is. When the Reactor Heat is 0 to 2999, it takes 4 Uranium Cells, 40000 Pulses. As for external heating, lava's easy enough, simply assume that it's completely covering the reactor, like water would. But it's gonna be fun to figure out fire... simply because of how fire works - it can't be in every block surrounding the Reactor. The only question is how to figure out the maximum heating of the reactor...


    Concerning the plating: I think Alblaka stated in his guide that plating will distribute “fair heat” and save the amount which they are not able to dissipate for the next reactor pulse.


    ...hm. I think that may have been info that I missed. I just changed the simulation so that it adds any heat it has itself to any heat it's supposed to distribute, and, if it doesn't divide out evenly, it'll keep any of the remainder on itself. In terms of simulating the plating, as well, every time the simulation tells the plating to pulse, it'll only subtract 0.1 heat from itself (and add 0.1 to heatdisperse). When the Uranium Cell distributes its heat, if it recognizes it's sending the heat to a Reactor Plating, it'll instead tell it to spread it instead of just dropping the heat on. It has a nice side effect of not forcing the plating to spread if heat back to the first plating unless another Uranium Cell tells it to (simulating normal behavior anyways).

  • [quote='Drashian',index.php?page=Thread&postID=3773#post3773]Exactly, on 3000 heat it should take 2 fresh uranium cells to enrich a single depleted one. For outward cooling, anything that's not water or air provides precisely zilch. Nearby fire and lava are particularly bad, they actually reduce outward cooling (although never to the point where the reactor gains heat from the outside). The cooling values for those are -2 (fire) and -3 (lava) if you want them. I guess they might be useful in rare situations for creating an exactly temperature-stable reactor, so there you go.


    Alright, I see what it is. When the Reactor Heat is 0 to 2999, it takes 4 Uranium Cells, 40000 Pulses. As for external heating, lava's easy enough, simply assume that it's completely covering the reactor, like water would. But it's gonna be fun to figure out fire... simply because of how fire works - it can't be in every block surrounding the Reactor. The only question is how to figure out the maximum heating of the reactor...


    Im not actually sure that is the case btw. The equation might actually instead be this.


    40,000/2^(heat/3,000)


    meaning it is a smooth slope, rather than a staircase, if you know what I mean. I don't actually know either way, but Alblaka should be able to tell us.

  • Im not actually sure that is the case btw. The equation might actually instead be this.


    40,000/2^(heat/3,000)


    meaning it is a smooth slope, rather than a staircase, if you know what I mean. I don't actually know either way, but Alblaka should be able to tell us.


    It's that word "might" that concerns me, though. We aren't exactly sure if your formula is the true one, so I'm sticking to the "staircase" ramping.


    Now then, that aside... development of the simulator is nearing completion. All that's really left is output and design saving/loading.


    For the output...

    Hopefully, by the end, I can get it to spit out a large amount of the vitals of the reactor design - efficiency, heat generated and dissipated, energy generated, destroyed items, whether or not any of the Depleted Isotope Cells were refined enough within a single cycle, and probably most importantly, if the reactor itself would be destroyed with such a layout.


    I'm dropping whether or not the reactor is destroyed - such a thing would be obvious anyways if it's classified as a Mark III or higher. Speaking of...

    how about also code some pre-made designs in, and give what class the reactor is. that will be great.


    While I'm not going to code in pre-made designs (I'm sure people would be able to come up with and share design files anyways) I'm going to code in the Mark rating of the reactor design. It's also going to add the "Hungry," "-SUC" and "Breeder" modifiers if they apply - "Breeder" is applied only if it actually produces any Re-Enriched Cells.


    In any case, here's what I have for the output so far...


    Anything else I should be adding?

  • It's that word "might" that concerns me, though. We aren't exactly sure if your formula is the true one, so I'm sticking to the "staircase" ramping.


    Indeed. I would request that you simply leave the flexibility to change the method to generate the multiplier, and Ofc us a Floating point variable, just so you can change it later if needed.

  • Would it be possible to output heat generation realtime, i.e. as soon as you insert heating elements? That would make it able to judge on the fly the amount of heat generated, and thus adjust the amount of coolant cells in the design.

  • Indeed. I would request that you simply leave the flexibility to change the method to generate the multiplier, and Ofc us a Floating point variable, just so you can change it later if needed.

    ...alright. I'll add in the option to toggle between the two methods in the Menu.


    Would it be possible to output heat generation realtime, i.e. as soon as you insert heating elements? That would make it able to judge on the fly the amount of heat generated, and thus adjust the amount of coolant cells in the design.

    The whole purpose of the simulator is to determine the results of a full cycle quickly. As well, the different Class rankings are based upon if they last a certain amount of time without detonating or interaction. I'm also assuming the player is using Redstone to keep the nuke cells off until it's fully prepped.