Buildings.Fluid.Chillers

Package with chiller models

Package Content

NameDescription
Buildings.Fluid.Chillers.Carnot Carnot Chiller with performance curve adjusted based on Carnot efficiency
Buildings.Fluid.Chillers.Examples Examples Collection of models that illustrate model use and test models


Buildings.Fluid.Chillers.Carnot Buildings.Fluid.Chillers.Carnot

Chiller with performance curve adjusted based on Carnot efficiency

Buildings.Fluid.Chillers.Carnot

Information


This is model of a chiller whose coefficient of performance (COP) changes
with temperatures in the same way as the Carnot efficiency changes.
The COP at the nominal conditions can be specified by a parameter, or
it can be computed by the model based on the Carnot effectiveness, in which
case
  COP_nominal = etaCar * COPCar
 
                             TEva
              = etaCar * -----------,
                          TCon-TEva
where TEva is the evaporator temperature and TCon is the condenser temperature. On the Advanced tab, a user can specify what temperature should be used as the evaporator (or condenser) temperature. The options are the temperature of the fluid volume, of port_a, of port_b, or the average temperature of port_a and port_b.

The chiller COP is computed as the product

  COP = etaCar * COPCar * etaPL,
where etaCar is the Carnot effectiveness, COPCar is the Carnot efficiency and etaPL is a polynomial in the control signal y that can be used to take into account a change in COP at part load conditions.

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

Extends from Interfaces.PartialDynamicFourPortTransformer (Partial model transporting two fluid streams between four ports with storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
Nominal condition
MassFlowRatem1_flow_nominal Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominal Nominal mass flow rate [kg/s]
Pressuredp1_nominal Pressure [Pa]
Pressuredp2_nominal Pressure [Pa]
Timetau160Time constant at nominal flow [s]
Timetau260Time constant at nominal flow [s]
PowerP_nominal Nominal compressor power (at y=1) [W]
TemperatureDifferencedTEva_nominal10Temperature difference evaporator inlet-outlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
Initialization
MassFlowRatem1_flow.start0Mass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction) [kg/s]
Pressuredp1.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]
Pressuredp2.start0Pressure difference between port_a2 and port_b2 [Pa]
Efficiency
Booleanuse_eta_CarnottrueSet to true to use Carnot efficiency
RealetaCar Carnot effectiveness (=COP/COP_Carnot)
RealCOP_nominal Coefficient of performance
TemperatureTCon_nominal303.15Condenser temperature [K]
TemperatureTEva_nominal278.15Evaporator temperature [K]
Reala[:]{1}Coefficients for efficiency curve (need p(a=a, y=1)=1)
Assumptions
BooleanallowFlowReversal1system.allowFlowReversal= true to allow flow reversal in medium 1, false restricts to design direction (port_a -> port_b)
BooleanallowFlowReversal2system.allowFlowReversal= true to allow flow reversal in medium 2, false restricts to design direction (port_a -> port_b)
Initialization
SpecificEnthalpyh_outflow_a1_startMedium1.h_defaultStart value for enthalpy flowing out of port a1 [J/kg]
SpecificEnthalpyh_outflow_b1_startMedium1.h_defaultStart value for enthalpy flowing out of port b1 [J/kg]
SpecificEnthalpyh_outflow_a2_startMedium2.h_defaultStart value for enthalpy flowing out of port a2 [J/kg]
SpecificEnthalpyh_outflow_b2_startMedium2.h_defaultStart value for enthalpy flowing out of port b2 [J/kg]
Advanced
MassFlowRatem1_flow_small1E-4*m1_flow_nominalSmall mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*m2_flow_nominalSmall mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_V_flowfalse= true, if volume flow rate at inflowing port is computed
Booleanshow_Ttrue= true, if actual temperature at port is computed (may lead to events)
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
Medium 1
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
Medium 2
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

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)
input RealInputyPart load ratio

Modelica definition

