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.

Files changed (129) hide show
  1. foxes/VERSION +1 -1
  2. foxes/algorithms/downwind/downwind.py +131 -65
  3. foxes/algorithms/downwind/models/__init__.py +2 -1
  4. foxes/algorithms/downwind/models/farm_wakes_calc.py +87 -55
  5. foxes/algorithms/downwind/models/init_farm_data.py +134 -0
  6. foxes/algorithms/downwind/models/point_wakes_calc.py +54 -65
  7. foxes/algorithms/downwind/models/{calc_order.py → reorder_farm_output.py} +28 -26
  8. foxes/algorithms/iterative/iterative.py +100 -51
  9. foxes/algorithms/iterative/models/convergence.py +3 -3
  10. foxes/algorithms/iterative/models/farm_wakes_calc.py +55 -48
  11. foxes/algorithms/sequential/models/seq_state.py +7 -6
  12. foxes/algorithms/sequential/sequential.py +81 -44
  13. foxes/constants.py +33 -18
  14. foxes/core/__init__.py +2 -2
  15. foxes/core/algorithm.py +31 -12
  16. foxes/core/data.py +335 -41
  17. foxes/core/data_calc_model.py +27 -23
  18. foxes/core/farm_controller.py +27 -28
  19. foxes/core/farm_data_model.py +26 -4
  20. foxes/core/model.py +186 -129
  21. foxes/core/partial_wakes_model.py +84 -81
  22. foxes/core/point_data_model.py +51 -18
  23. foxes/core/rotor_model.py +59 -77
  24. foxes/core/states.py +6 -6
  25. foxes/core/turbine_model.py +4 -4
  26. foxes/core/turbine_type.py +24 -0
  27. foxes/core/vertical_profile.py +3 -3
  28. foxes/core/wake_frame.py +91 -50
  29. foxes/core/wake_model.py +74 -43
  30. foxes/core/wake_superposition.py +29 -26
  31. foxes/input/farm_layout/__init__.py +1 -0
  32. foxes/input/farm_layout/from_random.py +49 -0
  33. foxes/input/states/__init__.py +1 -1
  34. foxes/input/states/create/__init__.py +1 -0
  35. foxes/input/states/create/random_abl_states.py +6 -2
  36. foxes/input/states/create/random_timeseries.py +56 -0
  37. foxes/input/states/field_data_nc.py +12 -8
  38. foxes/input/states/multi_height.py +24 -14
  39. foxes/input/states/scan_ws.py +13 -17
  40. foxes/input/states/single.py +28 -20
  41. foxes/input/states/states_table.py +22 -18
  42. foxes/models/axial_induction_models/betz.py +1 -1
  43. foxes/models/farm_models/turbine2farm.py +2 -2
  44. foxes/models/model_book.py +40 -14
  45. foxes/models/partial_wakes/__init__.py +2 -2
  46. foxes/models/partial_wakes/axiwake.py +73 -200
  47. foxes/models/partial_wakes/centre.py +40 -0
  48. foxes/models/partial_wakes/grid.py +7 -63
  49. foxes/models/partial_wakes/rotor_points.py +53 -147
  50. foxes/models/partial_wakes/segregated.py +158 -0
  51. foxes/models/partial_wakes/top_hat.py +88 -196
  52. foxes/models/point_models/set_uniform_data.py +4 -4
  53. foxes/models/point_models/tke2ti.py +4 -4
  54. foxes/models/point_models/wake_deltas.py +4 -4
  55. foxes/models/rotor_models/centre.py +15 -19
  56. foxes/models/rotor_models/grid.py +2 -1
  57. foxes/models/rotor_models/levels.py +2 -1
  58. foxes/models/turbine_models/__init__.py +0 -1
  59. foxes/models/turbine_models/calculator.py +11 -7
  60. foxes/models/turbine_models/kTI_model.py +13 -11
  61. foxes/models/turbine_models/lookup_table.py +22 -9
  62. foxes/models/turbine_models/power_mask.py +81 -51
  63. foxes/models/turbine_models/rotor_centre_calc.py +17 -20
  64. foxes/models/turbine_models/sector_management.py +5 -6
  65. foxes/models/turbine_models/set_farm_vars.py +49 -20
  66. foxes/models/turbine_models/table_factors.py +5 -5
  67. foxes/models/turbine_models/thrust2ct.py +9 -5
  68. foxes/models/turbine_models/yaw2yawm.py +7 -13
  69. foxes/models/turbine_models/yawm2yaw.py +7 -11
  70. foxes/models/turbine_types/PCt_file.py +84 -3
  71. foxes/models/turbine_types/PCt_from_two.py +7 -3
  72. foxes/models/turbine_types/null_type.py +2 -2
  73. foxes/models/turbine_types/wsrho2PCt_from_two.py +2 -2
  74. foxes/models/turbine_types/wsti2PCt_from_two.py +6 -2
  75. foxes/models/wake_frames/farm_order.py +26 -22
  76. foxes/models/wake_frames/rotor_wd.py +32 -31
  77. foxes/models/wake_frames/seq_dynamic_wakes.py +112 -64
  78. foxes/models/wake_frames/streamlines.py +51 -47
  79. foxes/models/wake_frames/timelines.py +59 -47
  80. foxes/models/wake_frames/yawed_wakes.py +63 -40
  81. foxes/models/wake_models/axisymmetric.py +31 -35
  82. foxes/models/wake_models/dist_sliced.py +50 -56
  83. foxes/models/wake_models/gaussian.py +33 -35
  84. foxes/models/wake_models/induction/rankine_half_body.py +79 -87
  85. foxes/models/wake_models/induction/rathmann.py +56 -63
  86. foxes/models/wake_models/induction/self_similar.py +59 -62
  87. foxes/models/wake_models/ti/crespo_hernandez.py +83 -74
  88. foxes/models/wake_models/ti/iec_ti.py +65 -75
  89. foxes/models/wake_models/top_hat.py +60 -69
  90. foxes/models/wake_models/wake_mirror.py +49 -54
  91. foxes/models/wake_models/wind/bastankhah14.py +44 -66
  92. foxes/models/wake_models/wind/bastankhah16.py +84 -111
  93. foxes/models/wake_models/wind/jensen.py +67 -89
  94. foxes/models/wake_models/wind/turbopark.py +93 -133
  95. foxes/models/wake_superpositions/ti_linear.py +33 -27
  96. foxes/models/wake_superpositions/ti_max.py +33 -27
  97. foxes/models/wake_superpositions/ti_pow.py +35 -27
  98. foxes/models/wake_superpositions/ti_quadratic.py +33 -27
  99. foxes/models/wake_superpositions/ws_linear.py +39 -32
  100. foxes/models/wake_superpositions/ws_max.py +40 -33
  101. foxes/models/wake_superpositions/ws_pow.py +39 -32
  102. foxes/models/wake_superpositions/ws_product.py +35 -28
  103. foxes/models/wake_superpositions/ws_quadratic.py +39 -32
  104. foxes/opt/constraints/min_dist.py +1 -1
  105. foxes/opt/objectives/farm_vars.py +1 -1
  106. foxes/opt/problems/layout/farm_layout.py +38 -97
  107. foxes/output/__init__.py +1 -0
  108. foxes/output/farm_results_eval.py +1 -1
  109. foxes/output/flow_plots_2d/flow_plots.py +2 -0
  110. foxes/output/flow_plots_2d/get_fig.py +2 -0
  111. foxes/output/grids.py +1 -1
  112. foxes/output/rose_plot.py +3 -3
  113. foxes/output/rotor_point_plots.py +117 -0
  114. foxes/output/turbine_type_curves.py +2 -2
  115. foxes/utils/__init__.py +2 -1
  116. foxes/utils/load.py +29 -0
  117. foxes/utils/random_xy.py +56 -0
  118. foxes/utils/runners/runners.py +13 -1
  119. foxes/utils/windrose_plot.py +1 -1
  120. foxes/variables.py +10 -0
  121. {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/METADATA +13 -7
  122. {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/RECORD +126 -122
  123. {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/WHEEL +1 -1
  124. foxes/models/partial_wakes/distsliced.py +0 -322
  125. foxes/models/partial_wakes/mapped.py +0 -252
  126. foxes/models/turbine_models/set_XYHD.py +0 -130
  127. {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/LICENSE +0 -0
  128. {foxes-0.6.1.dist-info → foxes-0.7.dist-info}/top_level.txt +0 -0
  129. {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
- superpositions: dict
73
- The superpositions. Key: variable name str,
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
- s = super().__repr__()
120
- s += f"({self.k_var}={k}, sp={self.superpositions[FV.TI]})"
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 init_wake_deltas(self, algo, mdata, fdata, pdata, wake_deltas):
129
+ def new_wake_deltas(self, algo, mdata, fdata, tdata):
124
130
  """
125
- Initialize wake delta storage.
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.Data
137
+ mdata: foxes.core.MData
134
138
  The model data
135
- fdata: foxes.core.Data
139
+ fdata: foxes.core.FData
136
140
  The farm data
137
- pdata: foxes.core.Data
138
- The evaluation point data
141
+ tdata: foxes.core.TData
142
+ The target point data
143
+
144
+ Returns
145
+ -------
139
146
  wake_deltas: dict
140
- The wake deltas storage, add wake deltas
141
- on the fly. Keys: Variable name str, for which the
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
- n_states = mdata.n_states
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
- pdata,
155
- states_source_turbine,
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.Data
170
+ mdata: foxes.core.MData
167
171
  The model data
168
- fdata: foxes.core.Data
172
+ fdata: foxes.core.FData
169
173
  The farm data
170
- pdata: foxes.core.Data
171
- The evaluation point data
172
- states_source_turbine: numpy.ndarray
173
- For each state, one turbine index for the
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, n_points)
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, n_points)
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, n_points)
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.STATE_POINT,
193
+ FC.STATE_TARGET,
195
194
  lookup="w",
196
195
  algo=algo,
197
196
  fdata=fdata,
198
- pdata=pdata,
199
- upcast=True,
200
- states_source_turbine=states_source_turbine,
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.STATE_POINT,
205
+ FC.STATE_TARGET,
207
206
  lookup="sw",
208
207
  algo=algo,
209
208
  fdata=fdata,
210
- pdata=pdata,
211
- upcast=True,
212
- states_source_turbine=states_source_turbine,
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 calc_centreline_wake_deltas(
221
+ def calc_centreline(
223
222
  self,
224
223
  algo,
225
224
  mdata,
226
225
  fdata,
227
- pdata,
228
- states_source_turbine,
229
- sp_sel,
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.Data
240
+ mdata: foxes.core.MData
242
241
  The model data
243
- fdata: foxes.core.Data
242
+ fdata: foxes.core.FData
244
243
  The farm data
245
- pdata: foxes.core.Data
246
- The evaluation point data
247
- states_source_turbine: numpy.ndarray
248
- For each state, one turbine index for the
249
- wake causing turbine. Shape: (n_states,)
250
- sp_sel: numpy.ndarray of bool
251
- The state-point selection, for which the wake
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: (n_sp_sel,)
252
+ The x values, shape: (n_st_sel,)
255
253
  wake_r: numpy.ndarray
256
- The wake radii, shape: (n_sp_sel,)
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: (n_sp_sel,)
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: (n_sp_sel,)
263
+ varlue: numpy.ndarray, shape: (n_st_sel,)
266
264
 
267
265
  """
268
266
  # prepare:
269
- n_states = fdata.n_states
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
- # read D from extra data:
276
- D = np.zeros((n_states, n_points), dtype=FC.DTYPE)
277
- D[:] = fdata[FV.D][st_sel][:, None]
278
- D = D[sp_sel]
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 ti:
281
- ti = np.zeros((n_states, n_points), dtype=FC.DTYPE)
282
- ti[:] = fdata[TI][st_sel][:, None]
283
- ti = ti[sp_sel]
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
- superpositions: dict
48
- The superpositions. Key: variable name str,
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
- s = super().__repr__()
71
- s += f"({self.k_var}={k}, sp={self.superpositions[FV.TI]})"
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 init_wake_deltas(self, algo, mdata, fdata, pdata, wake_deltas):
80
+ def new_wake_deltas(self, algo, mdata, fdata, tdata):
75
81
  """
76
- Initialize wake delta storage.
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.Data
88
+ mdata: foxes.core.MData
85
89
  The model data
86
- fdata: foxes.core.Data
90
+ fdata: foxes.core.FData
87
91
  The farm data
88
- pdata: foxes.core.Data
89
- The evaluation point data
92
+ tdata: foxes.core.TData
93
+ The target point data
94
+
95
+ Returns
96
+ -------
90
97
  wake_deltas: dict
91
- The wake deltas storage, add wake deltas
92
- on the fly. Keys: Variable name str, for which the
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
- n_states = mdata.n_states
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
- pdata,
106
- states_source_turbine,
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.Data
121
+ mdata: foxes.core.MData
118
122
  The model data
119
- fdata: foxes.core.Data
123
+ fdata: foxes.core.FData
120
124
  The farm data
121
- pdata: foxes.core.Data
122
- The evaluation point data
123
- states_source_turbine: numpy.ndarray
124
- For each state, one turbine index for the
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, n_points)
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, n_points)
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, n_points)
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.STATE_POINT,
143
+ FC.STATE_TARGET,
146
144
  lookup="sw",
147
145
  algo=algo,
148
146
  fdata=fdata,
149
- pdata=pdata,
150
- upcast=True,
151
- states_source_turbine=states_source_turbine,
147
+ tdata=tdata,
148
+ upcast=False,
149
+ downwind_index=downwind_index,
152
150
  )
151
+ return k * x
153
152
 
154
- # calculate:
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
- pdata,
165
- states_source_turbine,
166
- sp_sel,
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.Data
172
+ mdata: foxes.core.MData
179
173
  The model data
180
- fdata: foxes.core.Data
174
+ fdata: foxes.core.FData
181
175
  The farm data
182
- pdata: foxes.core.Data
183
- The evaluation point data
184
- states_source_turbine: numpy.ndarray
185
- For each state, one turbine index for the
186
- wake causing turbine. Shape: (n_states,)
187
- sp_sel: numpy.ndarray of bool
188
- The state-point selection, for which the wake
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: (n_sp_sel,)
184
+ The x values, shape: (n_st_sel,)
192
185
  wake_r: numpy.ndarray
193
- The wake radii, shape: (n_sp_sel,)
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: (n_sp_sel,)
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: (n_sp_sel,)
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.STATE_POINT,
201
+ FC.STATE_TARGET,
210
202
  lookup="w",
211
203
  algo=algo,
212
204
  fdata=fdata,
213
- pdata=pdata,
205
+ tdata=tdata,
206
+ downwind_index=downwind_index,
214
207
  upcast=True,
215
- states_source_turbine=states_source_turbine,
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.STATE_POINT,
213
+ FC.STATE_TARGET,
223
214
  lookup="w",
224
215
  algo=algo,
225
216
  fdata=fdata,
226
- pdata=pdata,
217
+ tdata=tdata,
218
+ downwind_index=downwind_index,
227
219
  upcast=True,
228
- states_source_turbine=states_source_turbine,
229
- )
230
- ws = ws[sp_sel]
220
+ )[st_sel]
231
221
 
232
222
  # calculate wind deficit:
233
223
  if self.iec_type == "2005":