Skip to content

Commit 846763a

Browse files
authored
Merge branch 'master' into feat/torqueEquation
2 parents 9225bc3 + 2daef87 commit 846763a

9 files changed

Lines changed: 543 additions & 1172 deletions

File tree

OpenHPL/ElectroMech/Turbines/Turbine.mo

Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ model Turbine "Simple turbine model with mechanical connectors"
1111
annotation (Dialog(group = "Efficiency data"), choices(checkBox = true));
1212
parameter SI.Efficiency eta_h = 0.9 "Hydraulic efficiency"
1313
annotation (Dialog(group = "Efficiency data", enable = ConstEfficiency));
14-
parameter Real lookup_table[:, :] = [0, 0.4; 0.2, 0.7; 0.5, 0.9; 0.95, 0.95; 1.0, 0.93]
15-
"Look-up table for the turbine/valve efficiency, described by a table matrix, where the first column is a pu value of the guide vane opening, and the second column is a pu value of the turbine efficiency."
16-
annotation (Dialog(group = "Efficiency data", enable = not ConstEfficiency));
14+
replaceable parameter OpenHPL.Types.Efficiency VarEfficiency constrainedby OpenHPL.Types.Efficiency
15+
"Look-up table for the turbine efficiency, described by a table matrix,
16+
where the first column is a pu value of the opening, and the second column is a pu value of the turbine efficiency."
17+
annotation(choicesAllMatching=true, Dialog(group = "Efficiency data", enable = not ConstEfficiency));
1718
Modelica.Blocks.Math.Feedback lossCorrection
1819
annotation (Placement(transformation(extent={{-50,70},{-30,90}})));
1920
Modelica.Blocks.Tables.CombiTable1Dv efficiencyCurve(
20-
table=lookup_table,
21+
table=VarEfficiency.EffTable,
2122
smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative,
2223
extrapolation=Modelica.Blocks.Types.Extrapolation.LastTwoPoints)
2324
"Efficiency curve of the turbine"
@@ -80,12 +81,66 @@ or it will be calculated from the nominal turbine net head <code>H_n</code> and
8081
8182
<h5>Usage</h5>
8283
83-
<p>Besides hydraulic input and output, there are inputs as the control signal for the valve
84+
<p>Besides hydraulic input and output, there are inputs as the control signal for the
8485
opening and also output as the turbine shaft power.</p>
8586
86-
<h5>More Information</h5>
87-
<p>More info about the model can be found in: <a href=\"modelica://OpenHPL/Resources/Documents/Report.docx\">Resources/Report/Report.docx</a>
88-
and <a href=\"modelica://OpenHPL.UsersGuide.References\">[Vytvytskyi2019]</a>.</p>
87+
<h5>Efficiency Options</h5>
88+
89+
<p>Two modes are available, controlled by the Boolean parameter <code>ConstEfficiency</code>
90+
in the <em>Efficiency data</em> group:</p>
91+
92+
<ul>
93+
<li><strong>Constant efficiency</strong> (<code>ConstEfficiency = true</code>, default):
94+
The hydraulic efficiency is fixed at the value given by <code>eta_h</code>
95+
(default 0.9). This is suitable for quick studies where a single
96+
representative efficiency value is sufficient.</li>
97+
<li><strong>Variable efficiency table</strong> (<code>ConstEfficiency = false</code>):
98+
Efficiency varies with guide-vane opening according to a lookup table stored
99+
in the replaceable record <code>VarEfficiency</code> of type
100+
<a href=\"modelica://OpenHPL.Types.Efficiency\">Types.Efficiency</a>.</li>
101+
</ul>
102+
103+
<h5>Defining a Custom Efficiency Record</h5>
104+
105+
<p>To supply turbine-specific efficiency data, create a new record that extends
106+
<code>OpenHPL.Types.Efficiency</code> and override <code>EffTable</code>.
107+
The table must have exactly two columns:</p>
108+
109+
<ol>
110+
<li>Guide-vane opening in per-unit (0 = fully closed, 1 = fully open).</li>
111+
<li>Corresponding turbine efficiency in per-unit (0 = no conversion, 1 = lossless).</li>
112+
</ol>
113+
114+
<p>Rows must be sorted in ascending order of the first column.
115+
Extrapolation beyond the defined range uses the slope of the last two points
116+
(<code>Modelica.Blocks.Types.Extrapolation.LastTwoPoints</code>), and the curve is
117+
interpolated with a continuous derivative
118+
(<code>Modelica.Blocks.Types.Smoothness.ContinuousDerivative</code>).</p>
119+
120+
<p><strong>Example record:</strong></p>
121+
<blockquote><pre>
122+
record MyTurbineEfficiency
123+
extends OpenHPL.Types.Efficiency(
124+
EffTable = [0.00, 0.00;
125+
0.20, 0.72;
126+
0.50, 0.91;
127+
0.80, 0.94;
128+
1.00, 0.91]);
129+
end MyTurbineEfficiency;
130+
</pre></blockquote>
131+
132+
<p>Place this record in your own package (or directly in the model), then in the
133+
<em>Efficiency data</em> group of the Turbine:</p>
134+
<ol>
135+
<li>Uncheck <code>ConstEfficiency</code>.</li>
136+
<li>Set <code>VarEfficiency</code> to <code>redeclare MyTurbineEfficiency VarEfficiency</code>
137+
(or use the drop-down in the parameter dialog, which lists all records compatible with
138+
<a href=\"modelica://OpenHPL.Types.Efficiency\">Types.Efficiency</a>).</li>
139+
</ol>
140+
141+
<p>The base record <a href=\"modelica://OpenHPL.Types.Efficiency\">Types.Efficiency</a>
142+
already contains a representative default table that can be used as a starting point
143+
when no measured data are available.</p>
89144
</html>"), Icon(graphics={Text(
90145
visible=enable_P_out,
91146
extent={{30,100},{50,80}},

0 commit comments

Comments
 (0)