foxes 1.5__tar.gz → 1.5.1__tar.gz

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.
Files changed (335) hide show
  1. {foxes-1.5/foxes.egg-info → foxes-1.5.1}/PKG-INFO +1 -1
  2. {foxes-1.5 → foxes-1.5.1}/examples/abl_states/run.py +58 -56
  3. {foxes-1.5 → foxes-1.5.1}/examples/dyn_wakes/run.py +110 -118
  4. {foxes-1.5 → foxes-1.5.1}/examples/field_data_nc/run.py +22 -20
  5. {foxes-1.5 → foxes-1.5.1}/examples/multi_height/run.py +8 -6
  6. {foxes-1.5 → foxes-1.5.1}/examples/scan_row/run.py +89 -87
  7. {foxes-1.5 → foxes-1.5.1}/examples/sector_management/run.py +40 -38
  8. {foxes-1.5 → foxes-1.5.1}/examples/states_lookup_table/run.py +6 -4
  9. {foxes-1.5 → foxes-1.5.1}/examples/streamline_wakes/run.py +8 -6
  10. {foxes-1.5 → foxes-1.5.1}/examples/timelines/run.py +100 -98
  11. {foxes-1.5 → foxes-1.5.1}/examples/timeseries/run.py +71 -76
  12. {foxes-1.5 → foxes-1.5.1}/examples/wind_rose/run.py +27 -25
  13. {foxes-1.5 → foxes-1.5.1}/examples/yawed_wake/run.py +82 -80
  14. {foxes-1.5 → foxes-1.5.1}/foxes/core/algorithm.py +1 -0
  15. {foxes-1.5 → foxes-1.5.1}/foxes/engines/pool.py +1 -0
  16. {foxes-1.5 → foxes-1.5.1}/foxes/utils/xarray_utils.py +20 -12
  17. {foxes-1.5 → foxes-1.5.1/foxes.egg-info}/PKG-INFO +1 -1
  18. {foxes-1.5 → foxes-1.5.1}/pyproject.toml +1 -1
  19. {foxes-1.5 → foxes-1.5.1}/LICENSE +0 -0
  20. {foxes-1.5 → foxes-1.5.1}/Logo_FOXES.svg +0 -0
  21. {foxes-1.5 → foxes-1.5.1}/MANIFEST.in +0 -0
  22. {foxes-1.5 → foxes-1.5.1}/README.md +0 -0
  23. {foxes-1.5 → foxes-1.5.1}/docs/source/conf.py +0 -0
  24. {foxes-1.5 → foxes-1.5.1}/examples/compare_rotors_pwakes/run.py +0 -0
  25. {foxes-1.5 → foxes-1.5.1}/examples/compare_wakes/run.py +0 -0
  26. {foxes-1.5 → foxes-1.5.1}/examples/induction/run.py +0 -0
  27. {foxes-1.5 → foxes-1.5.1}/examples/power_mask/run.py +0 -0
  28. {foxes-1.5 → foxes-1.5.1}/examples/quickstart/run.py +0 -0
  29. {foxes-1.5 → foxes-1.5.1}/examples/random_timeseries/run.py +0 -0
  30. {foxes-1.5 → foxes-1.5.1}/examples/sequential/run.py +0 -0
  31. {foxes-1.5 → foxes-1.5.1}/examples/single_state/run.py +0 -0
  32. {foxes-1.5 → foxes-1.5.1}/examples/tab_file/run.py +0 -0
  33. {foxes-1.5 → foxes-1.5.1}/examples/timeseries_slurm/run.py +0 -0
  34. {foxes-1.5 → foxes-1.5.1}/foxes/__init__.py +0 -0
  35. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/__init__.py +0 -0
  36. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/downwind/__init__.py +0 -0
  37. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/downwind/downwind.py +0 -0
  38. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/downwind/models/__init__.py +0 -0
  39. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/downwind/models/farm_wakes_calc.py +0 -0
  40. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/downwind/models/init_farm_data.py +0 -0
  41. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/downwind/models/point_wakes_calc.py +0 -0
  42. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/downwind/models/reorder_farm_output.py +0 -0
  43. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/downwind/models/set_amb_farm_results.py +0 -0
  44. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/downwind/models/set_amb_point_results.py +0 -0
  45. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/iterative/__init__.py +0 -0
  46. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/iterative/iterative.py +0 -0
  47. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/iterative/models/__init__.py +0 -0
  48. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/iterative/models/convergence.py +0 -0
  49. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/iterative/models/farm_wakes_calc.py +0 -0
  50. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/iterative/models/urelax.py +0 -0
  51. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/sequential/__init__.py +0 -0
  52. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/sequential/models/__init__.py +0 -0
  53. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/sequential/models/plugin.py +0 -0
  54. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/sequential/models/seq_state.py +0 -0
  55. {foxes-1.5 → foxes-1.5.1}/foxes/algorithms/sequential/sequential.py +0 -0
  56. {foxes-1.5 → foxes-1.5.1}/foxes/config/__init__.py +0 -0
  57. {foxes-1.5 → foxes-1.5.1}/foxes/config/config.py +0 -0
  58. {foxes-1.5 → foxes-1.5.1}/foxes/constants.py +0 -0
  59. {foxes-1.5 → foxes-1.5.1}/foxes/core/__init__.py +0 -0
  60. {foxes-1.5 → foxes-1.5.1}/foxes/core/axial_induction_model.py +0 -0
  61. {foxes-1.5 → foxes-1.5.1}/foxes/core/data.py +0 -0
  62. {foxes-1.5 → foxes-1.5.1}/foxes/core/data_calc_model.py +0 -0
  63. {foxes-1.5 → foxes-1.5.1}/foxes/core/engine.py +0 -0
  64. {foxes-1.5 → foxes-1.5.1}/foxes/core/farm_controller.py +0 -0
  65. {foxes-1.5 → foxes-1.5.1}/foxes/core/farm_data_model.py +0 -0
  66. {foxes-1.5 → foxes-1.5.1}/foxes/core/farm_model.py +0 -0
  67. {foxes-1.5 → foxes-1.5.1}/foxes/core/ground_model.py +0 -0
  68. {foxes-1.5 → foxes-1.5.1}/foxes/core/model.py +0 -0
  69. {foxes-1.5 → foxes-1.5.1}/foxes/core/partial_wakes_model.py +0 -0
  70. {foxes-1.5 → foxes-1.5.1}/foxes/core/point_data_model.py +0 -0
  71. {foxes-1.5 → foxes-1.5.1}/foxes/core/rotor_model.py +0 -0
  72. {foxes-1.5 → foxes-1.5.1}/foxes/core/states.py +0 -0
  73. {foxes-1.5 → foxes-1.5.1}/foxes/core/turbine.py +0 -0
  74. {foxes-1.5 → foxes-1.5.1}/foxes/core/turbine_model.py +0 -0
  75. {foxes-1.5 → foxes-1.5.1}/foxes/core/turbine_type.py +0 -0
  76. {foxes-1.5 → foxes-1.5.1}/foxes/core/vertical_profile.py +0 -0
  77. {foxes-1.5 → foxes-1.5.1}/foxes/core/wake_deflection.py +0 -0
  78. {foxes-1.5 → foxes-1.5.1}/foxes/core/wake_frame.py +0 -0
  79. {foxes-1.5 → foxes-1.5.1}/foxes/core/wake_model.py +0 -0
  80. {foxes-1.5 → foxes-1.5.1}/foxes/core/wake_superposition.py +0 -0
  81. {foxes-1.5 → foxes-1.5.1}/foxes/core/wind_farm.py +0 -0
  82. {foxes-1.5 → foxes-1.5.1}/foxes/data/__init__.py +0 -0
  83. {foxes-1.5 → foxes-1.5.1}/foxes/data/farms/__init__.py +0 -0
  84. {foxes-1.5 → foxes-1.5.1}/foxes/data/farms/test_farm_67.csv +0 -0
  85. {foxes-1.5 → foxes-1.5.1}/foxes/data/parse.py +0 -0
  86. {foxes-1.5 → foxes-1.5.1}/foxes/data/power_ct_curves/DTU-10MW-D178d3-H119.csv +0 -0
  87. {foxes-1.5 → foxes-1.5.1}/foxes/data/power_ct_curves/IEA-15MW-D240-H150.csv +0 -0
  88. {foxes-1.5 → foxes-1.5.1}/foxes/data/power_ct_curves/IWT-7d5MW-D164-H100.csv +0 -0
  89. {foxes-1.5 → foxes-1.5.1}/foxes/data/power_ct_curves/NREL-5MW-D126-H90.csv +0 -0
  90. {foxes-1.5 → foxes-1.5.1}/foxes/data/power_ct_curves/__init__.py +0 -0
  91. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/WRF-Timeseries-3000.nc +0 -0
  92. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/WRF-Timeseries-4464.csv.gz +0 -0
  93. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/__init__.py +0 -0
  94. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/abl_states_6000.csv.gz +0 -0
  95. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/point_cloud_100.nc +0 -0
  96. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/timeseries_100.csv.gz +0 -0
  97. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/timeseries_3000.csv.gz +0 -0
  98. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/timeseries_8000.csv.gz +0 -0
  99. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/weibull_cloud_4.nc +0 -0
  100. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/weibull_grid.nc +0 -0
  101. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/weibull_sectors_12.csv +0 -0
  102. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/weibull_sectors_12.nc +0 -0
  103. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/wind_rose_bremen.csv +0 -0
  104. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/wind_rotation.nc +0 -0
  105. {foxes-1.5 → foxes-1.5.1}/foxes/data/states/winds100.tab +0 -0
  106. {foxes-1.5 → foxes-1.5.1}/foxes/data/static_data.py +0 -0
  107. {foxes-1.5 → foxes-1.5.1}/foxes/engines/__init__.py +0 -0
  108. {foxes-1.5 → foxes-1.5.1}/foxes/engines/dask.py +0 -0
  109. {foxes-1.5 → foxes-1.5.1}/foxes/engines/default.py +0 -0
  110. {foxes-1.5 → foxes-1.5.1}/foxes/engines/futures.py +0 -0
  111. {foxes-1.5 → foxes-1.5.1}/foxes/engines/mpi.py +0 -0
  112. {foxes-1.5 → foxes-1.5.1}/foxes/engines/multiprocess.py +0 -0
  113. {foxes-1.5 → foxes-1.5.1}/foxes/engines/numpy.py +0 -0
  114. {foxes-1.5 → foxes-1.5.1}/foxes/engines/ray.py +0 -0
  115. {foxes-1.5 → foxes-1.5.1}/foxes/engines/single.py +0 -0
  116. {foxes-1.5 → foxes-1.5.1}/foxes/input/__init__.py +0 -0
  117. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/__init__.py +0 -0
  118. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/from_arrays.py +0 -0
  119. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/from_csv.py +0 -0
  120. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/from_df.py +0 -0
  121. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/from_file.py +0 -0
  122. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/from_json.py +0 -0
  123. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/from_random.py +0 -0
  124. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/grid.py +0 -0
  125. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/ring.py +0 -0
  126. {foxes-1.5 → foxes-1.5.1}/foxes/input/farm_layout/row.py +0 -0
  127. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/__init__.py +0 -0
  128. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/create/__init__.py +0 -0
  129. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/create/random_abl_states.py +0 -0
  130. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/create/random_timeseries.py +0 -0
  131. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/dataset_states.py +0 -0
  132. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/field_data.py +0 -0
  133. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/multi_height.py +0 -0
  134. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/one_point_flow.py +0 -0
  135. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/point_cloud_data.py +0 -0
  136. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/scan.py +0 -0
  137. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/single.py +0 -0
  138. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/states_table.py +0 -0
  139. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/weibull_sectors.py +0 -0
  140. {foxes-1.5 → foxes-1.5.1}/foxes/input/states/wrg_states.py +0 -0
  141. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/__init__.py +0 -0
  142. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/dict.py +0 -0
  143. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/windio/__init__.py +0 -0
  144. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/windio/read_attributes.py +0 -0
  145. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/windio/read_farm.py +0 -0
  146. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/windio/read_fields.py +0 -0
  147. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/windio/read_outputs.py +0 -0
  148. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/windio/read_site.py +0 -0
  149. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/windio/windio.py +0 -0
  150. {foxes-1.5 → foxes-1.5.1}/foxes/input/yaml/yaml.py +0 -0
  151. {foxes-1.5 → foxes-1.5.1}/foxes/models/__init__.py +0 -0
  152. {foxes-1.5 → foxes-1.5.1}/foxes/models/axial_induction/__init__.py +0 -0
  153. {foxes-1.5 → foxes-1.5.1}/foxes/models/axial_induction/betz.py +0 -0
  154. {foxes-1.5 → foxes-1.5.1}/foxes/models/axial_induction/madsen.py +0 -0
  155. {foxes-1.5 → foxes-1.5.1}/foxes/models/farm_controllers/__init__.py +0 -0
  156. {foxes-1.5 → foxes-1.5.1}/foxes/models/farm_controllers/basic.py +0 -0
  157. {foxes-1.5 → foxes-1.5.1}/foxes/models/farm_models/__init__.py +0 -0
  158. {foxes-1.5 → foxes-1.5.1}/foxes/models/farm_models/turbine2farm.py +0 -0
  159. {foxes-1.5 → foxes-1.5.1}/foxes/models/ground_models/__init__.py +0 -0
  160. {foxes-1.5 → foxes-1.5.1}/foxes/models/ground_models/no_ground.py +0 -0
  161. {foxes-1.5 → foxes-1.5.1}/foxes/models/ground_models/wake_mirror.py +0 -0
  162. {foxes-1.5 → foxes-1.5.1}/foxes/models/model_book.py +0 -0
  163. {foxes-1.5 → foxes-1.5.1}/foxes/models/partial_wakes/__init__.py +0 -0
  164. {foxes-1.5 → foxes-1.5.1}/foxes/models/partial_wakes/axiwake.py +0 -0
  165. {foxes-1.5 → foxes-1.5.1}/foxes/models/partial_wakes/centre.py +0 -0
  166. {foxes-1.5 → foxes-1.5.1}/foxes/models/partial_wakes/grid.py +0 -0
  167. {foxes-1.5 → foxes-1.5.1}/foxes/models/partial_wakes/rotor_points.py +0 -0
  168. {foxes-1.5 → foxes-1.5.1}/foxes/models/partial_wakes/segregated.py +0 -0
  169. {foxes-1.5 → foxes-1.5.1}/foxes/models/partial_wakes/top_hat.py +0 -0
  170. {foxes-1.5 → foxes-1.5.1}/foxes/models/point_models/__init__.py +0 -0
  171. {foxes-1.5 → foxes-1.5.1}/foxes/models/point_models/set_uniform_data.py +0 -0
  172. {foxes-1.5 → foxes-1.5.1}/foxes/models/point_models/tke2ti.py +0 -0
  173. {foxes-1.5 → foxes-1.5.1}/foxes/models/point_models/ustar2ti.py +0 -0
  174. {foxes-1.5 → foxes-1.5.1}/foxes/models/point_models/wake_deltas.py +0 -0
  175. {foxes-1.5 → foxes-1.5.1}/foxes/models/rotor_models/__init__.py +0 -0
  176. {foxes-1.5 → foxes-1.5.1}/foxes/models/rotor_models/centre.py +0 -0
  177. {foxes-1.5 → foxes-1.5.1}/foxes/models/rotor_models/direct_infusion.py +0 -0
  178. {foxes-1.5 → foxes-1.5.1}/foxes/models/rotor_models/grid.py +0 -0
  179. {foxes-1.5 → foxes-1.5.1}/foxes/models/rotor_models/levels.py +0 -0
  180. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/__init__.py +0 -0
  181. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/calculator.py +0 -0
  182. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/kTI_model.py +0 -0
  183. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/lookup_table.py +0 -0
  184. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/power_mask.py +0 -0
  185. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/rotor_centre_calc.py +0 -0
  186. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/sector_management.py +0 -0
  187. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/set_farm_vars.py +0 -0
  188. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/table_factors.py +0 -0
  189. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/thrust2ct.py +0 -0
  190. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/yaw2yawm.py +0 -0
  191. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_models/yawm2yaw.py +0 -0
  192. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/CpCt_file.py +0 -0
  193. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/CpCt_from_two.py +0 -0
  194. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/PCt_file.py +0 -0
  195. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/PCt_from_two.py +0 -0
  196. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/TBL_file.py +0 -0
  197. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/__init__.py +0 -0
  198. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/calculator_type.py +0 -0
  199. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/lookup.py +0 -0
  200. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/null_type.py +0 -0
  201. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/wsrho2PCt_from_two.py +0 -0
  202. {foxes-1.5 → foxes-1.5.1}/foxes/models/turbine_types/wsti2PCt_from_two.py +0 -0
  203. {foxes-1.5 → foxes-1.5.1}/foxes/models/vertical_profiles/__init__.py +0 -0
  204. {foxes-1.5 → foxes-1.5.1}/foxes/models/vertical_profiles/abl_log_neutral_ws.py +0 -0
  205. {foxes-1.5 → foxes-1.5.1}/foxes/models/vertical_profiles/abl_log_stable_ws.py +0 -0
  206. {foxes-1.5 → foxes-1.5.1}/foxes/models/vertical_profiles/abl_log_unstable_ws.py +0 -0
  207. {foxes-1.5 → foxes-1.5.1}/foxes/models/vertical_profiles/abl_log_ws.py +0 -0
  208. {foxes-1.5 → foxes-1.5.1}/foxes/models/vertical_profiles/data_profile.py +0 -0
  209. {foxes-1.5 → foxes-1.5.1}/foxes/models/vertical_profiles/sheared_ws.py +0 -0
  210. {foxes-1.5 → foxes-1.5.1}/foxes/models/vertical_profiles/uniform.py +0 -0
  211. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_deflections/__init__.py +0 -0
  212. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_deflections/bastankhah2016.py +0 -0
  213. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_deflections/jimenez.py +0 -0
  214. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_deflections/no_deflection.py +0 -0
  215. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_frames/__init__.py +0 -0
  216. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_frames/dynamic_wakes.py +0 -0
  217. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_frames/farm_order.py +0 -0
  218. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_frames/rotor_wd.py +0 -0
  219. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_frames/seq_dynamic_wakes.py +0 -0
  220. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_frames/streamlines.py +0 -0
  221. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_frames/timelines.py +0 -0
  222. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/__init__.py +0 -0
  223. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/axisymmetric.py +0 -0
  224. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/dist_sliced.py +0 -0
  225. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/gaussian.py +0 -0
  226. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/induction/__init__.py +0 -0
  227. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/induction/rankine_half_body.py +0 -0
  228. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/induction/rathmann.py +0 -0
  229. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/induction/self_similar.py +0 -0
  230. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/induction/self_similar2020.py +0 -0
  231. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/induction/vortex_sheet.py +0 -0
  232. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/ti/__init__.py +0 -0
  233. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/ti/crespo_hernandez.py +0 -0
  234. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/ti/iec_ti.py +0 -0
  235. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/top_hat.py +0 -0
  236. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/wind/__init__.py +0 -0
  237. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/wind/bastankhah14.py +0 -0
  238. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/wind/bastankhah16.py +0 -0
  239. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/wind/jensen.py +0 -0
  240. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_models/wind/turbopark.py +0 -0
  241. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/__init__.py +0 -0
  242. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/ti_linear.py +0 -0
  243. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/ti_max.py +0 -0
  244. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/ti_pow.py +0 -0
  245. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/ti_quadratic.py +0 -0
  246. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/wind_vector.py +0 -0
  247. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/ws_linear.py +0 -0
  248. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/ws_max.py +0 -0
  249. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/ws_pow.py +0 -0
  250. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/ws_product.py +0 -0
  251. {foxes-1.5 → foxes-1.5.1}/foxes/models/wake_superpositions/ws_quadratic.py +0 -0
  252. {foxes-1.5 → foxes-1.5.1}/foxes/output/__init__.py +0 -0
  253. {foxes-1.5 → foxes-1.5.1}/foxes/output/animation.py +0 -0
  254. {foxes-1.5 → foxes-1.5.1}/foxes/output/calc_points.py +0 -0
  255. {foxes-1.5 → foxes-1.5.1}/foxes/output/farm_layout.py +0 -0
  256. {foxes-1.5 → foxes-1.5.1}/foxes/output/farm_results_eval.py +0 -0
  257. {foxes-1.5 → foxes-1.5.1}/foxes/output/flow_plots_2d/__init__.py +0 -0
  258. {foxes-1.5 → foxes-1.5.1}/foxes/output/flow_plots_2d/flow_plots.py +0 -0
  259. {foxes-1.5 → foxes-1.5.1}/foxes/output/flow_plots_2d/get_fig.py +0 -0
  260. {foxes-1.5 → foxes-1.5.1}/foxes/output/grids.py +0 -0
  261. {foxes-1.5 → foxes-1.5.1}/foxes/output/output.py +0 -0
  262. {foxes-1.5 → foxes-1.5.1}/foxes/output/plt.py +0 -0
  263. {foxes-1.5 → foxes-1.5.1}/foxes/output/results_writer.py +0 -0
  264. {foxes-1.5 → foxes-1.5.1}/foxes/output/rose_plot.py +0 -0
  265. {foxes-1.5 → foxes-1.5.1}/foxes/output/rotor_point_plots.py +0 -0
  266. {foxes-1.5 → foxes-1.5.1}/foxes/output/seq_plugins/__init__.py +0 -0
  267. {foxes-1.5 → foxes-1.5.1}/foxes/output/seq_plugins/seq_flow_ani_plugin.py +0 -0
  268. {foxes-1.5 → foxes-1.5.1}/foxes/output/seq_plugins/seq_wake_debug_plugin.py +0 -0
  269. {foxes-1.5 → foxes-1.5.1}/foxes/output/slice_data.py +0 -0
  270. {foxes-1.5 → foxes-1.5.1}/foxes/output/slices_data.py +0 -0
  271. {foxes-1.5 → foxes-1.5.1}/foxes/output/state_turbine_map.py +0 -0
  272. {foxes-1.5 → foxes-1.5.1}/foxes/output/state_turbine_table.py +0 -0
  273. {foxes-1.5 → foxes-1.5.1}/foxes/output/turbine_type_curves.py +0 -0
  274. {foxes-1.5 → foxes-1.5.1}/foxes/utils/__init__.py +0 -0
  275. {foxes-1.5 → foxes-1.5.1}/foxes/utils/abl/__init__.py +0 -0
  276. {foxes-1.5 → foxes-1.5.1}/foxes/utils/abl/neutral.py +0 -0
  277. {foxes-1.5 → foxes-1.5.1}/foxes/utils/abl/sheared.py +0 -0
  278. {foxes-1.5 → foxes-1.5.1}/foxes/utils/abl/stable.py +0 -0
  279. {foxes-1.5 → foxes-1.5.1}/foxes/utils/abl/unstable.py +0 -0
  280. {foxes-1.5 → foxes-1.5.1}/foxes/utils/cubic_roots.py +0 -0
  281. {foxes-1.5 → foxes-1.5.1}/foxes/utils/data_book.py +0 -0
  282. {foxes-1.5 → foxes-1.5.1}/foxes/utils/dev_utils.py +0 -0
  283. {foxes-1.5 → foxes-1.5.1}/foxes/utils/dict.py +0 -0
  284. {foxes-1.5 → foxes-1.5.1}/foxes/utils/exec_python.py +0 -0
  285. {foxes-1.5 → foxes-1.5.1}/foxes/utils/factory.py +0 -0
  286. {foxes-1.5 → foxes-1.5.1}/foxes/utils/geom2d/__init__.py +0 -0
  287. {foxes-1.5 → foxes-1.5.1}/foxes/utils/geom2d/area_geometry.py +0 -0
  288. {foxes-1.5 → foxes-1.5.1}/foxes/utils/geom2d/circle.py +0 -0
  289. {foxes-1.5 → foxes-1.5.1}/foxes/utils/geom2d/example_intersection.py +0 -0
  290. {foxes-1.5 → foxes-1.5.1}/foxes/utils/geom2d/example_union.py +0 -0
  291. {foxes-1.5 → foxes-1.5.1}/foxes/utils/geom2d/half_plane.py +0 -0
  292. {foxes-1.5 → foxes-1.5.1}/foxes/utils/geom2d/polygon.py +0 -0
  293. {foxes-1.5 → foxes-1.5.1}/foxes/utils/geopandas_utils.py +0 -0
  294. {foxes-1.5 → foxes-1.5.1}/foxes/utils/load.py +0 -0
  295. {foxes-1.5 → foxes-1.5.1}/foxes/utils/pandas_utils.py +0 -0
  296. {foxes-1.5 → foxes-1.5.1}/foxes/utils/random_xy.py +0 -0
  297. {foxes-1.5 → foxes-1.5.1}/foxes/utils/regularize.py +0 -0
  298. {foxes-1.5 → foxes-1.5.1}/foxes/utils/subclasses.py +0 -0
  299. {foxes-1.5 → foxes-1.5.1}/foxes/utils/tab_files.py +0 -0
  300. {foxes-1.5 → foxes-1.5.1}/foxes/utils/two_circles.py +0 -0
  301. {foxes-1.5 → foxes-1.5.1}/foxes/utils/weibull.py +0 -0
  302. {foxes-1.5 → foxes-1.5.1}/foxes/utils/wind_dir.py +0 -0
  303. {foxes-1.5 → foxes-1.5.1}/foxes/utils/wrg_utils.py +0 -0
  304. {foxes-1.5 → foxes-1.5.1}/foxes/variables.py +0 -0
  305. {foxes-1.5 → foxes-1.5.1}/foxes.egg-info/SOURCES.txt +0 -0
  306. {foxes-1.5 → foxes-1.5.1}/foxes.egg-info/dependency_links.txt +0 -0
  307. {foxes-1.5 → foxes-1.5.1}/foxes.egg-info/entry_points.txt +0 -0
  308. {foxes-1.5 → foxes-1.5.1}/foxes.egg-info/requires.txt +0 -0
  309. {foxes-1.5 → foxes-1.5.1}/foxes.egg-info/top_level.txt +0 -0
  310. {foxes-1.5 → foxes-1.5.1}/setup.cfg +0 -0
  311. {foxes-1.5 → foxes-1.5.1}/tests/0_consistency/iterative/test_iterative.py +0 -0
  312. {foxes-1.5 → foxes-1.5.1}/tests/0_consistency/partial_wakes/test_partial_wakes.py +0 -0
  313. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/PCt_files/flappy/run.py +0 -0
  314. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/PCt_files/test_PCt_files.py +0 -0
  315. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/abl_states/flappy/run.py +0 -0
  316. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/abl_states/test_abl_states.py +0 -0
  317. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/partial_top_hat/flappy/run.py +0 -0
  318. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/partial_top_hat/test_partial_top_hat.py +0 -0
  319. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/flappy/run.py +0 -0
  320. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/test_row_Jensen_linear_centre.py +0 -0
  321. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/flappy/run.py +0 -0
  322. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/test_row_Jensen_linear_tophat.py +0 -0
  323. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/flappy/run.py +0 -0
  324. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/test_row_Jensen_linear_tophat_IECTI_2005.py +0 -0
  325. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/flappy/run.py +0 -0
  326. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/test_row_Jensen_linear_tophat_IECTI_2019.py +0 -0
  327. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/flappy/run.py +0 -0
  328. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/test_row_Jensen_quadratic_centre.py +0 -0
  329. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6_2/grid_rotors/flappy/run.py +0 -0
  330. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6_2/grid_rotors/test_grid_rotors.py +0 -0
  331. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/flappy/run.py +0 -0
  332. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/test_row_Bastankhah_Crespo.py +0 -0
  333. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/flappy/run.py +0 -0
  334. {foxes-1.5 → foxes-1.5.1}/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/test_row_Bastankhah_linear_centre.py +0 -0
  335. {foxes-1.5 → foxes-1.5.1}/tests/3_examples/test_examples.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: foxes
