|
1 | 1 | within OpenHPL.ElectroMech.Turbines; |
2 | 2 | model Turbine "Simple turbine model with mechanical connectors" |
3 | | - outer Data data "Using standard class with global parameters"; |
4 | | - extends Icons.Turbine; |
5 | | - |
6 | | - parameter Boolean ValveCapacity = true "If checked the guide vane capacity C_v should be specified, |
7 | | - otherwise specify the nominal turbine parameters (net head and flow rate)" |
8 | | - annotation (Dialog(group = "Nominal turbine parameters"), choices(checkBox = true)); |
9 | | - parameter Real C_v = 3.7 "Guide vane 'valve capacity'" |
10 | | - annotation (Dialog(group = "Nominal turbine parameters", enable = ValveCapacity)); |
11 | | - parameter SI.Height H_n = 460 "Nominal net head" |
12 | | - annotation (Dialog(group = "Nominal turbine parameters", enable = not ValveCapacity)); |
13 | | - parameter SI.VolumeFlowRate Vdot_n = 23.4 "Nominal flow rate" |
14 | | - annotation (Dialog(group = "Nominal turbine parameters", enable = not ValveCapacity)); |
15 | | - parameter SI.PerUnit u_n = 0.95 "Nominal guide vane opening" |
16 | | - annotation (Dialog(group = "Nominal turbine parameters", enable = not ValveCapacity)); |
17 | | - parameter Boolean ConstEfficiency = true "If checked the constant efficiency eta_h is used, |
18 | | - otherwise specify lookup table for efficiency" |
19 | | - annotation (Dialog(group = "Efficiency data"), choices(checkBox = true)); |
20 | | - parameter SI.Efficiency eta_h = 0.9 "Turbine hydraulic efficiency" |
21 | | - annotation (Dialog(group = "Efficiency data", enable = ConstEfficiency)); |
22 | | - parameter Real lookup_table[:, :] = [0, 0.4; 0.2, 0.7; 0.5, 0.9; 0.95, 0.95; 1.0, 0.93] |
23 | | - "Look-up table for the turbine efficiency, described by a table matrix, |
24 | | - where the first column is a pu value of the guide vane opening, |
25 | | - and the second column is a pu value of the turbine efficiency." |
26 | | - annotation (Dialog(group = "Efficiency data", enable = not ConstEfficiency)); |
27 | | - parameter Boolean WaterCompress = false "If checked the water is compressible in the penstock" |
28 | | - annotation (Dialog(tab = "Advanced"), choices(checkBox = true)); |
29 | | - |
| 3 | + extends BaseClasses.BaseValve; |
30 | 4 | extends BaseClasses.Power2Torque(power(y=Wdot_s)); |
31 | | - extends OpenHPL.Interfaces.TurbineContacts; |
32 | | - |
33 | | - SI.Pressure dp "Turbine pressure drop"; |
34 | | - SI.MassFlowRate mdot "Turbine pressure drop"; |
35 | | - SI.EnergyFlowRate Kdot_i_tr "Kinetic energy flow"; |
36 | | - SI.VolumeFlowRate Vdot "Flow rate"; |
37 | | - Real C_v_ "Guide vane 'valve capacity'"; |
| 5 | + extends Interfaces.TurbineContacts; |
| 6 | + extends Icons.Turbine; |
38 | 7 |
|
39 | | - output SI.EnergyFlowRate Wdot_s "Shaft power"; |
40 | | - Modelica.Blocks.Tables.CombiTable1Dv look_up_table(table=lookup_table); |
41 | | - Modelica.Blocks.Math.Feedback lossCorrection annotation (Placement(transformation(extent={{-10,70},{10,90}}))); |
| 8 | + Modelica.Blocks.Math.Feedback lossCorrection annotation (Placement(transformation(extent={{-50,70},{-30,90}}))); |
42 | 9 | equation |
43 | | - Vdot = if WaterCompress then mdot / (data.rho * (1 + data.beta * (i.p - data.p_a))) else mdot / data.rho |
44 | | - "Checking for water compressibility"; |
45 | | - look_up_table.u[1] = u_t "Link the guide vane opening"; |
46 | | - C_v_ = if ValveCapacity then C_v else Vdot_n/sqrt(H_n*data.g*data.rho/data.p_a)/u_n |
47 | | - "Define guide vane 'valve capacity' base on the Nominal turbine parameters"; |
48 | | - dp = Vdot ^ 2 * data.p_a / (C_v_ * max(1e-6, u_t)) ^ 2 "Turbine valve equation for pressure drop"; |
49 | | - dp = i.p - o.p "Link the pressure drop to the ports"; |
50 | | - i.mdot+o.mdot=0 "Mass balance"; |
51 | | - mdot = i.mdot "Flow direction"; |
52 | | - Kdot_i_tr = dp * Vdot "Turbine energy balance"; |
53 | | - if ConstEfficiency then |
54 | | - Wdot_s = eta_h * Kdot_i_tr; |
55 | | - else |
56 | | - Wdot_s = look_up_table.y[1] * Kdot_i_tr; |
57 | | - end if; |
58 | | - |
59 | | - /* // for temperature variation, not finished... |
60 | | - i.T = o.T; */ |
61 | 10 |
|
62 | 11 | connect(P_out, lossCorrection.y) annotation (Line( |
63 | | - points={{40,110},{40,80},{9,80}}, |
| 12 | + points={{40,110},{40,80},{-31,80}}, |
64 | 13 | color={0,0,127}, |
65 | 14 | pattern=LinePattern.Dash)); |
66 | | - connect(lossCorrection.u1, power.y) annotation (Line(points={{-8,80},{-88,80},{-88,30},{-81,30}}, color={0,0,127})); |
67 | | - connect(frictionLoss.power, lossCorrection.u2) annotation (Line(points={{-1,12},{0,12},{0,72}}, color={0,0,127})); |
| 15 | + connect(lossCorrection.u1, power.y) annotation (Line(points={{-48,80},{-88,80},{-88,30},{-81,30}},color={0,0,127})); |
| 16 | + connect(frictionLoss.power, lossCorrection.u2) annotation (Line(points={{-1,12},{-40,12},{-40,72}}, |
| 17 | + color={0,0,127})); |
| 18 | + connect(u_t, u) annotation (Line(points={{-80,120},{-80,90},{0,90},{0,70}}, color={0,0,127})); |
68 | 19 | annotation ( |
69 | 20 | Documentation(info="<html><p> |
70 | 21 | This is a simple model of the turbine that give possibilities for simplified |
|
0 commit comments