modelPartialReversibleVapourCompressionMachine

Grey-box model for reversible heat pumps and chillers using a black-box to simulate the refrigeration cycle

Extends from AixLib.Fluid.Interfaces.PartialFourPortInterface (Partial model with four ports and declaration of quantities that are used by many models).

Information

This partial model for a generic grey-box vapour compression machine (heat pump or chiller) uses empirical data to model the refrigerant cycle. The modelling of system inertias and heat losses allow the simulation of transient states.

Resulting in the choosen model structure, several configurations are possible:

  1. Compressor type: on/off or inverter controlled
  2. Reversible operation / only main operation
  3. Source/Sink: Any combination of mediums is possible
  4. Generik: Losses and inertias can be switched on or off.

Concept

Using a signal bus as a connector, this model working as a heat pump can be easily combined with several control or safety blocks from AixLib.Controls.HeatPump. The relevant data is aggregated. In order to control both chillers and heat pumps, both flow and return temperature are aggregated. The mode signal chooses the operation type of the vapour compression machine:

  • mode = true: Main operation mode (heat pump: heating; chiller: cooling)
  • mode = false: Reversible operation mode (heat pump: cooling; chiller: heating)

To model both on/off and inverter controlled vapour compression machines, the compressor speed is normalizd to a relative value between 0 and 1.

Possible icing of the evaporator is modelled with an input value between 0 and 1.

The model structure is as follows. To understand each submodel, please have a look at the corresponding model information:

  1. InnerCycle (Black Box): Here, the user can use between several input models or just easily create his own, modular black box model. Please look at the model description for more info.
  2. Inertia: A n-order element is used to model system inertias (mass and thermal) of components inside the refrigerant cycle (compressor, pipes, expansion valve)
  3. HeatExchanger: This new model also enable modelling of thermal interias and heat losses in a heat exchanger. Please look at the model description for more info.

Parametrization

To simplify the parametrization of the evaporator and condenser volumes and nominal mass flows there exists an option of automatic estimation based on the nominal usable power of the vapour compression machine. This function uses a linear correlation of these parameters, which was established from the linear regression of more than 20 data sets of water-to-water heat pumps from different manufacturers (e.g. Carrier, Trane, Lennox) ranging from about 25kW to 1MW nominal power. The linear regressions with coefficients of determination above 91% give a good approximation of these parameters. Nevertheless, estimates for machines outside the given range should be checked for plausibility during simulation.

Assumptions

Several assumptions where made in order to model the vapour compression machine. For a detailed description see the corresponding model.

  1. Performance data 2D: In order to model inverter controlled machines, the compressor speed is scaled linearly
  2. Performance data 2D: Reduced evaporator power as a result of icing. The icing factor is multiplied with the evaporator power.
  3. Inertia: The default value of the n-th order element is set to 3. This follows comparisons with experimental data. Previous heat pump models are using n = 1 as a default. However, it was pointed out that a higher order element fits a real heat pump better in
  4. Scaling factor: A scaling facor is implemented for scaling of the thermal power and capacity. The factor scales the parameters V, m_flow_nominal, C, GIns, GOut and dp_nominal. As a result, the vapour compression machine can supply more heat with the COP staying nearly constant. However, one has to make sure that the supplied pressure difference or mass flow is also scaled with this factor, as the nominal values do not increase said mass flow.

Known Limitations

  • The n-th order element has a big influence on computational time. Reducing the order or disabling it completly will decrease computational time.
  • Reversing the mode: A normal 4-way-exchange valve suffers from heat losses and irreversibilities due to switching from one mode to another. Theses losses are not taken into account.

Parameters

