foxes 0.6.1__py3-none-any.whl → 0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of foxes might be problematic. Click here for more details.
- foxes/VERSION +1 -1
- foxes/algorithms/downwind/downwind.py +131 -65
- foxes/algorithms/downwind/models/__init__.py +2 -1
- foxes/algorithms/downwind/models/farm_wakes_calc.py +87 -55
- foxes/algorithms/downwind/models/init_farm_data.py +134 -0
- foxes/algorithms/downwind/models/point_wakes_calc.py +54 -65
- foxes/algorithms/downwind/models/{calc_order.py → reorder_farm_output.py} +28 -26
- foxes/algorithms/iterative/iterative.py +100 -51
- foxes/algorithms/iterative/models/convergence.py +3 -3
- foxes/algorithms/iterative/models/farm_wakes_calc.py +55 -48
- foxes/algorithms/sequential/models/seq_state.py +7 -6
- foxes/algorithms/sequential/sequential.py +81 -44
- foxes/constants.py +33 -18
- foxes/core/__init__.py +2 -2
- foxes/core/algorithm.py +31 -12
- foxes/core/data.py +335 -41
- foxes/core/data_calc_model.py +27 -23
- foxes/core/farm_controller.py +27 -28
- foxes/core/farm_data_model.py +26 -4
- foxes/core/model.py +186 -129
- foxes/core/partial_wakes_model.py +84 -81
- foxes/core/point_data_model.py +51 -18
- foxes/core/rotor_model.py +59 -77
- foxes/core/states.py +6 -6
- foxes/core/turbine_model.py +4 -4
- foxes/core/turbine_type.py +24 -0
- foxes/core/vertical_profile.py +3 -3
- foxes/core/wake_frame.py +91 -50
- foxes/core/wake_model.py +74 -43
- foxes/core/wake_superposition.py +29 -26
- foxes/input/farm_layout/__init__.py +1 -0
- foxes/input/farm_layout/from_random.py +49 -0
- foxes/input/states/__init__.py +1 -1
- foxes/input/states/create/__init__.py +1 -0
- foxes/input/states/create/random_abl_states.py +6 -2
- foxes/input/states/create/random_timeseries.py +56 -0
- foxes/input/states/field_data_nc.py +12 -8
- foxes/input/states/multi_height.py +24 -14
- foxes/input/states/scan_ws.py +13 -17
- foxes/input/states/single.py +28 -20
- foxes/input/states/states_table.py +22 -18
- foxes/models/axial_induction_models/betz.py +1 -1
- foxes/models/farm_models/turbine2farm.py +2 -2
- foxes/models/model_book.py +40 -14
- foxes/models/partial_wakes/__init__.py +2 -2
- foxes/models/partial_wakes/axiwake.py +73 -200
- foxes/models/partial_wakes/centre.py +40 -0
- foxes/models/partial_wakes/grid.py +7 -63
- foxes/models/partial_wakes/rotor_points.py +53 -147
- foxes/models/partial_wakes/segregated.py +158 -0
- foxes/models/partial_wakes/top_hat.py +88 -196
- foxes/models/point_models/set_uniform_data.py +4 -4
- foxes/models/point_models/tke2ti.py +4 -4
- foxes/models/point_models/wake_deltas.py +4 -4
- foxes/models/rotor_models/centre.py +15 -19
- foxes/models/rotor_models/grid.py +2 -1
- foxes/models/rotor_models/levels.py +2 -1
- foxes/models/turbine_models/__init__.py +0 -1
- foxes/models/turbine_models/calculator.py +11 -7
- foxes/models/turbine_models/kTI_model.py +13 -11
- foxes/models/turbine_models/lookup_table.py +22 -9
- foxes/models/turbine_models/power_mask.py +81 -51
- foxes/models/turbine_models/rotor_centre_calc.py +17 -20
- foxes/models/turbine_models/sector_management.py +5 -6
- foxes/models/turbine_models/set_farm_vars.py +49 -20
- foxes/models/turbine_models/table_factors.py +5 -5
- foxes/models/turbine_models/thrust2ct.py +9 -5
- foxes/models/turbine_models/yaw2yawm.py +7 -13
- foxes/models/turbine_models/yawm2yaw.py +7 -11
- foxes/models/turbine_types/PCt_file.py +84 -3
- foxes/models/turbine_types/PCt_from_two.py +7 -3
- foxes/models/turbine_types/null_type.py +2 -2
- foxes/models/turbine_types/wsrho2PCt_from_two.py +2 -2
- foxes/models/turbine_types/wsti2PCt_from_two.py +6 -2
- foxes/models/wake_frames/farm_order.py +26 -22
- foxes/models/wake_frames/rotor_wd.py +32 -31
- foxes/models/wake_frames/seq_dynamic_wakes.py +112 -64
- foxes/models/wake_frames/streamlines.py +51 -47
- foxes/models/wake_frames/timelines.py +59 -47
- foxes/models/wake_frames/yawed_wakes.py +63 -40
- foxes/models/wake_models/axisymmetric.py +31 -35
- foxes/models/wake_models/dist_sliced.py +50 -56
- foxes/models/wake_models/gaussian.py +33 -35
- foxes/models/wake_models/induction/rankine_half_body.py +79 -87
- foxes/models/wake_models/induction/rathmann.py +56 -63
- foxes/models/wake_models/induction/self_similar.py +59 -62
- foxes/models/wake_models/ti/crespo_hernandez.py +83 -74
- foxes/models/wake_models/ti/iec_ti.py +65 -75
- foxes/models/wake_models/top_hat.py +60 -69
- foxes/models/wake_models/wake_mirror.py +49 -54
- foxes/models/wake_models/wind/bastankhah14.py +44 -66
- foxes/models/wake_models/wind/bastankhah16.py +84 -111
- foxes/models/wake_models/wind/jensen.py +67 -89
- foxes/models/wake_models/wind/turbopark.py +93 -133
- foxes/models/wake_superpositions/ti_linear.py +33 -27
- foxes/models/wake_superpositions/ti_max.py +33 -27
- foxes/models/wake_superpositions/ti_pow.py +35 -27
- foxes/models/wake_superpositions/ti_quadratic.py +33 -27
- foxes/models/wake_superpositions/ws_linear.py +39 -32
- foxes/models/wake_superpositions/ws_max.py +40 -33
- foxes/models/wake_superpositions/ws_pow.py +39 -32
- foxes/models/wake_superpositions/ws_product.py +35 -28
- foxes/models/wake_superpositions/ws_quadratic.py +39 -32
- foxes/opt/constraints/min_dist.py +1 -1
- foxes/opt/objectives/farm_vars.py +1 -1
- foxes/opt/problems/layout/farm_layout.py +38 -97
- foxes/output/__init__.py +1 -0
- foxes/output/farm_results_eval.py +1 -1
- foxes/output/flow_plots_2d/flow_plots.py +2 -0
- foxes/output/flow_plots_2d/get_fig.py +2 -0
- foxes/output/grids.py +1 -1
- foxes/output/rose_plot.py +3 -3
- foxes/output/rotor_point_plots.py +117 -0
- foxes/output/turbine_type_curves.py +2 -2
- foxes/utils/__init__.py +2 -1
- foxes/utils/load.py +29 -0
- foxes/utils/random_xy.py +56 -0
- foxes/utils/runners/runners.py +13 -1
- foxes/utils/windrose_plot.py +1 -1
- foxes/variables.py +10 -0
- {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/METADATA +13 -7
- {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/RECORD +126 -122
- {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/WHEEL +1 -1
- foxes/models/partial_wakes/distsliced.py +0 -322
- foxes/models/partial_wakes/mapped.py +0 -252
- foxes/models/turbine_models/set_XYHD.py +0 -130
- {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/LICENSE +0 -0
- {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/top_level.txt +0 -0
- {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/zip-safe +0 -0
|
@@ -69,10 +69,8 @@ class CrespoHernandezTIWake(TopHatWakeModel):
|
|
|
69
69
|
|
|
70
70
|
Parameters
|
|
71
71
|
----------
|
|
72
|
-
|
|
73
|
-
The
|
|
74
|
-
value: The wake superposition model name,
|
|
75
|
-
will be looked up in model book
|
|
72
|
+
superposition: str
|
|
73
|
+
The TI wake superposition.
|
|
76
74
|
k: float, optional
|
|
77
75
|
The wake growth parameter k. If not given here
|
|
78
76
|
it will be searched in the farm data.
|
|
@@ -116,43 +114,49 @@ class CrespoHernandezTIWake(TopHatWakeModel):
|
|
|
116
114
|
|
|
117
115
|
def __repr__(self):
|
|
118
116
|
k = getattr(self, self.k_var)
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
iname = (
|
|
118
|
+
self.induction if isinstance(self.induction, str) else self.induction.name
|
|
119
|
+
)
|
|
120
|
+
s = f"{type(self).__name__}"
|
|
121
|
+
s += f"({self.superpositions[FV.TI]}, induction={iname}"
|
|
122
|
+
if k is None:
|
|
123
|
+
s += f", k_var={self.k_var}"
|
|
124
|
+
else:
|
|
125
|
+
s += f", {self.k_var}={k}"
|
|
126
|
+
s += ")"
|
|
121
127
|
return s
|
|
122
128
|
|
|
123
|
-
def
|
|
129
|
+
def new_wake_deltas(self, algo, mdata, fdata, tdata):
|
|
124
130
|
"""
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
They are added on the fly to the wake_deltas dict.
|
|
131
|
+
Creates new empty wake delta arrays.
|
|
128
132
|
|
|
129
133
|
Parameters
|
|
130
134
|
----------
|
|
131
135
|
algo: foxes.core.Algorithm
|
|
132
136
|
The calculation algorithm
|
|
133
|
-
mdata: foxes.core.
|
|
137
|
+
mdata: foxes.core.MData
|
|
134
138
|
The model data
|
|
135
|
-
fdata: foxes.core.
|
|
139
|
+
fdata: foxes.core.FData
|
|
136
140
|
The farm data
|
|
137
|
-
|
|
138
|
-
The
|
|
141
|
+
tdata: foxes.core.TData
|
|
142
|
+
The target point data
|
|
143
|
+
|
|
144
|
+
Returns
|
|
145
|
+
-------
|
|
139
146
|
wake_deltas: dict
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
wake delta applies, values: numpy.ndarray with
|
|
143
|
-
shape (n_states, n_points, ...)
|
|
147
|
+
Key: variable name, value: The zero filled
|
|
148
|
+
wake deltas, shape: (n_states, n_turbines, n_rpoints, ...)
|
|
144
149
|
|
|
145
150
|
"""
|
|
146
|
-
|
|
147
|
-
wake_deltas[FV.TI] = np.zeros((n_states, pdata.n_points), dtype=FC.DTYPE)
|
|
151
|
+
return {FV.TI: np.zeros_like(tdata[FC.TARGETS][..., 0])}
|
|
148
152
|
|
|
149
153
|
def calc_wake_radius(
|
|
150
154
|
self,
|
|
151
155
|
algo,
|
|
152
156
|
mdata,
|
|
153
157
|
fdata,
|
|
154
|
-
|
|
155
|
-
|
|
158
|
+
tdata,
|
|
159
|
+
downwind_index,
|
|
156
160
|
x,
|
|
157
161
|
ct,
|
|
158
162
|
):
|
|
@@ -163,53 +167,48 @@ class CrespoHernandezTIWake(TopHatWakeModel):
|
|
|
163
167
|
----------
|
|
164
168
|
algo: foxes.core.Algorithm
|
|
165
169
|
The calculation algorithm
|
|
166
|
-
mdata: foxes.core.
|
|
170
|
+
mdata: foxes.core.MData
|
|
167
171
|
The model data
|
|
168
|
-
fdata: foxes.core.
|
|
172
|
+
fdata: foxes.core.FData
|
|
169
173
|
The farm data
|
|
170
|
-
|
|
171
|
-
The
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
wake causing turbine. Shape: (n_states,)
|
|
174
|
+
tdata: foxes.core.TData
|
|
175
|
+
The target point data
|
|
176
|
+
downwind_index: int
|
|
177
|
+
The index in the downwind order
|
|
175
178
|
x: numpy.ndarray
|
|
176
|
-
The x values, shape: (n_states,
|
|
177
|
-
r: numpy.ndarray
|
|
178
|
-
The radial values for each x value, shape:
|
|
179
|
-
(n_states, n_points, n_r_per_x, 2)
|
|
179
|
+
The x values, shape: (n_states, n_targets)
|
|
180
180
|
ct: numpy.ndarray
|
|
181
181
|
The ct values of the wake-causing turbines,
|
|
182
|
-
shape: (n_states,
|
|
182
|
+
shape: (n_states, n_targets)
|
|
183
183
|
|
|
184
184
|
Returns
|
|
185
185
|
-------
|
|
186
186
|
wake_r: numpy.ndarray
|
|
187
|
-
The wake radii, shape: (n_states,
|
|
187
|
+
The wake radii, shape: (n_states, n_targets)
|
|
188
188
|
|
|
189
189
|
"""
|
|
190
|
-
|
|
191
190
|
# get D:
|
|
192
191
|
D = self.get_data(
|
|
193
192
|
FV.D,
|
|
194
|
-
FC.
|
|
193
|
+
FC.STATE_TARGET,
|
|
195
194
|
lookup="w",
|
|
196
195
|
algo=algo,
|
|
197
196
|
fdata=fdata,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
tdata=tdata,
|
|
198
|
+
downwind_index=downwind_index,
|
|
199
|
+
upcast=False,
|
|
201
200
|
)
|
|
202
201
|
|
|
203
202
|
# get k:
|
|
204
203
|
k = self.get_data(
|
|
205
204
|
self.k_var,
|
|
206
|
-
FC.
|
|
205
|
+
FC.STATE_TARGET,
|
|
207
206
|
lookup="sw",
|
|
208
207
|
algo=algo,
|
|
209
208
|
fdata=fdata,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
tdata=tdata,
|
|
210
|
+
downwind_index=downwind_index,
|
|
211
|
+
upcast=False,
|
|
213
212
|
)
|
|
214
213
|
|
|
215
214
|
# calculate:
|
|
@@ -219,14 +218,14 @@ class CrespoHernandezTIWake(TopHatWakeModel):
|
|
|
219
218
|
|
|
220
219
|
return radius
|
|
221
220
|
|
|
222
|
-
def
|
|
221
|
+
def calc_centreline(
|
|
223
222
|
self,
|
|
224
223
|
algo,
|
|
225
224
|
mdata,
|
|
226
225
|
fdata,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
tdata,
|
|
227
|
+
downwind_index,
|
|
228
|
+
st_sel,
|
|
230
229
|
x,
|
|
231
230
|
wake_r,
|
|
232
231
|
ct,
|
|
@@ -238,49 +237,59 @@ class CrespoHernandezTIWake(TopHatWakeModel):
|
|
|
238
237
|
----------
|
|
239
238
|
algo: foxes.core.Algorithm
|
|
240
239
|
The calculation algorithm
|
|
241
|
-
mdata: foxes.core.
|
|
240
|
+
mdata: foxes.core.MData
|
|
242
241
|
The model data
|
|
243
|
-
fdata: foxes.core.
|
|
242
|
+
fdata: foxes.core.FData
|
|
244
243
|
The farm data
|
|
245
|
-
|
|
246
|
-
The
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
is non-zero, shape: (n_states, n_points)
|
|
244
|
+
tdata: foxes.core.TData
|
|
245
|
+
The target point data
|
|
246
|
+
downwind_index: int
|
|
247
|
+
The index in the downwind order
|
|
248
|
+
st_sel: numpy.ndarray of bool
|
|
249
|
+
The state-target selection, for which the wake
|
|
250
|
+
is non-zero, shape: (n_states, n_targets)
|
|
253
251
|
x: numpy.ndarray
|
|
254
|
-
The x values, shape: (
|
|
252
|
+
The x values, shape: (n_st_sel,)
|
|
255
253
|
wake_r: numpy.ndarray
|
|
256
|
-
The wake radii, shape: (
|
|
254
|
+
The wake radii, shape: (n_st_sel,)
|
|
257
255
|
ct: numpy.ndarray
|
|
258
256
|
The ct values of the wake-causing turbines,
|
|
259
|
-
shape: (
|
|
257
|
+
shape: (n_st_sel,)
|
|
260
258
|
|
|
261
259
|
Returns
|
|
262
260
|
-------
|
|
263
261
|
cl_del: dict
|
|
264
262
|
The centre line wake deltas. Key: variable name str,
|
|
265
|
-
varlue: numpy.ndarray, shape: (
|
|
263
|
+
varlue: numpy.ndarray, shape: (n_st_sel,)
|
|
266
264
|
|
|
267
265
|
"""
|
|
268
266
|
# prepare:
|
|
269
|
-
|
|
270
|
-
n_points = sp_sel.shape[1]
|
|
271
|
-
n_targts = np.sum(sp_sel)
|
|
272
|
-
st_sel = (np.arange(n_states), states_source_turbine)
|
|
267
|
+
n_targts = np.sum(st_sel)
|
|
273
268
|
TI = FV.AMB_TI if self.use_ambti else FV.TI
|
|
274
269
|
|
|
275
|
-
#
|
|
276
|
-
D =
|
|
277
|
-
|
|
278
|
-
|
|
270
|
+
# get D:
|
|
271
|
+
D = self.get_data(
|
|
272
|
+
FV.D,
|
|
273
|
+
FC.STATE_TARGET,
|
|
274
|
+
lookup="w",
|
|
275
|
+
algo=algo,
|
|
276
|
+
fdata=fdata,
|
|
277
|
+
tdata=tdata,
|
|
278
|
+
downwind_index=downwind_index,
|
|
279
|
+
upcast=True,
|
|
280
|
+
)[st_sel]
|
|
279
281
|
|
|
280
|
-
# get
|
|
281
|
-
ti =
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
# get TI:
|
|
283
|
+
ti = self.get_data(
|
|
284
|
+
TI,
|
|
285
|
+
FC.STATE_TARGET,
|
|
286
|
+
lookup="w",
|
|
287
|
+
algo=algo,
|
|
288
|
+
fdata=fdata,
|
|
289
|
+
tdata=tdata,
|
|
290
|
+
downwind_index=downwind_index,
|
|
291
|
+
upcast=True,
|
|
292
|
+
)[st_sel]
|
|
284
293
|
|
|
285
294
|
# calculate induction factor:
|
|
286
295
|
twoa = 2 * self.induction.ct2a(ct)
|
|
@@ -44,10 +44,8 @@ class IECTIWake(TopHatWakeModel):
|
|
|
44
44
|
|
|
45
45
|
Parameters
|
|
46
46
|
----------
|
|
47
|
-
|
|
48
|
-
The
|
|
49
|
-
value: The wake superposition model name,
|
|
50
|
-
will be looked up in model book
|
|
47
|
+
superposition: str
|
|
48
|
+
The TI wake superposition.
|
|
51
49
|
opening_angle: float
|
|
52
50
|
The wake opening angle. The wake growth parameter k is calculated
|
|
53
51
|
based on the wake opening angle.
|
|
@@ -67,43 +65,49 @@ class IECTIWake(TopHatWakeModel):
|
|
|
67
65
|
|
|
68
66
|
def __repr__(self):
|
|
69
67
|
k = getattr(self, self.k_var)
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
iname = (
|
|
69
|
+
self.induction if isinstance(self.induction, str) else self.induction.name
|
|
70
|
+
)
|
|
71
|
+
s = f"{type(self).__name__}"
|
|
72
|
+
s += f"({self.superpositions[FV.TI]}, induction={iname}"
|
|
73
|
+
if k is None:
|
|
74
|
+
s += f", k_var={self.k_var}"
|
|
75
|
+
else:
|
|
76
|
+
s += f", {self.k_var}={k}"
|
|
77
|
+
s += ")"
|
|
72
78
|
return s
|
|
73
79
|
|
|
74
|
-
def
|
|
80
|
+
def new_wake_deltas(self, algo, mdata, fdata, tdata):
|
|
75
81
|
"""
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
They are added on the fly to the wake_deltas dict.
|
|
82
|
+
Creates new empty wake delta arrays.
|
|
79
83
|
|
|
80
84
|
Parameters
|
|
81
85
|
----------
|
|
82
86
|
algo: foxes.core.Algorithm
|
|
83
87
|
The calculation algorithm
|
|
84
|
-
mdata: foxes.core.
|
|
88
|
+
mdata: foxes.core.MData
|
|
85
89
|
The model data
|
|
86
|
-
fdata: foxes.core.
|
|
90
|
+
fdata: foxes.core.FData
|
|
87
91
|
The farm data
|
|
88
|
-
|
|
89
|
-
The
|
|
92
|
+
tdata: foxes.core.TData
|
|
93
|
+
The target point data
|
|
94
|
+
|
|
95
|
+
Returns
|
|
96
|
+
-------
|
|
90
97
|
wake_deltas: dict
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
wake delta applies, values: numpy.ndarray with
|
|
94
|
-
shape (n_states, n_points, ...)
|
|
98
|
+
Key: variable name, value: The zero filled
|
|
99
|
+
wake deltas, shape: (n_states, n_turbines, n_rpoints, ...)
|
|
95
100
|
|
|
96
101
|
"""
|
|
97
|
-
|
|
98
|
-
wake_deltas[FV.TI] = np.zeros((n_states, pdata.n_points), dtype=FC.DTYPE)
|
|
102
|
+
return {FV.TI: np.zeros_like(tdata[FC.TARGETS][..., 0])}
|
|
99
103
|
|
|
100
104
|
def calc_wake_radius(
|
|
101
105
|
self,
|
|
102
106
|
algo,
|
|
103
107
|
mdata,
|
|
104
108
|
fdata,
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
tdata,
|
|
110
|
+
downwind_index,
|
|
107
111
|
x,
|
|
108
112
|
ct,
|
|
109
113
|
):
|
|
@@ -114,56 +118,46 @@ class IECTIWake(TopHatWakeModel):
|
|
|
114
118
|
----------
|
|
115
119
|
algo: foxes.core.Algorithm
|
|
116
120
|
The calculation algorithm
|
|
117
|
-
mdata: foxes.core.
|
|
121
|
+
mdata: foxes.core.MData
|
|
118
122
|
The model data
|
|
119
|
-
fdata: foxes.core.
|
|
123
|
+
fdata: foxes.core.FData
|
|
120
124
|
The farm data
|
|
121
|
-
|
|
122
|
-
The
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
wake causing turbine. Shape: (n_states,)
|
|
125
|
+
tdata: foxes.core.TData
|
|
126
|
+
The target point data
|
|
127
|
+
downwind_index: int
|
|
128
|
+
The index in the downwind order
|
|
126
129
|
x: numpy.ndarray
|
|
127
|
-
The x values, shape: (n_states,
|
|
128
|
-
r: numpy.ndarray
|
|
129
|
-
The radial values for each x value, shape:
|
|
130
|
-
(n_states, n_points, n_r_per_x, 2)
|
|
130
|
+
The x values, shape: (n_states, n_targets)
|
|
131
131
|
ct: numpy.ndarray
|
|
132
132
|
The ct values of the wake-causing turbines,
|
|
133
|
-
shape: (n_states,
|
|
133
|
+
shape: (n_states, n_targets)
|
|
134
134
|
|
|
135
135
|
Returns
|
|
136
136
|
-------
|
|
137
137
|
wake_r: numpy.ndarray
|
|
138
|
-
The wake radii, shape: (n_states,
|
|
138
|
+
The wake radii, shape: (n_states, n_targets)
|
|
139
139
|
|
|
140
140
|
"""
|
|
141
|
-
|
|
142
|
-
# get k:
|
|
143
141
|
k = self.get_data(
|
|
144
142
|
self.k_var,
|
|
145
|
-
FC.
|
|
143
|
+
FC.STATE_TARGET,
|
|
146
144
|
lookup="sw",
|
|
147
145
|
algo=algo,
|
|
148
146
|
fdata=fdata,
|
|
149
|
-
|
|
150
|
-
upcast=
|
|
151
|
-
|
|
147
|
+
tdata=tdata,
|
|
148
|
+
upcast=False,
|
|
149
|
+
downwind_index=downwind_index,
|
|
152
150
|
)
|
|
151
|
+
return k * x
|
|
153
152
|
|
|
154
|
-
|
|
155
|
-
radius = k * x
|
|
156
|
-
|
|
157
|
-
return radius
|
|
158
|
-
|
|
159
|
-
def calc_centreline_wake_deltas(
|
|
153
|
+
def calc_centreline(
|
|
160
154
|
self,
|
|
161
155
|
algo,
|
|
162
156
|
mdata,
|
|
163
157
|
fdata,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
158
|
+
tdata,
|
|
159
|
+
downwind_index,
|
|
160
|
+
st_sel,
|
|
167
161
|
x,
|
|
168
162
|
wake_r,
|
|
169
163
|
ct,
|
|
@@ -175,59 +169,55 @@ class IECTIWake(TopHatWakeModel):
|
|
|
175
169
|
----------
|
|
176
170
|
algo: foxes.core.Algorithm
|
|
177
171
|
The calculation algorithm
|
|
178
|
-
mdata: foxes.core.
|
|
172
|
+
mdata: foxes.core.MData
|
|
179
173
|
The model data
|
|
180
|
-
fdata: foxes.core.
|
|
174
|
+
fdata: foxes.core.FData
|
|
181
175
|
The farm data
|
|
182
|
-
|
|
183
|
-
The
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
is non-zero, shape: (n_states, n_points)
|
|
176
|
+
tdata: foxes.core.TData
|
|
177
|
+
The target point data
|
|
178
|
+
downwind_index: int
|
|
179
|
+
The index in the downwind order
|
|
180
|
+
st_sel: numpy.ndarray of bool
|
|
181
|
+
The state-target selection, for which the wake
|
|
182
|
+
is non-zero, shape: (n_states, n_targets)
|
|
190
183
|
x: numpy.ndarray
|
|
191
|
-
The x values, shape: (
|
|
184
|
+
The x values, shape: (n_st_sel,)
|
|
192
185
|
wake_r: numpy.ndarray
|
|
193
|
-
The wake radii, shape: (
|
|
186
|
+
The wake radii, shape: (n_st_sel,)
|
|
194
187
|
ct: numpy.ndarray
|
|
195
188
|
The ct values of the wake-causing turbines,
|
|
196
|
-
shape: (
|
|
189
|
+
shape: (n_st_sel,)
|
|
197
190
|
|
|
198
191
|
Returns
|
|
199
192
|
-------
|
|
200
193
|
cl_del: dict
|
|
201
194
|
The centre line wake deltas. Key: variable name str,
|
|
202
|
-
varlue: numpy.ndarray, shape: (
|
|
195
|
+
varlue: numpy.ndarray, shape: (n_st_sel,)
|
|
203
196
|
|
|
204
197
|
"""
|
|
205
|
-
|
|
206
198
|
# read D from extra data:
|
|
207
199
|
D = self.get_data(
|
|
208
200
|
FV.D,
|
|
209
|
-
FC.
|
|
201
|
+
FC.STATE_TARGET,
|
|
210
202
|
lookup="w",
|
|
211
203
|
algo=algo,
|
|
212
204
|
fdata=fdata,
|
|
213
|
-
|
|
205
|
+
tdata=tdata,
|
|
206
|
+
downwind_index=downwind_index,
|
|
214
207
|
upcast=True,
|
|
215
|
-
|
|
216
|
-
)
|
|
217
|
-
D = D[sp_sel]
|
|
208
|
+
)[st_sel]
|
|
218
209
|
|
|
219
210
|
# get ws:
|
|
220
211
|
ws = self.get_data(
|
|
221
212
|
FV.REWS,
|
|
222
|
-
FC.
|
|
213
|
+
FC.STATE_TARGET,
|
|
223
214
|
lookup="w",
|
|
224
215
|
algo=algo,
|
|
225
216
|
fdata=fdata,
|
|
226
|
-
|
|
217
|
+
tdata=tdata,
|
|
218
|
+
downwind_index=downwind_index,
|
|
227
219
|
upcast=True,
|
|
228
|
-
|
|
229
|
-
)
|
|
230
|
-
ws = ws[sp_sel]
|
|
220
|
+
)[st_sel]
|
|
231
221
|
|
|
232
222
|
# calculate wind deficit:
|
|
233
223
|
if self.iec_type == "2005":
|