diff --git a/hisim/components/generic_heat_source.py b/hisim/components/generic_heat_source.py index 8a09cb5d..75dcaeec 100644 --- a/hisim/components/generic_heat_source.py +++ b/hisim/components/generic_heat_source.py @@ -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( diff --git a/hisim/modular_household/component_connections.py b/hisim/modular_household/component_connections.py index de4f7113..a865dd2f 100644 --- a/hisim/modular_household/component_connections.py +++ b/hisim/modular_household/component_connections.py @@ -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 diff --git a/tests/test_generic_dhw_boiler.py b/tests/test_generic_dhw_boiler.py index f3000785..1f696cee 100644 --- a/tests/test_generic_dhw_boiler.py +++ b/tests/test_generic_dhw_boiler.py @@ -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