Fusion Reactor Mechanic Documentation and Questions
KAfable opened this issue · 5 comments
Hey,
Making this issue because I ran into some issues figuring out cause/effect relationship. Also I did some googling, and even on YouTube, I couldn't seem to find information on how construction of fusion reactors affects their overall output. Would you mind please verifying/editing if any of these cause/effect relationships are correct? I honestly would do it myself but I don't know java very well, if you could point my towards the classes that handle the math, I could try looking it up as well.
For sake of simplicity, a T1DT reactor is going to be shorthand for Toroid Size 1 fusion reactor using Deuterium and Tritium. My goal is to figure out which variables are used in the calculation of other variables, and which are only correlated (eg. does temperature cause more power/efficiency, so power / efficiency are positively correlated, or does it affect efficiency, and then a second calculation determines power?).
The modpack I used for testing and that prompted these questions is Enigmatica 2 Expert.
The pack configs for NuclearCraft here, the only major change I see is that max toroid size is now 48 (which is a bit mad, considering 24 is already large enough).
https://hastebin.com/nomubilaco.bash
Toroid Size
Cause: The radius of your fusion reactor (with the smallest being 1 with no Fusion Connectors)
Effect: ??
- From testing it seems to affect fuel consumption rate, but I don't know the mathematical relationship, or even if it's related to toroid size and not something else like # of electromagnets (which technically should be the same since fusion reactors are a square).
- It also seems to affect total power output, but this is also heavily dependent on the fuel combination used, as well as the temperature? Not entirely sure, see more on power below.
Temperature
Cause: If the reactor is receiving power (seems to consume power at the max rate of 8.192M rf/t) until it heats up to 8k (do all fuel combinations reactions begin at 8000kK?)
Effect: Seems like the higher the temperature, the more power was being produced. However
I had a T1DT reactor peak power production at around 820kK, and then interestingly enough the power production started to decrease beyond that? I couldn't find any documentation on the math behind that on YT/reddit at least, efficiency was still at 99%. The T5DT reactor seems to have maxed out at 840kK before it started seeing diminishing returns, but it's diminishing returns also came slower, so I'm assuming once again Toroid size plays into this.
Another quirk I noticed is that efficiency peaks at around 8000kK:
and then definitely start's getting into increasing loss of efficiency at the temperature rises.
Efficiency
Cause: Running the reactor? Maybe directly related to temperature?
Effect: Seems related to the rate at which power increases, also it seems a bit unintuitive as 100% efficiency is a bad thing or a good thing? I can't actually tell, but the introduction video to the fusion reactor demonstrates a self-regulating redstone setup using comparators. I'm guessing this implies that the self-regulation for temperatures is important, but you want to maintain a high efficiency? Or is it the other way around?
Fuel Usage
Cause: There's a baseline duration number of certain fuel combinations available in the configs, however, it seems like Efficiency or temperature doesn't seem to affect fuel usage, only toroid size, as a T1DT was more than fine at 5 mb/t (as measured by Draconic Evolution Fluid gates) from 0% efficiency, 8kK up to 99% efficiency and 820kK.
Power
Cause: The big one, so far it seems related to fuel combination (some have bigger bursts, but use more fuel, etc.), toroid size (larger is better), and temperature (good to a certain degree, then has negative effects). Still couldn't find a definitive relationship, but a T1DT at 90% efficiency/ (using comparator regulation) produces about 576k, whereas a T5DT at 90% efficiency makes about 2880k (1800 multiplier from base). So from this math it seems like each additional Toroid adds about a 360x multiplier to the output for DT, I have not tested this yet with other fuel combinations.
So hopefully my questions were clear, let me know if you have any questions. To be honest, while it would be nice to have the strict calculations, if that's too much work, a simple explanation such as "power is the hypotenuse of x/z", or "temperature and efficiency is an exponential relationship", etc. would also be fine, I can undertand if you want to maintain some transparency to encourage user testing, but there are some things I'm just stumped on, and does seem to be in direct contrasting to the great documentation in fission reactors.
More questions will be added later for cooling, and using the supercooling electromagnets whenever I get around to make a build with them.
Thanks.
Also it seems like the hard cap that a fusion reactor can produce is 8.192M rf/t, which is a HUGE number (and I'm not opposed to hard max's, otherwise you end up with Environmental Tech levels of power creep), but it seems mechanically weird that this is throttled only because that is the max buffer the reactor can store (and therefore push out).
Sorry, said I'd get this answered yesterday, but alas, here we are:
First of all, there are a few config options other than the max toroid size that have been tweaked - the easiest way to see all of the tweaks that the pack has is to look at the configs in-game, accessible from the mod page. In particular, the power production and fuel use rates of the fusion reactor have been changed. The reason you're getting that artificial throttling is because the power config has been increased - I'll add some extra code that sets the capacity to, say, twice the max generation rate for whatever size is being used.
All of the mathematics of the reactor is done in the tile entity class - it's rather simple, but will change quite a bit when 1.13 comes around (more realistic efficiency curve, better cooling mechanics etc.).
The power produced per tick is set here - it is equal to the base power of the fuel combo, multiplied by the toroid size, power config and efficiency.
The efficiency is calculated here - it is basically a function that peaks at 100 at a heat proportional to the combo's 'heat variable', and falls away either side (this constant of proportionality happens to be 1218.76 H/kK). It is approximately a Maxwell-Boltzmann distribution. In 1.13, I will just use this distribution, as it is both simpler and more physically realistic. The fact that the current function is close is really just a coincidence :P
The heating rate while running is set here - it is proportional to the heat production config value, and is higher/lower for lower/higher efficiencies.
The fuel rate, as you say, is just a constant, proportional to the combo fuel rate, general fuel consumption rate config value and the toroid size - I guess it is set here.
If you want to max out the efficiency, the best option is active cooling using active coolers on the diagonals of the fusion ring (i.e. each adjacent to two e-magnets). The amount of cooling done by each cooler is proportional to the coolant's cooling rate config and the max active cooler fluid rate, and is also inversely proportional to the toroid size.
Hopefully that's a start :)
So, having watched you build a toroid size 5 D-T reactor, let me use your reactor and configs as an example:
Each completed process uses 1000 mB of tritium - the process time is from the configs - it is equal to 156.3×1.5 = 234.45. Each tick, the process progresses by 5 (the toroid size), so each process will take 234.45/5 = 46.89 ticks. So your reactor will use tritium at a rate of 21.33 mB/t.
Now the power: let's just take the reactor to be at 90% efficiency. The power is then 4×90×1600×5 = 2880000 RF/t = 2.88 MRF/t.
Finally, the max efficiency will be at 1218.76×670 = 816569 kK. The full efficiency curve looks like this (efficiency as a function of heat in MK). In 1.13, when the M-B distribution is used, it would look like this.
10/10 response, bookmarked, saved, woodreadtograndchildren, you know it's good when someone uses wolfram alpha in their response on a modded mc github.