oemof / oemof-thermal

Thermal energy components for the Open Energy Modeling Framework (oemof).
https://oemof.org
MIT License
28 stars 12 forks source link

quality grade sould not be a fixed value #177

Open ttjaden opened 3 years ago

ttjaden commented 3 years ago

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.

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 heatpump.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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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: