modelPartialHeatPump

Heat pump partial

Extends from IDEAS.Fluid.Interfaces.FourPortHeatMassExchanger (Model transporting two fluid streams between four ports with storing mass or energy), IDEAS.Fluid.HeatPumps.Interfaces.ModulationSecurity (Non physical down modulation of the power of a heat production when the fluid temperature approach its boundaries temperature in order to reduce the number of events), IDEAS.Fluid.Interfaces.OnOffInterface (Interface for either setting a device on using a parameter or using a realInput).

Information

This partial model provides an implementation for a heat pump. Heat is drawn from the fluid at the 'Brine' side and injected into the 'Fluid' side. The model uses performance tables to calculate the COP and electrical power.

Main equations

The COP and electrical power Pel are read from performance tables as a function of the evaporator inlet temperature and the condensor outlet temperature:

COP = f1(T_out_condensor, T_in_evaporator)

P_el = f2(T_out_condensor, T_in_evaporator)

These values are used to calculate the thermal powers:

Q_condensor = P_el*COP

Q_evaporator = P_el*(COP-1)

If the parameter use_scaling is true, the powers of the heat pump will be scaled with QNom / QNomRef. The nominal mass flow rate of the heat pump is also scaled to correctly scale the pressure losses.

The models also allows partial load if use_modulationSignal is set to true. The modulation is assumed to be ideal and it works then as a scaling input of the power.

The heat pump compressor will be switched off when:

  1. The external control signal is false
  2. The over/under-temperature protection is activated

In this case P_el will become zero. The transition from on to off can happen discretely or through a filter using the parameter 'avoidEvents'.

Assumptions and limitations

  • The transient behaviour of the thermodynamic cycle is not simulated.
  • The fluid mass flow rates do not have an impact on the values of COP and P_el.
  • Modulation of the power is not supported.
  • Maximum temperatures of the evaporator and minimum temperatures of the condensor are not considered.
  • Defrosting cycles etc are not considered.

Typical use and important parameters

A record with the required parameters needs to be provided.

The parameter 'avoidEvents' can be used to avoid an event when activating the over/under-temperature protection. When avoidEvents is true the thermal mass of the condensor and evaporator are increased to avoid undercooling/overheating the heat pump while it is switching off and the mass flow rate is zero. This factor can be quite significant and depends on the 'riseTime'.

Options

  1. Typical options inherited through lumpedVolumeDeclarations can be used.

Validation

Examples of this model can be found in IDEAS.Fluid.Production.Examples.HeatPump_BrineWater, IDEAS.Fluid.Production.Examples.HeatPump_BrineWaterTset and IDEAS.Fluid.Production.Examples.HeatPump_Events

Parameters

