foxes 0.7.2__py3-none-any.whl → 0.7.3.1__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 +57 -45
- foxes/algorithms/downwind/models/farm_wakes_calc.py +17 -6
- foxes/algorithms/downwind/models/point_wakes_calc.py +13 -45
- foxes/algorithms/iterative/iterative.py +1 -1
- foxes/algorithms/iterative/models/farm_wakes_calc.py +18 -4
- foxes/constants.py +5 -0
- foxes/core/__init__.py +2 -1
- foxes/core/ground_model.py +254 -0
- foxes/core/model.py +3 -2
- foxes/core/partial_wakes_model.py +19 -3
- foxes/core/states.py +33 -0
- foxes/core/wake_model.py +138 -2
- foxes/data/__init__.py +1 -1
- foxes/data/states/WRF-Timeseries-3000.nc +0 -0
- foxes/data/states/windio_timeseries_5000.nc +0 -0
- foxes/data/static_data.py +7 -0
- foxes/data/windio/DTU_10MW_turbine.yaml +10 -0
- foxes/data/windio/__init__.py +0 -0
- foxes/data/windio/windio_5turbines_timeseries.yaml +63 -0
- foxes/input/states/__init__.py +1 -0
- foxes/input/states/multi_height.py +225 -6
- foxes/input/windio/__init__.py +6 -1
- foxes/input/windio/get_states.py +115 -0
- foxes/input/windio/read_attributes.py +321 -0
- foxes/input/windio/read_farm.py +163 -0
- foxes/input/windio/read_fields.py +164 -0
- foxes/input/windio/runner.py +105 -0
- foxes/input/windio/windio.py +136 -254
- foxes/models/__init__.py +1 -0
- foxes/models/ground_models/__init__.py +2 -0
- foxes/models/ground_models/no_ground.py +12 -0
- foxes/models/ground_models/wake_mirror.py +161 -0
- foxes/models/model_book.py +68 -149
- foxes/models/partial_wakes/axiwake.py +27 -4
- foxes/models/partial_wakes/top_hat.py +26 -4
- foxes/models/turbine_types/PCt_file.py +1 -0
- foxes/models/turbine_types/PCt_from_two.py +92 -0
- foxes/models/wake_frames/yawed_wakes.py +41 -38
- foxes/models/wake_models/__init__.py +0 -1
- foxes/models/wake_models/induction/__init__.py +1 -0
- foxes/models/wake_models/induction/rankine_half_body.py +1 -1
- foxes/models/wake_models/induction/vortex_sheet.py +227 -0
- foxes/models/wake_models/ti/crespo_hernandez.py +26 -24
- foxes/models/wake_models/ti/iec_ti.py +33 -26
- foxes/models/wake_models/wind/bastankhah14.py +11 -32
- foxes/models/wake_models/wind/bastankhah16.py +30 -34
- foxes/models/wake_models/wind/jensen.py +13 -29
- foxes/models/wake_models/wind/turbopark.py +31 -61
- foxes/output/grids.py +6 -6
- foxes/output/output.py +6 -6
- foxes/utils/__init__.py +1 -1
- foxes/utils/factory.py +203 -11
- {foxes-0.7.2.dist-info → foxes-0.7.3.1.dist-info}/METADATA +8 -6
- {foxes-0.7.2.dist-info → foxes-0.7.3.1.dist-info}/RECORD +59 -45
- {foxes-0.7.2.dist-info → foxes-0.7.3.1.dist-info}/WHEEL +1 -1
- foxes/models/wake_models/wake_mirror.py +0 -196
- {foxes-0.7.2.dist-info → foxes-0.7.3.1.dist-info}/LICENSE +0 -0
- {foxes-0.7.2.dist-info → foxes-0.7.3.1.dist-info}/top_level.txt +0 -0
- {foxes-0.7.2.dist-info → foxes-0.7.3.1.dist-info}/zip-safe +0 -0
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
|
|
3
|
-
from foxes.core import WakeModel
|
|
4
|
-
import foxes.variables as FV
|
|
5
|
-
import foxes.constants as FC
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class WakeMirror(WakeModel):
|
|
9
|
-
"""
|
|
10
|
-
A wake model wrapper that adds mirror turbines
|
|
11
|
-
that model wake reflection from a horizontal plane,
|
|
12
|
-
e.g. the ground
|
|
13
|
-
|
|
14
|
-
Attributes
|
|
15
|
-
----------
|
|
16
|
-
wmodel: foxes.core.WakeModel
|
|
17
|
-
The original wake model
|
|
18
|
-
heights: list of float
|
|
19
|
-
The reflection heights
|
|
20
|
-
|
|
21
|
-
:group: models.wake_models
|
|
22
|
-
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
def __init__(self, wmodel, heights):
|
|
26
|
-
"""
|
|
27
|
-
Constructor.
|
|
28
|
-
|
|
29
|
-
Parameters
|
|
30
|
-
----------
|
|
31
|
-
wmodel: foxes.core.WakeModel
|
|
32
|
-
The original wake model
|
|
33
|
-
heights: list of float
|
|
34
|
-
The reflection heights
|
|
35
|
-
|
|
36
|
-
"""
|
|
37
|
-
super().__init__()
|
|
38
|
-
self.wmodel = wmodel
|
|
39
|
-
self.heights = heights
|
|
40
|
-
self.name = self.name + "_" + wmodel.name
|
|
41
|
-
|
|
42
|
-
def sub_models(self):
|
|
43
|
-
"""
|
|
44
|
-
List of all sub-models
|
|
45
|
-
|
|
46
|
-
Returns
|
|
47
|
-
-------
|
|
48
|
-
smdls: list of foxes.core.Model
|
|
49
|
-
All sub models
|
|
50
|
-
|
|
51
|
-
"""
|
|
52
|
-
return [self.wmodel]
|
|
53
|
-
|
|
54
|
-
def new_wake_deltas(self, algo, mdata, fdata, tdata):
|
|
55
|
-
"""
|
|
56
|
-
Creates new empty wake delta arrays.
|
|
57
|
-
|
|
58
|
-
Parameters
|
|
59
|
-
----------
|
|
60
|
-
algo: foxes.core.Algorithm
|
|
61
|
-
The calculation algorithm
|
|
62
|
-
mdata: foxes.core.MData
|
|
63
|
-
The model data
|
|
64
|
-
fdata: foxes.core.FData
|
|
65
|
-
The farm data
|
|
66
|
-
tdata: foxes.core.TData
|
|
67
|
-
The target point data
|
|
68
|
-
|
|
69
|
-
Returns
|
|
70
|
-
-------
|
|
71
|
-
wake_deltas: dict
|
|
72
|
-
Key: variable name, value: The zero filled
|
|
73
|
-
wake deltas, shape: (n_states, n_turbines, n_rpoints, ...)
|
|
74
|
-
|
|
75
|
-
"""
|
|
76
|
-
return self.wmodel.new_wake_deltas(algo, mdata, fdata, tdata)
|
|
77
|
-
|
|
78
|
-
def contribute(
|
|
79
|
-
self,
|
|
80
|
-
algo,
|
|
81
|
-
mdata,
|
|
82
|
-
fdata,
|
|
83
|
-
tdata,
|
|
84
|
-
downwind_index,
|
|
85
|
-
wake_coos,
|
|
86
|
-
wake_deltas,
|
|
87
|
-
):
|
|
88
|
-
"""
|
|
89
|
-
Modifies wake deltas at target points by
|
|
90
|
-
contributions from the specified wake source turbines.
|
|
91
|
-
|
|
92
|
-
Parameters
|
|
93
|
-
----------
|
|
94
|
-
algo: foxes.core.Algorithm
|
|
95
|
-
The calculation algorithm
|
|
96
|
-
mdata: foxes.core.MData
|
|
97
|
-
The model data
|
|
98
|
-
fdata: foxes.core.FData
|
|
99
|
-
The farm data
|
|
100
|
-
tdata: foxes.core.TData
|
|
101
|
-
The target point data
|
|
102
|
-
downwind_index: int
|
|
103
|
-
The index of the wake causing turbine
|
|
104
|
-
in the downwnd order
|
|
105
|
-
wake_coos: numpy.ndarray
|
|
106
|
-
The wake frame coordinates of the evaluation
|
|
107
|
-
points, shape: (n_states, n_targets, n_tpoints, 3)
|
|
108
|
-
wake_deltas: dict
|
|
109
|
-
The wake deltas. Key: variable name,
|
|
110
|
-
value: numpy.ndarray with shape
|
|
111
|
-
(n_states, n_targets, n_tpoints, ...)
|
|
112
|
-
|
|
113
|
-
"""
|
|
114
|
-
hh = fdata[FV.H][:, downwind_index].copy()
|
|
115
|
-
self.wmodel.contribute(
|
|
116
|
-
algo, mdata, fdata, tdata, downwind_index, wake_coos, wake_deltas
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
tdata[FC.TARGETS] = tdata[FC.TARGETS].copy() # making sure this is no ref
|
|
120
|
-
|
|
121
|
-
for h in self.heights:
|
|
122
|
-
|
|
123
|
-
fdata[FV.H][:, downwind_index] = hh + 2 * (h - hh)
|
|
124
|
-
|
|
125
|
-
nwcoos = algo.wake_frame.get_wake_coos(
|
|
126
|
-
algo, mdata, fdata, tdata, downwind_index
|
|
127
|
-
)
|
|
128
|
-
|
|
129
|
-
self.wmodel.contribute(
|
|
130
|
-
algo, mdata, fdata, tdata, downwind_index, nwcoos, wake_deltas
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
fdata[FV.H][:, downwind_index] = hh
|
|
134
|
-
|
|
135
|
-
def finalize_wake_deltas(
|
|
136
|
-
self,
|
|
137
|
-
algo,
|
|
138
|
-
mdata,
|
|
139
|
-
fdata,
|
|
140
|
-
amb_results,
|
|
141
|
-
wake_deltas,
|
|
142
|
-
):
|
|
143
|
-
"""
|
|
144
|
-
Finalize the wake calculation.
|
|
145
|
-
|
|
146
|
-
Modifies wake_deltas on the fly.
|
|
147
|
-
|
|
148
|
-
Parameters
|
|
149
|
-
----------
|
|
150
|
-
algo: foxes.core.Algorithm
|
|
151
|
-
The calculation algorithm
|
|
152
|
-
mdata: foxes.core.MData
|
|
153
|
-
The model data
|
|
154
|
-
fdata: foxes.core.FData
|
|
155
|
-
The farm data
|
|
156
|
-
amb_results: dict
|
|
157
|
-
The ambient results, key: variable name str,
|
|
158
|
-
values: numpy.ndarray with shape
|
|
159
|
-
(n_states, n_targets, n_tpoints)
|
|
160
|
-
wake_deltas: dict
|
|
161
|
-
The wake deltas object at the selected target
|
|
162
|
-
turbines. Key: variable str, value: numpy.ndarray
|
|
163
|
-
with shape (n_states, n_targets, n_tpoints)
|
|
164
|
-
|
|
165
|
-
"""
|
|
166
|
-
self.wmodel.finalize_wake_deltas(
|
|
167
|
-
algo,
|
|
168
|
-
mdata,
|
|
169
|
-
fdata,
|
|
170
|
-
amb_results,
|
|
171
|
-
wake_deltas,
|
|
172
|
-
)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
class GroundMirror(WakeMirror):
|
|
176
|
-
"""
|
|
177
|
-
A wake model wrapper that adds mirror turbines
|
|
178
|
-
that model wake reflection from the ground
|
|
179
|
-
|
|
180
|
-
:group: models.wake_models
|
|
181
|
-
|
|
182
|
-
"""
|
|
183
|
-
|
|
184
|
-
def __init__(self, *args, **kwargs):
|
|
185
|
-
"""
|
|
186
|
-
Constructor.
|
|
187
|
-
|
|
188
|
-
Parameters
|
|
189
|
-
----------
|
|
190
|
-
args: tuple, optional
|
|
191
|
-
Additional parameters for WakeMirror
|
|
192
|
-
kwargs: dict, optional
|
|
193
|
-
Additional parameters for WakeMirror
|
|
194
|
-
|
|
195
|
-
"""
|
|
196
|
-
super().__init__(*args, heights=[0], **kwargs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|