feat: link turbine output to transferred heat

This commit is contained in:
Andrii Prokhorov
2025-11-21 18:15:11 +02:00
parent 4873777ba8
commit 5c0ad3fb72
4 changed files with 23 additions and 12 deletions

View File

@@ -5,6 +5,8 @@ from __future__ import annotations
from dataclasses import dataclass
import logging
import math
from . import constants
from .state import CoolantLoopState, CoreState
@@ -14,8 +16,9 @@ LOGGER = logging.getLogger(__name__)
def heat_transfer(primary: CoolantLoopState, secondary: CoolantLoopState, core_power_mw: float) -> float:
"""Return MW transferred to the secondary loop."""
delta_t = max(0.0, primary.temperature_out - secondary.temperature_in)
conductance = 0.05 # steam generator effectiveness
transferred = min(core_power_mw, conductance * delta_t)
conductance = 0.15 # steam generator effectiveness
efficiency = 1.0 - math.exp(-conductance * delta_t)
transferred = min(core_power_mw, core_power_mw * efficiency)
LOGGER.debug("Heat transfer %.2f MW with ΔT=%.1fK", transferred, delta_t)
return transferred