Skip to content

Commit

Permalink
applied spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursivePineapple committed Oct 15, 2024
1 parent bf0f7ea commit 6c39c63
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ public class Config {
public static double MOX_EU_COEFFICIENT = 4;
public static int REACTOR_EU_MULTIPLIER = 100;
public static int FLUID_NUKE_HU_MULTIPLIER = 2;
//1 HU converts this/160 mb of distilled water to this mb of steam
//ex: 600 HU/s converts 1200mb/s of distilled water to 192000mb/s of steam
//BWRs are limited by the size of the reactor output buffer and this value
//which currently puts maximum power at just over 600 HU/s
// 1 HU converts this/160 mb of distilled water to this mb of steam
// ex: 600 HU/s converts 1200mb/s of distilled water to 192000mb/s of steam
// BWRs are limited by the size of the reactor output buffer and this value
// which currently puts maximum power at just over 600 HU/s
public static int BWR_STEAM_PER_HU_MULTIPLIER = 320;
public static int COOLANT_SPECIFIC_HEAT = 1;
public static int NAQ_COOLANT_SPECIFIC_HEAT = 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ public static void registerCoolants() {
FluidRegistry.getFluid("ic2hotcoolant"),
Config.COOLANT_SPECIFIC_HEAT);

CoolantRegistry.registerCoolant(
DISTILLED_WATER,
FluidRegistry.getFluid("steam"), 1);
CoolantRegistry.registerCoolant(DISTILLED_WATER, FluidRegistry.getFluid("steam"), 1);

CoolantRegistry
.registerCoolant(PSEUDO_LIQUID_NAQUADAH, HOT_PSEUDO_LIQUID_NAQUADAH, Config.NAQ_COOLANT_SPECIFIC_HEAT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ public class TileReactorCore extends TileEntity

Coolant coolantCache;
FluidTank coolantTank = new FluidTank(10_000);
//change for testing distilled water->steam conversion
//since so much steam is produced per HU, you need a large output buffer to capture useful
//steam/s production
// change for testing distilled water->steam conversion
// since so much steam is produced per HU, you need a large output buffer to capture useful
// steam/s production
FluidTank hotCoolantTank = new FluidTank(200_000);

private ArrayList<IReactorBlock> reactorBlocks = new ArrayList<>();
Expand Down Expand Up @@ -1044,28 +1044,31 @@ public int addAirHeat(int airHeat) {
this.hotCoolantTank.getCapacity() - this.hotCoolantTank.getFluidAmount());

int consumedCoolant;
//BWR
if(this.coolantCache.cold.getName().equals("distilled_water")) {
// BWR
if (this.coolantCache.cold.getName()
.equals("distilled_water")) {
consumedCoolant = Math.min(
roundedHeat / (coolantCache.specificHeatCapacity),
Math.min(
this.coolantTank.getFluidAmount(),
(this.hotCoolantTank.getCapacity() - this.hotCoolantTank.getFluidAmount())/Config.BWR_STEAM_PER_HU_MULTIPLIER
));
(this.hotCoolantTank.getCapacity() - this.hotCoolantTank.getFluidAmount())
/ Config.BWR_STEAM_PER_HU_MULTIPLIER));
}
//conventional coolants
// conventional coolants
else {
consumedCoolant = Math.min(roundedHeat / coolantCache.specificHeatCapacity, heatableCoolant);
}
this.roundedHeat -= consumedCoolant * coolantCache.specificHeatCapacity;
this.addedHeat += consumedCoolant * coolantCache.specificHeatCapacity;

//for BWRs, convert distilled water to a configured amount of steam instead of the same quantity of hot coolant
if(this.coolantCache.cold.getName().equals("distilled_water")) {
// for BWRs, convert distilled water to a configured amount of steam instead of the same quantity of hot
// coolant
if (this.coolantCache.cold.getName()
.equals("distilled_water")) {
this.coolantTank.drain(consumedCoolant, true);
this.hotCoolantTank.fill(new FluidStack(coolantCache.hot, consumedCoolant * Config.BWR_STEAM_PER_HU_MULTIPLIER), true);
}
else {
this.hotCoolantTank
.fill(new FluidStack(coolantCache.hot, consumedCoolant * Config.BWR_STEAM_PER_HU_MULTIPLIER), true);
} else {
this.coolantTank.drain(consumedCoolant, true);
this.hotCoolantTank.fill(new FluidStack(coolantCache.hot, consumedCoolant), true);
}
Expand Down

0 comments on commit 6c39c63

Please sign in to comment.