Skip to content

Commit 70734bd

Browse files
authored
Merge pull request #1439 from open-ideas/issue1437_ExamplesIBPSA
Issue1437 Fix OM scripting errors
2 parents 7d3d01d + 1d8a20f commit 70734bd

File tree

4 files changed

+48
-41
lines changed

4 files changed

+48
-41
lines changed

IDEAS/Buildings/Components/Interfaces/RectangularZoneTemplateInterface.mo

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ partial model RectangularZoneTemplateInterface
396396
// open door modelling
397397
parameter Boolean hasCavityA = false
398398
"=true, to model open door or cavity in internal wall"
399-
annotation(Dialog(tab="Face A", group="Cavity or open door", enable=(bouTypeA==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
399+
annotation(Dialog(tab="Face A", group="Cavity or open door", enable=(bouTypA==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
400400
parameter Modelica.Units.SI.Length hA(min=0) = 2
401401
"Height of (rectangular) cavity in internal wall" annotation (Dialog(
402402
enable=hasCavityA,
@@ -409,7 +409,7 @@ partial model RectangularZoneTemplateInterface
409409
group="Cavity or open door"));
410410
parameter Boolean hasCavityB = false
411411
"=true, to model open door or cavity in internal wall"
412-
annotation(Dialog(tab="Face B", group="Cavity or open door", enable=(bouTypeB==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
412+
annotation(Dialog(tab="Face B", group="Cavity or open door", enable=(bouTypB==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
413413
parameter Modelica.Units.SI.Length hB(min=0) = 2
414414
"Height of (rectangular) cavity in internal wall" annotation (Dialog(
415415
enable=hasCavityB,
@@ -422,7 +422,7 @@ partial model RectangularZoneTemplateInterface
422422
group="Cavity or open door"));
423423
parameter Boolean hasCavityC = false
424424
"=true, to model open door or cavity in internal wall"
425-
annotation(Dialog(tab="Face C", group="Cavity or open door", enable=(bouTypeC==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
425+
annotation(Dialog(tab="Face C", group="Cavity or open door", enable=(bouTypC==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
426426
parameter Modelica.Units.SI.Length hC(min=0) = 2
427427
"Height of (rectangular) cavity in internal wall" annotation (Dialog(
428428
enable=hasCavityC,
@@ -435,7 +435,7 @@ partial model RectangularZoneTemplateInterface
435435
group="Cavity or open door"));
436436
parameter Boolean hasCavityD = false
437437
"=true, to model open door or cavity in internal wall"
438-
annotation(Dialog(tab="Face D", group="Cavity or open door", enable=(bouTypeD==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
438+
annotation(Dialog(tab="Face D", group="Cavity or open door", enable=(bouTypD==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
439439
parameter Modelica.Units.SI.Length hD(min=0) = 2
440440
"Height of (rectangular) cavity in internal wall" annotation (Dialog(
441441
enable=hasCavityD,
@@ -448,7 +448,7 @@ partial model RectangularZoneTemplateInterface
448448
group="Cavity or open door"));
449449
parameter Boolean hasCavityFlo = false
450450
"=true, to model open door or cavity in internal floor"
451-
annotation(Dialog(tab="Floor", group="Cavity or open door", enable=(bouTypeFlo==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
451+
annotation(Dialog(tab="Floor", group="Cavity or open door", enable=(bouTypFlo==IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall)));
452452
parameter Modelica.Units.SI.Length bFlo(min=0) = 2
453453
"Breadth of (rectangular) cavity in internal floor" annotation (Dialog(
454454
enable=hasCavityFlo,
@@ -1099,6 +1099,9 @@ protected
10991099
final parameter Integer indWinD = indWinC + (if hasWinD then 1 else 0);
11001100
final parameter Integer indWinCei = indWinD + (if hasWinCei then 1 else 0);
11011101

1102+
final parameter Boolean hasCavity = hasCavityA or hasCavityB or hasCavityC or hasCavityD or hasCavityFlo
1103+
"Boolean to enable open door modelling parameters if the RectangularZone has a cavity";
1104+
11021105
initial equation
11031106
assert(not bouTypA==IDEAS.Buildings.Components.Interfaces.BoundaryType.SlabOnGround,
11041107
"The value for bouTypA is not supported");
@@ -1546,6 +1549,11 @@ components cannot be propagated.
15461549
</html>", revisions="<html>
15471550
<ul>
15481551
<li>
1552+
June 13, 2025, by Jelger Jansen:<br/>
1553+
Add parameter <code>hasCavity</code> as it is used in the enabling of some parameters and fix typo <code>bouTyp</code>.
1554+
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1437\">#1437</a>.
1555+
</li>
1556+
<li>
15491557
February 4, 2025, by Jelger Jansen:<br/>
15501558
Added <code>Modelica.Units.</code> to one or multiple parameter(s) due to the removal of <code>import</code> in IDEAS/package.mo.
15511559
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1415\">#1415</a> .

IDEAS/Buildings/Components/InterzonalAirFlow/BaseClasses/PartialInterzonalAirFlow.mo

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ partial model PartialInterzonalAirFlow "Partial for interzonal air flow"
1818
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal_vent
1919
"Nominal mass flow rate of ventilation system"
2020
annotation (Dialog(tab="Advanced"));
21+
2122
Modelica.Fluid.Interfaces.FluidPort_b port_b_interior(
2223
redeclare package Medium = Medium,
2324
m_flow(nominal=m_flow_nominal_vent),
@@ -67,29 +68,21 @@ equation
6768

6869
annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={
6970
Rectangle(
70-
extent={{-15,80},{15,-80}},
71+
extent={{-100,100},{60,70}},
7172
fillColor={192,192,192},
7273
fillPattern=FillPattern.Backward,
73-
pattern=LinePattern.None,
74-
origin={-19,86},
75-
rotation=90),
74+
pattern=LinePattern.None),
7675
Rectangle(
7776
extent={{-70,100},{-100,40}},
7877
fillColor={192,192,192},
7978
fillPattern=FillPattern.Backward,
8079
pattern=LinePattern.None),
8180
Line(
82-
points={{57.5,0},{-11,-0.5}},
83-
color={0,128,255},
84-
visible=not allowFlowReversal,
85-
origin={-20.5,31},
86-
rotation=90),
81+
points={{-20,20},{-20,90}},
82+
color={0,128,255}),
8783
Line(
88-
points={{57.5,0},{-13,-0.5}},
89-
color={0,128,255},
90-
visible=not allowFlowReversal,
91-
origin={19.5,33},
92-
rotation=90),
84+
points={{20,20},{20,90}},
85+
color={0,128,255}),
9386
Rectangle(
9487
extent={{-70,0},{-100,-60}},
9588
fillColor={192,192,192},
@@ -100,8 +93,7 @@ equation
10093
lineColor={0,128,255},
10194
fillColor={0,128,255},
10295
fillPattern=FillPattern.Solid,
103-
visible=not allowFlowReversal,
104-
origin={20,41},
96+
origin={20,40},
10597
rotation=270),
10698
Line(
10799
points={{60,70},{-70,70},{-70,-60}},
@@ -113,13 +105,18 @@ equation
113105
lineColor={0,128,255},
114106
fillColor={0,128,255},
115107
fillPattern=FillPattern.Solid,
116-
visible=not allowFlowReversal,
117-
origin={-20,69},
108+
origin={-20,70},
118109
rotation=90)}), Diagram(
119110
coordinateSystem(preserveAspectRatio=false)),
120111
Documentation(revisions="<html>
121112
<ul>
122113
<li>
114+
June 13, 2025, Jelger Jansen:<br/>
115+
Remove <code>visible=not allowFlowReversal</code> in annotation of icon elements.
116+
Improve placement of icon elements.
117+
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1437\">#1437</a>.
118+
</li>
119+
<li>
123120
March 17, 2020, Filip Jorissen:<br/>
124121
Added support for vector fluidport.
125122
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1029\">#1029</a>.

IDEAS/Buildings/Components/InterzonalAirFlow/FixedPressure.mo

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ equation
1414
annotation (Documentation(revisions="<html>
1515
<ul>
1616
<li>
17+
June 13, 2025, Jelger Jansen:<br/>
18+
Remove <code>visible=not allowFlowReversal</code> in annotation of icon elements.
19+
Improve placement of icon elements.
20+
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1437\">#1437</a>.
21+
</li>
22+
<li>
1723
March 17, 2020, Filip Jorissen:<br/>
1824
Added support for vector fluidport.
1925
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1029\">#1029</a>.
@@ -45,21 +51,16 @@ from the environment with the ambient temperature and humidity.
4551
lineColor={0,128,255},
4652
fillColor={0,128,255},
4753
fillPattern=FillPattern.Solid,
48-
visible=not allowFlowReversal,
49-
origin={-118,19},
54+
origin={-115.5,20},
5055
rotation=180),
5156
Polygon(
5257
points={{-11,10},{20,0},{-11,-10},{-11,10}},
5358
lineColor={0,128,255},
5459
fillColor={0,128,255},
5560
fillPattern=FillPattern.Solid,
56-
visible=not allowFlowReversal,
57-
origin={-54,19},
61+
origin={-54.5,20},
5862
rotation=360),
5963
Line(
60-
points={{57.5,0},{-11,-0.5}},
61-
color={0,128,255},
62-
visible=not allowFlowReversal,
63-
origin={-60.5,19},
64-
rotation=180)}));
64+
points={{-120,20},{-50,20}},
65+
color={0,128,255})}));
6566
end FixedPressure;

IDEAS/Buildings/Components/InterzonalAirFlow/n50FixedPressure.mo

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ equation
1414
annotation (Documentation(revisions="<html>
1515
<ul>
1616
<li>
17+
June 13, 2025, Jelger Jansen:<br/>
18+
Remove <code>visible=not allowFlowReversal</code> in annotation of icon elements.
19+
Improve placement of icon elements.
20+
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1437\">#1437</a>.
21+
</li>
22+
<li>
1723
March 17, 2020, Filip Jorissen:<br/>
1824
Added support for vector fluidport.
1925
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1029\">#1029</a>.
@@ -50,21 +56,16 @@ The mass flow rate is computed from the zone <code>n50</code> value.
5056
lineColor={0,128,255},
5157
fillColor={0,128,255},
5258
fillPattern=FillPattern.Solid,
53-
visible=not allowFlowReversal,
54-
origin={-54,19},
59+
origin={-54.5,20},
5560
rotation=360),
5661
Line(
57-
points={{57.5,0},{-11,-0.5}},
58-
color={0,128,255},
59-
visible=not allowFlowReversal,
60-
origin={-60.5,19},
61-
rotation=180),
62+
points={{-120,20},{-50,20}},
63+
color={0,128,255}),
6264
Polygon(
6365
points={{-11,10},{20,0},{-11,-10},{-11,10}},
6466
lineColor={0,128,255},
6567
fillColor={0,128,255},
6668
fillPattern=FillPattern.Solid,
67-
visible=not allowFlowReversal,
68-
origin={-118,19},
69+
origin={-115.5,20},
6970
rotation=180)}));
7071
end n50FixedPressure;

0 commit comments

Comments
 (0)