Heat pump

The heat pump model comprises four different calculation modes for simulating the performance of a heat pump - ‘detailed’, ‘fast’, ‘hplib’, and ‘fixed’ modes. The first two are based on the TESPy library, the third is based on the hplib library. In these three modes, a quasi-steady state modelling approach has been adopted, i.e., the conditions of the operation of the heat pump vary with each time-step and the steady state performance of the heat pump is calculated at these different conditions for each time-step. The ‘fixed’ mode is the most simplified, operating the heat pump with a fixed performance irrespective of the different operating conditions.

The model based on hplib, hereafter referred as “hplib” model, is a parametric fit equation-based model, and thus takes a statistical approach to predict the performance of the heat pump at different operating conditions. The model based on TESPy, hereafter referred as “tespy” model, is more complex and considers the physical states of the fluids in the different components of the heat pump. Therefore, it offers greater flexibility than the hplib model in estimating the performance of the heat pump at different operating conditions. However, as a result of this increased complexity, the simulation time for the detailed calculations in tespy model is higher as compared to that of the simpler calculations in hplib model.

hplib model

The hplib model is based on hplib (“Heat Pump LIBrary”), an open-source Python library that simulates the performance heat pumps using parametric fit equations for the electric power and COP. The fit parameters are identified by applying a least square regression model on the publicly available heat pump keymark data of the European Heat Pump Association (EHPA). It is possible to simulate the performance of both air and water source heat pumps. The parameters are available for a generic heat pump of both the types, as well as specific models available in the market.

The limits on the operation of the heat pump, the supply water and source air temperature ranges available from the technical datasheets of the chosen heat pump model, have been added to the model directly available in the hplib library.

The equations 1 and 2 are the fit equations for the electric power and COP respectively. The reference values, Pel,ref is the electrical power consumption at -7°C source temperature and 52°C supply water temperature. In both the equations, p1-4 are the fit parameters, Tin is the source inlet temperature, Tout is the supply water temperature, and Tamb is the ambient temperature.

Fit equations for the heat pump performance (hplib model)

The evaporator and condenser inlet temperatures are the inputs to the model. The model checks if they are within the operating range and ensures that the source air temperature is lower than the incoming water temperature. The model then calculates the electric power, COP, the heating capacity, and the condenser mass flow as outputs. The electric power and COP are estimated as shown in equations 1 and 2 respectively. The heating capacity is calculated from the electric power and COP. The mass flow in the condenser is calculated assuming a temperature difference of 5°C.

How to use the hplib calculation mode

The user must specify the ‘calc_mode’ parameter as ‘hplib’, and the ‘heat_source’, either ‘air’ or ‘water’, must be specified. For the ‘hp_model’ parameter, the user can choose from the different heat pump models available in the public heatpump keymark database (the keywords can be obtained from the ‘hplib_database.csv’ file). If the ‘hp_model’ is set to ‘Generic’, the user must additionally specify ‘cons_T’, ‘heat_source_T’, and ‘P_th’.

The limits of operation for the heat pump are not available directly within the model in the hplib library. If a corresponding equivalent heat pump model based on TESPy is available, the keyword for that model can be specified in the ‘equivalent_hp_model’. If not, the operation limits can be specified via ‘hp_limits’ parameter.

An example of the dictionary with the required parameters can be seen in the module documentation.

tespy model

The tespy model is based on TESPy (“Thermal Engineering Systems in Python”), an open-source Python library that provides a powerful simulation package for thermal processes like power plants, district heating systems, heat pumps etc. An initial version of this model has been used in a previous work, and significant changes have been made later for a master’s thesis and for different research projects. The performance of the heat pump is simulated by considering the energy and mass balances in the individual “components” of the heat pump – condenser, evaporator, compressor, expansion valve, heat exchangers and pumps – and the state of fluids in the “connections” between these “components.” The connections and components together form a topological network that is represented and solved as a system of equations. The schematic of the heat pump system used in this work is shown in the figure below.

Schematic of the heat pump system network

Schematic of the heat pump system network

The flexibility offered by the TESPy library in choosing the components of the network has been implemented through the following features in the model:

Stages of compression

  • The heat pump model is available in two system configurations, either with a one-stage compressor or a two-stage compressor.

Additional components

  • Intercooler between the two stages of compression

  • Superheater between the evaporator and the compressor

TESPy has two modes of calculation, design and offdesign, to solve the network. The design mode is used to design the system and forms the first calculation of the network. While designing the plant, TESPy offers much greater detail as compared to hplib, in terms of the parametrization of the individual components, for example, the isentropic efficiency of the compressor. The offdesign mode is used to calculate the performance of the system if parameters deviate from the design point, for example, operation at partial loads or operation at different temperature/pressure levels. The system calculations from the design mode form the basis for the offdesign mode. Both of these calculation modes have been implemented in this model.

How to use the tespy based calculation modes

The user must specify the ‘calc_mode’ parameter as ‘detailed’ or ‘fast’. A detailed description of these two modes of calculation can be found here.

