Skip to content

Commit

Permalink
Graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineGautier committed Aug 31, 2023
1 parent 73e2d2a commit 737165e
Show file tree
Hide file tree
Showing 20 changed files with 1,083 additions and 518 deletions.
49 changes: 26 additions & 23 deletions Buildings/Templates/ChilledWaterPlants/AirCooled.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within Buildings.Templates.ChilledWaterPlants;
model AirCooled "Air-cooled chiller plant"
extends Buildings.Templates.ChilledWaterPlants.Interfaces.PartialChilledWaterLoop(
extends
Buildings.Templates.ChilledWaterPlants.Interfaces.PartialChilledWaterLoop(
redeclare replaceable package MediumCon=Buildings.Media.Air,
redeclare final Buildings.Templates.ChilledWaterPlants.Components.Economizers.None eco,
ctl(final typCtlHea=Buildings.Templates.ChilledWaterPlants.Types.ChillerLiftControl.BuiltIn),
Expand All @@ -10,6 +11,15 @@ model AirCooled "Air-cooled chiller plant"
final nPumConWat=0,
final typValCooInlIso=Buildings.Templates.Components.Types.Valve.None,
final typValCooOutIso=Buildings.Templates.Components.Types.Valve.None);
Fluid.Sources.MassFlowSource_WeatherData souAir[nChi](
redeclare each final package Medium = MediumCon,
each final nPorts=1,
each final use_m_flow_in=true)
"Air flow source"
annotation (Placement(transformation(
extent={{10,-10},{-10,10}},
rotation=180,
origin={-80,-192})));

// Air loop
Fluid.Sources.Boundary_pT bouCon(
Expand All @@ -20,23 +30,18 @@ model AirCooled "Air-cooled chiller plant"
transformation(
extent={{10,-10},{-10,10}},
rotation=180,
origin={-120,0})));
Fluid.Sources.MassFlowSource_WeatherData souAir[nChi](
redeclare each final package Medium = MediumCon,
each final nPorts=1,
each final use_m_flow_in=true)
"Air flow source"
annotation (Placement(transformation(
extent={{10,-10},{-10,10}},
rotation=180,
origin={-120,-180})));
origin={-80,0})));
Controls.OBC.CDL.Conversions.BooleanToReal y1Chi[nChi]
"Convert chiller Start/Stop signal into real value"
annotation (Placement(transformation(extent={{-230,130},{-210,150}})));
annotation (Placement(transformation(extent={{-10,-10},{10,10}},
rotation=-90,
origin={-260,110})));
Controls.OBC.CDL.Continuous.MultiplyByParameter mCon_flow[nChi](
final k=chi.mConChi_flow_nominal)
"Compute air mass flow rate at condenser"
annotation (Placement(transformation(extent={{-188,130},{-168,150}})));
annotation (Placement(transformation(extent={{-10,-10},{10,10}},
rotation=-90,
origin={-260,70})));
protected
Buildings.Templates.Components.Interfaces.Bus busChi[nChi]
"Chiller control bus"
Expand All @@ -45,28 +50,26 @@ protected
equation
for i in 1:nChi loop
connect(busWea, souAir[i].weaBus) annotation (Line(
points={{0,280},{0,260},{-140,260},{-140,-180.2},{-130,-180.2}},
points={{0,280},{0,260},{-100,260},{-100,-192.2},{-90,-192.2}},
color={255,204,51},
thickness=0.5));
end for;
connect(souAir.ports[1], inlConChi.ports_a)
annotation(Line(
points={{-110,-180},{-100,-180}}, color={0,127,255}));
points={{-70,-192},{-70,-192}}, color={0,127,255}));
connect(outConChi.port_b, bouCon.ports[1])
annotation (Line(points={{-80,0},{-105,0},{-105,-4.44089e-16},{-110,
-4.44089e-16}},
annotation (Line(points={{-60,0},{-70,0}},
color={0,127,255}));
connect(y1Chi.y, mCon_flow.u)
annotation (Line(points={{-208,140},{-190,140}}, color={0,0,127}));
connect(mCon_flow.y, souAir.m_flow_in) annotation (Line(points={{-166,140},{
-160,140},{-160,-188},{-130,-188}},
color={0,0,127}));
annotation (Line(points={{-260,98},{-260,82}}, color={0,0,127}));
connect(mCon_flow.y, souAir.m_flow_in) annotation (Line(points={{-260,58},{
-260,-200},{-90,-200}}, color={0,0,127}));
connect(busChi.y1, y1Chi.u) annotation (Line(
points={{-260,140},{-232,140}},
points={{-260,140},{-260,122}},
color={255,204,51},
thickness=0.5));
connect(bus.chi, busChi) annotation (Line(
points={{-300,140},{-260,140}},
points={{-300,200},{-280,200},{-280,140},{-260,140}},
color={255,204,51},
thickness=0.5));
annotation (Documentation(info="<html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ model CoolingTowerOpen "Open-circuit cooling towers in parallel"
final show_T=show_T,
final allowFlowReversal=allowFlowReversal,
final energyDynamics=energyDynamics,
final tau=tau)
final tau=tau,
icon_pipe=Buildings.Templates.Components.Types.IconPipe.None)
"Cooler group inlet manifold"
annotation (Placement(transformation(extent={{-90,-10},{-70,10}})));
Buildings.Templates.Components.Routing.MultipleToSingle outCoo(
Expand All @@ -65,7 +66,8 @@ model CoolingTowerOpen "Open-circuit cooling towers in parallel"
final show_T=show_T,
final allowFlowReversal=allowFlowReversal,
final energyDynamics=energyDynamics,
final tau=tau)
final tau=tau,
icon_pipe=Buildings.Templates.Components.Types.IconPipe.None)
"Cooling tower group outlet manifold"
annotation (Placement(transformation(extent={{70,-10},{90,10}})));
equation
Expand Down Expand Up @@ -100,8 +102,6 @@ equation
annotation (Line(points={{50,0},{70,0}}, color={0,127,255}));
annotation (
defaultComponentName="coo",
Diagram(coordinateSystem(extent={{-100,-100},{100,100}})),
Icon(coordinateSystem(extent={{-400,-400},{400,400}})),
Documentation(info="<html>
<h4>Control points</h4>
<p>
Expand All @@ -116,5 +116,249 @@ November 18, 2022, by Antoine Gautier:<br/>
First implementation.
</li>
</ul>
</html>"));
</html>"),
Icon(graphics={
Rectangle(
extent={{60,-100},{220,-160}},
lineColor={28,108,200},
pattern=LinePattern.None,
fillColor={239,239,239},
fillPattern=FillPattern.Solid,
visible=nCoo >= 4),
Text(
extent={{60,-100},{220,-160}},
textColor={0,0,0},
visible=nCoo >= 4,
textString="CT-4"),
Rectangle(
extent={{-780,-100},{-620,-160}},
lineColor={28,108,200},
pattern=LinePattern.None,
fillColor={239,239,239},
fillPattern=FillPattern.Solid,
visible=nCoo >= 1),
Rectangle(
extent={{-620,160},{-780,-160}},
lineColor={0,0,0},
lineThickness=1,
visible=nCoo >= 1),
Text( extent={{-780,-98},{-620,-158}},
textColor={0,0,0},
textString="CT-1",
visible=nCoo >= 1),
Bitmap(
extent={{-740,160},{-660,240}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Actuators/VFD.svg",
visible=nCoo >= 1),
Bitmap(
extent={{-60,-60},{60,60}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Fans/Propeller.svg",
origin={-700,122},
rotation=-90,
visible=nCoo >= 1),
Line(
points={{-820,-240},{-820,80},{-780,80}},
color={0,0,0},
pattern=LinePattern.Dash,
thickness=5,
visible=nCoo >= 1),
Line(
points={{-700,-160},{-700,-300},{0,-300},{0,-302}},
color={0,0,0},
thickness=5,
visible=nCoo >= 1),
Rectangle(
extent={{-500,-100},{-340,-160}},
lineColor={28,108,200},
pattern=LinePattern.None,
fillColor={239,239,239},
fillPattern=FillPattern.Solid,
visible=nCoo >= 2),
Rectangle(
extent={{-340,160},{-500,-160}},
lineColor={0,0,0},
lineThickness=1,
visible=nCoo >= 2),
Text( extent={{-500,-98},{-340,-158}},
textColor={0,0,0},
visible=nCoo >= 2,
textString="CT-2"),
Bitmap(
extent={{-460,160},{-380,240}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Actuators/VFD.svg",
visible=nCoo >= 2),
Bitmap(
extent={{-60,-60},{60,60}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Fans/Propeller.svg",
origin={-420,122},
rotation=-90,
visible=nCoo >= 2),
Line(
points={{-822,-240},{-540,-240},{-540,80},{-500,80}},
color={0,0,0},
pattern=LinePattern.Dash,
thickness=5,
visible=nCoo >= 2),
Line(
points={{-420,-160},{-420,-300}},
color={0,0,0},
thickness=5,
visible=nCoo >= 2),
Rectangle(
extent={{-220,-100},{-60,-160}},
lineColor={28,108,200},
pattern=LinePattern.None,
fillColor={239,239,239},
fillPattern=FillPattern.Solid,
visible=nCoo >= 3),
Rectangle(
extent={{-60,160},{-220,-160}},
lineColor={0,0,0},
lineThickness=1,
visible=nCoo >= 3),
Text( extent={{-220,-98},{-60,-158}},
textColor={0,0,0},
visible=nCoo >= 3,
textString="CT-3"),
Bitmap(
extent={{-180,160},{-100,240}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Actuators/VFD.svg",
visible=nCoo >= 3),
Bitmap(
extent={{-60,-60},{60,60}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Fans/Propeller.svg",
origin={-140,122},
rotation=-90,
visible=nCoo >= 3),
Line(
points={{-542,-240},{-260,-240},{-260,80},{-220,80}},
color={0,0,0},
pattern=LinePattern.Dash,
thickness=5,
visible=nCoo >= 3),
Line(
points={{-140,-160},{-140,-300}},
color={0,0,0},
thickness=5,
visible=nCoo >= 3),
Rectangle(
extent={{220,160},{60,-160}},
lineColor={0,0,0},
lineThickness=1,
visible=nCoo >= 4),
Bitmap(
extent={{100,160},{180,240}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Actuators/VFD.svg",
visible=nCoo >= 4),
Bitmap(
extent={{-60,-60},{60,60}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Fans/Propeller.svg",
origin={140,122},
rotation=-90,
visible=nCoo >= 4),
Line(
points={{-262,-240},{20,-240},{20,80},{60,80}},
color={0,0,0},
pattern=LinePattern.Dash,
thickness=5,
visible=nCoo >= 4),
Line(
points={{140,-160},{140,-300},{0,-300}},
color={0,0,0},
thickness=5,
visible=nCoo >= 4),
Bitmap(
extent={{380,160},{460,240}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Actuators/VFD.svg",
visible=nCoo >= 5),
Bitmap(
extent={{-60,-60},{60,60}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Fans/Propeller.svg",
origin={420,122},
rotation=-90,
visible=nCoo >= 5),
Line(
points={{18,-240},{300,-240},{300,80},{340,80}},
color={0,0,0},
pattern=LinePattern.Dash,
thickness=5,
visible=nCoo >= 5),
Line(
points={{420,-160},{420,-300},{140,-300}},
color={0,0,0},
thickness=5,
visible=nCoo >= 5),
Rectangle(
extent={{340,-100},{500,-160}},
lineColor={28,108,200},
pattern=LinePattern.None,
fillColor={239,239,239},
fillPattern=FillPattern.Solid,
visible=nCoo >= 5),
Rectangle(
extent={{500,160},{340,-160}},
lineColor={0,0,0},
lineThickness=1,
visible=nCoo >= 5),
Text(
extent={{340,-100},{500,-160}},
textColor={0,0,0},
visible=nCoo >= 5,
textString="CT-5"),
Bitmap(
extent={{660,160},{740,240}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Actuators/VFD.svg",
visible=nCoo >= 6),
Bitmap(
extent={{-60,-60},{60,60}},
fileName=
"modelica://Buildings/Resources/Images/Templates/Components/Fans/Propeller.svg",
origin={700,122},
rotation=-90,
visible=nCoo >= 6),
Line(
points={{298,-240},{580,-240},{580,80},{620,80}},
color={0,0,0},
pattern=LinePattern.Dash,
thickness=5,
visible=nCoo >= 6),
Line(
points={{700,-160},{700,-300},{420,-300}},
color={0,0,0},
thickness=5,
visible=nCoo >= 6),
Rectangle(
extent={{620,-100},{780,-160}},
lineColor={28,108,200},
pattern=LinePattern.None,
fillColor={239,239,239},
fillPattern=FillPattern.Solid,
visible=nCoo >= 6),
Rectangle(
extent={{780,160},{620,-160}},
lineColor={0,0,0},
lineThickness=1,
visible=nCoo >= 6),
Text(
extent={{620,-100},{780,-160}},
textColor={0,0,0},
visible=nCoo >= 6,
textString="CT-6")}));
end CoolingTowerOpen;
Loading

0 comments on commit 737165e

Please sign in to comment.