Improve persistence and reactor dynamics
This commit is contained in:
26
tests/test_neutronics.py
Normal file
26
tests/test_neutronics.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from reactor_sim.neutronics import NeutronDynamics
|
||||
from reactor_sim.state import CoreState
|
||||
|
||||
|
||||
def _core_state(
|
||||
temperature: float = 950.0,
|
||||
flux: float = 2e7,
|
||||
burnup: float = 0.01,
|
||||
power: float = 500.0,
|
||||
) -> CoreState:
|
||||
return CoreState(
|
||||
fuel_temperature=temperature,
|
||||
neutron_flux=flux,
|
||||
reactivity_margin=0.0,
|
||||
power_output_mw=power,
|
||||
burnup=burnup,
|
||||
)
|
||||
|
||||
|
||||
def test_reactivity_increases_with_rod_withdrawal():
|
||||
dynamics = NeutronDynamics()
|
||||
state = _core_state()
|
||||
rho_full_out = dynamics.reactivity(state, control_fraction=0.0)
|
||||
rho_half = dynamics.reactivity(state, control_fraction=0.5)
|
||||
assert rho_full_out > 0.0
|
||||
assert rho_full_out > rho_half
|
||||
Reference in New Issue
Block a user