LBL logo

Buildings.Fluid.HeatPumps

Information

This package contains components models for heat pumps.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Fluid.HeatPumps.Carnot_TCon Carnot_TCon Heat pump with prescribed condenser leaving temperature and performance curve adjusted based on Carnot efficiency
Buildings.Fluid.HeatPumps.Carnot_y Carnot_y Reversible heat pump with performance curve adjusted based on Carnot efficiency
Buildings.Fluid.HeatPumps.Examples Examples Collection of models that illustrate model use and test models
Buildings.Fluid.HeatPumps.Validation Validation Collection of models that validate the heat pump models

Buildings.Fluid.HeatPumps.Carnot_TCon Buildings.Fluid.HeatPumps.Carnot_TCon

Heat pump with prescribed condenser leaving temperature and performance curve adjusted based on Carnot efficiency

Buildings.Fluid.HeatPumps.Carnot_TCon

Information

This is a model of a heat pump whose coefficient of performance COP changes with temperatures in the same way as the Carnot efficiency changes. The control input is the setpoint of the condenser leaving temperature, which is met exactly at steady state if the heat pump has sufficient capacity.

The model allows to either specify the Carnot effectivness ηCarnot,0, or a COP0 at the nominal conditions, together with the evaporator temperature Teva,0 and the condenser temperature Tcon,0, in which case the model computes the Carnot effectivness as

ηCarnot,0 = COP0 ⁄ (Tcon,0 ⁄ (Tcon,0-Teva,0)).

The heat pump COP is computed as the product

COP = ηCarnot,0 COPCarnot ηPL,

where COPCarnot is the Carnot efficiency and ηPL is a polynomial in heating part load ratio yPL that can be used to take into account a change in COP at part load conditions. This polynomial has the form

ηPL = a1 + a2 yPL + a3 yPL2 + ...

where the coefficients ai are declared by the parameter a.

On the Dynamics tag, the model can be parametrized to compute a transient or steady-state response. The transient response of the model is computed using a first order differential equation for the evaporator and condenser fluid volumes. The heat pump outlet temperatures are equal to the temperatures of these lumped volumes.

Typical use and important parameters

When using this component, make sure that the condenser has sufficient mass flow rate. Based on the evaporator mass flow rate, temperature difference and the efficiencies, the model computes how much heat will be removed by to the evaporator. If the mass flow rate is too small, very low outlet temperatures can result, possibly below freezing.

The condenser heat flow rate QCon_flow_nominal is used to assign the default value for the mass flow rates, which are used for the pressure drop calculations. It is also used to compute the part load efficiency. Hence, make sure that QCon_flow_nominal is set to a reasonable value.

The maximum heating capacity is set by the parameter QCon_flow_max, which is by default set to infinity.

By default, the coefficient of performance depends on the evaporator entering temperature and the condenser leaving temperature. This can be changed with the parameters effInpEva and effInpCon.

Notes

For a similar model that can be used as a chiller, see Buildings.Fluid.Chillers.Examples.Carnot_TEva.

Extends from Buildings.Fluid.Chillers.BaseClasses.PartialCarnot_T (Partial model for chiller with performance curve adjusted based on Carnot efficiency).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
HeatFlowRateQCon_flow_maxModelica.Constants.infMaximum heat flow rate for heating (positive) [W]
Nominal condition
MassFlowRatem1_flow_nominalQCon_flow_nominal/cp1_defaul...Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominalQEva_flow_nominal/cp2_defaul...Nominal mass flow rate [kg/s]
HeatFlowRateQEva_flow_nominal-QCon_flow_nominal*(COP_nomi...Nominal cooling heat flow rate (QEva_flow_nominal < 0) [W]
HeatFlowRateQCon_flow_nominal Nominal heating flow rate [W]
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
Pressuredp1_nominal Pressure difference over condenser [Pa]
Pressuredp2_nominal Pressure difference over evaporator [Pa]
Initialization
MassFlowRatem1_flow.start0Mass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction) [kg/s]
PressureDifferencedp1.start0Pressure difference between port_a1 and port_b1 [Pa]
MassFlowRatem2_flow.start0Mass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction) [kg/s]
PressureDifferencedp2.start0Pressure difference between port_a2 and port_b2 [Pa]
Efficiency
Booleanuse_eta_Carnot_nominaltrueSet to true to use Carnot effectiveness etaCarnot_nominal rather than COP_nominal
RealetaCarnot_nominalCOP_nominal/(TUse_nominal/(T...Carnot effectiveness (=COP/COP_Carnot) used if use_eta_Carnot_nominal = true [1]
RealCOP_nominaletaCarnot_nominal*TUse_nomin...Coefficient of performance at TEva_nominal and TCon_nominal, used if use_eta_Carnot_nominal = false [1]
TemperatureTCon_nominal303.15Condenser temperature used to compute COP_nominal if use_eta_Carnot_nominal=false [K]
TemperatureTEva_nominal278.15Evaporator temperature used to compute COP_nominal if use_eta_Carnot_nominal=false [K]
Reala[:]{1}Coefficients for efficiency curve (need p(a=a, yPL=1)=1)
Assumptions
BooleanallowFlowReversal1true= true to allow flow reversal in medium 1, false restricts to design direction (port_a -> port_b)
BooleanallowFlowReversal2true= true to allow flow reversal in medium 2, false restricts to design direction (port_a -> port_b)
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanhomotopyInitializationtrue= true, use homotopy method
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Temperature dependence
EfficiencyInputeffInpEvaBuildings.Fluid.Types.Effici...Temperatures of evaporator fluid used to compute Carnot efficiency
EfficiencyInputeffInpConBuildings.Fluid.Types.Effici...Temperatures of condenser fluid used to compute Carnot efficiency
Flow resistance
Condenser
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar [1]
Evaporator
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar [1]
Dynamics
Condenser
Timetau160Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s]
TemperatureT1_startMedium1.T_defaultInitial or guess value of set point [K]
Evaporator
Timetau260Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s]
TemperatureT2_startMedium2.T_defaultInitial or guess value of set point [K]
Evaporator and condenser
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
output RealOutputQCon_flowActual heating heat flow rate added to fluid 1 [W]
output RealOutputPElectric power consumed by compressor [W]
output RealOutputQEva_flowActual cooling heat flow rate removed from fluid 2 [W]
input RealInputTSetCondenser leaving water temperature [K]