The ‘heat_source’, either ‘air’ or ‘water’, must be specified.

For the ‘hp_model’ parameter, the user can choose from the different heat pump models available, shown in the table below.

Heat pump model from market

Keyword for ‘calc_mode’

Configuration

Daikin Altherma ERLQ00 6CV3

Air_6kW

Stages of compression - 1

Intercooler - No

Superheater - No

Heating capacity range - 1.8 kW - 12.07 kW

Operating temperatures - Source air: -20°C to 25°C; Water supply: 15°C to 55°C

Daikin Altherma ERLQ00 8CV3

Air_8kW

Stages of compression - 1

Intercooler - No

Superheater - No

Heating capacity range - 1.8 kW - 14.49 kW

Operating temperatures - Source air: -20°C to 25°C; Water supply: 15°C to 55°C

Daikin Altherma ERLQ01 6CV3

Air_16kW

Stages of compression - 1

Intercooler - No

Superheater - No

Heating capacity range - 6.46 kW - 22.9 kW

Operating temperatures - Source air: -20°C to 35°C; Water supply: 15°C to 55°C

Viessmann Vitocal 300-A

Air_25kW

Stages of compression - 2

Intercooler - No

Superheater - No

Heating capacity range - 10.76 kW - 39.4 kW

Operating temperatures - Source air: -20°C to 35°C; Water supply: 15°C to 55°C

Air_25kW_1stage

Stages of compression - 1

Intercooler - No

Superheater - No

Heating capacity range - 5.21 kW - 22.45 kW

Operating temperatures - Source air: -20°C to 35°C; Water supply: 15°C to 55°C

ait-deutschland LW-300(L )

Air_30kW

Stages of compression - 2

Intercooler - No

Superheater - No

Heating capacity range - 15.8 kW - 54 kW

Operating temperatures - Source air: -20°C to 35°C; Water supply: 15°C to 60°C

Air_30kW_1stage

Stages of compression - 1

Intercooler - No

Superheater - No

Heating capacity range - 7.3 kW - 30.95 kW

Operating temperatures - Source air: -20°C to 35°C; Water supply: 15°C to 60°C

Viessmann Vitocal 300-A

Air_40kW

Stages of compression - 2

Intercooler - No

Superheater - No

Heating capacity range - 16.73 kW - 53.41 kW

Operating temperatures - Source air: -20°C to 35°C; Water supply: 15°C to 55°C

Air_40kW_1stage

Stages of compression - 1

Intercooler - No

Superheater - No

Heating capacity range - 9.75 kW - 30.35 kW

Operating temperatures - Source air: -20°C to 35°C; Water supply: 15°C to 55°C

Viessmann Vitocal 300-A

Air_60kW

Stages of compression - 2

Intercooler - No

Superheater - No

Heating capacity range - 21.5 kW - 98.17 kW

Operating temperatures - Source air: -20°C to 35°C; Water supply: 15°C to 65°C

Air_60kW_1stage

Stages of compression - 1

Intercooler - No

Superheater - No

Heating capacity range - 11.98 kW - 50.58 kW

Operating temperatures - Source air: -20°C to 35°C; Water supply: 15°C to 65°C

Any other heat pump available in the market, with a different heating capacity and configuration, can be added to the model, following the procedure shown in the example of the “Air_30kW” heat pump.

Note

With TESPy, it is possible to simulate the performance of water-water heat pumps as well. However, this has not yet been integrated into this model and will be a part of a later release.

Example

An example scenario using the heat pump simulator in the mosaik environment is available in the ‘run_heatpump.py’ file.

The simulation is configured as shown below. The inputs to the heat pump model and the outputs from it are handled by ‘mosaik-csv’ .

 4SIM_CONFIG = {
 5    'HeatPumpSim': {
 6        'python': 'mosaik_components.heatpump.Heat_Pump_mosaik:HeatPumpSimulator',
 7    },
 8    'CSV': {
 9        'python': 'mosaik_csv:CSV',
10    },
11    'CSV_writer': {
12        'python': 'mosaik_csv_writer:CSVWriter'
13    },
14}
15
16# Create World
17world = mosaik.World(SIM_CONFIG)
18
19START = '01.01.2016 00:00'
20END = 10 * 15 * 60  # 2.5 Hours or 150 mins

The tespy model is used in the ‘fast’ calculation mode. The ‘Air_8kW’ heat pump is chosen. The required parameters are set as shown below.

22# Heat pump
23params = {'calc_mode': 'fast',
24          'hp_model': 'Air_8kW',
25          'heat_source': 'air',
26          }
27# configure the simulator
28heatpumpsim = world.start('HeatPumpSim', step_size=15*60)
29# Instantiate model
30heatpump = heatpumpsim.HeatPump(params=params)

The timeseries of heat demand, heat source temperature, and the condenser water inlet temperature, that are needed as inputs for the model, are available in the ‘heatpump_ data.csv’ file.

