diff --git a/exports/energy_systems/air_source_hp_export.py b/exports/energy_systems/air_source_hp_export.py index 4ab8ad1a..b8214b9d 100644 --- a/exports/energy_systems/air_source_hp_export.py +++ b/exports/energy_systems/air_source_hp_export.py @@ -48,4 +48,4 @@ class AirSourceHPExport(HeatPumpExport): :return: """ capacity_coeff, power_coeff = self._extract_model_coff(hp_model, data_type) - super(AirSourceHPExport, self)._run_insel(user_input, capacity_coeff, power_coeff) + super(AirSourceHPExport, self)._run_insel(user_input, capacity_coeff, power_coeff, 'air_source.insel') diff --git a/exports/energy_systems/heat_pump_export.py b/exports/energy_systems/heat_pump_export.py index 5037dd75..2b755d38 100644 --- a/exports/energy_systems/heat_pump_export.py +++ b/exports/energy_systems/heat_pump_export.py @@ -27,13 +27,14 @@ class HeatPumpExport: self._base_path = base_path self._output_path = output_path - def _run_insel(self, user_input: Dict, capacity_coeff: List, power_coeff: List) -> None: + def _run_insel(self, user_input: Dict, capacity_coeff: List, power_coeff: List, filename: str) -> None: """ Runs insel and write the necessary files :param user_input: a dictionary containing the user values necessary to run insel :param capacity_coeff: a list containing capacity coefficients :param power_coeff: a list containing power demand coefficients + :param filename: the name of the insel file to be created :return: """ self._input_data = user_input @@ -50,7 +51,7 @@ class HeatPumpExport: insel_template_content = insel_template_handler.read() insel_template = Template(insel_template_content).substitute(self._input_data) # create the insel file and write the template with substituted values into it - insel_file = (self._base_path / 'heat_pumps/dompark_heat_pump.insel') + insel_file = (self._base_path / 'heat_pumps' / filename) insel_file_handler = open(insel_file, "w") insel_file_handler.write(insel_template) # Now run insel @@ -156,6 +157,7 @@ class HeatPumpExport: constants_dict = yaml.load(file, Loader=yaml.FullLoader) for key, value in constants_dict.items(): self._input_data[key] = value + # compute maximum demand. TODO: This should come from catalog in the future max_demand = self._compute_max_demand() # compute TESCapacity diff --git a/exports/energy_systems/water_to_water_hp_export.py b/exports/energy_systems/water_to_water_hp_export.py index b7d0fc7f..7154c16f 100644 --- a/exports/energy_systems/water_to_water_hp_export.py +++ b/exports/energy_systems/water_to_water_hp_export.py @@ -47,7 +47,7 @@ class WaterToWaterHPExport(HeatPumpExport): :return: """ pow_demand_coeff, heat_output_coeff = self._extract_model_coff(hp_model, data_type) - super(WaterToWaterHPExport, self)._run_insel(user_input, pow_demand_coeff, heat_output_coeff) + super(WaterToWaterHPExport, self)._run_insel(user_input, pow_demand_coeff, heat_output_coeff, 'w2w.insel')