3
- Version: 1.5
3
+ Version: 1.5.1
4
4
  Summary: Farm Optimization and eXtended yield Evaluation Software
5
5
  Author: Jonas Schulte
6
6
  Maintainer: Jonas Schulte
@@ -91,70 +91,72 @@ if __name__ == "__main__":
91
91
  wake_frame="rotor_wd",
92
92
  partial_wakes=args.pwakes,
93
93
  mbook=mbook,
94
- engine=args.engine,
94
+ )
95
+
96
+ with foxes.Engine.new(
97
+ engine_type=args.engine,
95
98
  n_procs=args.n_cpus,
96
99
  chunk_size_states=args.chunksize_states,
97
100
  chunk_size_points=args.chunksize_points,
98
- )
99
-
100
- time0 = time.time()
101
- farm_results = algo.calc_farm()
102
- time1 = time.time()
101
+ ):
102
+ time0 = time.time()
103
+ farm_results = algo.calc_farm()
104
+ time1 = time.time()
103
105
 
104
- print("\nCalc time =", time1 - time0, "\n")
106
+ print("\nCalc time =", time1 - time0, "\n")
105
107
 
106
- print(farm_results)
108
+ print(farm_results)
107
109
 
108
- fr = farm_results.to_dataframe()
109
- print(fr[[FV.WD, FV.H, FV.AMB_REWS, FV.REWS, FV.AMB_P, FV.P]])
110
+ fr = farm_results.to_dataframe()
111
+ print(fr[[FV.WD, FV.H, FV.AMB_REWS, FV.REWS, FV.AMB_P, FV.P]])
110
112
 
