Skip to content

Commit

Permalink
Predheat typo for gas mode
Browse files Browse the repository at this point in the history
  • Loading branch information
springfall2008 authored Dec 14, 2024
1 parent f96812f commit 1ec2bea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/predbat/predheat.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def fill_table_gaps(self, table):
for key in range(min_key, max_key + 1):
if key not in table:
next_value = last_value
for next_key in range(key + 1, max_key + 1):
for next_key in range (key + 1, max_key + 1):
if next_key in table:
next_value = table[next_key]
break
Expand Down Expand Up @@ -363,12 +363,13 @@ def run_simulation(self, volume_temp, heating_active, save="best", last_predict_

# self.log("Minute {} flow {} volume {} diff {} power {} kw".format(minute, flow_temp, volume_temp, flow_temp_diff, heat_power_in / 1000.0))


if self.mode == "gas":
# Gas boiler flow temperature adjustment in efficiency based on flow temp
inlet_temp = int(volume_temp + 0.5)
inlet_temp = min(max(inlet_temp, 0), 100)
condensing = self.gas_efficiency.get(inlet_temp, 0.80)
heat_power_in /= condensing
heat_power_in = heat_power_out / (condensing * self.heat_cop)
else:
# Heat pump efficiency based on outdoor temp
out_temp = int(external_temp + 0.5)
Expand Down

0 comments on commit 1ec2bea

Please sign in to comment.