Skip to content

Commit 9f06bde

Browse files
Rename pipe vertical parameter to slanted (#92)
Updates the `vertical` boolean parameter across pipe models and their corresponding icons to `slanted`. This refactoring improves the semantic clarity of the parameter, better describing the orientation of pipes that are not horizontal. Co-authored-by: Dietmar Winkler <dietmar.winkler@dwe.no>
1 parent 3c86074 commit 9f06bde

18 files changed

Lines changed: 26 additions & 26 deletions

OpenHPL/Examples/SimpleGenFrancis.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ model SimpleGenFrancis "Model of a hydropower system with Francis turbine model"
1616
ElectroMech.Generators.SynchGen generator(P_op=100e6, UseFrequencyOutput=false) annotation (Placement(transformation(extent={{40,-40},{20,-20}})));
1717
replaceable
1818
Waterway.Pipe penstock(
19-
vertical=true,
19+
slanted=true,
2020
L=600,
2121
H=428.5,
2222
D_i=3,

OpenHPL/Examples/SimpleTurbine.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ model SimpleTurbine "Model of a hydropower system with a simple turbine turbine"
2121
D_o=3,
2222
H=80,
2323
L=200,
24-
vertical=true) constrainedby Interfaces.TwoContacts annotation (Placement(transformation(origin={0,30}, extent={{-10,-10},{10,10}})));
24+
slanted=true) constrainedby Interfaces.TwoContacts annotation (Placement(transformation(origin={0,30}, extent={{-10,-10},{10,10}})));
2525
OpenHPL.Waterway.SurgeTank surgeTank(H=25, L=30, h_0=20)
2626
annotation (Placement(transformation(
2727
origin={-30,30},

OpenHPL/Examples/SimpleValve.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ model SimpleValve "Model of a hydropower system with a simple turbine turbine"
2121
D_o=3,
2222
H=80,
2323
L=200,
24-
vertical=true) constrainedby Interfaces.TwoContacts annotation (Placement(transformation(origin={0,30}, extent={{-10,-10},{10,10}})));
24+
slanted=true) constrainedby Interfaces.TwoContacts annotation (Placement(transformation(origin={0,30}, extent={{-10,-10},{10,10}})));
2525
OpenHPL.Waterway.SurgeTank surgeTank(
2626
H=25,
2727
L=30,

OpenHPL/Examples/WithOpenIPSL/DetailedGen.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
within OpenHPL.Examples.WithOpenIPSL;
22
model DetailedGen
33
extends SimpleGen( redeclare Waterway.PenstockKP penstock(
4-
vertical=true,
4+
slanted=true,
55
H=428.5,
66
D_i=3), data(SteadyState=false));
77
annotation (experiment(StopTime=2000));

OpenHPL/Examples/WithOpenIPSL/SimpleGen.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ model SimpleGen "Synergy with OpenIPSL library(generator)"
1616
rotation=180)));
1717
replaceable
1818
Waterway.Pipe penstock(
19-
vertical=true,
19+
slanted=true,
2020
L=600,
2121
H=428.5,
2222
D_i=3) constrainedby Interfaces.TwoContacts

OpenHPL/Examples/WithOpenIPSL/SimpleGenTG.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ model SimpleGenTG "Synergy with OpenIPSL library(generator)"
1717
rotation=180)));
1818
replaceable
1919
Waterway.Pipe penstock(
20-
vertical=true,
20+
slanted=true,
2121
L=600,
2222
H=428.5,
2323
D_i=3) constrainedby Interfaces.TwoContacts

OpenHPL/Icons/Pipe.mo

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
within OpenHPL.Icons;
22
partial class Pipe "Pipe icon"
3-
parameter Boolean vertical=false "Display vertical icon instead"
3+
parameter Boolean slanted=false "Display slanted icon instead"
44
annotation(Dialog(group = "Icon"),
55
choices(checkBox = true));
66
annotation (
@@ -11,37 +11,37 @@ partial class Pipe "Pipe icon"
1111
lineColor={0,0,0},
1212
fillPattern=FillPattern.Solid,
1313
fillColor={175,175,175},
14-
visible=not vertical),
14+
visible=not slanted),
1515
Rectangle(
1616
extent={{-90,30},{90,-30}},
1717
lineColor={28,108,200},
1818
fillColor={0,128,255},
1919
fillPattern=FillPattern.Solid,
20-
visible=not vertical),
20+
visible=not slanted),
2121
Rectangle(
2222
extent={{-85,30},{85,-30}},
2323
lineColor={0,0,0},
2424
fillPattern=FillPattern.Solid,
2525
fillColor={175,175,175},
2626
rotation=-45,
27-
visible=vertical),
27+
visible=slanted),
2828
Rectangle(
2929
extent={{-85,20},{85,-20}},
3030
lineColor={28,108,200},
3131
fillColor={0,128,255},
3232
fillPattern=FillPattern.Solid,
3333
rotation=-45,
34-
visible=vertical),
34+
visible=slanted),
3535
Text(
3636
textColor={28,108,200},
3737
extent={{-150,140},{150,100}},
3838
textString="%name",
3939
textStyle={TextStyle.Bold},
40-
visible=vertical),
40+
visible=slanted),
4141
Text(
4242
textColor={28,108,200},
4343
extent={{-150,90},{150,50}},
4444
textString="%name",
4545
textStyle={TextStyle.Bold},
46-
visible=not vertical)}));
46+
visible=not slanted)}));
4747
end Pipe;

OpenHPL/Waterway/Penstock.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ within OpenHPL.Waterway;
22
model Penstock "Model of the penstock with elastic walls and compressible water. Simple Staggered grid scheme"
33
extends Modelica.Icons.ObsoleteModel;
44
outer Data data "Using standard data set";
5-
extends OpenHPL.Icons.Pipe(vertical=true);
5+
extends OpenHPL.Icons.Pipe(slanted=true);
66
import Modelica.Constants.pi;
77
// Penstock
88
parameter SI.Height H = 420 "Height over which water fall in the pipe, m" annotation (

OpenHPL/Waterway/PenstockKP.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
within OpenHPL.Waterway;
22
model PenstockKP "Detailed model of the pipe. Could have elastic walls and compressible water. KP scheme"
33
outer OpenHPL.Data data "Using standard data set";
4-
extends OpenHPL.Icons.Pipe( vertical=true);
4+
extends OpenHPL.Icons.Pipe( slanted=true);
55
extends Types.FrictionSpec( final D_h = (D_i + D_o) / 2);
66
import Modelica.Constants.pi;
77
// geometrical parameters of the pipe

OpenHPLTest/HPAllTypeFittingsTest.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ model HPAllTypeFittingsTest "Test for comparing fitting behaviour"
6060
L=100,
6161
D_i=4) annotation (Placement(transformation(extent={{40,-30},{60,-10}})));
6262
OpenHPL.Waterway.Pipe pipe6(
63-
vertical=false,
63+
slanted=false,
6464
H=5,
6565
L=100,
6666
D_i=4) annotation (Placement(transformation(extent={{-60,-50},{-40,-30}})));

0 commit comments

Comments
 (0)