111
- o = foxes.output.FarmResultsEval(farm_results)
112
- o = foxes.output.FarmResultsEval(farm_results)
113
- o.add_capacity(algo)
114
- o.add_capacity(algo, ambient=True)
115
- o.add_efficiency()
113
+ o = foxes.output.FarmResultsEval(farm_results)
114
+ o = foxes.output.FarmResultsEval(farm_results)
115
+ o.add_capacity(algo)
116
+ o.add_capacity(algo, ambient=True)
117
+ o.add_efficiency()
116
118
 
117
- # state-turbine results
118
- farm_df = farm_results.to_dataframe()
119
- print("\nFarm results data:\n")
120
- print(
121
- farm_df[
122
- [
123
- FV.X,
124
- FV.WD,
125
- FV.AMB_REWS,
126
- FV.REWS,
127
- FV.AMB_TI,
128
- FV.TI,
129
- FV.AMB_P,
130
- FV.P,
131
- FV.EFF,
119
+ # state-turbine results
120
+ farm_df = farm_results.to_dataframe()
121
+ print("\nFarm results data:\n")
122
+ print(
123
+ farm_df[
124
+ [
125
+ FV.X,
126
+ FV.WD,
127
+ FV.AMB_REWS,
128
+ FV.REWS,
129
+ FV.AMB_TI,
130
+ FV.TI,
131
+ FV.AMB_P,
132
+ FV.P,
133
+ FV.EFF,
134
+ ]
132
135
  ]
133
- ]
134
- )
135
- print()
136
+ )
137
+ print()
136
138
 
137
- # results by turbine
138
- turbine_results = o.reduce_states(
139
- {
140
- FV.AMB_P: "weights",
141
- FV.P: "weights",
142
- FV.AMB_CAP: "weights",
143
- FV.CAP: "weights",
144
- }
145
- )
146
- turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
147
- algo=algo, annual=True, ambient=True
148
- )
149
- turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
150
- turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
151
- print("\nResults by turbine:\n")
152
- print(turbine_results)
139
+ # results by turbine
140
+ turbine_results = o.reduce_states(
141
+ {
142
+ FV.AMB_P: "weights",
143
+ FV.P: "weights",
144
+ FV.AMB_CAP: "weights",
145
+ FV.CAP: "weights",
146
+ }
147
+ )
148
+ turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
149
+ algo=algo, annual=True, ambient=True
150
+ )
151
+ turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
152
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
153
+ print("\nResults by turbine:\n")
154
+ print(turbine_results)
153
155
 
