Skip to content

Commit

Permalink
more changes on generic heat source
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rieck committed Oct 18, 2024
1 parent 940fd04 commit 95007a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
19 changes: 0 additions & 19 deletions hisim/components/generic_heat_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,6 @@ def get_default_config_heating(
)
return config

@classmethod
def get_default_config_waterheating_with_district_heating(
cls,
building_name: str = "BUI1",
) -> "HeatSourceConfig":
"""Returns default configuration of a Heat Source used for water heating (DHW)."""
config = HeatSourceConfig(
building_name=building_name,
name="DHWHeatSource",
source_weight=1,
fuel=lt.LoadTypes.DISTRICTHEATING,
power_th=3000.0,
water_vs_heating=lt.InandOutputType.WATER_HEATING,
efficiency=1.0,
co2_footprint=0,
cost=0,
lifetime=1
)
return config

@classmethod
def get_default_config_waterheating(
Expand Down
7 changes: 6 additions & 1 deletion hisim/modular_household/component_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,12 @@ def configure_water_heating(
lt.HeatingSystems.OIL_HEATING: lt.LoadTypes.OIL,
lt.HeatingSystems.DISTRICT_HEATING: lt.LoadTypes.DISTRICTHEATING,
}
heater_config = generic_heat_source.HeatSourceConfig.get_default_config_waterheating_with_district_heating()
heater_config = generic_heat_source.HeatSourceConfig.get_default_config_waterheating(
heating_system=water_heating_system_installed,
max_warm_water_demand_in_liter=my_occupancy.max_hot_water_demand,
scaling_factor_according_to_number_of_apartments=my_occupancy.scaling_factor_according_to_number_of_apartments,
seconds_per_timestep=my_simulation_parameters.seconds_per_timestep,
)
heater_config.fuel = fuel_translator[water_heating_system_installed]
heater_config.efficiency = get_heating_system_efficiency(
heating_system_installed=water_heating_system_installed, water_vs_heating=lt.InandOutputType.HEATING
Expand Down
7 changes: 5 additions & 2 deletions tests/test_generic_dhw_boiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ def test_simple_bucket_boiler_state():
generic_hot_water_storage_modular.StorageConfig.get_default_config_for_boiler()
)
boiler_config.volume = 200
heater_config = (
generic_heat_source.HeatSourceConfig.get_default_config_waterheating_with_district_heating()
heater_config = generic_heat_source.HeatSourceConfig.get_default_config_waterheating(
heating_system=lt.HeatingSystems.DISTRICT_HEATING,
max_warm_water_demand_in_liter=200,
scaling_factor_according_to_number_of_apartments=1,
seconds_per_timestep=seconds_per_timestep,
)

# definition of outputs
Expand Down

0 comments on commit 95007a7

Please sign in to comment.