Modelica definition

model Carnot_TCon "Heat pump with prescribed condenser leaving temperature and performance curve adjusted based on Carnot efficiency" extends Buildings.Fluid.Chillers.BaseClasses.PartialCarnot_T( final COP_is_for_cooling = false, final QEva_flow_nominal = -QCon_flow_nominal*(COP_nominal-1)/COP_nominal, effInpEva=Buildings.Fluid.Types.EfficiencyInput.port_a, effInpCon=Buildings.Fluid.Types.EfficiencyInput.port_b, PEle(y=QCon_flow/COP), redeclare HeatExchangers.HeaterCooler_T con( final from_dp=from_dp1, final dp_nominal=dp1_nominal, final linearizeFlowResistance=linearizeFlowResistance1, final deltaM=deltaM1, final Q_flow_maxHeat=QCon_flow_max, final Q_flow_maxCool=0, final tau=tau1, final T_start=T1_start, final energyDynamics=energyDynamics, final homotopyInitialization=homotopyInitialization), redeclare HeatExchangers.HeaterCooler_u eva( final from_dp=from_dp2, final dp_nominal=dp2_nominal, final linearizeFlowResistance=linearizeFlowResistance2, final deltaM=deltaM2, final tau=tau2, final T_start=T2_start, final energyDynamics=energyDynamics, final homotopyInitialization=homotopyInitialization, final Q_flow_nominal=QEva_flow_nominal)); parameter Modelica.SIunits.HeatFlowRate QCon_flow_max( min=0) = Modelica.Constants.inf "Maximum heat flow rate for heating (positive)"; Modelica.Blocks.Interfaces.RealInput TSet(unit="K") "Condenser leaving water temperature"; protected Modelica.Blocks.Math.Gain yEva(final k=1/QEva_flow_nominal) "Normalized evaporator heat flow rate"; Modelica.Blocks.Math.Add QEva_flow_internal(final k1=-1) "Heat removed by evaporator"; initial equation assert(QCon_flow_nominal > 0, "Parameter QCon_flow_nominal must be positive."); assert(COP_nominal > 1, "The nominal COP of a heat pump must be bigger than one."); equation connect(TSet, con.TSet); connect(con.Q_flow, QCon_flow); connect(QEva_flow_internal.u1, con.Q_flow); connect(QEva_flow_internal.u2, PEle.y); connect(QEva_flow_internal.y, yEva.u); connect(QEva_flow, QEva_flow_internal.y); connect(yEva.y, eva.u); end Carnot_TCon;

Buildings.Fluid.HeatPumps.Carnot_y Buildings.Fluid.HeatPumps.Carnot_y

Reversible heat pump with performance curve adjusted based on Carnot efficiency

Buildings.Fluid.HeatPumps.Carnot_y

Information

This is model of a heat pump whose coefficient of performance COP changes with temperatures in the same way as the Carnot efficiency changes. The input signal y is the control signal for the compressor.

The model allows to either specify the Carnot effectivness ηCarnot,0, or a COP0 at the nominal conditions, together with the evaporator temperature Teva,0 and the condenser temperature Tcon,0, in which case the model computes the Carnot effectivness as

ηCarnot,0 = COP0 ⁄ (Tcon,0 ⁄ (Tcon,0-Teva,0)).

The heat pump COP is computed as the product

COP = ηCarnot,0 COPCarnot ηPL,

where COPCarnot is the Carnot efficiency and ηPL is a polynomial in the heating part load ratio yPL that can be used to take into account a change in COP at part load conditions. This polynomial has the form