TypeNameDefaultDescription
Booleanuse_revtrueIs the vapour compression machine reversible?
Booleanuse_autoCalcfalseEnable automatic estimation of volumes and mass flows?
Modelica.Units.SI.PowerQ_useNominal0Nominal usable heat flow of the vapour compression machine (HP: Heating; Chiller: Cooling)
RealscalingFactor1Scaling-factor of vapour compression machine
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
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
Advanced › Diagnostics
Booleanshow_T (from PartialFourPortInterface)false= true, if actual temperature at port is computed
Booleanshow_TPortfalse= true, if actual temperature at port is computed
Refrigerant inertia
Booleanuse_refInetrueConsider the inertia of the refrigerant cycle
Modelica.Units.SI.FrequencyrefIneFre_constantCut off frequency for inertia of refrigerant cycle
IntegernthOrder3Order of refrigerant cycle interia
Input Connectors
BooleanuseBusConnectorOnlyfalseSet true to use bus connector for modeSet, nSet and iceFac input
Condenser › Parameters
Modelica.Units.SI.MassFlowRatemFlow_conNominalManual input of the nominal mass flow rate (if not automatically calculated)
Modelica.Units.SI.VolumeVConManual input of the condenser volume (if not automatically calculated)
Condenser › Flow resistance
Modelica.Units.SI.PressureDifferencedpCon_nominalPressure drop at nominal mass flow rate
RealdeltaM_con0.1Fraction of nominal mass flow rate where transition to turbulent occurs
Condenser › Heat Losses
Booleanuse_conCaptrueIf heat losses at capacitor side are considered or not
Modelica.Units.SI.HeatCapacityCConHeat capacity of Condenser (= cp*m). If you want to neglace the dry mass of the condenser, you can set this value to zero
Modelica.Units.SI.ThermalConductanceGConOut0Constant parameter for heat transfer to the ambient. Represents a sum of thermal resistances such as conductance, insulation and natural convection. If you want to simulate a condenser with additional dry mass but without external heat losses, set the value to zero
Modelica.Units.SI.ThermalConductanceGConIns0Constant parameter for heat transfer to heat exchangers capacity. Represents a sum of thermal resistances such as forced convection and conduction inside of the capacity
Evaporator › Parameters
Modelica.Units.SI.MassFlowRatemFlow_evaNominalManual input of the nominal mass flow rate (if not automatically calculated)
Modelica.Units.SI.VolumeVEvaManual input of the evaporator volume (if not automatically calculated)
Evaporator › Flow resistance
Modelica.Units.SI.PressureDifferencedpEva_nominalPressure drop at nominal mass flow rate
RealdeltaM_eva0.1Fraction of nominal mass flow rate where transition to turbulent occurs
Evaporator › Heat Losses
Booleanuse_evaCaptrueIf heat losses at capacitor side are considered or not
Modelica.Units.SI.HeatCapacityCEvaHeat capacity of Evaporator (= cp*m). If you want to neglace the dry mass of the evaporator, you can set this value to zero
Modelica.Units.SI.ThermalConductanceGEvaOut0Constant parameter for heat transfer to the ambient. Represents a sum of thermal resistances such as conductance, insulation and natural convection. If you want to simulate a evaporator with additional dry mass but without external heat losses, set the value to zero
Modelica.Units.SI.ThermalConductanceGEvaIns0Constant parameter for heat transfer to heat exchangers capacity. Represents a sum of thermal resistances such as forced convection and conduction inside of the capacity
Assumptions › Temperature sensors
Modelica.Units.SI.TimetauSenT1Time constant at nominal flow rate (use tau=0 for steady-state sensor, but see user guide for potential problems)
BooleantransferHeattrueIf true, temperature T converges towards TAmb when no flow
Modelica.Units.SI.TimetauHeaTraEva1200Time constant for heat transfer in temperature sensors in evaporator, default 20 minutes
Modelica.Units.SI.TemperatureTAmbEva_nominal273.15Fixed ambient temperature for heat transfer of sensors at the evaporator side
Modelica.Units.SI.TimetauHeaTraCon1200Time constant for heat transfer in temperature sensors in condenser, default 20 minutes
Modelica.Units.SI.TemperatureTAmbCon_nominal291.15Fixed ambient temperature for heat transfer of sensors at the condenser side
Assumptions › Evaporator
BooleanallowFlowReversalEvatrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Assumptions › Condenser
BooleanallowFlowReversalContrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Initialization › Parameters
Modelica.Blocks.Types.InitinitTypeModelica.Blocks.Types.Init.InitialStateType of initialization (InitialState and InitialOutput are identical)
Initialization › Condenser
Modelica.Media.Interfaces.Types.AbsolutePressurepCon_startMedium_con.p_defaultStart value of pressure
Modelica.Media.Interfaces.Types.TemperatureTCon_startMedium_con.T_defaultStart value of temperature
Modelica.Units.SI.TemperatureTConCap_startMedium_con.T_defaultInitial temperature of heat capacity of condenser
Modelica.Media.Interfaces.Types.MassFraction[Medium_con.nX]XCon_startMedium_con.X_defaultStart value of mass fractions m_i/m
Initialization › Evaporator
Modelica.Media.Interfaces.Types.AbsolutePressurepEva_startMedium_eva.p_defaultStart value of pressure
Modelica.Media.Interfaces.Types.TemperatureTEva_startMedium_eva.T_defaultStart value of temperature
Modelica.Units.SI.TemperatureTEvaCap_startMedium_eva.T_defaultInitial temperature of heat capacity at evaporator
Modelica.Media.Interfaces.Types.MassFraction[Medium_eva.nX]XEva_startMedium_eva.X_defaultStart value of mass fractions m_i/m
Initialization › Refrigerant inertia
Real[nthOrder]x_startzeros(nthOrder)Initial or guess values of states
RealyRefIne_start0Initial or guess value of output (= state)
Dynamics › Equation
Modelica.Fluid.Types.DynamicsmassDynamicsModelica.Fluid.Types.Dynamics.DynamicFreeInitialType of mass balance: dynamic (3 initialization options) or steady state (only affects fluid-models)
Modelica.Fluid.Types.DynamicsenergyDynamicsModelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state (only affects fluid-models)
Advanced › General machine information
BooleanmachineType=true if heat pump; =false if chiller
Advanced › Flow resistance
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanhomotopyInitializationfalse= true, use homotopy method
Booleanlinearizedfalse= true, use linear relation between m_flow and dp for any flow rate

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.RealInputiceFac_inInput signal for icing factor
Modelica.Blocks.Interfaces.RealInputnSetInput signal speed for compressor relative between 0 and 1
AixLib.Obsolete.Year2024.Controls.Interfaces.VapourCompressionMachineControlBussigBus
Modelica.Blocks.Interfaces.RealInputT_amb_evaAmbient temperature on the evaporator side
Modelica.Blocks.Interfaces.RealInputT_amb_conAmbient temperature on the condenser side
Modelica.Blocks.Interfaces.BooleanInputmodeSetSet value of operation mode

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
AixLib.Obsolete.Year2024.Fluid.BaseClasses.PartialInnerCycleinnerCycle
AixLib.Obsolete.Year2024.Fluid.HeatExchangers.EvaporatorCondenserWithCapacityconHeat exchanger model for the condenser
AixLib.Obsolete.Year2024.Fluid.HeatExchangers.EvaporatorCondenserWithCapacityevaHeat exchanger model for the evaporator
Modelica.Blocks.Continuous.CriticalDampingheatFlowIneEvaThis n-th order block represents the inertia of the refrigerant cycle and delays the heat flow
Modelica.Blocks.Routing.RealPassThroughrealPassThroughnSetConUse default nSet value
Modelica.Blocks.Continuous.CriticalDampingheatFlowIneConThis n-th order block represents the inertia of the refrigerant cycle and delays the heat flow
Modelica.Blocks.Routing.RealPassThroughrealPassThroughnSetEvaUse default nSet value
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperaturevarTempOutEvaForeces heat losses according to ambient temperature
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperaturevarTempOutConForeces heat losses according to ambient temperature
AixLib.Fluid.Sensors.TemperatureTwoPortsenT_a2Temperature at sink inlet
AixLib.Fluid.Sensors.TemperatureTwoPortsenT_b2Temperature at sink outlet
AixLib.Fluid.Sensors.MassFlowRatemFlow_evaMass flow sensor at the evaporator
AixLib.Fluid.Sensors.TemperatureTwoPortsenT_b1Temperature at sink outlet
AixLib.Fluid.Sensors.TemperatureTwoPortsenT_a1Temperature at sink inlet
AixLib.Fluid.Sensors.MassFlowRatemFlow_conMass flow sensor at the evaporator
Modelica.Blocks.Logical.GreaterThresholdgreaterThresholdUse default nSet value

Contents

NameDescription
Medium_conMedium at sink side
Medium_evaMedium at source side

Revisions

  • May 22, 2019 by Julian Matthes:
    Rebuild due to the introducion of the thermal machine partial model (see issue #715)
  • November 26, 2018  by Fabian Wüllhorst:
    First implementation (see issue #577)