Skip to content

Commit 34b81e4

Browse files
committed
Fix a possible illegal construct for the surgetank icon.
See also discussion in OpenModelica/OpenModelica#13092
1 parent e6ba5e3 commit 34b81e4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

OpenHPL/Icons/Surge.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
within OpenHPL.Icons;
22
partial class Surge "Surge tank/shaft icon"
3+
input SI.Length lds "Lenght of watercolumn in the surge shaft(for DynamicSelect)";
4+
input SI.Length Lds "Length of the surge shaft (for DynamicSelect)";
35
annotation (
46
Icon(coordinateSystem(preserveAspectRatio=false, grid={1,1}),
57
graphics={
@@ -32,7 +34,7 @@ partial class Surge "Surge tank/shaft icon"
3234
pattern=LinePattern.None),
3335
Rectangle(
3436
extent=DynamicSelect({{-30,60},{30,18}},
35-
{{-30,(20+70*l/L)},{30,18}}),
37+
{{-30,(20+70*lds/Lds)},{30,18}}),
3638
lineColor={28,108,200},
3739
fillColor={0,128,255},
3840
fillPattern=FillPattern.Solid,

OpenHPL/Waterway/SurgeTank.mo

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
within OpenHPL.Waterway;
22
model SurgeTank "Model of the surge tank/shaft"
33
outer Data data "Using standard data set";
4-
extends OpenHPL.Icons.Surge;
4+
extends OpenHPL.Icons.Surge(lds=l, Lds=L);
5+
extends OpenHPL.Interfaces.ContactNode;
56
import Modelica.Constants.pi;
67

78
parameter Types.SurgeTank SurgeTankType = OpenHPL.Types.SurgeTank.STSimple "Types of surge tank" annotation (
@@ -59,7 +60,7 @@ model SurgeTank "Model of the surge tank/shaft"
5960
// variables for temperature. Not in use for now...
6061
// Real W_f, W_e;
6162
// connector (acquisition of algebraic variable, mass flow rate mdot, and node pressure (manifold pressure) p_n)
62-
extends OpenHPL.Interfaces.ContactNode;
63+
6364
initial equation
6465
if SteadyState then
6566
der(M) = 0;

0 commit comments

Comments
 (0)