154
- # power results
155
- P0 = o.calc_mean_farm_power(ambient=True)
156
- P = o.calc_mean_farm_power()
157
- print(f"\nFarm power : {P / 1000:.1f} MW")
158
- print(f"Farm ambient power: {P0 / 1000:.1f} MW")
159
- print(f"Farm efficiency : {o.calc_farm_efficiency():.2f}")
160
- print(f"Annual farm yield : {turbine_results[FV.YLD].sum():.2f} GWh.")
156
+ # power results
157
+ P0 = o.calc_mean_farm_power(ambient=True)
158
+ P = o.calc_mean_farm_power()
159
+ print(f"\nFarm power : {P / 1000:.1f} MW")
160
+ print(f"Farm ambient power: {P0 / 1000:.1f} MW")
161
+ print(f"Farm efficiency : {o.calc_farm_efficiency():.2f}")
162
+ print(f"Annual farm yield : {turbine_results[FV.YLD].sum():.2f} GWh.")
@@ -182,14 +182,6 @@ if __name__ == "__main__":
182
182
  plt.show()
183
183
  plt.close(ax.get_figure())
184
184
 
185
- engine = foxes.Engine.new(
186
- engine_type=args.engine,
187
- n_procs=args.n_cpus,
188
- chunk_size_states=args.chunksize_states,
189
- chunk_size_points=args.chunksize_points,
190
- )
191
- engine.initialize()
192
-
193
185
  algo = foxes.algorithms.Iterative(
194
186
  farm,
195
187
  states=states,
@@ -204,131 +196,131 @@ if __name__ == "__main__":
204
196
  verbosity=1,
205
197
  )
