Back-propagate inlet temperatures from heat removal
This commit is contained in:
@@ -16,7 +16,7 @@ from .fuel import FuelAssembly, decay_heat_fraction
|
||||
from .generator import DieselGenerator, GeneratorState
|
||||
from .neutronics import NeutronDynamics
|
||||
from .state import CoolantLoopState, CoreState, PlantState, PumpState, TurbineState
|
||||
from .thermal import ThermalSolver, heat_transfer, saturation_pressure
|
||||
from .thermal import ThermalSolver, heat_transfer, saturation_pressure, temperature_rise
|
||||
from .turbine import SteamGenerator, Turbine
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
@@ -358,6 +358,16 @@ class Reactor:
|
||||
|
||||
state.time_elapsed += dt
|
||||
|
||||
# Update inlet temperatures based on heat removed/added for next iteration.
|
||||
primary_cooling = temperature_rise(transferred, state.primary_loop.mass_flow_rate)
|
||||
state.primary_loop.temperature_in = max(
|
||||
constants.ENVIRONMENT_TEMPERATURE, state.primary_loop.temperature_out - primary_cooling
|
||||
)
|
||||
secondary_cooling = max(0.0, state.secondary_loop.temperature_out - constants.ENVIRONMENT_TEMPERATURE - 40.0)
|
||||
state.secondary_loop.temperature_in = max(
|
||||
constants.ENVIRONMENT_TEMPERATURE, state.secondary_loop.temperature_out - max(20.0, secondary_cooling)
|
||||
)
|
||||
|
||||
LOGGER.info(
|
||||
(
|
||||
"t=%5.1fs rods=%.2f core_power=%.1fMW prompt=%.1fMW :: "
|
||||
|
||||
Reference in New Issue
Block a user