Skip to content

Commit

Permalink
Issue2770 air cooled chiller (7.0.x) (#2776)
Browse files Browse the repository at this point in the history
* Apply changes to maintenance 70x branch

* Update release notes

* Removed white-space

* Changed diagram size

* Applied changes from issue2770_airCooledChiller

Co-authored-by: Michael Wetter <[email protected]>
  • Loading branch information
dhblum and mwetter authored Nov 24, 2021
1 parent 2028eb2 commit 1f5a174
Show file tree
Hide file tree
Showing 12 changed files with 382 additions and 21 deletions.
29 changes: 18 additions & 11 deletions Buildings/Fluid/Chillers/BaseClasses/PartialElectric.mo
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ initial equation
assert(PLRMax > PLRMinUnl, "Parameter PLRMax must be bigger than PLRMinUnl");
equation
// Condenser temperatures
TConEnt = Medium1.temperature(Medium1.setState_phX(port_a1.p, inStream(port_a1.h_outflow)));
TConEnt = Medium1.temperature(Medium1.setState_phX(port_a1.p,
inStream(port_a1.h_outflow),
inStream(port_a1.Xi_outflow)));
TConLvg = vol1.heatPort.T;
// Evaporator temperatures
TEvaEnt = Medium2.temperature(Medium2.setState_phX(port_a2.p, inStream(port_a2.h_outflow)));
Expand All @@ -114,38 +116,38 @@ equation
QEva_flow_ava = QEva_flow_nominal*capFunT;
// Cooling capacity required to chill water to setpoint
QEva_flow_set = Buildings.Utilities.Math.Functions.smoothMin(
x1= m2_flow*(hSet-inStream(port_a2.h_outflow)),
x1 = m2_flow*(hSet-inStream(port_a2.h_outflow)),
x2= Q_flow_small,
deltaX=-Q_flow_small/100);

// Part load ratio
PLR1 = Buildings.Utilities.Math.Functions.smoothMin(
x1= QEva_flow_set/(QEva_flow_ava+Q_flow_small),
x2= PLRMax,
x1 = QEva_flow_set/(QEva_flow_ava+Q_flow_small),
x2 = PLRMax,
deltaX=PLRMax/100);
// PLR2 is the compressor part load ratio. The lower bound PLRMinUnl is
// since for PLR1<PLRMinUnl, the chiller uses hot gas bypass, under which
// condition the compressor power is assumed to be the same as if the chiller
// were to operate at PLRMinUnl
PLR2 = Buildings.Utilities.Math.Functions.smoothMax(
x1= PLRMinUnl,
x2= PLR1,
deltaX= PLRMinUnl/100);
x1 = PLRMinUnl,
x2 = PLR1,
deltaX = PLRMinUnl/100);

// Cycling ratio.
// Due to smoothing, this can be about deltaX/10 above 1.0
CR = Buildings.Utilities.Math.Functions.smoothMin(
x1= PLR1/PLRMin,
x2= 1,
x1 = PLR1/PLRMin,
x2 = 1,
deltaX=0.001);

// Compressor power.
P = -QEva_flow_ava/COP_nominal*EIRFunT*EIRFunPLR*CR;
// Heat flow rates into evaporator and condenser
// Q_flow_small is a negative number.
QEva_flow = Buildings.Utilities.Math.Functions.smoothMax(
x1= QEva_flow_set,
x2= QEva_flow_ava,
x1 = QEva_flow_set,
x2 = QEva_flow_ava,
deltaX= -Q_flow_small/10);

//QEva_flow = max(QEva_flow_set, QEva_flow_ava);
Expand Down Expand Up @@ -330,6 +332,11 @@ The function value needs to be assigned to <code>EIRFunPLR</code>.
revisions="<html>
<ul>
<li>
November 19, 2021, by David Blum:<br/>
Add humidity to entering condenser state calculation.<br/>
This is for issue <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2770\">2770</a>.
</li>
<li>
June 28, 2019, by Michael Wetter:<br/>
Removed <code>start</code> values and removed
<code>nominal=1</code> for performance curves.<br/>
Expand Down
76 changes: 73 additions & 3 deletions Buildings/Fluid/Chillers/Data/ElectricEIR.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within Buildings.Fluid.Chillers.Data;
package ElectricEIR "Performance data for chiller ElectricEIR"
extends Modelica.Icons.MaterialPropertiesPackage;

