Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .CI/checkHTMLDoc/checkTags.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
VOID_TAGS = ('area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr')

# Tags that should not be used
AVOIDABLE_TAGS = ('b', 'i', 'h1', 'h2', 'h3', 'h6', 'figure', 'figcaption')
AVOIDABLE_TAGS = ('b', 'i', 'h1', 'h2', 'h3', 'h6')

def _checkFileTags(file_name):
"""
Expand Down
94 changes: 94 additions & 0 deletions OpenHPL/Examples/Gate.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
within OpenHPL.Examples;
model Gate "Usage of the tainter gate"
extends Modelica.Icons.Example;
inner Data data(SteadyState = true, Vdot_0 = 75) annotation (
Placement(transformation(extent = {{-100, 80}, {-80, 100}})));
Modelica.Blocks.Sources.Ramp gateOpening(
height=0,
duration=1000,
offset=1,
startTime=500) annotation (Placement(transformation(extent={{-40,70},{-20,90}})));
Waterway.Reservoir upstream(
constantLevel=false,
useLevel=true,
L=10,
W=10) annotation (Placement(transformation(extent={{-40,40},{-20,60}})));
Waterway.Reservoir downstream(
h_0=4,
constantLevel=false,
useLevel=true,
L=10,
W=10) annotation (Placement(transformation(
extent={{-10,10},{10,-10}},
rotation=180,
origin={30,50})));
Waterway.Gate_HR gate_HR(W=16.5, T=5.6) annotation (Placement(transformation(extent={{-10,40},{10,60}})));
Modelica.Blocks.Sources.Ramp down_level(
height=0,
duration=1000,
offset=3,
startTime=500) annotation (Placement(transformation(extent={{80,-10},{60,10}})));
Waterway.Reservoir upstream1(
constantLevel=false,
useLevel=true,
L=10,
W=10) annotation (Placement(transformation(extent={{-40,-10},{-20,10}})));
Waterway.Reservoir downstream1(
h_0=4,
constantLevel=false,
useLevel=true,
L=10,
W=10) annotation (Placement(transformation(
extent={{-10,10},{10,-10}},
rotation=180,
origin={30,0})));
Waterway.Gate gate(
sluice=false,
b=16.5,
r=8.5,
h_h=5.6) annotation (Placement(transformation(extent={{-8,-10},{12,10}})));
Waterway.Reservoir upstream2(
constantLevel=false,
useLevel=true,
L=10,
W=10) annotation (Placement(transformation(extent={{-40,-60},{-20,-40}})));
Waterway.Reservoir downstream2(
h_0=4,
constantLevel=false,
useLevel=true,
L=10,
W=10) annotation (Placement(transformation(
extent={{-10,10},{10,-10}},
rotation=180,
origin={30,-50})));
Waterway.Gate gate_sluice(
sluice=true,
b=16.5,
r=8.5,
h_h=5.6) annotation (Placement(transformation(extent={{-10,-60},{10,-40}})));
Modelica.Blocks.Sources.Ramp up_level(
height=0,
duration=1000,
offset=5,
startTime=500) annotation (Placement(transformation(extent={{-80,-10},{-60,10}})));
equation
connect(upstream.o, gate_HR.i) annotation (Line(points={{-20,50},{-10,50}}, color={0,128,255}));
connect(gate_HR.o, downstream.o) annotation (Line(points={{10,50},{20,50}}, color={0,128,255}));
connect(gateOpening.y, gate_HR.B) annotation (Line(points={{-19,80},{0,80},{0,62}}, color={0,0,127}));
connect(down_level.y, downstream.level) annotation (Line(points={{59,0},{54,0},{54,56},{42,56}}, color={0,0,127}));
connect(upstream1.o, gate.i) annotation (Line(points={{-20,0},{-8,0}}, color={0,128,255}));
connect(gate.o, downstream1.o) annotation (Line(points={{12,0},{20,0}}, color={0,128,255}));
connect(gateOpening.y, gate.a) annotation (Line(points={{-19,80},{-14,80},{-14,22},{2,22},{2,12}},
color={0,0,127}));
connect(upstream2.o, gate_sluice.i) annotation (Line(points={{-20,-50},{-10,-50}}, color={0,128,255}));
connect(gate_sluice.o, downstream2.o) annotation (Line(points={{10,-50},{20,-50}}, color={0,128,255}));
connect(gateOpening.y, gate_sluice.a) annotation (Line(points={{-19,80},{-14,80},{-14,-28},{0,-28},{0,-38}},
color={0,0,127}));
connect(downstream1.level, down_level.y) annotation (Line(points={{42,6},{54,6},{54,0},{59,0}}, color={0,0,127}));
connect(downstream2.level, down_level.y) annotation (Line(points={{42,-44},{54,-44},{54,0},{59,0}}, color={0,0,127}));
connect(up_level.y, upstream.level) annotation (Line(points={{-59,0},{-52,0},{-52,56},{-42,56}}, color={0,0,127}));
connect(upstream1.level, up_level.y) annotation (Line(points={{-42,6},{-52,6},{-52,0},{-59,0}}, color={0,0,127}));
connect(upstream2.level, up_level.y) annotation (Line(points={{-42,-44},{-52,-44},{-52,0},{-59,0}}, color={0,0,127}));
annotation (
experiment(StopTime=2000, Interval=0.4));
end Gate;
1 change: 1 addition & 0 deletions OpenHPL/Examples/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ DetailedGen
DetailedGenFrancis
PowerSystemSimple
VolumeFlowSource
Gate
WithOpenIPSL
3 changes: 2 additions & 1 deletion OpenHPL/Icons/BendPipe.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ within OpenHPL.Icons;
partial class BendPipe "Bend pipes icon."

annotation (
Icon(coordinateSystem(preserveAspectRatio=false, grid={1,1}), graphics={
preferredView="icon",
Icon(graphics={
Ellipse(
extent={{30,50},{80,-10}},
fillPattern=FillPattern.Solid,
Expand Down
3 changes: 2 additions & 1 deletion OpenHPL/Icons/DraftTube.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ within OpenHPL.Icons;
partial class DraftTube "Draft tube icon"

annotation (
Icon(coordinateSystem(preserveAspectRatio=false, grid={1,1}), graphics={
preferredView="icon",
Icon(graphics={
Polygon(
points={{-40,29},{-40,29}},
lineColor={0,0,0},
Expand Down
1 change: 1 addition & 0 deletions OpenHPL/Icons/ElectroMech.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within OpenHPL.Icons;
partial class ElectroMech "Electro mechanical icon"
annotation (
preferredView="icon",
Icon(graphics={
Text(textColor={28,108,200},
extent={{-150,100},{150,60}},
Expand Down
4 changes: 2 additions & 2 deletions OpenHPL/Icons/Fitting.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
within OpenHPL.Icons;
partial class Fitting "Pipe fitting icon"
annotation (
Icon(coordinateSystem(preserveAspectRatio=false, grid={1,1}),
graphics={
preferredView="icon",
Icon(graphics={
Rectangle(
extent={{-90,60},{10,-60}},
lineColor={0,0,0},
Expand Down
57 changes: 57 additions & 0 deletions OpenHPL/Icons/Gate.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
within OpenHPL.Icons;
partial class Gate "Icons for the gate"
parameter Boolean sluice=false "if true, gate is of type sluice gate, otherwise it is a radial/tainter gate type" annotation (Dialog(group="Type"), choices(checkBox=true));
annotation (
preferredView="icon",
Icon(graphics={
Rectangle(
extent={{-46,-60},{100,-72}},
lineColor={28,108,200},
fillColor={28,108,200},
fillPattern=FillPattern.Solid),
Rectangle(
visible = sluice,
extent={{-46,0},{-4,-60}},
lineColor={28,108,200},
fillColor={28,108,200},
fillPattern=FillPattern.Solid),
Rectangle(
visible = sluice,
extent={{-4,20},{4,-60}},
lineColor={0,0,0},
fillColor={175,175,175},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{-100,0},{-46,-72}},
lineColor={28,108,200},
fillColor={28,108,200},
fillPattern=FillPattern.Solid),
Ellipse(
visible = not sluice,
extent={{-60,140},{220,-140}},
lineColor={135,135,135},
startAngle=155,
endAngle=196,
fillColor={175,175,175},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{-100,-72},{100,-80}},
lineColor={0,0,0},
fillColor={215,215,215},
fillPattern=FillPattern.Forward),
Rectangle(extent={{-100,100},{100,-100}}, lineColor={0,0,0}),
Text(
textColor={28,108,200},
extent={{-90,100},{90,60}},
textString="%name",
textStyle={TextStyle.Bold}),
Ellipse(
extent={{-2,-4},{2,-8}},
lineColor={0,0,0},
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Line(
points={{0,-6},{0,100}},
color={0,0,0},
pattern=LinePattern.Dash)}));
end Gate;
1 change: 1 addition & 0 deletions OpenHPL/Icons/Generator.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within OpenHPL.Icons;
partial class Generator "Generator icon"
annotation (
preferredView="icon",
Icon(graphics={
Text(
textColor={127,0,0},
Expand Down
3 changes: 2 additions & 1 deletion OpenHPL/Icons/Governor.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
within OpenHPL.Icons;
partial class Governor "Governor icon"
annotation (
Icon(coordinateSystem(preserveAspectRatio = false), graphics={ Bitmap(extent = {{-60, -60}, {60, 60}}, origin = {2, 0}, rotation = 360,
preferredView="icon",
Icon(graphics={ Bitmap(extent = {{-60, -60}, {60, 60}}, origin = {2, 0}, rotation = 360,
fileName="modelica://OpenHPL/Resources/Images/governor.svg"),
Text(textColor={28,108,200},
extent={{-150,100},{150,60}},
Expand Down
3 changes: 2 additions & 1 deletion OpenHPL/Icons/Logo.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ partial package Logo "Main package icon"
extends Modelica.Icons.Package;

annotation (
Icon(coordinateSystem(preserveAspectRatio=false, grid={1,1}), graphics={
preferredView="icon",
Icon(graphics={
Polygon(
points={{-8.5,-13.5},{-8.5,-9.5},{-8.5,-5.5},{-7.5,-0.5},{-4.5,5.5},{-1.5,9.5},{2.5,12.5},{8.5,13.5},{8.5,-13.5},{-8.5,-13.5}},
lineColor={28,108,200},
Expand Down
3 changes: 2 additions & 1 deletion OpenHPL/Icons/Method.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
within OpenHPL.Icons;
partial class Method "Methods/functions icon"
annotation (
Icon(coordinateSystem(preserveAspectRatio = false), graphics={ Bitmap(extent={{-80,-80},{80,80}}, fileName="modelica://OpenHPL/Resources/Images/gears.svg")}));
preferredView="icon",
Icon(graphics={ Bitmap(extent={{-80,-80},{80,80}}, fileName="modelica://OpenHPL/Resources/Images/gears.svg")}));
end Method;
4 changes: 2 additions & 2 deletions OpenHPL/Icons/OpenChannel.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
within OpenHPL.Icons;
partial class OpenChannel "Open channel icon"
annotation (
Icon(coordinateSystem(preserveAspectRatio=false, grid={1,1}),
graphics={
preferredView="icon",
Icon(graphics={
Text(textColor={28,108,200},
extent={{-150,100},{150,60}},
textString="%name",
Expand Down
4 changes: 2 additions & 2 deletions OpenHPL/Icons/Pipe.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ partial class Pipe "Pipe icon"
annotation(Dialog(group = "Icon"),
choices(checkBox = true));
annotation (
Icon(coordinateSystem(grid={1,1}),
graphics={
preferredView="icon",
Icon(graphics={
Rectangle(
extent={{-90,40},{90,-40}},
lineColor={0,0,0},
Expand Down
4 changes: 3 additions & 1 deletion OpenHPL/Icons/Pylon.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
within OpenHPL.Icons;
partial class Pylon "Pylon icon"

annotation (Icon(graphics={
annotation (
preferredView="icon",
Icon(graphics={
Line(points={{0,90},{-20,70},{-20,-50},{40,-80},{20,-50},{-40,-80},{-20,-50},{20,-50},{-20,-10},{20,30},{-20,70},{20,70},{20,-50},{-20,-50},{20,-10},{-20,30},{20,70},{0,90}}, color={0,0,0}),
Line(points={{-20,70},{-52,50},{52,50},{20,70},{-20,70}}, color={0,0,0}),
Line(points={{-20,10},{-72,-10},{72,-10},{20,10},{-20,10}}, color={0,0,0})}));
Expand Down
5 changes: 3 additions & 2 deletions OpenHPL/Icons/Reservoir.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
within OpenHPL.Icons;
partial class Reservoir "Reservoir icon"
annotation (
Icon(coordinateSystem(preserveAspectRatio = false), graphics={ Rectangle(extent={{-100,100},{100,-100}}, lineColor={28,108,200}),
Text(
preferredView="icon",
Icon(graphics={ Rectangle(extent={{-100,100},{100,-100}}, lineColor={28,108,200}),
Text(
textColor={28,108,200},
extent={{-150,90},{150,50}},
textString="%name",
Expand Down
3 changes: 2 additions & 1 deletion OpenHPL/Icons/RunOff.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
within OpenHPL.Icons;
partial class RunOff "Run off model icon"
annotation (
Icon(coordinateSystem(preserveAspectRatio = false), graphics={
preferredView="icon",
Icon(graphics={
Text(textColor={28,108,200},
extent={{-150,100},{150,60}},
textString="%name",
Expand Down
1 change: 1 addition & 0 deletions OpenHPL/Icons/Surge.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ partial class Surge "Surge tank/shaft icon"
input SI.Length lds "Lenght of watercolumn in the surge shaft(for DynamicSelect)";
input SI.Length Lds "Length of the surge shaft (for DynamicSelect)";
annotation (
preferredView="icon",
Icon(coordinateSystem(preserveAspectRatio=false, grid={1,1}),
graphics={
Text(
Expand Down
1 change: 1 addition & 0 deletions OpenHPL/Icons/Turbine.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within OpenHPL.Icons;
partial class Turbine "Turbine icon"
annotation (
preferredView="icon",
Icon(graphics={
Text(textColor={28,108,200},
extent={{-100,-100},{100,-140}},
Expand Down
1 change: 1 addition & 0 deletions OpenHPL/Icons/Valve.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within OpenHPL.Icons;
partial class Valve "Valve icon"
annotation (
preferredView="icon",
Icon(graphics={
Text(
textColor={28,108,200},
Expand Down
1 change: 1 addition & 0 deletions OpenHPL/Icons/Water.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ partial package Water "Hydro icon"
extends Modelica.Icons.Package;

annotation (
preferredView="icon",
Icon(coordinateSystem(preserveAspectRatio=false, grid={2,2}), graphics={
Line(
points={{-60,-40},{-40,-52},{-20,-32},{0,-52},{20,-32},{40,-52},{60,-40}},
Expand Down
1 change: 1 addition & 0 deletions OpenHPL/Icons/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Fitting
DraftTube
Valve
OpenChannel
Gate
ElectroMech
Turbine
Generator
Expand Down
Binary file added OpenHPL/Resources/Images/TainterGate-backedup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OpenHPL/Resources/Images/TainterGate-freeflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added OpenHPL/Resources/Images/TainterGate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions OpenHPL/UsersGuide/References.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ model References "References"
extends Modelica.Icons.References;
annotation (Documentation(info="<html>
<dl>
<dt>[Bollrich2019]</dt>
<dd><p>Gerhard Bollrich: &quot;Technische Hydromechanik 1 (eBook)&quot;,
Book, Beuth Verlag GmbH, 2019,
8th Edition, ISBN 978-3-410-29170-1.</p>
</dd>
<dt>[Hinna2021]</dt>
<dd><p>Jonas Tveit Hinna:
&quot;Modelica model of transient pipe flow in hydraulic laboratory systems using the method of characteristics&quot;,
Expand Down
Loading
Loading