Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cop to bdew.py #16

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions demandlib/bdew.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,47 @@ def get_normalized_bdew_profile(self):
heat_profile_normalized = (kw * h * f * sf)

return heat_profile_normalized

def get_cop(self, heatpump_type = "Air", water_temp = 60):
""" Calculation of the coefficient of performance depending
on the outside temperature

Parameters
----------
heatpump_type: string
defines the technology used. Ground is more efficient than Air.
water_temp: int
temperature needed for the heating system

References
----------
.. [1]: 'https://www.researchgate.net/publication/255759857_A_review_of_domestic_heat_pumps'
Research paper about domestic heatpumps, containing the formulas used
"""

cop_lst = []

if heatpump_type == "Air":
for tmp in self.temperature:
cop = (6.81 - 0.121 * (water_temp - tmp)
+ 0.00063 * (water_temp - tmp)**2)
cop_lst.append(cop)

elif heatpump_type == "Ground":
for tmp in self.temperature:
cop = (8.77 - 0.15 * (water_temp - tmp)
+ 0.000734 * (water_temp - tmp)**2)
cop_lst.append(cop)

else:
# TODO Raise Error
print("Heatpump type is not defined")
return -9999

self.cop = pd.DataFrame({"cop" : cop_lst})
self.cop.set_index(self.df.index, inplace = True)


return self.cop