Skip to content

Commit

Permalink
missing pv generation found in ref model
Browse files Browse the repository at this point in the history
  • Loading branch information
SongminYu committed Feb 21, 2024
1 parent 8b08355 commit 70ac4dd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions models/operation/model_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 70ac4dd

Please sign in to comment.