Skip to content

Commit b48f68e

Browse files
Merge branch 'lbl-srg:master' into master
2 parents b8b5028 + 8f64586 commit b48f68e

142 files changed

Lines changed: 4537 additions & 2964 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/formatting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# Skip if the commit message contains "ci skip"
2525
if: "!contains(github.event.head_commit.message, 'ci skip')"
2626

27-
runs-on: ubuntu-22.04
27+
runs-on: ubuntu-24.04
2828

2929
steps:
3030
# Checks-out repository under $GITHUB_WORKSPACE, so job can access it

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ env:
3333
- DOCKER_REPONAME=lbnlblum
3434
- BUILDINGSPY_VERSION=BuildingsPy@0bc654fd913c83f64163be167807e8989eff0293
3535
- OMC_VERSION=ubuntu-2204-omc:1.24.0-1
36-
- OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.51.6
36+
- OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.55.11
3737
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2025x-x86_64
3838
- ENERGYPLUS_9_6_0=EnergyPlus-9.6.0-f420c06a69-Linux-Ubuntu20.04-x86_64
3939
- ENERGYPLUS_23_1_0=EnergyPlus-23.1.0-87ed9199d4-Linux-Ubuntu20.04-x86_64

Buildings/DHC/ETS/Combined/Controls/BaseClasses/PartialSupervisory.mo

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
within Buildings.DHC.ETS.Combined.Controls.BaseClasses;
22
partial block PartialSupervisory
33
"Partial model for supervisory controller"
4-
extends Modelica.Blocks.Icons.Block;
4+
55
parameter Integer nSouAmb
66
"Number of ambient sources to control"
77
annotation (Evaluate=true);
@@ -88,7 +88,16 @@ equation
8888
annotation (
8989
Icon(
9090
coordinateSystem(
91-
preserveAspectRatio=false)),
91+
preserveAspectRatio=false), graphics={
92+
Rectangle(
93+
extent={{-100,-100},{100,100}},
94+
lineColor={0,0,127},
95+
fillColor={255,255,255},
96+
fillPattern=FillPattern.Solid),
97+
Text(
98+
textColor={0,0,255},
99+
extent={{-100,100},{102,140}},
100+
textString="%name")}),
92101
Diagram(
93102
coordinateSystem(
94103
preserveAspectRatio=false,
Lines changed: 61 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,151 @@
11
within Buildings.DHC.ETS.Combined.Controls;
22
model Borefield
33
"Borefield controller"
4-
extends Modelica.Blocks.Icons.Block;
5-
parameter Modelica.Units.SI.Temperature TBorWatEntMax(displayUnit="degC")
4+
5+
parameter Real TBorWatEntMax(
6+
final quantity="ThermodynamicTemperature",
7+
final unit="K",
8+
displayUnit="degC")
69
"Maximum value of borefield water entering temperature";
710
parameter Real spePumBorMin(
811
final unit="1")=0.1
912
"Borefield pump minimum speed";
1013
Buildings.Controls.OBC.CDL.Interfaces.RealInput yValIso_actual[2]
1114
"Isolation valves return position (fractional)"
12-
annotation (Placement(transformation(extent={{-140,-60},{-100,-20}}),
15+
annotation (Placement(transformation(extent={{-140,-80},{-100,-40}}),
1316
iconTransformation(extent={{-140,-20},{-100,20}})));
1417
Buildings.Controls.OBC.CDL.Interfaces.RealInput u
1518
"Control signal from supervisory"
16-
annotation (Placement(transformation(extent={{-140,40},{-100,80}}),
19+
annotation (Placement(transformation(extent={{-140,60},{-100,100}}),
1720
iconTransformation(extent={{-140,40},{-100,80}})));
1821
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPum(
1922
final unit="kg/s")
2023
"Control signal for borefield pump"
21-
annotation (Placement(transformation(extent={{100,40},{140,80}}),
24+
annotation (Placement(transformation(extent={{100,60},{140,100}}),
2225
iconTransformation(extent={{100,40},{140,80}})));
2326
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValMix(
2427
final unit="1")
2528
"Control signal for borefield mixing valve"
26-
annotation (Placement(transformation(extent={{100,-80},{140,-40}}),
29+
annotation (Placement(transformation(extent={{100,-90},{140,-50}}),
2730
iconTransformation(extent={{100,-80},{140,-40}})));
2831
Buildings.Controls.OBC.CDL.Interfaces.RealInput TBorWatEnt(
2932
final unit="K",
3033
displayUnit="degC")
3134
"Borefield water entering temperature"
32-
annotation (Placement(transformation(extent={{-140,-120},{-100,-80}}),
35+
annotation (Placement(transformation(extent={{-140,-130},{-100,-90}}),
3336
iconTransformation(extent={{-140,-80},{-100,-40}})));
3437
Buildings.Controls.OBC.CDL.Reals.PIDWithReset conMix(
3538
final yMin=0,
3639
final yMax=1,
3740
final reverseActing=true,
3841
y_reset=0,
3942
k=0.1,
40-
final controllerType=Modelica.Blocks.Types.SimpleController.PI,
41-
Ti(
42-
displayUnit="s")=120)
43+
final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
44+
Ti(displayUnit="s")=120)
4345
"Mixing valve controller"
44-
annotation (Placement(transformation(extent={{-10,-90},{10,-70}})));
46+
annotation (Placement(transformation(extent={{-10,-100},{10,-80}})));
4547
Buildings.Controls.OBC.CDL.Reals.Sources.Constant maxTBorWatEnt(
4648
y(final unit="K",
4749
displayUnit="degC"),
4850
final k=TBorWatEntMax)
4951
"Maximum value of borefield water entering temperature"
50-
annotation (Placement(transformation(extent={{-50,-90},{-30,-70}})));
52+
annotation (Placement(transformation(extent={{-50,-100},{-30,-80}})));
5153
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold opeVal(
5254
final t=0.9,
5355
final h=0.1)
5456
"True if at least one isolation valve is open"
55-
annotation (Placement(transformation(extent={{-50,-58},{-30,-38}})));
57+
annotation (Placement(transformation(extent={{-40,-70},{-20,-50}})));
5658
Buildings.Controls.OBC.CDL.Reals.MultiMax multiMax1(
5759
final nin=2)
5860
"Maximum opening"
59-
annotation (Placement(transformation(extent={{-90,-50},{-70,-30}})));
61+
annotation (Placement(transformation(extent={{-80,-70},{-60,-50}})));
6062
Buildings.Controls.OBC.CDL.Reals.GreaterThreshold enaSup(
6163
final t=0.05,
6264
final h=0.025)
6365
"Borefield enabled from supervisory"
64-
annotation (Placement(transformation(extent={{-50,-30},{-30,-10}})));
66+
annotation (Placement(transformation(extent={{-40,-40},{-20,-20}})));
6567
Buildings.Controls.OBC.CDL.Reals.Switch runBor
6668
"Enable borefield system pump"
67-
annotation (Placement(transformation(extent={{70,50},{90,70}})));
69+
annotation (Placement(transformation(extent={{70,70},{90,90}})));
6870
Buildings.Controls.OBC.CDL.Reals.Sources.Constant limVal(
6971
final k=0.3)
7072
"Control signal value for full opening of the valve"
71-
annotation (Placement(transformation(extent={{-40,10},{-20,30}})));
73+
annotation (Placement(transformation(extent={{-40,20},{-20,40}})));
7274
Buildings.Controls.OBC.CDL.Reals.Sources.Constant speMin(
7375
final k=spePumBorMin)
7476
"Minimum pump speed"
75-
annotation (Placement(transformation(extent={{-40,74},{-20,94}})));
77+
annotation (Placement(transformation(extent={{-40,94},{-20,114}})));
7678
Buildings.Controls.OBC.CDL.Logical.And enaBor
7779
"Borefield enable signal"
78-
annotation (Placement(transformation(extent={{-10,-40},{10,-20}})));
80+
annotation (Placement(transformation(extent={{20,-50},{40,-30}})));
7981
Buildings.Controls.OBC.CDL.Reals.Line mapSpe
8082
"Mapping function for pump speed"
81-
annotation (Placement(transformation(extent={{20,70},{40,90}})));
83+
annotation (Placement(transformation(extent={{20,90},{40,110}})));
8284
Buildings.Controls.OBC.CDL.Reals.Sources.Constant one(
8385
final k=1)
8486
"One"
8587
annotation (Placement(transformation(extent={{-20,-10},{0,10}})));
8688
Buildings.Controls.OBC.CDL.Reals.Sources.Constant zer(
8789
final k=0)
8890
"Zero"
89-
annotation (Placement(transformation(extent={{-60,30},{-40,50}})));
91+
annotation (Placement(transformation(extent={{-60,50},{-40,70}})));
9092
Buildings.Controls.OBC.CDL.Reals.Line mapVal
9193
"Mapping function for valve opening"
92-
annotation (Placement(transformation(extent={{20,30},{40,50}})));
94+
annotation (Placement(transformation(extent={{20,40},{40,60}})));
9395
Buildings.Controls.OBC.CDL.Reals.Min min1
9496
"Minimum"
95-
annotation (Placement(transformation(extent={{70,-70},{90,-50}})));
97+
annotation (Placement(transformation(extent={{70,-80},{90,-60}})));
9698
equation
9799
connect(multiMax1.y,opeVal.u)
98-
annotation (Line(points={{-68,-40},{-60,-40},{-60,-48},{-52,-48}},color={0,0,127}));
100+
annotation (Line(points={{-58,-60},{-42,-60}}, color={0,0,127}));
99101
connect(yValIso_actual,multiMax1.u)
100-
annotation (Line(points={{-120,-40},{-92,-40}},color={0,0,127}));
102+
annotation (Line(points={{-120,-60},{-82,-60}},color={0,0,127}));
101103
connect(u,enaSup.u)
102-
annotation (Line(points={{-120,60},{-80,60},{-80,-20},{-52,-20}},color={0,0,127}));
104+
annotation (Line(points={{-120,80},{-80,80},{-80,-30},{-42,-30}},color={0,0,127}));
103105
connect(enaSup.y,enaBor.u1)
104-
annotation (Line(points={{-28,-20},{-20,-20},{-20,-30},{-12,-30}},color={255,0,255}));
106+
annotation (Line(points={{-18,-30},{0,-30},{0,-40},{18,-40}}, color={255,0,255}));
105107
connect(opeVal.y,enaBor.u2)
106-
annotation (Line(points={{-28,-48},{-20,-48},{-20,-38},{-12,-38}},color={255,0,255}));
108+
annotation (Line(points={{-18,-60},{0,-60},{0,-48},{18,-48}}, color={255,0,255}));
107109
connect(enaBor.y,conMix.trigger)
108-
annotation (Line(points={{12,-30},{20,-30},{20,-96},{-6,-96},{-6,-92}},color={255,0,255}));
110+
annotation (Line(points={{42,-40},{60,-40},{60,-106},{-6,-106},{-6,-102}}, color={255,0,255}));
109111
connect(maxTBorWatEnt.y,conMix.u_s)
110-
annotation (Line(points={{-28,-80},{-12,-80}},color={0,0,127}));
112+
annotation (Line(points={{-28,-90},{-12,-90}},color={0,0,127}));
111113
connect(runBor.y,yPum)
112-
annotation (Line(points={{92,60},{120,60}},color={0,0,127}));
114+
annotation (Line(points={{92,80},{120,80}},color={0,0,127}));
113115
connect(TBorWatEnt,conMix.u_m)
114-
annotation (Line(points={{-120,-100},{0,-100},{0,-92}},color={0,0,127}));
116+
annotation (Line(points={{-120,-110},{0,-110},{0,-102}}, color={0,0,127}));
115117
connect(enaBor.y,runBor.u2)
116-
annotation (Line(points={{12,-30},{20,-30},{20,20},{64,20},{64,60},{68,60}},color={255,0,255}));
118+
annotation (Line(points={{42,-40},{60,-40},{60,80},{68,80}}, color={255,0,255}));
117119
connect(mapSpe.y,runBor.u1)
118-
annotation (Line(points={{42,80},{60,80},{60,68},{68,68}},color={0,0,127}));
120+
annotation (Line(points={{42,100},{60,100},{60,88},{68,88}}, color={0,0,127}));
119121
connect(u,mapSpe.u)
120-
annotation (Line(points={{-120,60},{0,60},{0,80},{18,80}},color={0,0,127}));
122+
annotation (Line(points={{-120,80},{0,80},{0,100},{18,100}}, color={0,0,127}));
121123
connect(speMin.y,mapSpe.f1)
122-
annotation (Line(points={{-18,84},{18,84}},color={0,0,127}));
124+
annotation (Line(points={{-18,104},{18,104}}, color={0,0,127}));
123125
connect(min1.y,yValMix)
124-
annotation (Line(points={{92,-60},{120,-60}},color={0,0,127}));
126+
annotation (Line(points={{92,-70},{120,-70}},color={0,0,127}));
125127
connect(conMix.y,min1.u2)
126-
annotation (Line(points={{12,-80},{60,-80},{60,-66},{68,-66}},color={0,0,127}));
128+
annotation (Line(points={{12,-90},{50,-90},{50,-76},{68,-76}},color={0,0,127}));
127129
connect(mapVal.y,min1.u1)
128-
annotation (Line(points={{42,40},{60,40},{60,-54},{68,-54}},color={0,0,127}));
130+
annotation (Line(points={{42,50},{50,50},{50,-64},{68,-64}},color={0,0,127}));
129131
connect(one.y,mapSpe.x2)
130-
annotation (Line(points={{2,0},{12,0},{12,76},{18,76}},color={0,0,127}));
132+
annotation (Line(points={{2,0},{12,0},{12,96},{18,96}},color={0,0,127}));
131133
connect(one.y,mapSpe.f2)
132-
annotation (Line(points={{2,0},{12,0},{12,72},{18,72}},color={0,0,127}));
134+
annotation (Line(points={{2,0},{12,0},{12,92},{18,92}},color={0,0,127}));
133135
connect(one.y,mapVal.f2)
134-
annotation (Line(points={{2,0},{12,0},{12,32},{18,32}},color={0,0,127}));
136+
annotation (Line(points={{2,0},{12,0},{12,42},{18,42}},color={0,0,127}));
135137
connect(zer.y,mapVal.x1)
136-
annotation (Line(points={{-38,40},{-10,40},{-10,48},{18,48}},color={0,0,127}));
138+
annotation (Line(points={{-38,60},{-10,60},{-10,58},{18,58}},color={0,0,127}));
137139
connect(limVal.y,mapVal.x2)
138-
annotation (Line(points={{-18,20},{6,20},{6,36},{18,36}},color={0,0,127}));
140+
annotation (Line(points={{-18,30},{6,30},{6,46},{18,46}},color={0,0,127}));
139141
connect(u,mapVal.u)
140-
annotation (Line(points={{-120,60},{0,60},{0,40},{18,40}},color={0,0,127}));
142+
annotation (Line(points={{-120,80},{0,80},{0,50},{18,50}},color={0,0,127}));
141143
connect(limVal.y,mapSpe.x1)
142-
annotation (Line(points={{-18,20},{6,20},{6,88},{18,88}},color={0,0,127}));
144+
annotation (Line(points={{-18,30},{6,30},{6,108},{18,108}}, color={0,0,127}));
143145
connect(zer.y,mapVal.f1)
144-
annotation (Line(points={{-38,40},{-10,40},{-10,44},{18,44}},color={0,0,127}));
146+
annotation (Line(points={{-38,60},{-10,60},{-10,54},{18,54}},color={0,0,127}));
145147
connect(zer.y,runBor.u3)
146-
annotation (Line(points={{-38,40},{-10,40},{-10,52},{68,52}},color={0,0,127}));
148+
annotation (Line(points={{-38,60},{-10,60},{-10,72},{68,72}},color={0,0,127}));
147149
annotation (
148150
Diagram(
149151
coordinateSystem(
@@ -200,5 +202,15 @@ the control of the system when the mass flow rate required to meet
200202
the heat or cold rejection demand is below the flow rate corresponding
201203
to the minimum pump speed.
202204
</p>
203-
</html>"));
205+
</html>"),
206+
Icon(graphics={
207+
Rectangle(
208+
extent={{-100,-100},{100,100}},
209+
lineColor={0,0,127},
210+
fillColor={255,255,255},
211+
fillPattern=FillPattern.Solid),
212+
Text(
213+
textColor={0,0,255},
214+
extent={{-100,100},{102,140}},
215+
textString="%name")}));
204216
end Borefield;

Buildings/DHC/ETS/Combined/Controls/Chiller.mo

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
within Buildings.DHC.ETS.Combined.Controls;
22
model Chiller
33
"Chiller controller"
4-
extends Modelica.Blocks.Icons.Block;
5-
parameter Modelica.Units.SI.Temperature TConWatEntMin(displayUnit="degC")
4+
5+
parameter Real TConWatEntMin(
6+
final quantity="ThermodynamicTemperature",
7+
final unit="K",
8+
displayUnit="degC")
69
"Minimum value of condenser water entering temperature";
7-
parameter Modelica.Units.SI.Temperature TEvaWatEntMax(displayUnit="degC")
10+
parameter Real TEvaWatEntMax(
11+
final quantity="ThermodynamicTemperature",
12+
final unit="K",
13+
displayUnit="degC")
814
"Maximum value of evaporator water entering temperature";
915
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uCoo
1016
"Cooling enable signal"
@@ -41,8 +47,8 @@ model Chiller
4147
Buildings.Controls.OBC.CDL.Logical.Or heaOrCoo
4248
"Heating or cooling enabled"
4349
annotation (Placement(transformation(extent={{-120,50},{-100,70}})));
44-
PIDWithEnable conValEva(
45-
final controllerType=Modelica.Blocks.Types.SimpleController.PI,
50+
Buildings.DHC.ETS.Combined.Controls.PIDWithEnable conValEva(
51+
final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
4652
final yMax=1,
4753
final yMin=0,
4854
y_reset=0,
@@ -52,8 +58,8 @@ model Chiller
5258
final reverseActing=true)
5359
"Evaporator three-way valve control"
5460
annotation (Placement(transformation(extent={{50,-10},{70,10}})));
55-
PIDWithEnable conValCon(
56-
final controllerType=Modelica.Blocks.Types.SimpleController.PI,
61+
Buildings.DHC.ETS.Combined.Controls.PIDWithEnable conValCon(
62+
final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
5763
final yMax=1,
5864
final yMin=0,
5965
y_reset=0,
@@ -102,7 +108,16 @@ equation
102108
Icon(
103109
coordinateSystem(
104110
preserveAspectRatio=false,
105-
extent={{-100,-100},{100,100}})),
111+
extent={{-100,-100},{100,100}}), graphics={
112+
Rectangle(
113+
extent={{-100,-100},{100,100}},
114+
lineColor={0,0,127},
115+
fillColor={255,255,255},
116+
fillPattern=FillPattern.Solid),
117+
Text(
118+
textColor={0,0,255},
119+
extent={{-100,100},{102,140}},
120+
textString="%name")}),
106121
Diagram(
107122
coordinateSystem(
108123
preserveAspectRatio=false,
@@ -129,7 +144,7 @@ When enabled,
129144
</p>
130145
<ul>
131146
<li>
132-
the condenser and evaporator pumps are operated at constant speed,
147+
the condenser and evaporator pumps are operated at constant speed, and
133148
</li>
134149
<li>
135150
the condenser (resp. evaporator) mixing valve is modulated with a PI

0 commit comments

Comments
 (0)