Skip to content

Commit 729260a

Browse files
author
fabian.wuellhorst
committed
Add options to better understand the errors #18
1 parent 7cd31d2 commit 729260a

File tree

7 files changed

+56
-6
lines changed

7 files changed

+56
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
within BESMod.Examples.UseCaseModelicaConferencePaper;
2+
model ModelNoErrorTMea
3+
extends TEASERBuilding(
4+
use_busForTSet=false,
5+
use_minMax=true,
6+
use_bypass=true);
7+
end ModelNoErrorTMea;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
within BESMod.Examples.UseCaseModelicaConferencePaper;
2+
model ModelWithErrorBoth
3+
extends TEASERBuilding(
4+
use_busForTSet=true,
5+
use_minMax=false,
6+
use_bypass=true);
7+
end ModelWithErrorBoth;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
within BESMod.Examples.UseCaseModelicaConferencePaper;
2+
model ModelWithErrorTMea
3+
extends TEASERBuilding(
4+
use_busForTSet=false,
5+
use_minMax=false,
6+
use_bypass=true);
7+
end ModelWithErrorTMea;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
within BESMod.Examples.UseCaseModelicaConferencePaper;
2+
model ModelWithErrorTSet
3+
extends TEASERBuilding(use_bypass=true);
4+
end ModelWithErrorTSet;

BESMod/Examples/UseCaseModelicaConferencePaper/PartialModelicaConferenceUseCase.mo

+5-3
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ partial model PartialModelicaConferenceUseCase
129129
BESMod.Systems.Ventilation.Distribution.SimpleDistribution
130130
distribution(m_flow_nominal=building.AZone .*building.hZone .* 0.5 ./
131131
3600 .* 1.225),
132-
redeclare
133-
BESMod.Systems.Ventilation.Control.SummerPIDByPass
134-
control(use_bypass=false)));
132+
redeclare BESMod.Systems.Ventilation.Control.SummerPIDByPass control(
133+
use_bypass=use_bypass, use_minMax=use_minMax, use_busForTSet=use_busForTSet)));
135134

136135
parameter Real scalingFactorHP=hydraulic.generation.heatPumpParameters.QPri_flow_nominal
137136
/13000 "May be overwritten to avoid warnings and thus a fail in the CI";
137+
parameter Boolean use_bypass=false "=false to disable the bypass";
138+
parameter Boolean use_minMax = true "=false to use min-max block";
139+
parameter Boolean use_busForTSet = true "=false to use constant TSet";
138140

139141

140142
annotation (experiment(

BESMod/Examples/UseCaseModelicaConferencePaper/package.order

+4
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ PartialModelicaConferenceUseCase
22
BESModSystemParas
33
BuildingsLibraryRoom
44
TEASERBuilding
5+
ModelWithErrorTSet
6+
ModelWithErrorTMea
7+
ModelWithErrorBoth
8+
ModelNoErrorTMea

BESMod/Systems/Ventilation/Control/SummerPIDByPass.mo

+22-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ within BESMod.Systems.Ventilation.Control;
22
model SummerPIDByPass "Bypass the HEX in summer"
33
extends BaseClasses.PartialControl;
44
parameter Boolean use_bypass = true "=false to disable the bypass";
5+
parameter Boolean use_minMax = true "=false to use min-max block";
6+
parameter Boolean use_busForTSet = true "=false to use constant TSet";
7+
58

69
Components.SummerByPass summerByPass
710
if use_bypass
@@ -11,11 +14,14 @@ model SummerPIDByPass "Bypass the HEX in summer"
1114
annotation (Placement(transformation(extent={{-6,-54},{14,-34}})));
1215

1316
Modelica.Blocks.Math.MinMax minMaxMea(final nu=distributionParameters.nParallelDem)
17+
if use_minMax
1418
annotation (Placement(transformation(extent={{-88,32},{-68,52}})));
1519
Modelica.Blocks.Sources.Constant constZero1(k=distributionParameters.TDem_nominal[
16-
1])
20+
1]) if not use_busForTSet
1721
"Bypass is not used"
1822
annotation (Placement(transformation(extent={{-82,-30},{-62,-10}})));
23+
Modelica.Blocks.Routing.RealPassThrough realPassThrough if use_busForTSet
24+
annotation (Placement(transformation(extent={{-68,-62},{-48,-42}})));
1925
equation
2026
connect(summerByPass.TOda, weaBus.TDryBul) annotation (Line(points={{-35.2,26},
2127
{-44,26},{-44,68},{1,68},{1,98}}, color={0,0,127}), Text(
@@ -43,8 +49,21 @@ equation
4349
index=1,
4450
extent={{-6,3},{-6,3}},
4551
horizontalAlignment=TextAlignment.Right));
46-
connect(minMaxMea.yMax, summerByPass.TMea) annotation (Line(points={{-67,48},{
47-
-52,48},{-52,11},{-35.2,11}}, color={0,0,127}));
4852
connect(summerByPass.TZoneSet, constZero1.y) annotation (Line(points={{-35.2,
4953
-4},{-34,-4},{-34,-20},{-61,-20}}, color={0,0,127}));
54+
connect(summerByPass.TMea, buiMeaBus.TZoneMea[1]) annotation (Line(points={{-35.2,
55+
11},{-35.2,10},{-52,10},{-52,48},{-60,48},{-60,79},{-102,79}}, color={
56+
0,0,127}), Text(
57+
string="%second",
58+
index=1,
59+
extent={{-3,6},{-3,6}},
60+
horizontalAlignment=TextAlignment.Right));
61+
connect(realPassThrough.u, useProBus.TZoneSet[1]) annotation (Line(points={{-70,
62+
-52},{-80,-52},{-80,-60},{-103,-60}}, color={0,0,127}), Text(
63+
string="%second",
64+
index=1,
65+
extent={{-6,3},{-6,3}},
66+
horizontalAlignment=TextAlignment.Right));
67+
connect(realPassThrough.y, summerByPass.TZoneSet) annotation (Line(points={{-47,
68+
-52},{-35.2,-52},{-35.2,-4}}, color={0,0,127}));
5069
end SummerPIDByPass;

0 commit comments

Comments
 (0)