Skip to content

Commit 2599460

Browse files
Fix case w/o secondary flow sensor
1 parent 40b6f96 commit 2599460

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

Buildings/Controls/OBC/ASHRAE/G36/Plants/Boilers/PrimaryController.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ model PrimaryController
6969
user interface may not be exposed";
7070

7171
parameter Integer nLooSec(
72-
final min=1,
72+
final min=0,
7373
final start=1)
7474
"Number of secondary loops serviced by primary plant"
7575
annotation (Dialog(tab="General",

Buildings/Templates/Plants/Boilers/HotWater/Components/Controls/G36.mo

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ equation
210210
connect(busLooCon.THeaWatPlaRet, ctlLooPri.TRetPri);
211211
connect(busLooNon.THeaWatPlaRet, ctlLooPri.TRetPri);
212212
connect(bus.THeaWatSecRet, ctlLooPri.TRetSec);
213-
connect(bus.VHeaWatSec_flow, ctlLooPri.VHotWatSec_flow[1]);
214213
connect(busBoiCon.THeaWatSup, ctlLooPri.TSupBoi[1:cfg.nBoiCon]);
215214
connect(busBoiNon.THeaWatSup, ctlLooPri.TSupBoi[(cfg.nBoiCon + 1):nBoi]);
216215
connect(busLooCon.THeaWatPriSup, ctlLooPri.TSupPri);
@@ -233,7 +232,6 @@ equation
233232
// Secondary HW pump controller inputs from plant control bus
234233
connect(bus.dpHeaWatLoc, ctlPumHeaWatSec.dpHotWat_local);
235234
connect(bus.dpHeaWatRem, ctlPumHeaWatSec.dpHotWat_remote);
236-
connect(bus.VHeaWatSec_flow, ctlPumHeaWatSec.VHotWat_flow);
237235
connect(busPumHeaWatSec.y1_actual, ctlPumHeaWatSec.uHotWatPum);
238236
// Primary loop controller outputs to plant control bus
239237
connect(ctlLooPri.TBoiHotWatSupSet[1:cfg.nBoiCon], busBoiCon.THeaWatSupSet);
@@ -301,6 +299,10 @@ equation
301299
connect(reqResHeaWat.y, ctlLooPri.resReq)
302300
annotation(Line(points={{170,120},{-18,120},{-18,26.9},{-12,26.9}},
303301
color={255,127,0}));
302+
connect(VHeaWatSec_flow.y, ctlLooPri.VHotWatSec_flow) annotation (Line(points
303+
={{-188,-80},{-20,-80},{-20,-3.7},{-12,-3.7}}, color={0,0,127}));
304+
connect(VHeaWatSec_flow.y[1], ctlPumHeaWatSec.VHotWat_flow) annotation (Line(
305+
points={{-188,-80},{40,-80},{40,82},{48,82}}, color={0,0,127}));
304306
annotation(Documentation(
305307
info="<html>
306308
<h4>Description</h4>

Buildings/Templates/Plants/Boilers/HotWater/Components/Interfaces/PartialController.mo

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ block PartialController
176176
iconTransformation(extent={{-20,-20},{20,20}},
177177
rotation=-90,
178178
origin={100,-60})));
179+
Buildings.Controls.OBC.CDL.Routing.RealExtractSignal VHeaWatSec_flow(
180+
nin=cfg.nLooHeaWatSec,
181+
nout=cfg.nLooHeaWatSec)
182+
if have_senVHeaWatSec
183+
"Secondary HW flow (handles none, single or multiple sensors)"
184+
annotation(Placement(transformation(extent={{-210,-90},{-190,-70}})));
179185
protected
180186
Buildings.Templates.Components.Interfaces.Bus busBoiCon[cfg.nBoiCon]
181187
if cfg.have_boiCon
@@ -273,6 +279,17 @@ equation
273279
annotation(Line(points={{-160,200},{-180,200},{-180,0},{-260,0}},
274280
color={255,204,51},
275281
thickness=0.5));
282+
/* HACK(AntoineGautier)
283+
* Dymola should remove this at translation if have_senVHeaWatSec is false
284+
* But it doesn't... We have to remove it explicitly.
285+
*/
286+
if have_senVHeaWatSec then
287+
connect(bus.VHeaWatSec_flow, VHeaWatSec_flow.u[1])
288+
annotation (Line(
289+
points={{-260,0},{-260,-14},{-240,-14},{-240,-80},{-212,-80}},
290+
color={255,204,51},
291+
thickness=0.5));
292+
end if;
276293
annotation(Icon(coordinateSystem(preserveAspectRatio=false)),
277294
Diagram(coordinateSystem(preserveAspectRatio=false,
278295
extent={{-260,-280},{260,280}},

0 commit comments

Comments
 (0)