modelCarnot_y
Extends from Buildings.Fluid.Chillers.BaseClasses.PartialCarnot_y (Partial chiller model with performance curve adjusted based on Carnot efficiency).
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.
Set use_eta_Carnot_nominal=true to specify directly
the Carnot effectiveness ηCarnot,0,
in which case the value of the parameter COP_nominal
will not affect the simulation.
If use_eta_Carnot_nominal=false, the model will use
the value of the parameter COP_nominal
together with the specified nominal temperatures
to compute the Carnot effectiveness as
ηCarnot,0 = COP0 ⁄ (Tcon,0 ⁄ (Tcon,0 + Tapp,con,0 - (Teva,0-Tapp,eva,0))),
where Teva,0 is the evaporator temperature, Tcon,0 is the condenser temperature, Tapp,eva,0 is the evaporator approach temperature and Tapp,con,0 is the condenser approach temperature.
The COP is computed as the product
COP = ηCarnot,0 COPCarnot ηPL,
where COPCarnot is the Carnot efficiency and ηPL is the part load efficiency, expressed using a polynomial. This polynomial has the form
ηPL = a1 + a2 y + a3 y2 + ...,
where y ∈ [0, 1] is
the part load for heating and 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.
The coefficient of performance depends on the evaporator and condenser leaving temperature since otherwise the second law of thermodynamics may be violated.
Notes
For a similar model that can be used as a chiller, see Buildings.Fluid.Chillers.Carnot_y.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | homotopyInitialization (from Carnot) | true | = true, use homotopy method |
| Assumptions | |||
| Boolean | allowFlowReversal1 (from PartialFourPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1 |
| Boolean | allowFlowReversal2 (from PartialFourPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2 |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m1_flow_nominal (from PartialFourPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.MassFlowRate | m2_flow_nominal (from PartialFourPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.HeatFlowRate | QEva_flow_nominal (from Carnot) | Nominal cooling heat flow rate (QEva_flow_nominal < 0) | |
| Modelica.Units.SI.HeatFlowRate | QCon_flow_nominal (from Carnot) | Nominal heating flow rate | |
| Modelica.Units.SI.TemperatureDifference | dTEva_nominal (from Carnot) | -10 | Temperature difference evaporator outlet-inlet |
| Modelica.Units.SI.TemperatureDifference | dTCon_nominal (from Carnot) | 10 | Temperature difference condenser outlet-inlet |
| Modelica.Units.SI.Pressure | dp1_nominal (from Carnot) | Pressure difference over condenser | |
| Modelica.Units.SI.Pressure | dp2_nominal (from Carnot) | Pressure difference over evaporator | |
| Modelica.Units.SI.Power | P_nominal (from PartialCarnot_y) | Nominal compressor power (at y=1) | |
| Advanced | |||
| Medium1.MassFlowRate | m1_flow_small (from PartialFourPortInterface) | 1E-4*abs(m1_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Medium2.MassFlowRate | m2_flow_small (from PartialFourPortInterface) | 1E-4*abs(m2_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialFourPortInterface) | false | = true, if actual temperature at port is computed |
| Efficiency | |||
| Boolean | use_eta_Carnot_nominal (from Carnot) | true | Set to true to use Carnot effectiveness etaCarnot_nominal rather than COP_nominal |
| Real | etaCarnot_nominal (from Carnot) | 0.3 | Carnot effectiveness (=COP/COP_Carnot) used during simulation if use_eta_Carnot_nominal = true |
| Real | COP_nominal (from Carnot) | etaCarnot_nominal*TUseAct_nominal/(TCon_nominal + TAppCon_nominal - (TEva_nominal - TAppEva_nominal)) | Coefficient of performance at TEva_nominal and TCon_nominal, used during simulation if use_eta_Carnot_nominal = false |
| Modelica.Units.SI.Temperature | TCon_nominal (from Carnot) | 303.15 | Condenser temperature used to compute COP_nominal if use_eta_Carnot_nominal=false |
| Modelica.Units.SI.Temperature | TEva_nominal (from Carnot) | 278.15 | Evaporator temperature used to compute COP_nominal if use_eta_Carnot_nominal=false |
| Real[:] | a (from Carnot) | {1} | Coefficients for efficiency curve (need p(a=a, yPL=1)=1) |
| Modelica.Units.SI.TemperatureDifference | TAppCon_nominal (from Carnot) | if cp1_default < 1500 then 5 else 2 | Temperature difference between refrigerant and working fluid outlet in condenser |
| Modelica.Units.SI.TemperatureDifference | TAppEva_nominal (from Carnot) | if cp2_default < 1500 then 5 else 2 | Temperature difference between refrigerant and working fluid outlet in evaporator |
| Flow resistance › Condenser | |||
| Boolean | from_dp1 (from Carnot) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n1 (from Carnot) | 2 | Flow exponent, n1=1 for laminar, n1=2 for turbulent |
| Boolean | linearizeFlowResistance1 (from Carnot) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM1 (from Carnot) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Flow resistance › Evaporator | |||
| Boolean | from_dp2 (from Carnot) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n2 (from Carnot) | 2 | Flow exponent, n2=1 for laminar, n2=2 for turbulent |
| Boolean | linearizeFlowResistance2 (from Carnot) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM2 (from Carnot) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Dynamics › Condenser | |||
| Modelica.Units.SI.Time | tau1 (from Carnot) | 60 | Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState) |
| Modelica.Units.SI.Temperature | T1_start (from Carnot) | Medium1.T_default | Initial or guess value of set point |
| Dynamics › Evaporator | |||
| Modelica.Units.SI.Time | tau2 (from Carnot) | 60 | Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState) |
| Modelica.Units.SI.Temperature | T2_start (from Carnot) | Medium2.T_default | Initial or guess value of set point |
| Dynamics › Evaporator and condenser | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from Carnot) | Modelica.Fluid.Types.Dynamics.SteadyState | Type of energy balance: dynamic (3 initialization options) or steady state |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a1 (from PartialFourPort) | Fluid connector a1 (positive design flow direction is from port_a1 to port_b1) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b1 (from PartialFourPort) | Fluid connector b1 (positive design flow direction is from port_a1 to port_b1) | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_a2 (from PartialFourPort) | Fluid connector a2 (positive design flow direction is from port_a2 to port_b2) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b2 (from PartialFourPort) | Fluid connector b2 (positive design flow direction is from port_a2 to port_b2) | |
| Modelica.Blocks.Interfaces.RealOutput | QCon_flow (from Carnot) | Actual heating heat flow rate added to fluid 1 | |
| Modelica.Blocks.Interfaces.RealOutput | P (from Carnot) | Electric power consumed by compressor | |
| Modelica.Blocks.Interfaces.RealOutput | QEva_flow (from Carnot) | Actual cooling heat flow rate removed from fluid 2 | |
| Modelica.Blocks.Interfaces.RealInput | y (from PartialCarnot_y) | Part load ratio of compressor |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium1.MassFlowRate | m1_flow (from PartialFourPortInterface) | port_a1.m_flow | Mass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp1 (from PartialFourPortInterface) | port_a1.p - port_b1.p | Pressure difference between port_a1 and port_b1 |
| Medium2.MassFlowRate | m2_flow (from PartialFourPortInterface) | port_a2.m_flow | Mass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp2 (from PartialFourPortInterface) | port_a2.p - port_b2.p | Pressure difference between port_a2 and port_b2 |
| Medium1.ThermodynamicState | sta_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.ThermodynamicState | sta_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.ThermodynamicState | sta_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.ThermodynamicState | sta_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 |
| Real | yPL (from Carnot) | if COP_is_for_cooling then QEva_flow/QEva_flow_nominal else QCon_flow/QCon_flow_nominal | Part load ratio |
| Real | etaPL (from Carnot) | if evaluate_etaPL then Buildings.Utilities.Math.Functions.polynomial(a = a, x = yPL) else 1 | Efficiency due to part load (etaPL(yPL=1)=1) |
| Real | COP (from Carnot) | etaCarnot_nominal_internal*COPCar*etaPL | Coefficient of performance |
| Real | COPCar (from Carnot) | TUseAct/Buildings.Utilities.Math.Functions.smoothMax(x1 = 1, x2 = TConAct - TEvaAct, deltaX = 0.25) | Carnot efficiency |
| Modelica.Units.SI.Temperature | TConAct (from Carnot) | Medium1.temperature(staB1) + QCon_flow/QCon_flow_nominal*TAppCon_nominal | Condenser temperature used to compute efficiency, taking into account pinch temperature between fluid and refrigerant |
| Modelica.Units.SI.Temperature | TEvaAct (from Carnot) | Medium2.temperature(staB2) - QEva_flow/QEva_flow_nominal*TAppEva_nominal | Evaporator temperature used to compute efficiency, taking into account pinch temperature between fluid and refrigerant |
Revisions
-
February 3, 2023, by Michael Wetter:
Changed in base class the parameter bindingetaCarnot_nominal(unit="1") = COP_nominal/(TUseAct_nominal/(TCon_nominal+TAppCon_nominal - (TEva_nominal-TAppEva_nominal)))toetaCarnot_nominal(unit="1") = 0.3to avoid a circular assignment.
Improved documentation.
This is for Buildings, #3226. -
January 3, 2017, by Michael Wetter:
Removed parameterseffInpEvaandeffInpConand updated documentation. This is for issue 497. -
August 8, 2016, by Michael Wetter:
Changed default temperature to compute COP to be the leaving temperature as use of the entering temperature can violate the 2nd law if the temperature lift is small.
This is for Annex 60, issue 497. -
January 26, 2016, by Michael Wetter:
Refactored model to use the same base class as Buildings.Fluid.Chillers.Carnot_y.
Changed part load efficiency to depend on heating part load ratio rather than on the compressor part load ratio. -
January 20, 2015, by Damien Picard:
Add Carnot model to Annex 60 from the Buildings library.
Removed the flow direction dependency ofstaA1,staB1,staA2andstaB2as the efficiency of the Carnot machine should only be computed in the design flow direction.
-
December 18, 2015, by Michael Wetter:
Corrected wrong computation ofstaB1andstaB2which mistakenly used theinStreamoperator for the configuration without flow reversal. This is for issue 476. -
November 25, 2015 by Michael Wetter:
Changed sign convention fordTEva_nominalto be consistent with other models. The model will still work with the old values fordTEva_nominal, but it will write a warning so that users can transition their models.
Correctedassertstatement for the efficiency curve. This is for issue 468. -
September 3, 2015 by Michael Wetter:
Expanded documentation. -
May 6, 2015 by Michael Wetter:
AddedprescribedHeatFlowRate=trueforvol2. -
October 9, 2013 by Michael Wetter:
Reimplemented the computation of the port states to avoid using the conditionally removed variablessta_a1,sta_a2,sta_b1andsta_b2. -
May 10, 2013 by Michael Wetter:
Added electric powerPas an output signal. -
October 11, 2010 by Michael Wetter:
Fixed bug in energy balance. -
March 3, 2009 by Michael Wetter:
First implementation.