-
Notifications
You must be signed in to change notification settings - Fork 0
/
hillcurves.m
175 lines (141 loc) · 8.27 KB
/
hillcurves.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
%Take in initial info: turbine type, flow and speed
%Turbine types : francisHi,francisMid,francisLo,kaplan,turgo,pelton
function [efficiency] = hillcurves(turbineType,unitFlow,unitSpeed)
%Francis Hi
if turbineType==1
%Unit speeds between 75 and 325 ... 25 increments : 10 wide
%Unit flows between 0.08 and 0.25 ...0.01 increments : 17 high
QBank=0.07:0.01:0.26;
speedBank=50:25:350;
efficiencyMatrix= [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; %50
0,55.5,55.5,55.5,55.5,55.5,55.5,55.5,55.5,55.5,55.5,55.5,55.5,55.5,55.5,0,0,0,0,0; %75
0,65.7,65.7,65.7,65.7,65.7,65.7,65.7,65.7,65.7,65.7,65.7,65.7,65.7,65.7,60.6,60.6,55.5,55.5,0; %100
0,67,69,71,72,76,77.3,78.5,78.5,78.5,78.5,77.3,75,75,74,73,70,64,60,0; %125
0,70,72,76,78.5,81.2,82.5,83.5,84.9,85.5,86,85.5,84,83.5,82.5,81,78.5,76,70,0; %150
0,69,72,77,82,84,86.5,87.5,88.4,89.5,90,89.5,88.4,87.4,86.9,86.3,83.2,81.5,79,0; %175
0,65.7,70,77,82,86.3,87.4,88.8,90.5,90.9,91.3,91.7,90.8,89.4,88,87,86.3,83.5,82,0; %200
0,60,65,71,78,81.2,86.3,87,88.6,90.3,90.6,90.6,90.5,89,87,85,83,82,78,0; %225
0,0,55.5,62,70,76,78.5,81,84,86,87,88.4,88.4,87.4,85,82.5,79.5,76,74,0; %250
0,0,0,0,55.6,65,70,73,76,77,79,80,81.2,81.2,81.2,80,78,75.5,70,0; %275
0,0,0,0,0,0,55.5,60,65,67,68.5,69.5,69.5,69.5,72,76,74,72,67,0; %300
0,0,0,0,0,0,0,0,0,0,55.5,58,58.5,60,62,65,65,63,60,0; %325
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; %350
];
Qindex=findnearest(unitFlow,QBank);
Nindex= findnearest(unitSpeed,speedBank);
efficiency=efficiencyMatrix(Nindex,Qindex);
%Francis Med
elseif turbineType==2
%Unit speeds between 100 and 275 ... 25 increments : 8 wide
%Unit flows between 0.02 and 0.085 ...0.005 increments : 14 high
QBank=0.015:0.005:0.09;
speedBank=75:25:300;
efficiencyMatrix= [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; %75
0,65,64,64,63,62,62,61,60,60,59,58,58,56,0,0; %100
0,69,70,71,71,72,73,73,73,72,71,70,67,64,60,0; %125
0,73,73,74,76,79,80,81,81,80,79,76,74,73,70,0; %150
0,74,77,80,83,84,84,85,86,86,85.5,85,81,78,75,0; %175
0,70,78,84,85,87,88.5,89.5,90.5,90.5,90,89,86,82,78,0; %200
0,65,73,80,84,87,89,90.5,91.5,92,92,91.2,88.5,80,76,0; %225
0,58,63,68,78,81,83.5,86,88,88.5,88,83,74,65,63,0; %250
0,0,0,58,63,69,73,74,76,76,75,66,58,0,0,0; %275
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; %300
];
Qindex=findnearest(unitFlow,QBank);
Nindex= findnearest(unitSpeed,speedBank);
efficiency=efficiencyMatrix(Nindex,Qindex);
%Francis Lo
elseif turbineType==3
%Unit speeds between 190 and 280 ... 10 increments : 10 wide
%Unit flows between 0.004 and 0.019 ...0.001 increments : 16 high
QBank=0.003:0.001:0.02;
speedBank=180:10:290;
efficiencyMatrix= [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; %180
0,61,65,72,75,80,83,85,86.5,88,88,88,88,87,85,84,80,0; %190
0,62,68,74,77,81,84.5,87,88.75,89.75,90,90,90,89.25,88.25,85,83,0; %200
0,62,67.5,75,78,81.5,84.5,88,89,90.25,90.6,90.7,90.6,90.25,89,88,86,0; %210
0,63,69,74,78,81,84,88,89,90.2,90.6,91,91,90.5,90,88.5,86.5,0; %220
0,63,68,74,77,80,83.5,86,88.5,89.5,90.4,90.7,90.7,90.5,90,88.8,87,0; %230
0,61,65.5,73,75,78.5,81.5,86,87,89,89.5,90.2,90.25,90.2,89.5,88.5,87,0; %240
0,60,64,71,75,77,79.5,83,86,87,88.5,89.2,89.5,89.4,89,88,86,0; %250
0,59,62.5,68,73,75,78,80,82,84,86.5,87.5,88,88.1,88,86,83,0; %260
0,55,61.5,63,67,73,75.5,77,78.5,81,82,83,83.5,83,82.5,81,79,0; %270
0,52,58,61,63,68,71,74,75.5,77,75.5,78,80,80,80,78,75,0; %280
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 %290
];
Qindex=findnearest(unitFlow,QBank);
Nindex=findnearest(unitSpeed,speedBank);
efficiency=efficiencyMatrix(Nindex,Qindex);
%Kaplan
elseif turbineType==4
%Unit speeds between 90 and 210 ... 10 increments : 13 wide
%Unit flows between 0.2 and 3 ...0.2 increments : 15 high
QBank=0.6:0.1:3.1;
speedBank=80:10:220;
efficiencyMatrix= [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; %80
0,73,75,76.5,77.5,78.5,79,79.5,80,80,80,79.5,79,78.5,78.2,78,77.75,77,75,73,72,70,0,0,0,0; %90
0,74,77.5,79.5,81,82.25,82.75,83,83.25,83.25,83,82.75,82.75,82.5,82.25,81.75,81,80.25,79,78,77,74.5,73,70,0,0; %100
0,77,79,82,83,84,84.5,85,85.5,85.5,85.5,85.25,85,85,84.5,84,83.75,82.5,81.5,80.5,79,78,77,74,72,0; %110
0,77,81,83,84.5,85.5,86.5,87,87.25,87.5,87.25,87.25,87,86.75,86.25,85.75,85,84.5,83.25,82.5,81,79,78,76.5,73,0; %120
0,77,82,84,85.75,86.5,87.25,88,88.5,88.5,88.75,88.75,88.5,88,87.75,87.25,86.25,85.25,84.5,83.25,82,80,78.5,77,74,0; %130
0,77,82,84.25,86,87.25,88,88.75,89.25,89.75,90,90,89.75,89.5,88.5,88,87,86,85,84,82.5,80,78.5,77,74,0; %140
0,75,80,84,86,87.25,88.2,89,90,90.5,91.2,91.2,90.75,89.8,89,88.1,87,86,85,84,82,79.25,78,75,73,0; %150
0,73,78,82,85,87,88,89,90,90.75,91.5,92,91,90,89,88,87,85.5,84.5,83,81,78.5,77,74,72,0; %160
0,0,75,79,83,85,87,88.2,89,90,91,91,90.75,89.75,88.5,87.5,86,84.75,83.25,82,79.5,77.75,75,72.5,0,0; %170
0,0,72,77,81,84,85,86,87.5,88.25,89,89.25,89.25,88.5,87.5,86,84.5,83.25,82,80,78.5,76,73,0,0,0; %180
0,0,0,73,79,82,83.75,84.25,85,85.75,86.5,87,87,86,85,84,82.5,81.5,80.5,78.75,77,74,70,0,0,0; %190
0,0,0,0,74,79,81,82.25,83,83,83.25,83.25,83.25,83,82,81.5,80.5,79.5,78.5,77,74,70,0,0,0,0; %200
0,0,0,0,70,74.5,78,79.5,80,80.5,80.5,80,79.75,79,78.75,78,77.5,77,76.5,73,70,0,0,0,0,0; %210
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; %220
];
Qindex=findnearest(unitFlow,QBank);
Nindex= findnearest(unitSpeed,speedBank);
efficiency=efficiencyMatrix(Nindex,Qindex);
%Pelton
elseif turbineType==5
%Unit speeds between 90 and 160 ... 10 increments : 8 wide
%Unit flows between 0.001 and 0.004 ...0.0064 increments : 14 high
QBank=0.0006:0.0004:0.0066;
speedBank=80:10:170;
efficiencyMatrix= [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; %80
0,0,68,73,78,80,82,83,83,83,83,83,83,83,83,0; %90
0,68,75,80,83,84,85,86,86,86,86,86,86,86,86,0; %100
0,71,79,82,84.5,86.25,88,88.25,88.5,89,89,89,89,88.5,88.5,0; %110
0,68,78,81.5,86,87.5,88.5,89.2,89.4,89.6,89.7,89.8,89.9,90,90,0; %120
0,0,71,79.5,83,86.5,88,88.25,88.75,89,89.1,89.1,89,89,88.5,0; %130
0,0,0,68,78,80,84,85,86,86,86,86,86,85,84,0; %140
0,0,0,0,0,68,73,75,77,78,78,78,78,78,78,0; %150
0,0,0,0,0,0,0,0,68,68,68,68,68,68,68,0; %160
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; %170
];
Qindex=findnearest(unitFlow,QBank);
Nindex= findnearest(unitSpeed,speedBank);
efficiency=efficiencyMatrix(Nindex,Qindex);
%Turgo
elseif turbineType==6
%Unit speeds between 20% and 80% ... 5 increments : 12 wide
%Unit flows between 10% and 100% ...10 increments : 10 high
%Unit speed : 100%=2773.58 => 1% = 27.735
%Unit flows : 100%=0.0425 => 1% = 0.000425
QBank=(0:10:110)*0.000425;
speedBank=(15:5:85)*27.735;
efficiencyMatrix= [0,0,0,0,0,0,0,0,0,0,0,0;
0,0,50,53,53,53,53,53,50,50,50,0; %20
0,0,58,63,63,63,63,63,63,60,58,0; %25
0,50,63,70,73,73,73,70,68,68,63,0; %30
0,50,70,78,78,78,78,78,75,73,70,0; %35
0,53,73,80,83,83,83,82,80,80,78,0; %40
0,53,73,83,84,85,85,84,84,83,81,0; %45
0,50,73,83,84,86,87.3,87.1,87,86.5,84,0; %50
0,0,68,80,84,85,87,87.1,87.3,87.1,85,0; %55
0,0,63,78,82,84,85,85,85,84,83,0; %60
0,0,58,73,78,80,83,83,83,83,80,0; %65
0,0,53,68,73,75,78,78,78,78,76,0; %70
0,0,0,58,63,68,69,70,68,68,65,0; %75
0,0,0,0,51,53,58,58,58,58,53,0; %80
0,0,0,0,0,0,0,0,0,0,0,0;]; %85
Qindex=findnearest(unitFlow,QBank);
Nindex= findnearest(unitSpeed,speedBank);
efficiency=efficiencyMatrix(Nindex,Qindex);
end
end