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

added get_cop to heat_pump.py #7

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
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
47 changes: 47 additions & 0 deletions oemof_heat_components/heat_pump/heat_pump.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
import pandas as pd

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

Parameters
----------
heatbuilding: object
HeatBuilding object from demandlib.bdew countaining the index
and outside temperature
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add:
Returns

"""

cop_lst = []

if heatpump_type == "Air":
for tmp in heatbuilding.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 heatbuilding.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 None

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


return heatbuilding.cop