model Carnot 
  "Chiller with performance curve adjusted based on Carnot efficiency"
 extends Interfaces.PartialDynamicFourPortTransformer(
     redeclare Buildings.Fluid.MixingVolumes.MixingVolumeDryAir vol2(redeclare 
        package Medium = Medium2,
     nPorts=2, V=m2_flow_nominal*tau2/rho2_nominal,
     final use_HeatTransfer=true,
     redeclare model HeatTransfer =
          Modelica.Fluid.Vessels.BaseClasses.HeatTransfer.IdealHeatTransfer (
             surfaceAreas={1})),
             final show_T = true);

  parameter Buildings.Fluid.Types.EfficiencyInput effInpEva=
    Buildings.Fluid.Types.EfficiencyInput.volume 
    "Temperatures of evaporator fluid used to compute Carnot efficiency";
  parameter Buildings.Fluid.Types.EfficiencyInput effInpCon=
    Buildings.Fluid.Types.EfficiencyInput.port_a 
    "Temperatures of condenser fluid used to compute Carnot efficiency";
  parameter Modelica.SIunits.Power P_nominal 
    "Nominal compressor power (at y=1)";
  parameter Modelica.SIunits.TemperatureDifference dTEva_nominal = 10 
    "Temperature difference evaporator inlet-outlet";
  parameter Modelica.SIunits.TemperatureDifference dTCon_nominal = 10 
    "Temperature difference condenser outlet-inlet";
  // Efficiency
  parameter Boolean use_eta_Carnot = true 
    "Set to true to use Carnot efficiency";
  parameter Real etaCar(fixed=use_eta_Carnot) 
    "Carnot effectiveness (=COP/COP_Carnot)";
  parameter Real COP_nominal(fixed=not use_eta_Carnot) 
    "Coefficient of performance";
  parameter Modelica.SIunits.Temperature TCon_nominal = 303.15 
    "Condenser temperature";
  parameter Modelica.SIunits.Temperature TEva_nominal = 278.15 
    "Evaporator temperature";

  parameter Real a[:] = {1} 
    "Coefficients for efficiency curve (need p(a=a, y=1)=1)";

  Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeaFloCon 
    "Prescribed heat flow rate";
  Modelica.Blocks.Sources.RealExpression QCon_flow_in(y=QCon_flow) 
    "Condenser heat flow rate";
  Modelica.Blocks.Sources.RealExpression QEva_flow_in(y=QEva_flow) 
    "Evaporator heat flow rate";
  Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHeaFloEva 
    "Prescribed heat flow rate";
  Modelica.Blocks.Interfaces.RealInput y(min=0, max=1) "Part load ratio";
  Real etaPL "Efficiency due to part load of compressor (etaPL(y=1)=1";
  Real COP(min=0) "Coefficient of performance";
  Real COPCar(min=0) "Carnot efficiency";
  Modelica.SIunits.HeatFlowRate QCon_flow "Condenser heat input";
  Modelica.SIunits.HeatFlowRate QEva_flow "Evaporator heat input";
  Modelica.SIunits.Power P "Compressor power";
  Modelica.SIunits.Temperature TCon 
    "Condenser temperature used to compute efficiency";
  Modelica.SIunits.Temperature TEva 
    "Evaporator temperature used to compute efficiency";
initial equation 
  assert(dTEva_nominal>0, "Parameter dTEva_nominal must be positive.");
  assert(dTCon_nominal>0, "Parameter dTCon_nominal must be positive.");
  if use_eta_Carnot then
    COP_nominal = etaCar * TEva_nominal/(TCon_nominal-TEva_nominal);
  else
    etaCar = COP_nominal / (TEva_nominal/(TCon_nominal-TEva_nominal));
  end if;
  assert(abs(Buildings.Utilities.Math.Functions.polynomial(
                                                     a=a, x=y)-1) < 0.01, "Efficiency curve is wrong. Need etaPL(y=1)=1.");
  assert(etaCar > 0.1, "Parameters lead to etaCar < 0.1. Check parameters.");
  assert(etaCar < 1,   "Parameters lead to etaCar > 1. Check parameters.");
equation 
  // Set temperatures that will be used to compute Carnot efficiency
  if effInpCon == Buildings.Fluid.Types.EfficiencyInput.volume then
    TCon = vol1.heatPort.T;
  elseif effInpCon == Buildings.Fluid.Types.EfficiencyInput.port_a then
    TCon = Medium1.temperature(sta_a1);
  elseif effInpCon == Buildings.Fluid.Types.EfficiencyInput.port_b then
    TCon = Medium1.temperature(sta_b1);
  else
    TCon = 0.5 * (Medium1.temperature(sta_a1)+Medium1.temperature(sta_b1));
  end if;

  if effInpEva == Buildings.Fluid.Types.EfficiencyInput.volume then
    TEva = vol2.heatPort.T;
  elseif effInpEva == Buildings.Fluid.Types.EfficiencyInput.port_a then
    TEva = Medium2.temperature(sta_a2);
  elseif effInpEva == Buildings.Fluid.Types.EfficiencyInput.port_b then
    TEva = Medium2.temperature(sta_b2);
  else
    TEva = 0.5 * (Medium2.temperature(sta_a2)+Medium2.temperature(sta_b2));
  end if;

  etaPL  = Buildings.Utilities.Math.Functions.polynomial(
                                                   a=a, x=y);
  P = y * P_nominal;
  COPCar = TEva / max(1, abs(TCon-TEva));
  COP = etaCar * COPCar * etaPL;
  -QEva_flow = COP * P;
  0 = P + QEva_flow + QCon_flow;

  connect(QCon_flow_in.y, preHeaFloCon.Q_flow);
  connect(QEva_flow_in.y, preHeaFloEva.Q_flow);
  connect(preHeaFloEva.port, vol1.heatPort);
  connect(preHeaFloCon.port, vol2.heatPort);
end Carnot;

HTML-documentation generated by Dymola Thu Jun 24 16:54:10 2010.