32# Input data csv
33HEAT_LOAD_DATA = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data', 'heatpump_data.csv')
34# configure the simulator
35csv = world.start('CSV', sim_start=START, datafile=HEAT_LOAD_DATA)
36# Instantiate model
37heat_load = csv.HP()

The output data is saved into ‘hp_trial.csv’ file.

39# Output data storage
40# configure the simulator
41csv_sim_writer = world.start('CSV_writer', start_date='01.01.2020 00:00', date_format='%d.%m.%Y %H:%M',
42                             output_file='hp_trial.csv')
43# Instantiate model
44csv_writer = csv_sim_writer.CSVWriter(buff_size=60 * 60)

The different entities are then connected and the simulation is executed.

46# Connect entities
47world.connect(heat_load, heatpump, 'Q_Demand', 'heat_source_T', ('heat_source_T', 'T_amb'), 'cond_in_T')
48world.connect(heatpump, csv_writer, 'Q_Demand', 'Q_Supplied', 'heat_source_T', 'P_Required', 'COP')
49
50# Run simulation
51world.run(until=END)

Module Documentation

This module contains a simulation model of a Heat Pump based on the library TESPy.

class mosaik_components.heatpump.Heat_Pump_Model.Heat_Pump(params, COP_m_data)

Simulation model of a heat pump based on the libraries TESPy and hplib.

Heat pump parameters are provided at instantiation by the dictionary params. The following dictionary contains the parameters that are mandatory:

{
    'calc_mode': 'hplib',
    'hp_model': 'LW 300(L)',
    'heat_source': 'air',
}

Explanation of the entries in the dictionary:

  • calc_mode: The calculation mode that is used by the heat pump model. Currently, ‘detailed’, ‘fast’, ‘hplib’, and ‘fixed’ calculation modes are available. The differences are explained in the documentation.

  • hp_model: The specific model of the heat pump that must be simulated. The different models available currently can be found in the documentation. This need not be specified for the ‘fixed’ calculation mode.

  • heat_source: The fluid that acts as the source of heat for the heat pump, either ‘water’ or ‘air’

If the ‘hplib’ calculation mode is chosen, the following parameter is required in addition to the mandatory ones:

{
    'equivalent_hp_model': 'Air_30kW',
}
  • equivalent_hp_model: The heat pump model from the saved data file whose limits of operation will be applied

Alternatively, the limits can be directly specified in the following parameter:

{
    'hp_limits': { 'heat_source_T_min': -10, 'heat_source_T_max': 35, 'cons_T_min': 25, 'cons_T_max': 55,
                   'heatload_min': 15000 }
}

For the ‘hplib’ calculation mode if the ‘Generic’ heat pump model is chosen, the following parameters are required in addition to the mandatory ones:

{
    'cons_T': 35,
    'heat_source_T': 12,
    'P_th': 35000,
}
  • cons_T: The temperature at which heat is supplied to the consumer (in °C).

  • heat_source_T: The temperature at which the fluid (water or air) is available as the heat source (in °C).

  • P_th: The heating capacity of the heat pump (in W).

If the ‘fixed’ calculation mode is chosen, the following parameters are required in addition to the mandatory ones:

{
    'COP': 3.5,
    'heating capacity': 35000,
    'cond_m': 0.5,
}
  • COP: The COP of the heat pump.

  • heating_capacity: The heating capacity of the heat pump (in W).

  • cond_m: The mass flow rate of water in the condenser (in kg/s).

design

stores the design of the heat pump in a Heat_Pump_Model.Heat_Pump_Initiation object

state

stores the state variables of the heat pump in a Heat_Pump_Model.Heat_Pump_State object

inputs

stores the input parameters of the heat pump model in a Heat_Pump_Model.Heat_Pump_Inputs object

step()

Perform simulation step with step size step_size

class mosaik_components.heatpump.Heat_Pump_Model.Heat_Pump_Inputs(params)

Inputs variables to the heat pump for each time step

Q_Demand

The heat demand of the consumer in W

heat_source_T

The temperature of the heat source (in °C)

T_amb

The ambient temperature (in °C)

cond_in_T

The temperature at which the water reenters the condenser (in °C)

step_size

step size in seconds

class mosaik_components.heatpump.Heat_Pump_Model.Heat_Pump_State

Attributes that define the state of the Heat_Pump

P_Required

Power consumption of the heat pump in W

COP

COP of the heat pump

Q_Demand

The heat demand of the consumer in W

Q_Supplied

The heat supplied to the consumer in W

Q_evap

The heat removed in the evaporator in W

cons_T

The temperature at which heat is supplied to the consumer (in °C)

cond_in_T

The temperature at which the water reenters the condenser (in °C)

heat_source_T

The temperature of the heat source (in °C)

T_amb

The ambient temperature (in °C)

cond_m

The mass flow rate of water in the condenser of the heat pump (in kg/s)

cond_m_neg

The negative of the mass flow rate of water in the condenser of the heat pump (in kg/s)

step_executed

The execution of the step function of the heat pump model