TypeNameDefaultDescription
BooleanhomotopyInitialization (from FourPortHeatMassExchanger)true= true, use homotopy method
Modelica.Units.SI.TemperatureDifferencedeltaT_security (from ModulationSecurity)if use_modulation_security then 1 else 5Temperature difference from the boundary at which the security hysteresis will be released
Modelica.Units.SI.TemperatureT_max (from ModulationSecurity)373.15Maximum fluid temperature
Modelica.Units.SI.TemperatureT_min (from ModulationSecurity)273.15Minimum fluid temperature
Booleanuse_onOffSignal (from OnOffInterface)falseSet to true to switch device on/off using external signal
BooleanonOff (from OnOffInterface)trueSet to true if device is on
IDEAS.Fluid.HeatPumps.BaseClasses.HeatPumpDataheatPumpData
Booleanuse_TSetfalseTrue if the heat pump uses a set point temperature control
Realscaif use_scaling then P_the_nominal/heatPumpData.P_the_nominal else 1scaling factor for the nominal power of the heat pump
Assumptions
BooleanallowFlowReversal1 (from PartialFourPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2 (from PartialFourPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Nominal condition
Modelica.Units.SI.MassFlowRatem1_flow_nominal (from PartialFourPortInterface)Nominal mass flow rate
Modelica.Units.SI.MassFlowRatem2_flow_nominal (from PartialFourPortInterface)Nominal mass flow rate
Modelica.Units.SI.PressureDifferencedp1_nominal (from FourPortFlowResistanceParameters)Pressure difference
Modelica.Units.SI.PressureDifferencedp2_nominal (from FourPortFlowResistanceParameters)Pressure difference
Advanced
Medium1.MassFlowRatem1_flow_small (from PartialFourPortInterface)1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow
Medium2.MassFlowRatem2_flow_small (from PartialFourPortInterface)1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow
Booleanuse_scalingfalsescale the performance data based on the nominal power
BooleanperfFromToutfalse= true, then recompute performance based on evaporator outlet temperature instead of directly using the inlet temperature
Booleanuse_modulationSignalfalseenables an input for modulating the heat pump ideally (no change of COP, just scaling of the electrical and thermal power)
Modelica.Units.SI.PowerP_the_nominalheatPumpData.P_the_nominalnominal thermal power of the heat pump
RealmSenFac1Factor to scale the thermal mass of the evaporator and condensor
Advanced › Diagnostics
Booleanshow_T (from PartialFourPortInterface)false= true, if actual temperature at port is computed
Flow resistance › Medium 1
BooleancomputeFlowResistance1 (from FourPortFlowResistanceParameters)true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp1 (from FourPortFlowResistanceParameters)false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1 (from FourPortFlowResistanceParameters)false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM1 (from FourPortFlowResistanceParameters)0.1Fraction of nominal flow rate where flow transitions to laminar
Flow resistance › Medium 2
BooleancomputeFlowResistance2 (from FourPortFlowResistanceParameters)true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp2 (from FourPortFlowResistanceParameters)false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2 (from FourPortFlowResistanceParameters)false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM2 (from FourPortFlowResistanceParameters)0.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics › Nominal condition
Modelica.Units.SI.Timetau1 (from FourPortHeatMassExchanger)30Time constant at nominal flow
Modelica.Units.SI.Timetau2 (from FourPortHeatMassExchanger)30Time constant at nominal flow
Dynamics › Conservation equations
Modelica.Fluid.Types.DynamicsenergyDynamics (from FourPortHeatMassExchanger)Modelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state
Initialization › Medium 1
Medium1.AbsolutePressurep1_start (from FourPortHeatMassExchanger)Medium1.p_defaultStart value of pressure
Medium1.TemperatureT1_start (from FourPortHeatMassExchanger)Medium1.T_defaultStart value of temperature
Medium1.MassFraction[Medium1.nX]X1_start (from FourPortHeatMassExchanger)Medium1.X_defaultStart value of mass fractions m_i/m
Medium1.ExtraProperty[Medium1.nC]C1_start (from FourPortHeatMassExchanger)fill(0, Medium1.nC)Start value of trace substances
Medium1.ExtraProperty[Medium1.nC]C1_nominal (from FourPortHeatMassExchanger)fill(1E-2, Medium1.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Initialization › Medium 2
Medium2.AbsolutePressurep2_start (from FourPortHeatMassExchanger)Medium2.p_defaultStart value of pressure
Medium2.TemperatureT2_start (from FourPortHeatMassExchanger)Medium2.T_defaultStart value of temperature
Medium2.MassFraction[Medium2.nX]X2_start (from FourPortHeatMassExchanger)Medium2.X_defaultStart value of mass fractions m_i/m
Medium2.ExtraProperty[Medium2.nC]C2_start (from FourPortHeatMassExchanger)fill(0, Medium2.nC)Start value of trace substances
Medium2.ExtraProperty[Medium2.nC]C2_nominal (from FourPortHeatMassExchanger)fill(1E-2, Medium2.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Advanced › Events
Booleanuse_modulation_security (from ModulationSecurity)falseSet to true if power modulation should be used to avoid exceeding temperature.
Flow resistance
BooleancomputeFlowResistancetrue=true, compute flow resistance. Set to false to assume no friction

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a1 (from PartialFourPort)Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
Modelica.Fluid.Interfaces.FluidPort_bport_b1 (from PartialFourPort)Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
Modelica.Fluid.Interfaces.FluidPort_aport_a2 (from PartialFourPort)Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
Modelica.Fluid.Interfaces.FluidPort_bport_b2 (from PartialFourPort)Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
Modelica.Blocks.Interfaces.RealOutputmodulation_security (from ModulationSecurity)IDEAS.Utilities.Math.Functions.spliceFunction(x = min(limLow.y, limUp.y)/max(Modelica.Constants.eps, deltaT_security) - 1, pos = 1, neg = 0, deltax = 0.5)Modulation to avoid reaching temperature boundaries
Modelica.Blocks.Interfaces.BooleanInputon (from OnOffInterface)
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatLoss
Modelica.Blocks.Interfaces.RealOutputPElectrical power consumption
Modelica.Blocks.Interfaces.RealInputmodModulation level

Components

TypeNameDefaultDescription
Medium1.MassFlowRatem1_flow (from PartialFourPortInterface)port_a1.m_flowMass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp1 (from PartialFourPortInterface)port_a1.p - port_b1.pPressure difference between port_a1 and port_b1
Medium2.MassFlowRatem2_flow (from PartialFourPortInterface)port_a2.m_flowMass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp2 (from PartialFourPortInterface)port_a2.p - port_b2.pPressure difference between port_a2 and port_b2
Medium1.ThermodynamicStatesta_a1 (from PartialFourPortInterface)if allowFlowReversal1 then Medium1.setState_phX(port_a1.p, noEvent(actualStream(port_a1.h_outflow)), noEvent(actualStream(port_a1.Xi_outflow))) else Medium1.setState_phX(port_a1.p, inStream(port_a1.h_outflow), inStream(port_a1.Xi_outflow))Medium properties in port_a1
Medium1.ThermodynamicStatesta_b1 (from PartialFourPortInterface)if allowFlowReversal1 then Medium1.setState_phX(port_b1.p, noEvent(actualStream(port_b1.h_outflow)), noEvent(actualStream(port_b1.Xi_outflow))) else Medium1.setState_phX(port_b1.p, port_b1.h_outflow, port_b1.Xi_outflow)Medium properties in port_b1
Medium2.ThermodynamicStatesta_a2 (from PartialFourPortInterface)if allowFlowReversal2 then Medium2.setState_phX(port_a2.p, noEvent(actualStream(port_a2.h_outflow)), noEvent(actualStream(port_a2.Xi_outflow))) else Medium2.setState_phX(port_a2.p, inStream(port_a2.h_outflow), inStream(port_a2.Xi_outflow))Medium properties in port_a2
Medium2.ThermodynamicStatesta_b2 (from PartialFourPortInterface)if allowFlowReversal2 then Medium2.setState_phX(port_b2.p, noEvent(actualStream(port_b2.h_outflow)), noEvent(actualStream(port_b2.Xi_outflow))) else Medium2.setState_phX(port_b2.p, port_b2.h_outflow, port_b2.Xi_outflow)Medium properties in port_b2
Modelica.Units.SI.HeatFlowRateQ1_flow (from FourPortHeatMassExchanger)vol1.heatPort.Q_flowHeat flow rate into medium 1
Modelica.Units.SI.HeatFlowRateQ2_flow (from FourPortHeatMassExchanger)vol2.heatPort.Q_flowHeat flow rate into medium 2
IDEAS.Fluid.MixingVolumes.BaseClasses.MixingVolumeHeatPortvol1 (from FourPortHeatMassExchanger)
IDEAS.Fluid.MixingVolumes.MixingVolumevol2 (from FourPortHeatMassExchanger)
IDEAS.Fluid.FixedResistances.PressureDroppreDro1 (from FourPortHeatMassExchanger)Flow resistance of fluid 1
IDEAS.Fluid.FixedResistances.PressureDroppreDro2 (from FourPortHeatMassExchanger)Flow resistance of fluid 2
Modelica.Blocks.Tables.CombiTable2DspowerTableInterpolation table for finding the electrical power
Modelica.Blocks.Tables.CombiTable2DscopTable
Modelica.Blocks.Sources.RealExpressionQEvap
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlowprescribedHeatEvap
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlowprescribedHeatCond
Modelica.Thermal.HeatTransfer.Components.ThermalConductorthermalConductorLosses
Modelica.Blocks.Sources.RealExpressionQCond
Modelica.Units.SI.PowerP_elElectrical power consumption
Modelica.Units.SI.PowerP_evapThermal power of the evaporator (positive)
Modelica.Units.SI.PowerP_condThermal power of the condensor (positive)
Modelica.Units.SI.TemperatureTEvapInEvaporator inlet temperature
RealcopCOP of the heat pump
Modelica.Blocks.Sources.RealExpressionPElec
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensorT_out_cond
Modelica.Blocks.Sources.RealExpressionTEvapInExp

Revisions

  • January 2014 by Damien Picard:
    Remove unnecessary filters + add modulation temperature security to avoid overheating and undercooling and limit number of events.
  • December 2014 by Damien Picard:
    Make filter parameters final to avoid warning durings compilation.
  • December 2014 by Damien Picard:
    Add value to internal variable modulationRate_internal to close the equations when use_modulation_security is false. Add a modulation input.
  • November 2014 by Filip Jorissen:
    Added 'AvoidEvents' parameter, temperature protection and documentation.
  • March 2014 by Filip Jorissen:
    Initial version