record Generic "Generic data record for chiller ElectricEIR"
extends Buildings.Fluid.Chillers.Data.BaseClasses.Chiller(
final nCapFunT=6,
Expand Down Expand Up @@ -8728,14 +8729,83 @@ Chiller:Electric:EIR,
</pre>
</html>"));

record ElectricEIRChiller_York_YCAL0033EE_101kW_3_1COP_AirCooled =
Buildings.Fluid.Chillers.Data.ElectricEIR.Generic (
QEva_flow_nominal = -100582,
COP_nominal = 3.1,
PLRMin = 0.10,
PLRMinUnl = 0.10,
PLRMax = 1.15,
mEva_flow_nominal = 1000 * 0.0043,
mCon_flow_nominal = 1.2 * 9.4389,
TEvaLvg_nominal = 273.15 + 6.67,
TConEnt_nominal = 273.15 + 35,
TEvaLvgMin = 273.15 + 4.44,
TEvaLvgMax = 273.15 + 10.0,
TConEntMin = 273.15 + 23.89,
TConEntMax = 273.15 + 51.67,
capFunT = {-0.2660645697,0.0998714035,-0.0023814154,0.0628316481,-0.0009644649,-0.0011249224},
EIRFunT = {0.1807017787,0.0271530312,-0.0004553574,0.0188175079,0.0002623276,-0.0012881189},
EIRFunPLR = {0.0,1.0,0.0},
etaMotor = 1.0)
"ElectricEIRChiller York YCAL0033EE 100.6 kW/3.1 COP Air Cooled"
annotation (
defaultComponentName="datChi",
defaultComponentPrefixes="parameter",
Documentation(info=
"<html>
Performance data for chiller model.
This data corresponds to the following EnergyPlus model:
<pre>
Chiller:Electric:EIR,
ElectricEIRChiller York YCAL0033EE 100.6kW/3.1COP, !- Name
100582, !- Reference Capacity {W}
3.1, !- Reference COP {W/W}
6.67, !- Reference Leaving Chilled Water Temperature {C}
35, !- Reference Entering Condenser Fluid Temperature {C}
0.0043, !- Reference Chilled Water Flow Rate {m3/s}
0.0011, !- Reference Condenser Fluid Flow Rate {m3/s}
ElectricEIRChiller York YCAL0033EE 100.6kW/3.1COP CAPFT, !- Cooling Capacity Function of Temperature Curve Name
ElectricEIRChiller York YCAL0033EE 100.6kW/3.1COP EIRFT, !- Electric Input to Cooling Output Ratio Function of Temperature Curve Name
ElectricEIRChiller York YCAL0033EE 100.6kW/3.1COP EIRFPLR, !- Electric Input to Cooling Output Ratio Function of Part Load Ratio Curve Name
0.10, !- Minimum Part Load Ratio
1.15, !- Maximum Part Load Ratio
1.0, !- Optimum Part Load Ratio
0.10, !- Minimum Unloading Ratio
Chilled Water Side Inlet Node, !- Chilled Water Inlet Node Name
Chilled Water Side Outlet Node, !- Chilled Water Outlet Node Name
Condenser Side Inlet Node, !- Condenser Inlet Node Name
Condenser Side Outlet Node, !- Condenser Outlet Node Name
AirCooled, !- Condenser Type
, !- Condenser Fan Power Ratio {W/W}
1.0, !- Fraction of Compressor Electric Consumption Rejected by Condenser
2.0, !- Leaving Chilled Water Lower Temperature Limit {C}
ConstantFlow, !- Chiller Flow Mode
0.0; !- Design Heat Recovery Water Flow Rate {m3/s}
</pre>
<br>
Note that the reference condenser fluid volumetric flow rate listed in the
EnergyPlus performance data is not reasonable. The value obtained
from the manufacturer data sheet is used instead. The data sheet
is available
<a href=\"https://www.johnsoncontrols.com/en_hk/-/media/jci/be/united-states/hvac-equipment/chillers/files/be_eng_guide_-ycal_scroll-chillers-style-e-50-and-60-hz-111417.pdf\">here</a>
. Please see the Section for Physical Data and Nominal Ratings and row for Condender Fans Total Chiller CFM.
</html>"));
annotation(preferredView="info",
Documentation(info="<html>
<p>
Package with performance data for chillers.
</p>
</html>", revisions="<html>
<p>
Generated on 04/25/2016 13:20 by thierry
</p>
<ul>
<li>
November 19, 2021 by David Blum:<br/>
Added air-cooled chiller YCAL0033EE.
</li>
<li>
April 25, 2016 by Thierry Nouidui:<br/>
Generated.
</li>
</ul>
</html>"));
end ElectricEIR;
16 changes: 11 additions & 5 deletions Buildings/Fluid/Chillers/Examples/BaseClasses/PartialElectric.mo
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,25 @@ partial model PartialElectric
redeclare package Medium = Medium1,
use_T_in=true,
m_flow=mCon_flow_nominal,
T=298.15)
T=298.15) "Mass flow source"
annotation (Placement(transformation(extent={{-60,6},{-40,26}})));
Buildings.Fluid.Sources.MassFlowSource_T sou2(
redeclare package Medium = Medium2,
use_T_in=true,
m_flow=mEva_flow_nominal,
T=291.15)
T=291.15) "Mass flow source"
annotation (Placement(transformation(extent={{60,-6},{40,14}})));
Buildings.Fluid.Sources.Boundary_pT sin1(
redeclare package Medium = Medium1,
nPorts=1) annotation (Placement(
nPorts=1) "Pressure source"
annotation (Placement(
transformation(
extent={{10,-10},{-10,10}},
origin={70,40})));
Buildings.Fluid.Sources.Boundary_pT sin2(
redeclare package Medium = Medium2,
nPorts=1) annotation (Placement(
nPorts=1) "Pressure source"
annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
origin={-70,-20})));
Expand All @@ -59,9 +61,11 @@ partial model PartialElectric
duration=3600) "Evaporator inlet temperature"
annotation (Placement(transformation(extent={{50,-40},{70,-20}})));
Modelica.Blocks.Sources.Pulse pulse(period=3600/2)
"Pulse signal generator"
annotation (Placement(transformation(extent={{-80,80},{-60,100}})));
Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=0.5)
annotation (Placement(transformation(extent={{-40,80},{-20,100}})));
"Greater threshold" annotation (
Placement(transformation(extent = {{-40, 80}, {-20, 100}})));
Buildings.Fluid.FixedResistances.PressureDrop res1(
redeclare package Medium = Medium1,
m_flow_nominal=mCon_flow_nominal,
Expand Down Expand Up @@ -94,4 +98,6 @@ equation
points={{-40,-20},{-60,-20}},
color={0,127,255},
smooth=Smooth.None));
annotation (Diagram(coordinateSystem(extent={{-100,-100},{100,120}})), Icon(
coordinateSystem(extent={{-100,-100},{100,120}})));
end PartialElectric;
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
within Buildings.Fluid.Chillers.Examples.BaseClasses;
partial model PartialElectric_AirCooled
"Base class for test model of chiller electric EIR with air-cooled condenser"
package Medium1 = Buildings.Media.Air "Medium model";
package Medium2 = Buildings.Media.Water "Medium model";

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";
parameter Real COPc_nominal = 3 "Chiller COP";
parameter Modelica.SIunits.MassFlowRate mEva_flow_nominal
"Nominal mass flow rate at evaporator";
parameter Modelica.SIunits.MassFlowRate mCon_flow_nominal
"Nominal mass flow rate at condenser";

