modelCarnot
Extends from IBPSA.Fluid.Interfaces.PartialFourPortInterface (Partial model transporting fluid between two ports without storing mass or energy).
Information
This is the base class for the Carnot chiller and the Carnot heat pump whose coefficient of performance COP changes with temperatures in the same way as the Carnot efficiency changes.
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 ⁄ (Tuse,0 ⁄ (Tcon,0-Teva,0)),
where Tuse is the temperature of the the useful heat, e.g., the evaporator temperature for a chiller or the condenser temperature for a heat pump.
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
either the part load for cooling in case of a chiller, or the part load of heating in
case of a heat pump, and the coefficients ai
are declared by the parameter a.
Implementation
To make this base class applicable to chiller or heat pumps, it uses
the boolean constant COP_is_for_cooling.
Depending on its value, the equations for the coefficient of performance
and the part load ratio are set up.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| 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.SIunits.MassFlowRate | m1_flow_nominal (from PartialFourPortInterface) | Nominal mass flow rate | |
| Modelica.SIunits.MassFlowRate | m2_flow_nominal (from PartialFourPortInterface) | Nominal mass flow rate | |
| Modelica.SIunits.HeatFlowRate | QEva_flow_nominal | Nominal cooling heat flow rate (QEva_flow_nominal < 0) | |
| Modelica.SIunits.HeatFlowRate | QCon_flow_nominal | Nominal heating flow rate | |
| Modelica.SIunits.TemperatureDifference | dTEva_nominal | -10 | Temperature difference evaporator outlet-inlet |
| Modelica.SIunits.TemperatureDifference | dTCon_nominal | 10 | Temperature difference condenser outlet-inlet |
| Modelica.SIunits.Pressure | dp1_nominal | Pressure difference over condenser | |
| Modelica.SIunits.Pressure | dp2_nominal | Pressure difference over evaporator | |
| 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 |
| Boolean | homotopyInitialization | true | = true, use homotopy method |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialFourPortInterface) | false | = true, if actual temperature at port is computed |
| Efficiency | |||
| Boolean | use_eta_Carnot_nominal | true | Set to true to use Carnot effectiveness etaCarnot_nominal rather than COP_nominal |
| Real | etaCarnot_nominal | COP_nominal/(TUseAct_nominal/(TCon_nominal + TAppCon_nominal - (TEva_nominal - TAppEva_nominal))) | Carnot effectiveness (=COP/COP_Carnot) used if use_eta_Carnot_nominal = true |
| Real | COP_nominal | etaCarnot_nominal*TUseAct_nominal/(TCon_nominal + TAppCon_nominal - (TEva_nominal - TAppEva_nominal)) | Coefficient of performance at TEva_nominal and TCon_nominal, used if use_eta_Carnot_nominal = false |
| Modelica.SIunits.Temperature | TCon_nominal | 303.15 | Condenser temperature used to compute COP_nominal if use_eta_Carnot_nominal=false |
| Modelica.SIunits.Temperature | TEva_nominal | 278.15 | Evaporator temperature used to compute COP_nominal if use_eta_Carnot_nominal=false |
| Real[:] | a | {1} | Coefficients for efficiency curve (need p(a=a, yPL=1)=1) |
| Modelica.SIunits.TemperatureDifference | TAppCon_nominal | if cp1_default < 1500 then 5 else 2 | Temperature difference between refrigerant and working fluid outlet in condenser |
| Modelica.SIunits.TemperatureDifference | TAppEva_nominal | if cp2_default < 1500 then 5 else 2 | Temperature difference between refrigerant and working fluid outlet in evaporator |
| Flow resistance › Condenser | |||
| Boolean | from_dp1 | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Boolean | linearizeFlowResistance1 | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM1 | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Flow resistance › Evaporator | |||
| Boolean | from_dp2 | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Boolean | linearizeFlowResistance2 | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM2 | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Dynamics › Condenser | |||
| Modelica.SIunits.Time | tau1 | 60 | Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState) |
| Modelica.SIunits.Temperature | T1_start | Medium1.T_default | Initial or guess value of set point |
| Dynamics › Evaporator | |||
| Modelica.SIunits.Time | tau2 | 60 | Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState) |
| Modelica.SIunits.Temperature | T2_start | Medium2.T_default | Initial or guess value of set point |
| Dynamics › Evaporator and condenser | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics | 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 | Actual heating heat flow rate added to fluid 1 | |
| Modelica.Blocks.Interfaces.RealOutput | P | Electric power consumed by compressor | |
| Modelica.Blocks.Interfaces.RealOutput | QEva_flow | Actual cooling heat flow rate removed from fluid 2 |
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.SIunits.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.SIunits.PressureDifference | dp2 (from PartialFourPortInterface) | port_a2.p - port_b2.p | Pressure difference between port_a2 and port_b2 |
| Medium1.ThermodynamicState | sta_a1 (from PartialFourPortInterface) | Medium1.setState_phX(port_a1.p, noEvent(actualStream(port_a1.h_outflow)), noEvent(actualStream(port_a1.Xi_outflow))) | Medium properties in port_a1 |
| Medium1.ThermodynamicState | sta_b1 (from PartialFourPortInterface) | Medium1.setState_phX(port_b1.p, noEvent(actualStream(port_b1.h_outflow)), noEvent(actualStream(port_b1.Xi_outflow))) | Medium properties in port_b1 |
| Medium2.ThermodynamicState | sta_a2 (from PartialFourPortInterface) | Medium2.setState_phX(port_a2.p, noEvent(actualStream(port_a2.h_outflow)), noEvent(actualStream(port_a2.Xi_outflow))) | Medium properties in port_a2 |
| Medium2.ThermodynamicState | sta_b2 (from PartialFourPortInterface) | Medium2.setState_phX(port_b2.p, noEvent(actualStream(port_b2.h_outflow)), noEvent(actualStream(port_b2.Xi_outflow))) | Medium properties in port_b2 |
| Real | yPL | if COP_is_for_cooling then QEva_flow/QEva_flow_nominal else QCon_flow/QCon_flow_nominal | Part load ratio |
| Real | etaPL | if evaluate_etaPL then 1 else IBPSA.Utilities.Math.Functions.polynomial(a = a, x = yPL) | Efficiency due to part load (etaPL(yPL=1)=1) |
| Real | COP | etaCarnot_nominal_internal*COPCar*etaPL | Coefficient of performance |
| Real | COPCar | TUseAct/IBPSA.Utilities.Math.Functions.smoothMax(x1 = 1, x2 = TConAct - TEvaAct, deltaX = 0.25) | Carnot efficiency |
| Modelica.SIunits.Temperature | TConAct | 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.SIunits.Temperature | TEvaAct | 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
-
June 16, 2017, by Michael Wetter:
Added temperature difference between fluids in condenser and evaporator for computation of nominal COP and effectiveness.
This is for #698. -
March 28, 2017, by Felix Buenning:
Added temperature difference between fluids in condenser and evaporator. The difference is based on discussions with Emerson Climate Technologies.
This is for #698. -
January 2, 2017, by Filip Jorissen:
Removed option for choosing what temperature should be used to compute the Carnot efficiency. This is for issue 497. -
January 26, 2016, by Michael Wetter:
First implementation of this base class.