Skip to content

Commit 03ea1a9

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

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ block PartialController
4444
Buildings.Templates.Plants.Boilers.HotWater.Types.PumpsSecondary.None
4545
and (cfg.have_boiCon and cfg.have_pumHeaWatPriVarCon
4646
or cfg.have_boiNon and cfg.have_pumHeaWatPriVarNon)));
47+
// At least one flow sensor is needed, either in primary or secondary loop for staging.
4748
final parameter Boolean have_senVHeaWatPriCon =
4849
cfg.have_boiCon
4950
and (if cfg.have_pumHeaWatPriVarCon and
@@ -176,6 +177,13 @@ block PartialController
176177
iconTransformation(extent={{-20,-20},{20,20}},
177178
rotation=-90,
178179
origin={100,-60})));
180+
Buildings.Controls.OBC.CDL.Routing.RealExtractSignal VHeaWatSec_flow(
181+
nin=cfg.nLooHeaWatSec,
182+
nout=cfg.nLooHeaWatSec)
183+
if cfg.typPumHeaWatSec <>
184+
Buildings.Templates.Plants.Boilers.HotWater.Types.PumpsSecondary.None
185+
"Secondary HW flow (handles none, single or multiple sensors)"
186+
annotation(Placement(transformation(extent={{-210,-90},{-190,-70}})));
179187
protected
180188
Buildings.Templates.Components.Interfaces.Bus busBoiCon[cfg.nBoiCon]
181189
if cfg.have_boiCon
@@ -273,6 +281,14 @@ equation
273281
annotation(Line(points={{-160,200},{-180,200},{-180,0},{-260,0}},
274282
color={255,204,51},
275283
thickness=0.5));
284+
// HACK: Using an explicit range for bus.VHeaWatSec_flow avoids Dymola's warning
285+
// "Note: since there are connections to elements of pla.bus.VHeaWatSec_flow[]
286+
// we have to expand pla.boiCon.bus.VHeaWatSec_flow[] (which is connected to it)."
287+
connect(bus.VHeaWatSec_flow[1:cfg.nLooHeaWatSec], VHeaWatSec_flow.u)
288+
annotation (Line(
289+
points={{-260,0},{-260,-14},{-240,-14},{-240,-80},{-212,-80}},
290+
color={255,204,51},
291+
thickness=0.5));
276292
annotation(Icon(coordinateSystem(preserveAspectRatio=false)),
277293
Diagram(coordinateSystem(preserveAspectRatio=false,
278294
extent={{-260,-280},{260,280}},

0 commit comments

Comments
 (0)