Sources.MassFlowSource_WeatherData sou1(
redeclare package Medium = Medium1,
m_flow=mCon_flow_nominal)
"Weather data"
annotation (Placement(transformation(extent={{-60,6},{-40,26}})));
Buildings.Fluid.Sources.MassFlowSource_T sou2(
redeclare package Medium = Medium2,
use_T_in=true,
m_flow=mEva_flow_nominal,
T=291.15) "Mass flow source"
annotation (Placement(transformation(extent={{60,-6},{40,14}})));
Buildings.Fluid.Sources.Boundary_pT sin1(
redeclare package Medium = Medium1,
nPorts=1) "Pressure source"
annotation (Placement(
transformation(
extent={{10,-10},{-10,10}},
origin={70,40})));
Buildings.Fluid.Sources.Boundary_pT sin2(
redeclare package Medium = Medium2,
nPorts=1) "Pressure source"
annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
origin={-70,-20})));
Modelica.Blocks.Sources.Ramp TSet(
duration=3600*6,
startTime=197.25*24*3600,
offset=273.15 + 5,
height=5) "Set point for leaving chilled water temperature"
annotation (Placement(transformation(extent={{-80,50},{-60,70}})));
Modelica.Blocks.Sources.Ramp TEva_in(
offset=273.15 + 10,
height=6,
startTime=197*24*3600,
duration=12*3600)
"Evaporator inlet temperature"
annotation (Placement(transformation(extent={{50,-40},{70,-20}})));
Modelica.Blocks.Sources.Pulse pulse(period=3600/2)
"Pulse signal"
annotation (Placement(transformation(extent={{-80,80},{-60,100}})));
Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=0.5)
"Greater threshold"
annotation (Placement(transformation(extent={{-40,80},{-20,100}})));
Buildings.Fluid.FixedResistances.PressureDrop res1(
redeclare package Medium = Medium1,
m_flow_nominal=mCon_flow_nominal,
dp_nominal=6000) "Flow resistance"
annotation (Placement(transformation(extent={{32,30},{52,50}})));
Buildings.Fluid.FixedResistances.PressureDrop res2(
dp_nominal=6000,
redeclare package Medium = Medium2,
m_flow_nominal=mEva_flow_nominal) "Flow resistance"
annotation (Placement(transformation(extent={{-20,-30},{-40,-10}})));
BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
annotation (Placement(transformation(extent={{-100,20},{-80,40}})));
equation
connect(TEva_in.y, sou2.T_in) annotation (Line(
points={{71,-30},{80,-30},{80,8},{62,8}},
color={0,0,127},
smooth=Smooth.None));

