Heat Pump¶
-
class
pygld.
HeatPump
[source]¶ The
HeatPump
class holds all the properties and handles all the calculation and modelling related to a single heatpump coupled to a ground-loop heat exchanger system.An Example is available at the end of this section.
Model and Data¶
-
HeatPump.
hpdata
¶ Return the performance data of the heatpump stored in a dict.
-
HeatPump.
model
¶ Return the fabrication model of the heatpump.
-
HeatPump.
set_model
(value)¶ Set the fabrication model of the heatpump.
Set the fabrication model of the heatpump, either from an index or a str. If the index or the str is not a valid key of the heatpump models database, an error is raised. The list of heatpump models available in the databse can be obtained with the
get_avail_heatpump_models()
method.
Heat carrier fluid properties¶
-
HeatPump.
fluid
¶ Heat carrier fluid type.
Get or set the type of the heat carrier fluid used in the geothermal heat exchanger. By default, the heat carrier is set to pure water. The list of available heat carrier fluid types can be obtained with the
get_avail_fluid_types()
method. The heat carrier fluid is assumed to be pure water whenfr
is set to 0.see also
pygld.HeatCarrierFluid.fluid
andpygld.HeatCarrierFluid.set_fluid()
.
-
HeatPump.
fr
¶ Antifreeze volumetric fraction of the heat carrier fluid in m³/m³ (0 ≤ fr ≤ 1).
Get or set the antifreeze volumetric fraction of the heat carrier fluid. The value of fr must be between 0 and 1 and is assumed to be 0 when the
fluid
is set to ‘water’.see also
pygld.HeatCarrierFluid.fr
.
Heatpump independent properties¶
-
HeatPump.
qbat
¶ Building thermal load applied to the heatpump in kW (- for cooling, + for heating).
Get or set the portion of the building thermal load that is applied to the heatpump as a single value or a series of values. The lenght of the data series used to set the attribute must match exactly that of the
TinHP
, or an error will be raised when computing the dependent properties (ToutHP
,Tm
,COP
, andCAP
). Negative values are used to represent the cooling thermal loads of the building while positive values are used to represent the heating thermal loads.
-
HeatPump.
TinHP
¶ Temperature of the water entering the heatpump in °C.
Get or set the temperature of the water entering the heatpump as a single value or a series of values. A
ToutHP
,Tm
,COP
, andCAP
value is calculated for every value ofTinHP
. A numpy array will always be returned when gettingTinHP
, independently of the format used to set the attribute.
-
HeatPump.
Vf
¶ Volumetric flowrate of the heat carrier fluid in L/s.
Get or set the volumetric flowrate of the heat carrier fluid circulating through the heatpump as a single value or a series of values. The lenght of the data series used to set the attribute must match exactly that of the
TinHP
, or an error will be raised when computing the dependent properties (ToutHP
,Tm
,COP
, andCAP
).
Heatpump dependent properties¶
-
HeatPump.
Tm
¶ Mean temperature of the fluid circulating through the heatpump in °C.
Get the mean temperature of the fluid circulating through the heatpump as series of values stored in a numpy array of a length that match that of
TinHP
.The mean temperature of the fluid circulating through the heatpump (
Tm
) is calculated as follow:where is the index at which is computed, and are, respectively, the temperature of the fluid entering and leaving the heatpump in °C.
-
HeatPump.
ToutHP
¶ Temperature of the fluid leaving the heatpump in °C.
Get the temperature of the fluid leaving the heatpump as a series of values stored in a numpy array of a length that match that of
TinHP
.The temperature of the fluid leaving the heatpump (
ToutHP
) is calculated as follow:where is the index at which is computed, is the flowrate of the fluid in L/s, is the temperature of the fluid leaving the heatpump in °C, and are, respectively, the density in kg/m³ and the specific heat capacity in J/(kg·K) of the fluid at , and is the ground heat load in kW. The ground heat load () is calculated as:
where is the building thermal load in kW, and and are, respectively, the coefficient of performance of the heatpump computed for the cooling and heating mode.
-
HeatPump.
CAP
¶ Capacity of the heatpump in kW.
Get the capacity of the heatpump as series of values stored in a numpy array of a length that match that of
TinHP
. The capacities are calculated either for the cooling or heating mode according to the sign of the values set forqbat
.See the
COP
documentation for more information on how CAP is calculated.
-
HeatPump.
COP
¶ Coefficient of performance of the heatpump.
Get the coefficient of performance of the heatpump as series of values stored in a numpy array of a length that match that of
TinHP
. At each index, the coefficients are calculated either for the cooling or heating mode according to the sign ofqbat
.The
COP
andCAP
are calculated with a second order polynomial equation-fit model in two variables of the form :where are the coefficients, is the temperature of the fluid entering the heatpump, is the flowrate and is the dependent variable that we want to model. Four equations are thus needed to represent the coefficient of performance () and capacity () of the heatpump in cooling and heating mode. The coefficients are determined by least-squares optimization using the performance data provided by the manufacturer of the heatpump
Utilities¶
-
HeatPump.
in_table
(varname, TinHP, Vf)¶ Return whether the (TinHP, Vf) pair of values is inside or outside the performance data table of the heatpump for the specified varname. COP or CAP values evaluated outside the data table (extrapolation) must be used with care.
-
HeatPump.
get_flowrange
()¶ Return the minimum and maximum operational flowrate of the heatpump in L/s.
-
HeatPump.
get_avail_fluid_types
()¶ Return a list of all available heat carrier fluid types.
-
HeatPump.
get_avail_heatpump_models
()¶ Return a list of all available heatpump models in the database.
-
HeatPump.
print_avail_heatpump_models
()¶ Print the list of all available heatpump models in the database.
-
HeatPump.
plot_heatpump_model_goodness
()¶ Produce a graph that shows the goodness of fit of the equation-fit models used to evaluate the COP and CAP values of the heatpump as a function of the entering water temperature (TinHP) and the volumetric flowrate (Vf).
Example¶
Import and instantiate the HeatPump
class:
>>> from pygld import HeatPump
>>> heatpump = HeatPump()
Print the list of available heatpump models:
>>> heatpump.print_avail_heatpump_models()
0 - TCHV072 (6 Tons, 21.1 kW)
1 - TCHV096 (8 Tons, 28.1 kW)
2 - TCHV120 (10 Tons, 35.2 kW)
3 - TCHV160 (13.3 Tons, 46.9 kW)
4 - TCHV192 (16 Tons, 56.3 kW)
5 - TCHV240 (20 Tons, 70.3 kW)
6 - TCHV300 (25 Tons, 87.9 kW)
7 - TMW360 (30 tons, 105.6 kW)
8 - TMW600 (50 tons, 176 kW)
9 - TMW840 (70 tons, 246 kW)
Print the list of available heat carrier fluids:
>>> print(heatpump.get_avail_fluid_types())
['prop_glycol', 'ethyl_glycol', 'water']
Set the model of the heatpump:
>>> heatpump.set_model(1)
>>> print(heatpump.model)
TCHV096 (8 Tons, 28.1 kW)
Set the values of the independent variables (qbat
,
TinHP
, Vf
) and the
properties of the heat carrier fluid (fluid
and
fr
):
>>> heatpump.qbat = [-16.5, 14.5]
>>> heatpump.Vf = [1, 1]
>>> heatpump.TinHP = [28, 0]
>>> heatpump.fluid = 'prop_glycol'
>>> heatpump._fr = 0.3
Get and print the resulting values of the dependent variables
(TinHP
, Tm
,
COP
, CAP
):
>>> print(heatpump.TinHP)
[ 28. 0.]
>>> print(heatpump.Tm)
[ 30.49737498 -1.20748958]
>>> print(heatpump.COP)
[ 3.83293579 3.36205915]
>>> print(heatpump.CAP)
[ 28.20969661 22.99085714]
Or print heatpump to get a nicely formatted summary:
>>> print(heatpump)
model: TCHV096 (8 Tons, 28.1 kW)
fluid: prop_glycol
fr : 0
Vf (L/s): [ 1. 1.]
qbat (kW): [-16.5 14.5]
TinHP (°C): [ 28. 0.]
ToutHP (°C): [ 32.99474997 -2.41497917]
Tm (°C): [ 30.49737498 -1.20748958]
COP : [ 3.83293579 3.36205915]
CAP (kW): [ 28.20969661 22.99085714]
Check the goodness of fit of the models used to evaluate the
COP
and CAP
of the heatpump:
>>> heatpump.plot_heatpump_model_goodness()