Fix coolant demand to increase when outlet overheats
This commit is contained in:
@@ -61,8 +61,9 @@ class ControlSystem:
|
||||
|
||||
def coolant_demand(self, primary: CoolantLoopState) -> float:
|
||||
desired_temp = 580.0
|
||||
# Increase demand when outlet is hotter than desired, reduce when cooler.
|
||||
error = (primary.temperature_out - desired_temp) / 100.0
|
||||
demand = clamp(0.8 - error, 0.0, 1.0)
|
||||
demand = clamp(0.8 + error, 0.0, 1.0)
|
||||
LOGGER.debug("Coolant demand %.2f for outlet %.1fK", demand, primary.temperature_out)
|
||||
return demand
|
||||
|
||||
|
||||
Reference in New Issue
Block a user