206
198
 
207
- time0 = time.time()
208
- farm_results = algo.calc_farm()
209
- time1 = time.time()
199
+ with foxes.Engine.new(
200
+ engine_type=args.engine,
201
+ n_procs=args.n_cpus,
202
+ chunk_size_states=args.chunksize_states,
203
+ chunk_size_points=args.chunksize_points,
204
+ ):
205
+ time0 = time.time()
206
+ farm_results = algo.calc_farm()
207
+ time1 = time.time()
210
208
 
211
- print("\nCalc time =", time1 - time0, "\n")
209
+ print("\nCalc time =", time1 - time0, "\n")
212
210
 
213
- o = foxes.output.FarmResultsEval(farm_results)
214
- o.add_capacity(algo)
215
- o.add_capacity(algo, ambient=True)
216
- o.add_efficiency()
211
+ o = foxes.output.FarmResultsEval(farm_results)
212
+ o.add_capacity(algo)
213
+ o.add_capacity(algo, ambient=True)
214
+ o.add_efficiency()
217
215
 
218
- print("\nFarm results:\n")
219
- print(farm_results)
216
+ print("\nFarm results:\n")
217
+ print(farm_results)
220
218
 
221
- # state-turbine results
222
- farm_df = farm_results.to_dataframe()
223
- print("\nFarm results data:\n")
224
- print(
225
- farm_df[
226
- [
227
- FV.X,
228
- FV.Y,
229
- FV.WD,
230
- FV.AMB_REWS,
231
- FV.REWS,
232
- FV.AMB_TI,
233
- FV.TI,
234
- FV.AMB_P,
235
- FV.P,
236
- FV.EFF,
219
+ # state-turbine results
220
+ farm_df = farm_results.to_dataframe()
221
+ print("\nFarm results data:\n")
222
+ print(
223
+ farm_df[
224
+ [
225
+ FV.X,
226
+ FV.Y,
227
+ FV.WD,
228
+ FV.AMB_REWS,
229
+ FV.REWS,
230
+ FV.AMB_TI,
231
+ FV.TI,
232
+ FV.AMB_P,
233
+ FV.P,
234
+ FV.EFF,
235
+ ]
237
236
  ]
238
- ]
239
- )
240
- print()
241
- print(farm_df[[FV.AMB_REWS, FV.REWS, FV.CT, FV.EFF]].describe())
242
-
243
- # power results
244
- P0 = o.calc_mean_farm_power(ambient=True)
245
- P = o.calc_mean_farm_power()
246
- print(f"\nFarm power : {P / 1000:.1f} MW")
247
- print(f"Farm ambient power: {P0 / 1000:.1f} MW")
248
- print(f"Farm efficiency : {o.calc_farm_efficiency() * 100:.2f} %")
249
-
250
- engine.finalize()
251
-
252
- if not args.nofig:
253
- sts = np.arange(farm_results.sizes["state"])
254
- plt.plot(sts, farm_results.REWS[:, 1], label="Turbine 1")
255
- plt.plot(sts, farm_results.REWS[:, 4], label="Turbine 4")
256
- plt.plot(sts, farm_results.REWS[:, 7], label="Turbine 7")
257
- plt.legend()
258
- plt.xlabel("State")
259
- plt.ylabel("REWS [m/s]")
260
- plt.show()
261
- plt.close()
262
-
263
- if not args.nofig and args.animation:
264
- print("\nCalculating animation")
265
-
266
- fig, axs = plt.subplots(
267
- 2, 1, figsize=(5.2, 7), gridspec_kw={"height_ratios": [3, 1]}
268
237
  )
238
+ print()
239
+ print(farm_df[[FV.AMB_REWS, FV.REWS, FV.CT, FV.EFF]].describe())
269
240
 
270
- engine.initialize()
241
+ # power results
242
+ P0 = o.calc_mean_farm_power(ambient=True)
243
+ P = o.calc_mean_farm_power()
244
+ print(f"\nFarm power : {P / 1000:.1f} MW")
245
+ print(f"Farm ambient power: {P0 / 1000:.1f} MW")
246
+ print(f"Farm efficiency : {o.calc_farm_efficiency() * 100:.2f} %")
271
247
 
272
- of = foxes.output.FlowPlots2D(algo, farm_results)
273
- ofg = of.gen_states_fig_xy(
274
- FV.WS,
275
- resolution=30,
276
- quiver_pars=dict(angles="xy", scale_units="xy", scale=0.013),
277
- quiver_n=35,
278
- xmax=5000,
279
- ymax=5000,
280
- vmin=0,
281
- fig=fig,
282
- ax=axs[0],
283
- ret_im=True,
284
- title=None,
285
- animated=True,
286
- precalc=True,
287
- rotor_color="red",
288
- )
289
- next(ofg)
248
+ if not args.nofig:
249
+ sts = np.arange(farm_results.sizes["state"])
250
+ plt.plot(sts, farm_results.REWS[:, 1], label="Turbine 1")
251
+ plt.plot(sts, farm_results.REWS[:, 4], label="Turbine 4")
252
+ plt.plot(sts, farm_results.REWS[:, 7], label="Turbine 7")
253
+ plt.legend()
254
+ plt.xlabel("State")
255
+ plt.ylabel("REWS [m/s]")
256
+ plt.show()
257
+ plt.close()
290
258
 
291
- engine.finalize()
259
+ if not args.nofig and args.animation:
260
+ print("\nCalculating animation")
292
261
 
293
- anim = foxes.output.Animator(fig)
294
- anim.add_generator(ofg)
295
- anim.add_generator(
296
- o.gen_stdata(
297
- turbines=[1, 4, 7],
298
- variable=FV.REWS,
262
+ fig, axs = plt.subplots(
263
+ 2, 1, figsize=(5.2, 7), gridspec_kw={"height_ratios": [3, 1]}
264
+ )
265
+
266
+ of = foxes.output.FlowPlots2D(algo, farm_results)
267
+ ofg = of.gen_states_fig_xy(
268
+ FV.WS,
269
+ resolution=30,
270
+ quiver_pars=dict(angles="xy", scale_units="xy", scale=0.013),
271
+ quiver_n=35,
272
+ xmax=5000,
273
+ ymax=5000,
274
+ vmin=0,
299
275
  fig=fig,
300
- ax=axs[1],
276
+ ax=axs[0],
301
277
  ret_im=True,
302
- legloc="upper right",
278
+ title=None,
303
279
  animated=True,
280
+ precalc=True,
281
+ rotor_color="red",
282
+ )
283
+ next(ofg)
284
+
285
+ anim = foxes.output.Animator(fig)
286
+ anim.add_generator(ofg)
287
+ anim.add_generator(
288
+ o.gen_stdata(
289
+ turbines=[1, 4, 7],
290
+ variable=FV.REWS,
291
+ fig=fig,
292
+ ax=axs[1],
293
+ ret_im=True,
294
+ legloc="upper right",
295
+ animated=True,
296
+ )
304
297
  )
305
- )
306
298
 
307
- ani = anim.animate()
299
+ ani = anim.animate()
308
300
 
309
- lo = foxes.output.FarmLayoutOutput(farm)
310
- lo.get_figure(
311
- fig=fig,
312
- ax=axs[0],
313
- title="",
314
- annotate=1,
315
- anno_delx=-120,
316
- anno_dely=-60,
317
- alpha=0,
318
- )
301
+ lo = foxes.output.FarmLayoutOutput(farm)
302
+ lo.get_figure(
303
+ fig=fig,
304
+ ax=axs[0],
305
+ title="",
306
+ annotate=1,
307
+ anno_delx=-120,
308
+ anno_dely=-60,
309
+ alpha=0,
310
+ )
319
311
 
320
- axs[0].scatter(
321
- [args.ref_xy[0]],
322
- [args.ref_xy[1]],
323
- marker="x",
324
- color="red",
325
- s=80,
326
- animated=True,
327
- )
312
+ axs[0].scatter(
313
+ [args.ref_xy[0]],
314
+ [args.ref_xy[1]],
315
+ marker="x",
316
+ color="red",
317
+ s=80,
318
+ animated=True,
319
+ )
328
320
 
329
- fpath = Path(args.ani_file)
330
- print("Writing file", fpath)
331
- if fpath.suffix == ".gif":
332
- ani.save(filename=fpath, writer="pillow", fps=args.fps)
333
- else:
334
- ani.save(filename=fpath, writer="ffmpeg", fps=args.fps)
321
+ fpath = Path(args.ani_file)
322
+ print("Writing file", fpath)
323
+ if fpath.suffix == ".gif":
324
+ ani.save(filename=fpath, writer="pillow", fps=args.fps)
325
+ else:
326
+ ani.save(filename=fpath, writer="ffmpeg", fps=args.fps)
@@ -98,31 +98,33 @@ if __name__ == "__main__":
98
98
  wake_frame=args.wake_frame,
99
99
  partial_wakes=args.pwakes,
100
100
  mbook=mbook,
101
- engine=args.engine,
102
- n_procs=args.n_cpus,
103
- chunk_size_states=args.chunksize_states,
104
- chunk_size_points=args.chunksize_points,
105
101
  verbosity=1,
106
102
  )
107
103
 
108
- time0 = time.time()
109
- farm_results = algo.calc_farm()
110
- time1 = time.time()
104
+ with foxes.Engine.new(
105
+ engine_type=args.engine,
106
+ n_procs=args.n_cpus,
107
+ chunk_size_states=args.chunksize_states,
108
+ chunk_size_points=args.chunksize_points,
109
+ ):
110
+ time0 = time.time()
111
+ farm_results = algo.calc_farm()
112
+ time1 = time.time()
111
113
 
112
- print("\nCalc time =", time1 - time0, "\n")
114
+ print("\nCalc time =", time1 - time0, "\n")
113
115
 
114
- print(farm_results)
116
+ print(farm_results)
115
117
 
116
- fr = farm_results.to_dataframe()
117
- print(fr[[FV.WD, FV.AMB_REWS, FV.REWS, FV.AMB_P, FV.P]])
118
+ fr = farm_results.to_dataframe()
119
+ print(fr[[FV.WD, FV.AMB_REWS, FV.REWS, FV.AMB_P, FV.P]])
118
120
 
119
- o = foxes.output.SlicesData(algo, farm_results)
120
- ds = o.get_states_data_xy(
121
- z_list=[90, 100], variables=[FV.WS], resolution=50, verbosity=1
122
- )
123
- print(ds)
121
+ o = foxes.output.SlicesData(algo, farm_results)
122
+ ds = o.get_states_data_xy(
123
+ z_list=[90, 100], variables=[FV.WS], resolution=50, verbosity=1
124
+ )
125
+ print(ds)
124
126
 
125
- if not args.nofig:
126
- o = foxes.output.FlowPlots2D(algo, farm_results)
127
- o.get_mean_fig_xy(FV.WS, resolution=10)
128
- plt.show()
127
+ if not args.nofig:
128
+ o = foxes.output.FlowPlots2D(algo, farm_results)
129
+ o.get_mean_fig_xy(FV.WS, resolution=10)
130
+ plt.show()
@@ -91,14 +91,16 @@ if __name__ == "__main__":
91
91
  wake_frame="rotor_wd",
92
92
  partial_wakes=args.pwakes,
93
93
  mbook=mbook,
94
- engine=args.engine,
95
- n_procs=args.n_cpus,
96
- chunk_size_states=args.chunksize_states,
97
94
  )
98
95
 
99
- time0 = time.time()
100
- farm_results = algo.calc_farm()
101
- time1 = time.time()
96
+ with foxes.Engine.new(
97
+ engine_type=args.engine,
98
+ n_procs=args.n_cpus,
99
+ chunk_size_states=args.chunksize_states,
100
+ ):
101
+ time0 = time.time()
102
+ farm_results = algo.calc_farm()
103
+ time1 = time.time()
102
104
 
103
105
  print("\nCalc time =", time1 - time0, "\n")
104
106
 
@@ -102,97 +102,99 @@ if __name__ == "__main__":
102
102
  wake_frame="rotor_wd",
103
103
  partial_wakes=args.pwakes,
104
104
  mbook=mbook,
105
- engine=args.engine,
105
+ )
106
+
107
+ with foxes.Engine.new(
108
+ engine_type=args.engine,
106
109
  n_procs=args.n_cpus,
107
110
  chunk_size_states=args.chunksize_states,
108
111
  chunk_size_points=args.chunksize_points,
109
- )
110
-
111
- time0 = time.time()
112
- farm_results = algo.calc_farm()
113
- time1 = time.time()
114
-
115
- print("\nCalc time =", time1 - time0, "\n")
116
-
117
- print("\nFarm results:\n", farm_results)
118
-
119
- o = foxes.output.FarmResultsEval(farm_results)
120
- o.add_capacity(algo)
121
- o.add_capacity(algo, ambient=True)
122
- o.add_efficiency()
123
-
124
- # state-turbine results
125
- farm_df = farm_results.to_dataframe()
126
- print("\nFarm results data:\n")
127
- print(
128
- farm_df[
129
- [
130
- FV.X,
131
- FV.WD,
132
- FV.AMB_REWS,
133
- FV.REWS,
134
- FV.AMB_TI,
135
- FV.TI,
136
- FV.AMB_P,
137
- FV.P,
138
- FV.EFF,
139
- ]
140
- ]
141
- )
142
- print()
143
-
144
- # results by turbine
145
- turbine_results = o.reduce_states(
146
- {
147
- FV.AMB_P: "weights",
148
- FV.P: "weights",
149
- FV.AMB_CAP: "weights",
150
- FV.CAP: "weights",
151
- }
152
- )
153
- turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
154
- algo=algo, annual=True, ambient=True
155
- )
156
- turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
157
- turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
158
- print("\nResults by turbine:\n")
159
- print(turbine_results)
160
-
161
- # power results
162
- P0 = o.calc_mean_farm_power(ambient=True)
163
- P = o.calc_mean_farm_power()
164
- print(f"\nFarm power : {P / 1000:.1f} MW")
165
- print(f"Farm ambient power: {P0 / 1000:.1f} MW")
166
- print(f"Farm efficiency : {o.calc_farm_efficiency() * 100:.2f} %")
167
- print(f"Annual farm yield : {turbine_results[FV.YLD].sum():.2f} GWh.")
168
- print()
169
-
170
- if not args.nofig and args.calc_cline:
171
- points = np.zeros((n_s, n_p, 3))
172
- points[:, :, 0] = np.linspace(p0[0], p0[0] + n_t * stp[0] + 10 * D, n_p)[
173
- None, :
174
- ]
175
- points[:, :, 1] = p0[1]
176
- points[:, :, 2] = H
177
- print("\nPOINTS:\n", points[0])
178
-
112
+ ):
179
113
  time0 = time.time()