connect(greaterThreshold.u, pulse.y) annotation (Line(
points={{-42,90},{-59,90}},
color={0,0,127},
smooth=Smooth.None));
connect(res1.port_b, sin1.ports[1]) annotation (Line(
points={{52,40},{60,40}},
color={0,127,255},
smooth=Smooth.None));
connect(res2.port_b, sin2.ports[1]) annotation (Line(
points={{-40,-20},{-60,-20}},
color={0,127,255},
smooth=Smooth.None));
connect(weaDat.weaBus, sou1.weaBus) annotation (Line(
points={{-80,30},{-70,30},{-70,16.2},{-60,16.2}},
color={255,204,51},
thickness=0.5));
annotation (Diagram(coordinateSystem(extent={{-120,-100},{100,120}})), Icon(
coordinateSystem(extent={{-120,-100},{100,120}})));
end PartialElectric_AirCooled;
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PartialElectric
PartialElectric_AirCooled
74 changes: 74 additions & 0 deletions Buildings/Fluid/Chillers/Examples/ElectricEIR_AirCooled.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
within Buildings.Fluid.Chillers.Examples;
model ElectricEIR_AirCooled
"Test model for chiller electric EIR with air-cooled condenser"
extends Modelica.Icons.Example;
extends Buildings.Fluid.Chillers.Examples.BaseClasses.PartialElectric_AirCooled(
P_nominal=-per.QEva_flow_nominal/per.COP_nominal,
mEva_flow_nominal=per.mEva_flow_nominal,
mCon_flow_nominal=per.mCon_flow_nominal,
sou1(nPorts=1),
sou2(nPorts=1));

parameter Data.ElectricEIR.ElectricEIRChiller_York_YCAL0033EE_101kW_3_1COP_AirCooled
per "Chiller performance data"
annotation (Placement(transformation(extent={{60,80},{80,100}})));

Buildings.Fluid.Chillers.ElectricEIR chi(
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
per=per,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
dp1_nominal=6000,
dp2_nominal=6000) "Chiller model"
annotation (Placement(transformation(extent={{0,0},{20,20}})));

equation
connect(sou1.ports[1], chi.port_a1) annotation (Line(
points={{-40,16},{0,16}},
color={0,127,255},
smooth=Smooth.None));
connect(chi.port_b1, res1.port_a) annotation (Line(
points={{20,16},{26,16},{26,40},{32,40}},
color={0,127,255},
smooth=Smooth.None));
connect(sou2.ports[1], chi.port_a2) annotation (Line(
points={{40,4},{20,4}},
color={0,127,255},
smooth=Smooth.None));
connect(chi.port_b2, res2.port_a) annotation (Line(
points={{0,4},{-10,4},{-10,-20},{-20,-20}},
color={0,127,255},
smooth=Smooth.None));
connect(chi.on, greaterThreshold.y) annotation (Line(
points={{-2,13},{-10,13},{-10,90},{-19,90}},
color={255,0,255},
smooth=Smooth.None));
connect(chi.TSet, TSet.y) annotation (Line(
points={{-2,7},{-30,7},{-30,60},{-59,60}},
color={0,0,127},
smooth=Smooth.None));
annotation (
experiment(
StartTime=17020800,
StopTime=17064000,
Tolerance=1e-06),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Fluid/Chillers/Examples/ElectricEIR_AirCooled.mos"
"Simulate and plot"),
Documentation(info="<html>
<p>
Example that simulates a chiller whose efficiency is computed based on the
condenser entering and evaporator leaving fluid temperature.
A bicubic polynomial is used to compute the chiller part load performance.
This example is for an air-cooled chiller.
</p>
</html>", revisions="<html>
<ul>
<li>
November 19, 2021 by David Blum:<br/>
First implementation.
</li>
</ul>
</html>"),
Diagram(coordinateSystem(extent={{-120,-100},{100,120}})),
Icon(coordinateSystem(extent={{-100,-100},{100,100}})));
end ElectricEIR_AirCooled;
Loading

0 comments on commit 1f5a174

Please sign in to comment.