ηPL = a1 + a2 yPL + a3 yPL2 + ...

where the coefficients ai are declared by the parameter a.

On the Dynamics tag, the model can be parametrized to compute a transient or steady-state response. The transient response of the model is computed using a first order differential equation for the evaporator and condenser fluid volumes. The heat pump outlet temperatures are equal to the temperatures of these lumped volumes.

Typical use and important parameters

When using this component, make sure that the evaporator and the condenser have sufficient mass flow rate. Based on the mass flow rates, the compressor power, temperature difference and the efficiencies, the model computes how much heat will be added to the condenser and removed at the evaporator. If the mass flow rates are too small, very high temperature differences can result.

The condenser heat flow rate QCon_flow_nominal is used to assign the default value for the mass flow rates, which are used for the pressure drop calculations. It is also used to compute the part load efficiency. Hence, make sure that QCon_flow_nominal is set to a reasonable value.

The maximum heating capacity is set by the parameter QCon_flow_max, which is by default set to infinity.

By default, the coefficient of performance depends on the evaporator entering temperature and the condenser leaving temperature. This can be changed with the parameters effInpEva and effInpCon.

Notes

For a similar model that can be used as a chiller, see Buildings.Fluid.Chillers.Carnot_y.

Extends from Buildings.Fluid.Chillers.BaseClasses.PartialCarnot_y (Partial chiller model with performance curve adjusted based on Carnot efficiency).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
Nominal condition
MassFlowRatem1_flow_nominalQCon_flow_nominal/cp1_defaul...Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominalQEva_flow_nominal/cp2_defaul...Nominal mass flow rate [kg/s]
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
Pressuredp1_nominal Pressure difference over condenser [Pa]
Pressuredp2_nominal Pressure difference over evaporator [Pa]
PowerP_nominal Nominal compressor power (at y=1) [W]
Initialization
MassFlowRatem1_flow.start0Mass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction) [kg/s]
PressureDifferencedp1.start0Pressure difference between port_a1 and port_b1 [Pa]
MassFlowRatem2_flow.start0Mass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction) [kg/s]
PressureDifferencedp2.start0Pressure difference between port_a2 and port_b2 [Pa]
Efficiency
Booleanuse_eta_Carnot_nominaltrueSet to true to use Carnot effectiveness etaCarnot_nominal rather than COP_nominal
RealetaCarnot_nominalCOP_nominal/(TUse_nominal/(T...Carnot effectiveness (=COP/COP_Carnot) used if use_eta_Carnot_nominal = true [1]
RealCOP_nominaletaCarnot_nominal*TUse_nomin...Coefficient of performance at TEva_nominal and TCon_nominal, used if use_eta_Carnot_nominal = false [1]
TemperatureTCon_nominal303.15Condenser temperature used to compute COP_nominal if use_eta_Carnot_nominal=false [K]
TemperatureTEva_nominal278.15Evaporator temperature used to compute COP_nominal if use_eta_Carnot_nominal=false [K]
Reala[:]{1}Coefficients for efficiency curve (need p(a=a, yPL=1)=1)
Assumptions
BooleanallowFlowReversal1true= true to allow flow reversal in medium 1, false restricts to design direction (port_a -> port_b)
BooleanallowFlowReversal2true= true to allow flow reversal in medium 2, false restricts to design direction (port_a -> port_b)
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanhomotopyInitializationtrue= true, use homotopy method
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Temperature dependence
EfficiencyInputeffInpEvaBuildings.Fluid.Types.Effici...Temperatures of evaporator fluid used to compute Carnot efficiency
EfficiencyInputeffInpConBuildings.Fluid.Types.Effici...Temperatures of condenser fluid used to compute Carnot efficiency
Flow resistance
Condenser
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar [1]
Evaporator
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar [1]
Dynamics
Condenser
Timetau160Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s]
TemperatureT1_startMedium1.T_defaultInitial or guess value of set point [K]
Evaporator
Timetau260Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s]
TemperatureT2_startMedium2.T_defaultInitial or guess value of set point [K]
Evaporator and condenser
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
output RealOutputQCon_flowActual heating heat flow rate added to fluid 1 [W]
output RealOutputPElectric power consumed by compressor [W]
output RealOutputQEva_flowActual cooling heat flow rate removed from fluid 2 [W]
input RealInputyPart load ratio of compressor [1]

Modelica definition

model Carnot_y "Reversible heat pump with performance curve adjusted based on Carnot efficiency" extends Buildings.Fluid.Chillers.BaseClasses.PartialCarnot_y( effInpEva=Buildings.Fluid.Types.EfficiencyInput.port_a, effInpCon=Buildings.Fluid.Types.EfficiencyInput.port_b, final COP_is_for_cooling = false); initial equation assert(COP_nominal > 1, "The nominal COP of a heat pump must be bigger than one."); end Carnot_y;

http://simulationresearch.lbl.gov/modelica