Improve reactor controls, reactions, and maintenance UI
This commit is contained in:
@@ -25,6 +25,7 @@ class SteamGenerator:
|
||||
class Turbine:
|
||||
generator_efficiency: float = constants.GENERATOR_EFFICIENCY
|
||||
mechanical_efficiency: float = constants.STEAM_TURBINE_EFFICIENCY
|
||||
rated_output_mw: float = 400.0 # cap per unit electrical output
|
||||
|
||||
def step(
|
||||
self,
|
||||
@@ -37,6 +38,9 @@ class Turbine:
|
||||
available_power = max(steam_power_mw, (enthalpy * mass_flow / 1_000.0) / 1_000.0)
|
||||
shaft_power_mw = available_power * self.mechanical_efficiency
|
||||
electrical = shaft_power_mw * self.generator_efficiency
|
||||
if electrical > self.rated_output_mw:
|
||||
electrical = self.rated_output_mw
|
||||
shaft_power_mw = electrical / max(1e-6, self.generator_efficiency)
|
||||
condenser_temp = max(305.0, loop.temperature_in - 20.0)
|
||||
state.steam_enthalpy = enthalpy
|
||||
state.shaft_power_mw = shaft_power_mw
|
||||
|
||||
Reference in New Issue
Block a user