180
- point_results = algo.calc_points(farm_results, points)
114
+ farm_results = algo.calc_farm()
181
115
  time1 = time.time()
116
+
182
117
  print("\nCalc time =", time1 - time0, "\n")
183
118
 
184
- print(point_results)
185
-
186
- fig, ax = plt.subplots()
187
- for s in range(points.shape[0]):
188
- ax.plot(points[s, :, 0], point_results[FV.WS][s, :])
189
- ax.set_xlabel("x [m]")
190
- ax.set_ylabel("Wind speed [m/s]")
191
- ax.set_title("Centreline wind speed")
192
- plt.show()
193
- plt.close(fig)
194
-
195
- if not args.nofig and args.calc_mean:
196
- o = foxes.output.FlowPlots2D(algo, farm_results)
197
- fig = o.get_mean_fig_xy(FV.WS, resolution=10)
198
- plt.show()
119
+ print("\nFarm results:\n", farm_results)
120
+
121
+ o = foxes.output.FarmResultsEval(farm_results)
122
+ o.add_capacity(algo)
123
+ o.add_capacity(algo, ambient=True)
124
+ o.add_efficiency()
125
+
126
+ # state-turbine results
127
+ farm_df = farm_results.to_dataframe()
128
+ print("\nFarm results data:\n")
129
+ print(
130
+ farm_df[
131
+ [
132
+ FV.X,
133
+ FV.WD,
134
+ FV.AMB_REWS,
135
+ FV.REWS,
136
+ FV.AMB_TI,
137
+ FV.TI,
138
+ FV.AMB_P,
139
+ FV.P,
140
+ FV.EFF,
141
+ ]
142
+ ]
143
+ )
144
+ print()
145
+
146
+ # results by turbine
147
+ turbine_results = o.reduce_states(
148
+ {
149
+ FV.AMB_P: "weights",
150
+ FV.P: "weights",
151
+ FV.AMB_CAP: "weights",
152
+ FV.CAP: "weights",
153
+ }
154
+ )
155
+ turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
156
+ algo=algo, annual=True, ambient=True
157
+ )
158
+ turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
159
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
160
+ print("\nResults by turbine:\n")
161
+ print(turbine_results)
162
+
163
+ # power results
164
+ P0 = o.calc_mean_farm_power(ambient=True)
165
+ P = o.calc_mean_farm_power()
166
+ print(f"\nFarm power : {P / 1000:.1f} MW")
167
+ print(f"Farm ambient power: {P0 / 1000:.1f} MW")
168
+ print(f"Farm efficiency : {o.calc_farm_efficiency() * 100:.2f} %")
169
+ print(f"Annual farm yield : {turbine_results[FV.YLD].sum():.2f} GWh.")
170
+ print()
171
+
172
+ if not args.nofig and args.calc_cline:
173
+ points = np.zeros((n_s, n_p, 3))
174
+ points[:, :, 0] = np.linspace(p0[0], p0[0] + n_t * stp[0] + 10 * D, n_p)[
175
+ None, :
176
+ ]
177
+ points[:, :, 1] = p0[1]
178
+ points[:, :, 2] = H
179
+ print("\nPOINTS:\n", points[0])
180
+
181
+ time0 = time.time()
182
+ point_results = algo.calc_points(farm_results, points)
183
+ time1 = time.time()
184
+ print("\nCalc time =", time1 - time0, "\n")
185
+
186
+ print(point_results)
187
+
188
+ fig, ax = plt.subplots()
189
+ for s in range(points.shape[0]):
190
+ ax.plot(points[s, :, 0], point_results[FV.WS][s, :])
191
+ ax.set_xlabel("x [m]")
192
+ ax.set_ylabel("Wind speed [m/s]")
193
+ ax.set_title("Centreline wind speed")
194
+ plt.show()
195
+ plt.close(fig)
196
+
197
+ if not args.nofig and args.calc_mean:
198
+ o = foxes.output.FlowPlots2D(algo, farm_results)
199
+ fig = o.get_mean_fig_xy(FV.WS, resolution=10)
200
+ plt.show()