diff --git a/src/reactor_sim/constants.py b/src/reactor_sim/constants.py index 920d5ee..31b379c 100644 --- a/src/reactor_sim/constants.py +++ b/src/reactor_sim/constants.py @@ -11,7 +11,7 @@ COOLANT_DENSITY = 700.0 # kg/m^3 averaged between phases MAX_CORE_TEMPERATURE = 1_800.0 # K MAX_PRESSURE = 15.0 # MPa typical PWR primary loop limit CONTROL_ROD_SPEED = 0.03 # fraction insertion per second -CONTROL_ROD_WORTH = 0.03 # delta rho contribution when fully withdrawn +CONTROL_ROD_WORTH = 0.042 # delta rho contribution when fully withdrawn STEAM_TURBINE_EFFICIENCY = 0.34 GENERATOR_EFFICIENCY = 0.96 ENVIRONMENT_TEMPERATURE = 295.0 # K diff --git a/src/reactor_sim/neutronics.py b/src/reactor_sim/neutronics.py index 927344c..97b2556 100644 --- a/src/reactor_sim/neutronics.py +++ b/src/reactor_sim/neutronics.py @@ -15,7 +15,7 @@ LOGGER = logging.getLogger(__name__) def temperature_feedback(temp: float) -> float: """Negative coefficient: higher temperature lowers reactivity.""" reference = 900.0 - coefficient = -1.5e-5 + coefficient = -1.7e-5 return coefficient * (temp - reference) @@ -28,7 +28,7 @@ class NeutronDynamics: beta_effective: float = 0.0065 delayed_neutron_fraction: float = 0.0008 external_source_coupling: float = 1e-6 - shutdown_bias: float = -0.02 + shutdown_bias: float = -0.014 def reactivity(self, state: CoreState, control_fraction: float) -> float: rho = ( @@ -50,6 +50,7 @@ class NeutronDynamics: def step(self, state: CoreState, control_fraction: float, dt: float, external_source_rate: float = 0.0) -> None: rho = self.reactivity(state, control_fraction) + rho = min(rho, 0.02) shutdown = control_fraction >= 0.95 if shutdown: rho = min(rho, -0.04) diff --git a/tests/test_simulation.py b/tests/test_simulation.py index 2fca864..cc28d54 100644 --- a/tests/test_simulation.py +++ b/tests/test_simulation.py @@ -155,8 +155,26 @@ def test_full_rod_withdrawal_reaches_gigawatt_power(): reactor.primary_pump_active = True reactor.secondary_pump_active = True - for _ in range(60): + early_power = 0.0 + for step in range(60): + reactor.step(state, dt=1.0) + if step == 10: + early_power = state.core.power_output_mw + assert state.core.power_output_mw > max(2_000.0, early_power * 2) + assert state.core.fuel_temperature > 600.0 + + +def test_partially_inserted_rods_hold_near_three_gw(): + reactor = Reactor.default() + state = reactor.initial_state() + reactor.shutdown = False + reactor.control.manual_control = True + reactor.control.rod_fraction = 0.4 + reactor.primary_pump_active = True + reactor.secondary_pump_active = True + + for _ in range(120): reactor.step(state, dt=1.0) - assert state.core.power_output_mw > 2_000.0 - assert state.core.fuel_temperature > 400.0 + assert 2_000.0 < state.core.power_output_mw < 4_000.0 + assert 500.0 < state.core.fuel_temperature < 800.0