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

quality grade sould not be a fixed value #177

Open
ttjaden opened this issue Feb 11, 2021 · 4 comments
Open

quality grade sould not be a fixed value #177

ttjaden opened this issue Feb 11, 2021 · 4 comments

Comments

@ttjaden
Copy link

ttjaden commented Feb 11, 2021

Because of my switch from matlab to python I wanted to start to use oemof thermal for time series calculations with heat pumps. For the last years i used the open source toolbox Carnot 7.1 and its models. There, it is well documented that the quality grade is not a fixed value.

  • Therefore it should be considered to change your heat pump model to accept pandas.dataframes or lists or arrays as input for quality grade
  • And next: A small function would be great to calculate the quality grade from datasheet input as a lookup-table or function of t_low and t_high

Here an example how much the quality grade relies on the different temperatures

Calculating the quality factor for "Stiebel Eltron WPL 13" with matlab
With data from Datasheet and parameter identification (Schwarmberger), see Carnot 7.1
https://fh-aachen.sciebo.de/index.php/s/0hxub0iIJrui3ED?path=%2FCARNOT_documentation_7.1
see heat_pump.html
Parameter of th heat pump

load('Stiebel_WPL_13.mat')
K1=K_h(1);K2=K_h(2);K3=K_h(3);   % K1..K3 for thermal
K4=K_h(4);K5=K_h(5);K6=K_h(6);   % K4..K6 for electric

loop for calculating heat and electric power over different temperatures

T_low = [-20:1:30]; %°C
T_high = [20:1:70]; %°C
for i=1:length(T_low)
    for j=1:length(T_high)
P_th_WP(j,i)  = K1*T_low(i) + K2*T_high(j) + K3;
P_el_WP(j,i)  = K4*T_low(i) + K5*T_high(j) + K6;
    end
end

Heating power in W

contourf(T_low,T_high,P_th_WP);
xlabel('Source temperature in °C')
ylabel('outlet temperature in °C')
title('heating power in W')
colorbar

image

electric power in W

contourf(T_low,T_high,P_el_WP);
xlabel('Source temperature in °C')
ylabel('outlet temperature in °C')
title('eletric power in W')
colorbar

image

COP

cop=P_th_WP./P_el_WP;
contourf(T_low,T_high,cop);
xlabel('Source temperature in °C')
ylabel('outlet temperature in °C')
title('COP')
colorbar

image

Quality factor

for i=1:length(T_low)
    for j=1:length(T_high)
carnot(j,i) = (T_high(j)+273.15)/((T_high(j)+273.15)-(T_low(i)+273.15));
    end
end
eta = cop ./ carnot;
contourf(T_low,T_high,eta);
xlabel('Source temperature in °C')
ylabel('outlet temperature in °C')
title('Quality grade')
colorbar

image

Plot quality grade over temperature difference

for i=1:length(T_low)
    for j=1:length(T_high)
t_diff(j,i) = T_high(j)-T_low(i);
    end
end
for i=1:length(T_low)
scatter(t_diff(:,i),eta(:,i))
hold on
end
xlabel('temperature difference (high - low) in K')
ylabel('quality grade')
title('Quality grade')
grid on
xlim([0,100])
ylim([0,0.5])

image

The last image shows that it is note recommended to find a fit-function with x=temperature difference. It has to be a fit with x1=temp_low and x2=temp_high

@ttjaden
Copy link
Author

ttjaden commented Feb 11, 2021

For the WPL 13 a quadratic fit-function for the quality grade (eta) would be:

eta = a + b*x + c*y + d*x^2 + e*x*y + f*y^2
With

       x = T_low
       y = T_high

Coefficients

       a = 0.1238
       b = -0.01743
       c =  0.01183
       d =  0.0001943
       e =  0.0003445
       f =  -0.0001192

Goodness of fit:

  R-square: 0.997
  Adjusted R-square: 0.997
  RMSE: 0.004754

After a market review of different heat pumps you could identify a representative parameter-set

@jnnr
Copy link
Member

jnnr commented Feb 11, 2021

Thanks for opening that issue! Seems like there are some refinements that could be made for the heat pumps.

  1. Allowing to pass time series of quality grade: Should not be too big a thing. Requires a bit of rewriting of calc_cops, but certainly possible. I don't have much time for this, but maybe someone else or you?

  2. Adding a function to calculate quality grades from temperature: I am not too deep into the technical modeling of heat pumps at the moment, so I cannot give feedback on that. But if such a formula as you describe it makes sense, there will be a way to include it.

@ttjaden
Copy link
Author

ttjaden commented Apr 6, 2021

@jnnr I created a repository with "real world" heat pump data. I will take another week, but then there will be the formula to calculate heat pump efficiency and electrical & thermal power as time series. Required input will be the input/output temperature of the heatpump.
https://github.com/RE-Lab-Projects/hplib

@ttjaden
Copy link
Author

ttjaden commented Sep 27, 2021

Hi! Just wanted to let you know, that we finished the "hplib - heat pump library". Please have a look. I guess, it could be an easy solution for you to switch to this model.

https://github.com/RE-Lab-Projects/hplib/releases/tag/v1.1

Right now, we have to things on the "TODO" list:

  • make hplib pip installable
  • allow the simulate function to work with single values AND pd.series or arrays

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants