From a96e937a8c5c431c953c830d0db62c67f91346f8 Mon Sep 17 00:00:00 2001 From: Dietmar Winkler Date: Mon, 13 Apr 2026 16:12:17 +0200 Subject: [PATCH] Rename pipe `vertical` parameter to `slanted` 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. --- OpenHPL/Examples/SimpleGenFrancis.mo | 2 +- OpenHPL/Examples/SimpleTurbine.mo | 2 +- OpenHPL/Examples/SimpleValve.mo | 2 +- OpenHPL/Examples/WithOpenIPSL/DetailedGen.mo | 2 +- OpenHPL/Examples/WithOpenIPSL/SimpleGen.mo | 2 +- OpenHPL/Examples/WithOpenIPSL/SimpleGenTG.mo | 2 +- OpenHPL/Icons/Pipe.mo | 14 +++++++------- OpenHPL/Waterway/Penstock.mo | 2 +- OpenHPL/Waterway/PenstockKP.mo | 2 +- OpenHPLTest/HPAllTypeFittingsTest.mo | 2 +- OpenHPLTest/HPDraftTube.mo | 6 +++--- OpenHPLTest/HPSTAirCushion.mo | 2 +- OpenHPLTest/HPSTSharpOrifice.mo | 2 +- OpenHPLTest/HPSTSimple.mo | 2 +- OpenHPLTest/HPSTThrottleValve.mo | 2 +- OpenHPLTest/HPTaperedFittingsTest.mo | 2 +- OpenHPLTest/TorpaHPPAirCushionTest.mo | 2 +- OpenHPLTest/TorpaHPPAirCushionTest2.mo | 2 +- 18 files changed, 26 insertions(+), 26 deletions(-) diff --git a/OpenHPL/Examples/SimpleGenFrancis.mo b/OpenHPL/Examples/SimpleGenFrancis.mo index f1187364..cb702a5c 100644 --- a/OpenHPL/Examples/SimpleGenFrancis.mo +++ b/OpenHPL/Examples/SimpleGenFrancis.mo @@ -16,7 +16,7 @@ model SimpleGenFrancis "Model of a hydropower system with Francis turbine model" ElectroMech.Generators.SynchGen generator(P_op=100e6, UseFrequencyOutput=false) annotation (Placement(transformation(extent={{40,-40},{20,-20}}))); replaceable Waterway.Pipe penstock( - vertical=true, + slanted=true, L=600, H=428.5, D_i=3, diff --git a/OpenHPL/Examples/SimpleTurbine.mo b/OpenHPL/Examples/SimpleTurbine.mo index 4f95c4df..78e47bb1 100644 --- a/OpenHPL/Examples/SimpleTurbine.mo +++ b/OpenHPL/Examples/SimpleTurbine.mo @@ -21,7 +21,7 @@ model SimpleTurbine "Model of a hydropower system with a simple turbine turbine" D_o=3, H=80, L=200, - vertical=true) constrainedby Interfaces.TwoContacts annotation (Placement(transformation(origin={0,30}, extent={{-10,-10},{10,10}}))); + slanted=true) constrainedby Interfaces.TwoContacts annotation (Placement(transformation(origin={0,30}, extent={{-10,-10},{10,10}}))); OpenHPL.Waterway.SurgeTank surgeTank(H=25, L=30, h_0=20) annotation (Placement(transformation( origin={-30,30}, diff --git a/OpenHPL/Examples/SimpleValve.mo b/OpenHPL/Examples/SimpleValve.mo index 06f15522..6dffa1ab 100644 --- a/OpenHPL/Examples/SimpleValve.mo +++ b/OpenHPL/Examples/SimpleValve.mo @@ -21,7 +21,7 @@ model SimpleValve "Model of a hydropower system with a simple turbine turbine" D_o=3, H=80, L=200, - vertical=true) constrainedby Interfaces.TwoContacts annotation (Placement(transformation(origin={0,30}, extent={{-10,-10},{10,10}}))); + slanted=true) constrainedby Interfaces.TwoContacts annotation (Placement(transformation(origin={0,30}, extent={{-10,-10},{10,10}}))); OpenHPL.Waterway.SurgeTank surgeTank( H=25, L=30, diff --git a/OpenHPL/Examples/WithOpenIPSL/DetailedGen.mo b/OpenHPL/Examples/WithOpenIPSL/DetailedGen.mo index 0b3ea277..c5becfe3 100644 --- a/OpenHPL/Examples/WithOpenIPSL/DetailedGen.mo +++ b/OpenHPL/Examples/WithOpenIPSL/DetailedGen.mo @@ -1,7 +1,7 @@ within OpenHPL.Examples.WithOpenIPSL; model DetailedGen extends SimpleGen( redeclare Waterway.PenstockKP penstock( - vertical=true, + slanted=true, H=428.5, D_i=3), data(SteadyState=false)); annotation (experiment(StopTime=2000)); diff --git a/OpenHPL/Examples/WithOpenIPSL/SimpleGen.mo b/OpenHPL/Examples/WithOpenIPSL/SimpleGen.mo index 96bd496d..71b5ed5e 100644 --- a/OpenHPL/Examples/WithOpenIPSL/SimpleGen.mo +++ b/OpenHPL/Examples/WithOpenIPSL/SimpleGen.mo @@ -16,7 +16,7 @@ model SimpleGen "Synergy with OpenIPSL library(generator)" rotation=180))); replaceable Waterway.Pipe penstock( - vertical=true, + slanted=true, L=600, H=428.5, D_i=3) constrainedby Interfaces.TwoContacts diff --git a/OpenHPL/Examples/WithOpenIPSL/SimpleGenTG.mo b/OpenHPL/Examples/WithOpenIPSL/SimpleGenTG.mo index 4dd7012c..1cd21157 100644 --- a/OpenHPL/Examples/WithOpenIPSL/SimpleGenTG.mo +++ b/OpenHPL/Examples/WithOpenIPSL/SimpleGenTG.mo @@ -17,7 +17,7 @@ model SimpleGenTG "Synergy with OpenIPSL library(generator)" rotation=180))); replaceable Waterway.Pipe penstock( - vertical=true, + slanted=true, L=600, H=428.5, D_i=3) constrainedby Interfaces.TwoContacts diff --git a/OpenHPL/Icons/Pipe.mo b/OpenHPL/Icons/Pipe.mo index cf956a1f..6dc89553 100644 --- a/OpenHPL/Icons/Pipe.mo +++ b/OpenHPL/Icons/Pipe.mo @@ -1,6 +1,6 @@ within OpenHPL.Icons; partial class Pipe "Pipe icon" - parameter Boolean vertical=false "Display vertical icon instead" + parameter Boolean slanted=false "Display slanted icon instead" annotation(Dialog(group = "Icon"), choices(checkBox = true)); annotation ( @@ -11,37 +11,37 @@ partial class Pipe "Pipe icon" lineColor={0,0,0}, fillPattern=FillPattern.Solid, fillColor={175,175,175}, - visible=not vertical), + visible=not slanted), Rectangle( extent={{-90,30},{90,-30}}, lineColor={28,108,200}, fillColor={0,128,255}, fillPattern=FillPattern.Solid, - visible=not vertical), + visible=not slanted), Rectangle( extent={{-85,30},{85,-30}}, lineColor={0,0,0}, fillPattern=FillPattern.Solid, fillColor={175,175,175}, rotation=-45, - visible=vertical), + visible=slanted), Rectangle( extent={{-85,20},{85,-20}}, lineColor={28,108,200}, fillColor={0,128,255}, fillPattern=FillPattern.Solid, rotation=-45, - visible=vertical), + visible=slanted), Text( textColor={28,108,200}, extent={{-150,140},{150,100}}, textString="%name", textStyle={TextStyle.Bold}, - visible=vertical), + visible=slanted), Text( textColor={28,108,200}, extent={{-150,90},{150,50}}, textString="%name", textStyle={TextStyle.Bold}, - visible=not vertical)})); + visible=not slanted)})); end Pipe; diff --git a/OpenHPL/Waterway/Penstock.mo b/OpenHPL/Waterway/Penstock.mo index 7ca74eae..828c3262 100644 --- a/OpenHPL/Waterway/Penstock.mo +++ b/OpenHPL/Waterway/Penstock.mo @@ -2,7 +2,7 @@ within OpenHPL.Waterway; model Penstock "Model of the penstock with elastic walls and compressible water. Simple Staggered grid scheme" extends Modelica.Icons.ObsoleteModel; outer Data data "Using standard data set"; - extends OpenHPL.Icons.Pipe(vertical=true); + extends OpenHPL.Icons.Pipe(slanted=true); import Modelica.Constants.pi; // Penstock parameter SI.Height H = 420 "Height over which water fall in the pipe, m" annotation ( diff --git a/OpenHPL/Waterway/PenstockKP.mo b/OpenHPL/Waterway/PenstockKP.mo index e1c68ae9..93243ce6 100644 --- a/OpenHPL/Waterway/PenstockKP.mo +++ b/OpenHPL/Waterway/PenstockKP.mo @@ -1,7 +1,7 @@ within OpenHPL.Waterway; model PenstockKP "Detailed model of the pipe. Could have elastic walls and compressible water. KP scheme" outer OpenHPL.Data data "Using standard data set"; - extends OpenHPL.Icons.Pipe( vertical=true); + extends OpenHPL.Icons.Pipe( slanted=true); extends Types.FrictionSpec( final D_h = (D_i + D_o) / 2); import Modelica.Constants.pi; // geometrical parameters of the pipe diff --git a/OpenHPLTest/HPAllTypeFittingsTest.mo b/OpenHPLTest/HPAllTypeFittingsTest.mo index 88cd7d59..9d2f8085 100644 --- a/OpenHPLTest/HPAllTypeFittingsTest.mo +++ b/OpenHPLTest/HPAllTypeFittingsTest.mo @@ -60,7 +60,7 @@ model HPAllTypeFittingsTest "Test for comparing fitting behaviour" L=100, D_i=4) annotation (Placement(transformation(extent={{40,-30},{60,-10}}))); OpenHPL.Waterway.Pipe pipe6( - vertical=false, + slanted=false, H=5, L=100, D_i=4) annotation (Placement(transformation(extent={{-60,-50},{-40,-30}}))); diff --git a/OpenHPLTest/HPDraftTube.mo b/OpenHPLTest/HPDraftTube.mo index 8755ca8c..f37bc71e 100644 --- a/OpenHPLTest/HPDraftTube.mo +++ b/OpenHPLTest/HPDraftTube.mo @@ -21,7 +21,7 @@ model HPDraftTube "Testing the draft tube models." D_o=3, H=428.5, L=600, - vertical=true) annotation (Placement(transformation( + slanted=true) annotation (Placement(transformation( origin={2,50}, extent={{-10,-10},{10,10}}))); OpenHPL.Waterway.SurgeTank surgeTank(h_0=69.9) annotation (Placement(transformation( @@ -48,7 +48,7 @@ model HPDraftTube "Testing the draft tube models." D_o=3, H=428.5, L=600, - vertical=true) annotation (Placement(transformation(origin={0,-10}, extent={{-10,-10},{10,10}}))); + slanted=true) annotation (Placement(transformation(origin={0,-10}, extent={{-10,-10},{10,10}}))); OpenHPL.Waterway.SurgeTank surgeTank1(h_0=69.9) annotation (Placement(transformation(origin={-30,-10}, extent={{-10,-10},{10,10}}))); OpenHPL.ElectroMech.Turbines.Turbine turbine1(C_v=3.7, ConstEfficiency=false) annotation (Placement(transformation(origin={30,-20}, extent={{-10,-10},{10,10}}))); OpenHPL.Waterway.DraftTube draftTube1( @@ -74,7 +74,7 @@ model HPDraftTube "Testing the draft tube models." D_o=3, H=428.5, L=600, - vertical=true) annotation (Placement(transformation(origin={2,-70}, extent={{-10,-10},{10,10}}))); + slanted=true) annotation (Placement(transformation(origin={2,-70}, extent={{-10,-10},{10,10}}))); OpenHPL.Waterway.SurgeTank surgeTank2(h_0=69.9) annotation (Placement(transformation(origin={-30,-70}, extent={{-10,-10},{10,10}}))); OpenHPL.ElectroMech.Turbines.Turbine turbine2(C_v=3.7, ConstEfficiency=false) annotation (Placement(transformation(origin={32,-80}, extent={{-10,-10},{10,10}}))); OpenHPL.Waterway.DraftTube draftTube2( diff --git a/OpenHPLTest/HPSTAirCushion.mo b/OpenHPLTest/HPSTAirCushion.mo index 6f06f2fd..670e204d 100644 --- a/OpenHPLTest/HPSTAirCushion.mo +++ b/OpenHPLTest/HPSTAirCushion.mo @@ -30,7 +30,7 @@ model HPSTAirCushion D_o=4, H=300, L=500, - vertical=true) annotation (Placement(transformation( + slanted=true) annotation (Placement(transformation( origin={0,30}, extent={{-10,-10},{10,10}}))); OpenHPL.ElectroMech.Turbines.Turbine turbine( diff --git a/OpenHPLTest/HPSTSharpOrifice.mo b/OpenHPLTest/HPSTSharpOrifice.mo index 4061be79..f38a2669 100644 --- a/OpenHPLTest/HPSTSharpOrifice.mo +++ b/OpenHPLTest/HPSTSharpOrifice.mo @@ -30,7 +30,7 @@ model HPSTSharpOrifice D_o=4, H=300, L=500, - vertical=true) annotation (Placement(transformation( + slanted=true) annotation (Placement(transformation( origin={0,30}, extent={{-10,-10},{10,10}}))); OpenHPL.ElectroMech.Turbines.Turbine turbine( diff --git a/OpenHPLTest/HPSTSimple.mo b/OpenHPLTest/HPSTSimple.mo index 44d3b62d..fcc49e91 100644 --- a/OpenHPLTest/HPSTSimple.mo +++ b/OpenHPLTest/HPSTSimple.mo @@ -30,7 +30,7 @@ model HPSTSimple D_o=4, H=300, L=500, - vertical=true) annotation (Placement(transformation( + slanted=true) annotation (Placement(transformation( origin={0,30}, extent={{-10,-10},{10,10}}))); OpenHPL.ElectroMech.Turbines.Turbine turbine( diff --git a/OpenHPLTest/HPSTThrottleValve.mo b/OpenHPLTest/HPSTThrottleValve.mo index 0c1eafa3..550bf706 100644 --- a/OpenHPLTest/HPSTThrottleValve.mo +++ b/OpenHPLTest/HPSTThrottleValve.mo @@ -30,7 +30,7 @@ model HPSTThrottleValve D_o=4, H=300, L=500, - vertical=true) annotation (Placement(transformation( + slanted=true) annotation (Placement(transformation( origin={0,30}, extent={{-10,-10},{10,10}}))); OpenHPL.ElectroMech.Turbines.Turbine turbine( diff --git a/OpenHPLTest/HPTaperedFittingsTest.mo b/OpenHPLTest/HPTaperedFittingsTest.mo index d006658f..49da5508 100644 --- a/OpenHPLTest/HPTaperedFittingsTest.mo +++ b/OpenHPLTest/HPTaperedFittingsTest.mo @@ -8,7 +8,7 @@ model HPTaperedFittingsTest "Test for comparing fitting behaviour" D_o=4, L=4) annotation (Placement(transformation(extent={{-10,50},{10,70}}))); OpenHPL.Waterway.Pipe pipe1( - vertical=false, + slanted=false, H=5, L=100, D_i=2) annotation (Placement(transformation(extent={{-60,50},{-40,70}}))); diff --git a/OpenHPLTest/TorpaHPPAirCushionTest.mo b/OpenHPLTest/TorpaHPPAirCushionTest.mo index c812d939..cf5accaa 100644 --- a/OpenHPLTest/TorpaHPPAirCushionTest.mo +++ b/OpenHPLTest/TorpaHPPAirCushionTest.mo @@ -24,7 +24,7 @@ model TorpaHPPAirCushionTest "Test case for air cushion surge tank from Torpa hy D_o=6.56, H=8.6, L=250, - vertical=true, + slanted=true, p_eps=0.005) annotation (Placement(transformation( origin={0,30}, extent={{-10,-10},{10,10}}))); diff --git a/OpenHPLTest/TorpaHPPAirCushionTest2.mo b/OpenHPLTest/TorpaHPPAirCushionTest2.mo index e7f6ac35..7ec55bd6 100644 --- a/OpenHPLTest/TorpaHPPAirCushionTest2.mo +++ b/OpenHPLTest/TorpaHPPAirCushionTest2.mo @@ -17,7 +17,7 @@ model TorpaHPPAirCushionTest2 "Test case for air cushion surge tank from Torpa h D_o=3, H=428.5, L=600, - vertical=true) annotation (Placement(transformation( + slanted=true) annotation (Placement(transformation( origin={0,30}, extent={{-10,-10},{10,10}}))); OpenHPL.Waterway.SurgeTank surgeTank(h_0=69.9) annotation (Placement(transformation(