Skip to content

Commit

Permalink
add dhw district heating
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rieck committed Nov 15, 2024
1 parent 8542bbb commit 4e7f5ba
Show file tree
Hide file tree
Showing 5 changed files with 1,023 additions and 151 deletions.
41 changes: 4 additions & 37 deletions hisim/components/generic_boiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ class GenericBoilerController(Component):
"""

# Inputs
WaterTemperatureInputFromHeatWaterStorage = "WaterTemperatureInputFromHeatWaterStorage"
WaterTemperatureInputFromWaterStorage = "WaterTemperatureInputFromWaterStorage"

# set heating flow temperature
HeatingFlowTemperatureFromHeatDistributionSystem = "HeatingFlowTemperatureFromHeatDistributionSystem"
Expand Down Expand Up @@ -662,7 +662,7 @@ def __init__(
# input channel
self.water_temperature_input_channel: ComponentInput = self.add_input(
self.component_name,
self.WaterTemperatureInputFromHeatWaterStorage,
self.WaterTemperatureInputFromWaterStorage,
lt.LoadTypes.TEMPERATURE,
lt.Units.CELSIUS,
True,
Expand Down Expand Up @@ -701,7 +701,7 @@ def get_default_connections_from_simple_hot_water_storage(self,):
storage_classname = SimpleHotWaterStorage.get_classname()
connections.append(
ComponentConnection(
GenericBoilerController.WaterTemperatureInputFromHeatWaterStorage,
GenericBoilerController.WaterTemperatureInputFromWaterStorage,
storage_classname,
SimpleHotWaterStorage.WaterTemperatureToHeatGenerator,
)
Expand Down Expand Up @@ -1367,7 +1367,7 @@ def get_default_connections_from_simple_hot_water_storage(self,):
storage_classname = SimpleDHWStorage.get_classname()
connections.append(
ComponentConnection(
GenericBoilerControllerForDHW.WaterTemperatureInputFromHeatWaterStorage,
GenericBoilerControllerForDHW.WaterTemperatureInputFromWaterStorage,
storage_classname,
SimpleDHWStorage.WaterTemperatureToHeatGenerator,
)
Expand Down Expand Up @@ -1444,36 +1444,3 @@ def get_controller_state(
set_heating_flow_temperature_in_celsius=self.warm_water_temperature_aim_in_celsius,
)
return

# def modulate_power(self, water_temperature_input_in_celsius: float,) -> float:
# """Modulate linear between minimial_thermal_power and max_thermal_power of Generic Boiler.

# only used if generic_boilermode is "heating".
# """

# minimal_percentage = self.config.minimal_thermal_power_in_watt / self.config.maximal_thermal_power_in_watt

# if (
# water_temperature_input_in_celsius
# < self.warm_water_temperature_aim_in_celsius - self.set_temperature_difference_for_full_power
# ):
# percentage = 1.0
# return percentage
# if water_temperature_input_in_celsius < self.warm_water_temperature_aim_in_celsius:
# temperature_difference_in_celsius = (
# self.warm_water_temperature_aim_in_celsius - water_temperature_input_in_celsius
# )
# linear_fit = 1 - (
# (self.set_temperature_difference_for_full_power - temperature_difference_in_celsius)
# / self.set_temperature_difference_for_full_power
# )

# percentage = max(minimal_percentage, linear_fit)

# return percentage
# if water_temperature_input_in_celsius <= self.warm_water_temperature_aim_in_celsius:
# percentage = minimal_percentage
# return percentage

# percentage = 0.0
# return percentage
Loading

0 comments on commit 4e7f5ba

Please sign in to comment.