Skip to content

Commit

Permalink
feat: rebalance a little
Browse files Browse the repository at this point in the history
  • Loading branch information
bruberu committed Jul 8, 2024
1 parent 3c4c888 commit 41cc55f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
19 changes: 12 additions & 7 deletions src/main/java/gregtech/api/nuclear/fission/FissionReactor.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public class FissionReactor {
// Minecraft days, and yes, I am using this for plutonium too
public static double poisonFraction = 0.063; // Xenon-135 yield from fission
public static double crossSectionRatio = 4; // The ratio between the cross section for typical fuels and xenon-135;
public static double weightedGenerationTimeDelayed = 1.5; // The mean generation time in seconds, adjusted for
public static double weightedGenerationTimeDelayed = 2; // The mean generation time in seconds, adjusted for
// simple Minecraft players

// very much changed here for balance purposes
Expand Down Expand Up @@ -344,8 +344,8 @@ public void computeGeometry() {

double kSlow = avgLowEnergyFissionFactor / avgLowEnergyCaptureFactor * avgGeometricFactorSlowNeutrons;
double kFast = avgHighEnergyFissionFactor / avgHighEnergyCaptureFactor * avgGeometricFactorFastNeutrons;

k = (kSlow + kFast) * reactorDepth / (1. + reactorDepth);

double depthDiameterDifference = 0.5 * (reactorDepth - reactorRadius * 2) / reactorRadius;
double sigmoid = 1 / (1 + Math.exp(-depthDiameterDifference));
double fuelRodFactor = sigmoid * Math.pow(avgFuelRodDistance, -2) +
Expand Down Expand Up @@ -465,7 +465,7 @@ public double makeCoolantFlow(int flowRate) {
double idealHeatFlux = heatFluxPerAreaAndTemp * 4 * reactorDepth *
(temperature - coolant.getFluid().getTemperature());

idealHeatFlux = Math.min(idealHeatFlux, realMaxPower() / (1e6 * coolantChannels.size()));
idealHeatFlux = Math.min(idealHeatFlux, realMaxPower() * 1e6 / coolantChannels.size());

double idealFluidUsed = idealHeatFlux / heatRemovedPerLiter;

Expand Down Expand Up @@ -567,7 +567,7 @@ public void updatePower() {

double inverseReactorPeriod = (this.kEff - 1) / weightedGenerationTimeDelayed;

this.power += getDecayHeat();
this.power += 0.00001; // Let it kickstart itself
this.power *= Math.exp(inverseReactorPeriod);

this.fuelDepletion += this.power;
Expand Down Expand Up @@ -647,13 +647,18 @@ public void regulateControlRods() {
this.controlRodInsertion = Math.min(1, this.controlRodInsertion);
this.controlRodFactor = ControlRod.controlRodFactor(effectiveControlRods, this.controlRodInsertion);
}
if (load < 9. / 10) {
if (kEff < 1) {
if (load > 3. / 10) {
if (kEff > 1.005) {
this.controlRodInsertion += 2f / 255;
this.controlRodInsertion = Math.min(1, this.controlRodInsertion);
this.controlRodFactor = ControlRod.controlRodFactor(effectiveControlRods, this.controlRodInsertion);
} else if (kEff < 1.005) {
this.controlRodInsertion -= 1f / 255;
this.controlRodInsertion = Math.max(0, this.controlRodInsertion);
this.controlRodFactor = ControlRod.controlRodFactor(effectiveControlRods, this.controlRodInsertion);
}
} else {
}
if (load > 9. / 10) {
if (kEff > 1) {
this.controlRodInsertion += 1f / 255;
this.controlRodInsertion = Math.min(1, this.controlRodInsertion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ public static void register() {
.color(0x232323).iconSet(METALLIC)
.flags(DISABLE_DECOMPOSITION)
.components(HighEnrichedUraniumDioxide, 1, DepletedUraniumDioxide, 19)
.fissionFuelProperties(1000, 750, 55., 1., 2500., 0.)
.fissionFuelProperties(1500, 750, 55., 1., 2500., 0.)
.build()
.setFormula("UO2", true);

Expand All @@ -518,7 +518,7 @@ public static void register() {
.color(0x242826).iconSet(METALLIC)
.flags(DISABLE_DECOMPOSITION)
.components(HighEnrichedUraniumDioxide, 1, DepletedUraniumDioxide, 4)
.fissionFuelProperties(2000, 600, 40., 1., 3000., 0.)
.fissionFuelProperties(1800, 600, 40., 1., 3000., 0.)
.build()
.setFormula("UO2", true);

Expand All @@ -527,7 +527,7 @@ public static void register() {
.color(0x62C032).iconSet(METALLIC)
.flags(DISABLE_DECOMPOSITION)
.components(FissilePlutoniumDioxide, 1, Uraninite, 19)
.fissionFuelProperties(2000, 1000, 50., 10., 4000., 10.)
.fissionFuelProperties(1600, 1000, 50., 10., 4000., 10.)
.build()
.setFormula("(U,Pu)O2", true);

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/gregtech/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ gregtech.multiblock.primitive_water_pump.extra1=Biome Coefficient:/n Ocean, Riv
gregtech.multiblock.primitive_water_pump.extra2=Hatch Multipliers:/n Pump Hatch: 1x/n ULV Output Hatch: 2x/n LV Output Hatch: 4x/n/nWhile raining in the Pump's Biome, the total water production will be increased by 50%%.
gregtech.multiblock.processing_array.description=The Processing Array combines up to 16 single block machine(s) in a single multiblock, effectively easing automation.
gregtech.multiblock.advanced_processing_array.description=The Processing Array combines up to 64 single block machine(s) in a single multiblock, effectively easing automation.
gregtech.multiblock.fission_reactor.description=Fission Reactors use fuel rods placed together to create a sustained chain of fission reactions. These reactions generate heat (power) that may be soaked up by coolants, which can then be used inside turbines. For example, using distilled water as a coolant, each channel soaks up about 2 EU/t of heat per degree Kelvin and block of internal reactor depth. The reactor can take on a variety of shapes. Its cross sections can be seen in JEI, and the reactor may extend 7 blocks up and down from the controller. Reactors can import and export fuel rods/coolants through special pairs of hatches on the top and bottom layers, respectively. Control rod hatches may also be placed on the top layer, and they give the user more control over the reactor. Inserting them more decreases the neutron multiplication rate "effective K" (shown as k_eff), a factor by which the power is continually multiplied by until it reaches the approximate max power. If k_eff is over 1, the reactor's power will eventually increase; if it's below 1, it will eventually decrease; and if it's around 1, it will stay stable. In fact, the reactor automatically shifts this over time, attempting to reach a stable equilibrium. This may be overridden manually, which you may want to do if the k_eff is over 1.05 to avoid it spiralling out of control and melting down. K_eff is also affected by neutron poisons inside the reactor, which will increase in concentration over time as the reactor runs (and still remain in a fairly high concentration for a while after). One further way the reactor may be controlled is by choosing a reactor configuration with a lower relative max power output (usually taller ones), as k_eff will tend towards one at that value. Control rods, fuel hatches, and coolant hatches all require special tubing beneath them to form correctly; check their tooltips to see which blocks to use. Once a reactor's hatches are filled, the reactor can be locked to begin operation, meaning that the types of items/fluids in the hatches can not be changed while the reactor operates. The placement of the fuel rods and coolant channels within the reactor is quite important. Neutrons produced by decaying atoms in the fuel rods can cause fissions in other fuel rods; therefore, reactors work far more effectively with more than one fuel rod channel. The chance that a neutron interacts with a fuel rod is increased if it is slowed down by a moderator, such as distilled water inside a coolant channel. As such, it can be helpful to put coolant channels between fuel rods to increase k_eff (and control rods do much the opposite). Fuel rods also decay at a rate proportional to the power; a 600 MJ fuel rod will deplete after 600 seconds of 1 MW, or alternatively 1 second of 600 MW. Note: if this multiblock receives maintenance problems, the coolant systems will occasionally seize up and stop working. However, coolant channels only operate when the hot coolant fluid is actually hotter than the reactor itself.
gregtech.multiblock.fission_reactor.description=Fission Reactors use fuel rods placed together to create a sustained chain of fission reactions. These reactions generate heat (power) that may be soaked up by coolants, which can then be used inside turbines. For example, using distilled water as a coolant, each channel soaks up about 2 EU/t of heat per degree Kelvin and block of internal reactor depth. The reactor can take on a variety of shapes. Its cross sections can be seen in JEI, and the reactor may extend 7 blocks up and down from the controller. Reactors can import and export fuel rods/coolants through special pairs of hatches on the top and bottom layers, respectively. Control rod hatches may also be placed on the top layer, and they give the user more control over the reactor. Inserting them more decreases the neutron multiplication rate "effective K" (shown as k_eff), a factor by which the power is continually multiplied by until it reaches the approximate max power. If k_eff is over 1, the reactor's power will eventually increase; if it's below 1, it will eventually decrease; and if it's around 1, it will stay stable. In fact, the reactor automatically shifts this over time, attempting to reach a stable equilibrium. This may be overridden manually, which you may want to do if the k_eff is over 1.05 to avoid it spiralling out of control and melting down. K_eff is also affected by neutron poisons inside the reactor, which will increase in concentration over time as the reactor runs (and still remain in a fairly high concentration for a while after). Control rods, fuel hatches, and coolant hatches all require special tubing beneath them to form correctly; check their tooltips to see which blocks to use. Once a reactor's hatches are filled, the reactor can be locked to begin operation, meaning that the types of items/fluids in the hatches can not be changed while the reactor operates. The placement of the fuel rods and coolant channels within the reactor is quite important. Neutrons produced by decaying atoms in the fuel rods can cause fissions in other fuel rods; therefore, reactors work far more effectively with more than one fuel rod channel. The chance that a neutron interacts with a fuel rod is increased if it is slowed down by a moderator, such as distilled water inside a coolant channel. As such, it can be helpful to put coolant channels between fuel rods to increase k_eff (and control rods do much the opposite). Fuel rods also decay at a rate proportional to the power; a 600 MJ fuel rod will deplete after 600 seconds of 1 MW, or alternatively 1 second of 600 MW. Note: if this multiblock receives maintenance problems, the coolant systems will occasionally seize up and stop working. However, coolant channels only operate when the hot coolant fluid is actually hotter than the reactor itself, and they can also only altogether export as much heat as the max power.
gregtech.multiblock.gas_centrifuge.description=The Gas Centrifuge can help in the purification process of isotopes, especially those of uranium. By repeatedly putting uranium hexafluoride into a gas centrifuge, one can obtain highly enriched uranium hexafluoride, which has a purity high enough to make nuclear fuels. Each block of length makes it perform one more recipe in parallel.
gregtech.multiblock.heat_exchanger.description=The Heat Exchanger can be used to take heat out from one fluid by either radiating it out into its surrounding environment or by transferring it into another fluid. This can be used with hot coolant from fission reactors to help generate steam for steam turbines.
gregtech.multiblock.spent_fuel_pool.description=The Spent Fuel Pool takes hot depleted fuel rods fresh from a fission reactor and cools them down to be processed later. It only forms when full blocks of water are placed on top; what did you expect? Each block of length makes it perform 32 more recipes in parallel.
Expand Down

0 comments on commit 41cc55f

Please sign in to comment.