From 70ac4ddbcf5738b5db17106ba94fa1a8d1959597 Mon Sep 17 00:00:00 2001 From: Songmin Yu Date: Wed, 21 Feb 2024 16:26:22 +0100 Subject: [PATCH] missing pv generation found in ref model --- models/operation/model_ref.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/models/operation/model_ref.py b/models/operation/model_ref.py index 96b3875..9e01b41 100644 --- a/models/operation/model_ref.py +++ b/models/operation/model_ref.py @@ -40,12 +40,9 @@ def run_heatpump_ref(self): def calc_space_heating_demand(self): hp_max = (self.SpaceHeating_MaxBoilerPower * self.SpaceHeatingHourlyCOP) - self.Q_HeatingElement_heat = np.where( - self.Q_RoomHeating - hp_max < 0, 0, self.Q_RoomHeating - hp_max - ) + self.Q_HeatingElement_heat = np.where(self.Q_RoomHeating - hp_max < 0, 0, self.Q_RoomHeating - hp_max) self.Q_HeatingTank_bypass = self.Q_RoomHeating - self.Q_HeatingElement_heat self.E_Heating_HP_out = self.Q_HeatingTank_bypass / self.SpaceHeatingHourlyCOP - self.Q_HeatingTank = np.zeros(self.Q_HeatingTank_bypass.shape) self.Q_HeatingTank_in = np.zeros(self.Q_HeatingTank_bypass.shape) self.Q_HeatingTank_out = np.zeros(self.Q_HeatingTank_bypass.shape) @@ -388,6 +385,7 @@ def calc_hot_water_tank_energy(self, grid_demand: np.array, pv_surplus: np.array f"indoor comfort level.") self.Q_DHWTank = (tank_temperature + 273.15) * tank_capacity + self.PV2Load += (pv_surplus - pv_surplus_after_hot_water_tank) else: grid_demand_after_hot_water_tank = grid_demand @@ -585,6 +583,7 @@ def calc_hot_water_tank_energy_fuel_boiler(self, gas_demand: np.array, pv_surplu self.Q_DHWTank = (tank_temperature + 273.15) * tank_capacity self.Q_DHWTank_bypass = self.Q_DHWTank_bypass.clip(min=0) # TODO: for some unknown reason, for some scenarios, this line is necessary + self.PV2Load += (pv_surplus - pv_surplus_after_hot_water_tank) else: gas_demand_after_hot_water_tank = gas_demand