foxes 1.2.5__tar.gz → 1.3__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.
Potentially problematic release.
This version of foxes might be problematic. Click here for more details.
- {foxes-1.2.5/foxes.egg-info → foxes-1.3}/PKG-INFO +10 -8
- {foxes-1.2.5 → foxes-1.3}/README.md +8 -6
- foxes-1.3/examples/quickstart/run.py +17 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/__init__.py +1 -1
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/downwind/downwind.py +9 -15
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/downwind/models/farm_wakes_calc.py +13 -7
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/downwind/models/init_farm_data.py +4 -4
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/downwind/models/reorder_farm_output.py +5 -1
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/downwind/models/set_amb_point_results.py +1 -1
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/iterative/models/farm_wakes_calc.py +6 -3
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/sequential/models/seq_state.py +0 -18
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/sequential/sequential.py +5 -18
- {foxes-1.2.5 → foxes-1.3}/foxes/constants.py +6 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/data.py +44 -18
- {foxes-1.2.5 → foxes-1.3}/foxes/core/engine.py +19 -1
- {foxes-1.2.5 → foxes-1.3}/foxes/core/farm_data_model.py +1 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/rotor_model.py +42 -38
- {foxes-1.2.5 → foxes-1.3}/foxes/core/states.py +2 -47
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/__init__.py +1 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/field_data_nc.py +39 -61
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/multi_height.py +31 -54
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/one_point_flow.py +22 -21
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/scan.py +6 -19
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/single.py +5 -17
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/states_table.py +15 -37
- foxes-1.3/foxes/input/states/wrg_states.py +301 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/partial_wakes/rotor_points.py +8 -2
- {foxes-1.2.5 → foxes-1.3}/foxes/models/partial_wakes/segregated.py +9 -4
- {foxes-1.2.5 → foxes-1.3}/foxes/models/rotor_models/centre.py +6 -4
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_frames/seq_dynamic_wakes.py +5 -2
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_frames/timelines.py +10 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/farm_layout.py +12 -4
- {foxes-1.2.5 → foxes-1.3}/foxes/output/farm_results_eval.py +36 -12
- {foxes-1.2.5 → foxes-1.3}/foxes/output/rose_plot.py +20 -2
- {foxes-1.2.5 → foxes-1.3}/foxes/output/slice_data.py +16 -19
- {foxes-1.2.5 → foxes-1.3/foxes.egg-info}/PKG-INFO +10 -8
- {foxes-1.2.5 → foxes-1.3}/foxes.egg-info/SOURCES.txt +1 -0
- {foxes-1.2.5 → foxes-1.3}/pyproject.toml +1 -1
- {foxes-1.2.5 → foxes-1.3}/tests/0_consistency/iterative/test_iterative.py +2 -3
- {foxes-1.2.5 → foxes-1.3}/tests/0_consistency/partial_wakes/test_partial_wakes.py +2 -2
- foxes-1.3/tests/1_verification/flappy_0_6/PCt_files/test_PCt_files.py +98 -0
- foxes-1.3/tests/1_verification/flappy_0_6/abl_states/test_abl_states.py +84 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/test_row_Jensen_linear_centre.py +3 -2
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/test_row_Jensen_linear_tophat.py +3 -3
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/test_row_Jensen_linear_tophat_IECTI_2005.py +3 -3
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/test_row_Jensen_linear_tophat_IECTI_2019.py +3 -3
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/test_row_Jensen_quadratic_centre.py +3 -3
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6_2/grid_rotors/test_grid_rotors.py +3 -3
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/test_row_Bastankhah_Crespo.py +3 -2
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/test_row_Bastankhah_linear_centre.py +3 -3
- {foxes-1.2.5 → foxes-1.3}/tests/3_examples/test_examples.py +3 -2
- foxes-1.2.5/foxes/input/states/wrg_states.py +0 -189
- foxes-1.2.5/tests/1_verification/flappy_0_6/PCt_files/test_PCt_files.py +0 -106
- foxes-1.2.5/tests/1_verification/flappy_0_6/abl_states/test_abl_states.py +0 -87
- {foxes-1.2.5 → foxes-1.3}/LICENSE +0 -0
- {foxes-1.2.5 → foxes-1.3}/Logo_FOXES.svg +0 -0
- {foxes-1.2.5 → foxes-1.3}/MANIFEST.in +0 -0
- {foxes-1.2.5 → foxes-1.3}/docs/source/conf.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/abl_states/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/compare_rotors_pwakes/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/compare_wakes/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/dyn_wakes/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/field_data_nc/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/induction/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/multi_height/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/power_mask/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/random_timeseries/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/scan_row/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/sector_management/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/sequential/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/single_state/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/states_lookup_table/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/streamline_wakes/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/tab_file/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/timelines/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/timeseries/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/timeseries_slurm/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/wind_rose/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/examples/yawed_wake/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/downwind/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/downwind/models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/downwind/models/point_wakes_calc.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/downwind/models/set_amb_farm_results.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/iterative/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/iterative/iterative.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/iterative/models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/iterative/models/convergence.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/iterative/models/urelax.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/sequential/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/sequential/models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/algorithms/sequential/models/plugin.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/config/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/config/config.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/algorithm.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/axial_induction_model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/data_calc_model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/farm_controller.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/farm_model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/ground_model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/partial_wakes_model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/point_data_model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/turbine.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/turbine_model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/turbine_type.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/vertical_profile.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/wake_frame.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/wake_model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/wake_superposition.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/core/wind_farm.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/farms/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/farms/test_farm_67.csv +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/parse.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/power_ct_curves/DTU-10MW-D178d3-H119.csv +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/power_ct_curves/IEA-15MW-D240-H150.csv +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/power_ct_curves/IWT-7d5MW-D164-H100.csv +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/power_ct_curves/NREL-5MW-D126-H90.csv +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/power_ct_curves/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/WRF-Timeseries-3000.nc +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/WRF-Timeseries-4464.csv.gz +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/abl_states_6000.csv.gz +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/timeseries_100.csv.gz +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/timeseries_3000.csv.gz +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/timeseries_8000.csv.gz +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/wind_rose_bremen.csv +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/wind_rotation.nc +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/states/winds100.tab +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/data/static_data.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/dask.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/default.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/futures.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/mpi.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/multiprocess.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/numpy.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/pool.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/ray.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/engines/single.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/farm_layout/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/farm_layout/from_csv.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/farm_layout/from_df.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/farm_layout/from_file.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/farm_layout/from_json.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/farm_layout/from_random.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/farm_layout/grid.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/farm_layout/ring.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/farm_layout/row.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/create/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/create/random_abl_states.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/states/create/random_timeseries.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/dict.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/windio/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/windio/read_attributes.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/windio/read_farm.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/windio/read_fields.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/windio/read_outputs.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/windio/read_site.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/windio/windio.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/input/yaml/yaml.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/axial_induction/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/axial_induction/betz.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/axial_induction/madsen.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/farm_controllers/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/farm_controllers/basic.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/farm_models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/farm_models/turbine2farm.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/ground_models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/ground_models/no_ground.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/ground_models/wake_mirror.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/model_book.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/partial_wakes/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/partial_wakes/axiwake.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/partial_wakes/centre.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/partial_wakes/grid.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/partial_wakes/top_hat.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/point_models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/point_models/set_uniform_data.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/point_models/tke2ti.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/point_models/ustar2ti.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/point_models/wake_deltas.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/rotor_models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/rotor_models/grid.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/rotor_models/levels.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/calculator.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/kTI_model.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/lookup_table.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/power_mask.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/rotor_centre_calc.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/sector_management.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/set_farm_vars.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/table_factors.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/thrust2ct.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/yaw2yawm.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_models/yawm2yaw.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/CpCt_file.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/CpCt_from_two.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/PCt_file.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/PCt_from_two.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/TBL_file.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/lookup.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/null_type.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/wsrho2PCt_from_two.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/turbine_types/wsti2PCt_from_two.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/vertical_profiles/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/vertical_profiles/abl_log_neutral_ws.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/vertical_profiles/abl_log_stable_ws.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/vertical_profiles/abl_log_unstable_ws.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/vertical_profiles/abl_log_ws.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/vertical_profiles/data_profile.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/vertical_profiles/sheared_ws.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/vertical_profiles/uniform.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_frames/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_frames/dynamic_wakes.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_frames/farm_order.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_frames/rotor_wd.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_frames/streamlines.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_frames/yawed_wakes.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/axisymmetric.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/dist_sliced.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/gaussian.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/induction/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/induction/rankine_half_body.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/induction/rathmann.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/induction/self_similar.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/induction/self_similar2020.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/induction/vortex_sheet.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/ti/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/ti/crespo_hernandez.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/ti/iec_ti.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/top_hat.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/wind/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/wind/bastankhah14.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/wind/bastankhah16.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/wind/jensen.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_models/wind/turbopark.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/ti_linear.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/ti_max.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/ti_pow.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/ti_quadratic.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/ws_linear.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/ws_max.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/ws_pow.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/ws_product.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/models/wake_superpositions/ws_quadratic.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/animation.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/calc_points.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/flow_plots_2d/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/flow_plots_2d/flow_plots.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/flow_plots_2d/get_fig.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/grids.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/output.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/plt.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/results_writer.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/rotor_point_plots.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/round.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/seq_plugins/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/seq_plugins/seq_flow_ani_plugin.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/seq_plugins/seq_wake_debug_plugin.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/slices_data.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/state_turbine_map.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/state_turbine_table.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/output/turbine_type_curves.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/abl/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/abl/neutral.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/abl/sheared.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/abl/stable.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/abl/unstable.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/cubic_roots.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/data_book.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/dev_utils.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/dict.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/exec_python.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/factory.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/geom2d/__init__.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/geom2d/area_geometry.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/geom2d/circle.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/geom2d/example_intersection.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/geom2d/example_union.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/geom2d/half_plane.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/geom2d/polygon.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/geopandas_utils.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/load.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/pandas_helpers.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/pandas_utils.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/random_xy.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/regularize.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/subclasses.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/tab_files.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/two_circles.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/wind_dir.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/wrg_utils.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/utils/xarray_utils.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes/variables.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes.egg-info/dependency_links.txt +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes.egg-info/entry_points.txt +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes.egg-info/requires.txt +0 -0
- {foxes-1.2.5 → foxes-1.3}/foxes.egg-info/top_level.txt +0 -0
- {foxes-1.2.5 → foxes-1.3}/setup.cfg +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/PCt_files/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/abl_states/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/partial_top_hat/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/partial_top_hat/test_partial_top_hat.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6_2/grid_rotors/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/flappy/run.py +0 -0
- {foxes-1.2.5 → foxes-1.3}/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/flappy/run.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: foxes
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3
|
|
4
4
|
Summary: Farm Optimization and eXtended yield Evaluation Software
|
|
5
5
|
Author: Jonas Schulte
|
|
6
6
|
Maintainer: Jonas Schulte
|
|
@@ -191,15 +191,17 @@ For detailed examples of how to run _foxes_, check the `examples` and `notebooks
|
|
|
191
191
|
```python
|
|
192
192
|
import foxes
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
if __name__ == "__main__":
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
foxes.input.farm_layout.add_from_file(farm, "test_farm_67.csv", turbine_models=["NREL5MW"])
|
|
196
|
+
states = foxes.input.states.Timeseries("timeseries_3000.csv.gz", ["WS", "WD","TI","RHO"])
|
|
198
197
|
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
farm = foxes.WindFarm()
|
|
199
|
+
foxes.input.farm_layout.add_from_file(farm, "test_farm_67.csv", turbine_models=["NREL5MW"])
|
|
201
200
|
|
|
202
|
-
|
|
201
|
+
algo = foxes.algorithms.Downwind(farm, states, ["Jensen_linear_k007"])
|
|
202
|
+
farm_results = algo.calc_farm()
|
|
203
|
+
|
|
204
|
+
print(farm_results)
|
|
203
205
|
```
|
|
204
206
|
|
|
205
207
|
## Testing
|
|
@@ -86,15 +86,17 @@ For detailed examples of how to run _foxes_, check the `examples` and `notebooks
|
|
|
86
86
|
```python
|
|
87
87
|
import foxes
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
if __name__ == "__main__":
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
foxes.input.farm_layout.add_from_file(farm, "test_farm_67.csv", turbine_models=["NREL5MW"])
|
|
91
|
+
states = foxes.input.states.Timeseries("timeseries_3000.csv.gz", ["WS", "WD","TI","RHO"])
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
farm = foxes.WindFarm()
|
|
94
|
+
foxes.input.farm_layout.add_from_file(farm, "test_farm_67.csv", turbine_models=["NREL5MW"])
|
|
96
95
|
|
|
97
|
-
|
|
96
|
+
algo = foxes.algorithms.Downwind(farm, states, ["Jensen_linear_k007"])
|
|
97
|
+
farm_results = algo.calc_farm()
|
|
98
|
+
|
|
99
|
+
print(farm_results)
|
|
98
100
|
```
|
|
99
101
|
|
|
100
102
|
## Testing
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import foxes
|
|
2
|
+
|
|
3
|
+
if __name__ == "__main__":
|
|
4
|
+
|
|
5
|
+
states = foxes.input.states.Timeseries(
|
|
6
|
+
"timeseries_3000.csv.gz", ["WS", "WD", "TI", "RHO"]
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
farm = foxes.WindFarm()
|
|
10
|
+
foxes.input.farm_layout.add_from_file(
|
|
11
|
+
farm, "test_farm_67.csv", turbine_models=["NREL5MW"]
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
algo = foxes.algorithms.Downwind(farm, states, ["Jensen_linear_k007"])
|
|
15
|
+
farm_results = algo.calc_farm()
|
|
16
|
+
|
|
17
|
+
print(farm_results)
|
|
@@ -61,8 +61,6 @@ class Downwind(Algorithm):
|
|
|
61
61
|
FV.TI,
|
|
62
62
|
FV.CT,
|
|
63
63
|
FV.P,
|
|
64
|
-
FV.ORDER,
|
|
65
|
-
FV.WEIGHT,
|
|
66
64
|
]
|
|
67
65
|
|
|
68
66
|
def __init__(
|
|
@@ -447,9 +445,7 @@ class Downwind(Algorithm):
|
|
|
447
445
|
# 2) calculate ambient rotor results:
|
|
448
446
|
mlist.models.append(self.rotor_model)
|
|
449
447
|
calc_pars.append(calc_parameters.get(mlist.models[-1].name, {}))
|
|
450
|
-
calc_pars[-1].update(
|
|
451
|
-
{"store_rpoints": True, "store_rweights": True, "store_amb_res": True}
|
|
452
|
-
)
|
|
448
|
+
calc_pars[-1].update({"store": True})
|
|
453
449
|
|
|
454
450
|
# 3) run post-rotor turbine models via farm controller:
|
|
455
451
|
mlist.models.append(self.farm_controller)
|
|
@@ -475,13 +471,14 @@ class Downwind(Algorithm):
|
|
|
475
471
|
|
|
476
472
|
def _calc_farm_vars(self, mlist):
|
|
477
473
|
"""Helper function that gathers the farm variables"""
|
|
478
|
-
self.farm_vars = sorted(list(
|
|
474
|
+
self.farm_vars = sorted(list(mlist.output_farm_vars(self)))
|
|
479
475
|
|
|
480
476
|
def _launch_parallel_farm_calc(
|
|
481
477
|
self,
|
|
482
478
|
mlist,
|
|
483
479
|
*data,
|
|
484
480
|
outputs=None,
|
|
481
|
+
normalize=False,
|
|
485
482
|
**kwargs,
|
|
486
483
|
):
|
|
487
484
|
"""
|
|
@@ -495,6 +492,8 @@ class Downwind(Algorithm):
|
|
|
495
492
|
The (mdata, fdata) inputs
|
|
496
493
|
outputs: list of str, optional
|
|
497
494
|
The output variables, or None for defaults
|
|
495
|
+
normalize: bool
|
|
496
|
+
Normalize the weights to 1 wrt sum over states
|
|
498
497
|
kwargs: dict, optional
|
|
499
498
|
Additional parameters for running
|
|
500
499
|
|
|
@@ -510,6 +509,9 @@ class Downwind(Algorithm):
|
|
|
510
509
|
self, mlist, *data, out_vars=out_vars, **kwargs
|
|
511
510
|
)
|
|
512
511
|
|
|
512
|
+
if normalize:
|
|
513
|
+
farm_results[FV.WEIGHT] /= farm_results[FV.WEIGHT].sum(dim=FC.STATE)
|
|
514
|
+
|
|
513
515
|
return farm_results
|
|
514
516
|
|
|
515
517
|
def calc_farm(
|
|
@@ -679,13 +681,7 @@ class Downwind(Algorithm):
|
|
|
679
681
|
"""
|
|
680
682
|
return (
|
|
681
683
|
get_engine()
|
|
682
|
-
.run_calculation(
|
|
683
|
-
self,
|
|
684
|
-
mlist,
|
|
685
|
-
*data,
|
|
686
|
-
out_vars=outputs,
|
|
687
|
-
**kwargs,
|
|
688
|
-
)
|
|
684
|
+
.run_calculation(self, mlist, *data, out_vars=outputs, **kwargs)
|
|
689
685
|
.sel({FC.TPOINT: 0})
|
|
690
686
|
.rename({FC.TARGET: FC.POINT})
|
|
691
687
|
)
|
|
@@ -812,8 +808,6 @@ class Downwind(Algorithm):
|
|
|
812
808
|
point_data,
|
|
813
809
|
outputs=ovars,
|
|
814
810
|
parameters=calc_pars,
|
|
815
|
-
# sel=sel,
|
|
816
|
-
# isel=isel,
|
|
817
811
|
**kwargs,
|
|
818
812
|
)
|
|
819
813
|
del model_data, farm_results, point_data
|
|
@@ -3,6 +3,7 @@ from copy import deepcopy
|
|
|
3
3
|
|
|
4
4
|
from foxes.core import FarmDataModel, TData
|
|
5
5
|
import foxes.constants as FC
|
|
6
|
+
import foxes.variables as FV
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class FarmWakesCalculation(FarmDataModel):
|
|
@@ -58,8 +59,9 @@ class FarmWakesCalculation(FarmDataModel):
|
|
|
58
59
|
"""
|
|
59
60
|
# collect ambient rotor results and weights:
|
|
60
61
|
rotor = algo.rotor_model
|
|
61
|
-
|
|
62
|
+
rwghts = algo.get_from_chunk_store(FC.ROTOR_WEIGHTS, mdata=mdata)
|
|
62
63
|
amb_res = algo.get_from_chunk_store(FC.AMB_ROTOR_RES, mdata=mdata)
|
|
64
|
+
weights = algo.get_from_chunk_store(FC.WEIGHT_RES, mdata=mdata)
|
|
63
65
|
|
|
64
66
|
# generate all wake evaluation points
|
|
65
67
|
# (n_states, n_order, n_rpoints)
|
|
@@ -77,20 +79,24 @@ class FarmWakesCalculation(FarmDataModel):
|
|
|
77
79
|
return tdata, wdelta
|
|
78
80
|
|
|
79
81
|
def _evaluate(
|
|
80
|
-
gmodel, tdata, amb_res,
|
|
82
|
+
gmodel, tdata, amb_res, rwghts, wake_res, wdeltas, oi, wmodel, pwake
|
|
81
83
|
):
|
|
82
84
|
"""Helper function for data evaluation at turbines"""
|
|
83
85
|
wres = gmodel.finalize_farm_wakes(
|
|
84
|
-
algo, mdata, fdata, tdata, amb_res,
|
|
86
|
+
algo, mdata, fdata, tdata, amb_res, rwghts, wdeltas, wmodel, oi, pwake
|
|
85
87
|
)
|
|
86
88
|
|
|
87
|
-
hres = {
|
|
89
|
+
hres = {
|
|
90
|
+
v: d[:, oi, None] if d.shape[1] > 1 else d[:, 0, None]
|
|
91
|
+
for v, d in wake_res.items()
|
|
92
|
+
}
|
|
88
93
|
for v, d in wres.items():
|
|
89
94
|
if v in wake_res:
|
|
90
95
|
hres[v] += d[:, None]
|
|
96
|
+
hres[FV.WEIGHT] = weights
|
|
91
97
|
|
|
92
98
|
rotor.eval_rpoint_results(
|
|
93
|
-
algo, mdata, fdata, hres,
|
|
99
|
+
algo, mdata, fdata, hres, rwghts, downwind_index=oi
|
|
94
100
|
)
|
|
95
101
|
|
|
96
102
|
res = algo.farm_controller.calculate(
|
|
@@ -119,7 +125,7 @@ class FarmWakesCalculation(FarmDataModel):
|
|
|
119
125
|
gmodel,
|
|
120
126
|
tdatap,
|
|
121
127
|
amb_res,
|
|
122
|
-
|
|
128
|
+
rwghts,
|
|
123
129
|
wake_res,
|
|
124
130
|
wdeltas,
|
|
125
131
|
oi,
|
|
@@ -144,7 +150,7 @@ class FarmWakesCalculation(FarmDataModel):
|
|
|
144
150
|
gmodel,
|
|
145
151
|
tdatap,
|
|
146
152
|
amb_res,
|
|
147
|
-
|
|
153
|
+
rwghts,
|
|
148
154
|
wake_res,
|
|
149
155
|
wdeltas,
|
|
150
156
|
oi,
|
|
@@ -43,7 +43,6 @@ class InitFarmData(FarmDataModel):
|
|
|
43
43
|
FV.WD,
|
|
44
44
|
FV.YAW,
|
|
45
45
|
FV.ORDER,
|
|
46
|
-
FV.WEIGHT,
|
|
47
46
|
FV.ORDER_SSEL,
|
|
48
47
|
FV.ORDER_INV,
|
|
49
48
|
]
|
|
@@ -106,10 +105,11 @@ class InitFarmData(FarmDataModel):
|
|
|
106
105
|
fdata[FV.D][:, ti] = D
|
|
107
106
|
|
|
108
107
|
# calc WD and YAW at rotor centres:
|
|
109
|
-
|
|
108
|
+
svrs = algo.states.output_point_vars(algo)
|
|
109
|
+
tdata = TData.from_points(points=fdata[FV.TXYH], variables=svrs)
|
|
110
110
|
sres = algo.states.calculate(algo, mdata, fdata, tdata)
|
|
111
111
|
fdata[FV.WD] = sres[FV.WD][:, :, 0]
|
|
112
|
-
del tdata, sres
|
|
112
|
+
del tdata, sres, svrs
|
|
113
113
|
|
|
114
114
|
# calculate and inverse:
|
|
115
115
|
order = algo.wake_frame.calc_order(algo, mdata, fdata)
|
|
@@ -124,7 +124,7 @@ class InitFarmData(FarmDataModel):
|
|
|
124
124
|
fdata[FV.TXYH] = fdata[FV.TXYH][ssel, order]
|
|
125
125
|
for i, v in enumerate([FV.X, FV.Y, FV.H]):
|
|
126
126
|
fdata[v] = fdata[FV.TXYH][..., i]
|
|
127
|
-
for v in [FV.D, FV.WD
|
|
127
|
+
for v in [FV.D, FV.WD]:
|
|
128
128
|
if np.any(fdata[v] != fdata[v][0, 0, None, None]):
|
|
129
129
|
fdata[v] = fdata[v][ssel, order]
|
|
130
130
|
fdata[FV.YAW] = fdata[FV.WD].copy()
|
|
@@ -75,7 +75,11 @@ class ReorderFarmOutput(FarmDataModel):
|
|
|
75
75
|
|
|
76
76
|
out = {}
|
|
77
77
|
for v in self.output_farm_vars(algo):
|
|
78
|
-
if
|
|
78
|
+
if (
|
|
79
|
+
v != FV.ORDER
|
|
80
|
+
and fdata[v].shape[1] > 1
|
|
81
|
+
and np.any(fdata[v] != fdata[v][0, 0, None, None])
|
|
82
|
+
):
|
|
79
83
|
out[v] = fdata[v][ssel, order_inv]
|
|
80
84
|
else:
|
|
81
85
|
out[v] = fdata[v]
|
|
@@ -3,6 +3,7 @@ from copy import deepcopy
|
|
|
3
3
|
|
|
4
4
|
from foxes.core import FarmDataModel, TData
|
|
5
5
|
import foxes.constants as FC
|
|
6
|
+
import foxes.variables as FV
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class FarmWakesCalculation(FarmDataModel):
|
|
@@ -88,8 +89,9 @@ class FarmWakesCalculation(FarmDataModel):
|
|
|
88
89
|
"""
|
|
89
90
|
# collect ambient rotor results and weights:
|
|
90
91
|
rotor = algo.rotor_model
|
|
91
|
-
|
|
92
|
+
rwghts = algo.get_from_chunk_store(FC.ROTOR_WEIGHTS, mdata=mdata)
|
|
92
93
|
amb_res = algo.get_from_chunk_store(FC.AMB_ROTOR_RES, mdata=mdata)
|
|
94
|
+
weights = algo.get_from_chunk_store(FC.WEIGHT_RES, mdata=mdata)
|
|
93
95
|
|
|
94
96
|
# generate all wake evaluation points
|
|
95
97
|
# (n_states, n_order, n_rpoints)
|
|
@@ -139,7 +141,7 @@ class FarmWakesCalculation(FarmDataModel):
|
|
|
139
141
|
fdata,
|
|
140
142
|
tdatap,
|
|
141
143
|
amb_res,
|
|
142
|
-
|
|
144
|
+
rwghts,
|
|
143
145
|
wdeltas,
|
|
144
146
|
wmodel,
|
|
145
147
|
oi,
|
|
@@ -151,7 +153,8 @@ class FarmWakesCalculation(FarmDataModel):
|
|
|
151
153
|
|
|
152
154
|
del pwake, tdatap, wdeltas
|
|
153
155
|
|
|
154
|
-
|
|
156
|
+
wake_res[FV.WEIGHT] = weights
|
|
157
|
+
rotor.eval_rpoint_results(algo, mdata, fdata, wake_res, rwghts)
|
|
155
158
|
res = algo.farm_controller.calculate(algo, mdata, fdata, pre_rotor=False)
|
|
156
159
|
if self.urelax is not None:
|
|
157
160
|
res = self.urelax.calculate(algo, mdata, fdata, res)
|
|
@@ -30,7 +30,6 @@ class SeqState(States):
|
|
|
30
30
|
|
|
31
31
|
# updated by SequentialIter:
|
|
32
32
|
self._size = states.size()
|
|
33
|
-
self._weight = None
|
|
34
33
|
self._indx = None
|
|
35
34
|
self._counter = None
|
|
36
35
|
|
|
@@ -100,23 +99,6 @@ class SeqState(States):
|
|
|
100
99
|
"""
|
|
101
100
|
return self._counter
|
|
102
101
|
|
|
103
|
-
def weights(self, algo):
|
|
104
|
-
"""
|
|
105
|
-
The statistical weights of all states.
|
|
106
|
-
|
|
107
|
-
Parameters
|
|
108
|
-
----------
|
|
109
|
-
algo: foxes.core.Algorithm
|
|
110
|
-
The calculation algorithm
|
|
111
|
-
|
|
112
|
-
Returns
|
|
113
|
-
-------
|
|
114
|
-
weights: numpy.ndarray
|
|
115
|
-
The weights, shape: (n_states, n_turbines)
|
|
116
|
-
|
|
117
|
-
"""
|
|
118
|
-
return self._weight[None, :] if self._size == 1 else self.states.weights(algo)
|
|
119
|
-
|
|
120
102
|
def output_point_vars(self, algo):
|
|
121
103
|
"""
|
|
122
104
|
The variables which are being modified by the model.
|
|
@@ -139,7 +139,6 @@ class Sequential(Iterative):
|
|
|
139
139
|
self.print_deco("calc_farm")
|
|
140
140
|
|
|
141
141
|
self._inds = self.states0.index()
|
|
142
|
-
self._weights = self.states0.weights(self)
|
|
143
142
|
self._i = 0
|
|
144
143
|
self._counter = 0
|
|
145
144
|
|
|
@@ -158,12 +157,15 @@ class Sequential(Iterative):
|
|
|
158
157
|
print(f"\nOutput farm variables:", ", ".join(self.farm_vars))
|
|
159
158
|
print()
|
|
160
159
|
|
|
160
|
+
sts = self._model_data[FC.STATE].to_numpy()
|
|
161
161
|
self._farm_results = Dataset(
|
|
162
|
-
coords={FC.STATE:
|
|
162
|
+
coords={FC.STATE: sts},
|
|
163
163
|
data_vars={
|
|
164
164
|
v: (
|
|
165
165
|
(FC.STATE, FC.TURBINE),
|
|
166
|
-
np.
|
|
166
|
+
np.zeros(
|
|
167
|
+
(len(sts), self.n_turbines), dtype=config.dtype_double
|
|
168
|
+
),
|
|
167
169
|
)
|
|
168
170
|
for v in self.farm_vars
|
|
169
171
|
},
|
|
@@ -191,7 +193,6 @@ class Sequential(Iterative):
|
|
|
191
193
|
self.states._counter = self._i
|
|
192
194
|
self.states._size = 1
|
|
193
195
|
self.states._indx = self._inds[self._i]
|
|
194
|
-
self.states._weight = self._weights[self._i]
|
|
195
196
|
|
|
196
197
|
if self._verbo0 > 0:
|
|
197
198
|
print(f"{self.name}: Running state {self.states.index()[0]}")
|
|
@@ -257,7 +258,6 @@ class Sequential(Iterative):
|
|
|
257
258
|
self.states._counter = None
|
|
258
259
|
self.states._size = len(self._inds)
|
|
259
260
|
self.states._indx = self._inds
|
|
260
|
-
self.states._weight = self._weights
|
|
261
261
|
|
|
262
262
|
for p in self.plugins:
|
|
263
263
|
p.finalize(self)
|
|
@@ -323,19 +323,6 @@ class Sequential(Iterative):
|
|
|
323
323
|
"""
|
|
324
324
|
return self.counter if counter else self.index
|
|
325
325
|
|
|
326
|
-
@property
|
|
327
|
-
def weight(self):
|
|
328
|
-
"""
|
|
329
|
-
The current weight array
|
|
330
|
-
|
|
331
|
-
Returns
|
|
332
|
-
-------
|
|
333
|
-
w: numpy.ndarray
|
|
334
|
-
The current weight array, shape: (n_turbines,)
|
|
335
|
-
|
|
336
|
-
"""
|
|
337
|
-
return self.states._weight if self.iterating else None
|
|
338
|
-
|
|
339
326
|
@property
|
|
340
327
|
def farm_results(self):
|
|
341
328
|
"""
|
|
@@ -73,11 +73,17 @@ ROTOR_WEIGHTS = "rotor_weights"
|
|
|
73
73
|
""" Identifier for rotor point weights
|
|
74
74
|
:group: foxes.constants
|
|
75
75
|
"""
|
|
76
|
+
|
|
76
77
|
AMB_ROTOR_RES = "amb_rotor_res"
|
|
77
78
|
""" Identifier for ambient rotor point results
|
|
78
79
|
:group: foxes.constants
|
|
79
80
|
"""
|
|
80
81
|
|
|
82
|
+
WEIGHT_RES = "weight_res"
|
|
83
|
+
""" Identifier for weights results at rotor points
|
|
84
|
+
:group: foxes.constants
|
|
85
|
+
"""
|
|
86
|
+
|
|
81
87
|
|
|
82
88
|
VARS = "vars"
|
|
83
89
|
""" Variables identifier
|
|
@@ -156,10 +156,11 @@ class Data(Dict):
|
|
|
156
156
|
for li, l in enumerate(self.loop_dims):
|
|
157
157
|
if data.shape[li] == 1 and (len(dims) < li + 1 or dims[li] != l):
|
|
158
158
|
self[name] = np.squeeze(data, axis=li)
|
|
159
|
-
|
|
160
159
|
for ci, c in enumerate(dims):
|
|
161
|
-
if c not in self.sizes:
|
|
160
|
+
if c not in self.sizes or self.sizes[c] == 1:
|
|
162
161
|
self.sizes[c] = self[name].shape[ci]
|
|
162
|
+
elif self[name].shape[ci] == 1:
|
|
163
|
+
pass
|
|
163
164
|
elif self.sizes[c] != self[name].shape[ci]:
|
|
164
165
|
raise ValueError(
|
|
165
166
|
f"Inconsistent size for data entry '{name}', dimension '{c}': Expecting {self.sizes[c]}, found {self[name].shape[ci]} in shape {self[name].shape}"
|
|
@@ -288,12 +289,16 @@ class Data(Dict):
|
|
|
288
289
|
raise ValueError(
|
|
289
290
|
f"Expecting coordinate '{FC.STATE}' at position 0 for data variable '{v}', got {d.dims}"
|
|
290
291
|
)
|
|
291
|
-
n_states =
|
|
292
|
+
n_states = d.shape[0]
|
|
292
293
|
s = np.s_[:] if s_states is None else s_states
|
|
293
294
|
data[v] = d.to_numpy()[s].copy() if copy else d.to_numpy()[s]
|
|
295
|
+
dims[v] = d.dims
|
|
296
|
+
if v == FV.WEIGHT and d.dims == (FC.STATE,):
|
|
297
|
+
data[v] = data[v][:, None]
|
|
298
|
+
dims[v] = (FC.STATE, FC.TURBINE)
|
|
294
299
|
else:
|
|
295
300
|
data[v] = d.to_numpy().copy() if copy else d.to_numpy()
|
|
296
|
-
|
|
301
|
+
dims[v] = d.dims
|
|
297
302
|
|
|
298
303
|
if callback is not None:
|
|
299
304
|
callback(data, dims)
|
|
@@ -362,8 +367,7 @@ class FData(Data):
|
|
|
362
367
|
super()._run_entry_checks(name, data, dims)
|
|
363
368
|
data = self[name]
|
|
364
369
|
dims = self.dims[name]
|
|
365
|
-
|
|
366
|
-
if name not in self.sizes and name not in FC.TNAME:
|
|
370
|
+
if name not in self.sizes and name not in [FC.TNAME, FV.WEIGHT]:
|
|
367
371
|
dms = (FC.STATE, FC.TURBINE)
|
|
368
372
|
shp = (self.n_states, self.n_turbines)
|
|
369
373
|
if len(data.shape) < 2:
|
|
@@ -418,8 +422,6 @@ class FData(Data):
|
|
|
418
422
|
if FC.STATE not in data:
|
|
419
423
|
data[FC.STATE] = mdata[FC.STATE]
|
|
420
424
|
dims[FC.STATE] = mdata.dims[FC.STATE]
|
|
421
|
-
data[FV.WEIGHT] = mdata[FV.WEIGHT]
|
|
422
|
-
dims[FV.WEIGHT] = mdata.dims[FV.WEIGHT]
|
|
423
425
|
if callback is not None:
|
|
424
426
|
callback(data, dims)
|
|
425
427
|
|
|
@@ -587,8 +589,9 @@ class TData(Data):
|
|
|
587
589
|
def from_points(
|
|
588
590
|
cls,
|
|
589
591
|
points,
|
|
590
|
-
data=
|
|
591
|
-
dims=
|
|
592
|
+
data=None,
|
|
593
|
+
dims=None,
|
|
594
|
+
variables=None,
|
|
592
595
|
name="tdata",
|
|
593
596
|
**kwargs,
|
|
594
597
|
):
|
|
@@ -599,11 +602,14 @@ class TData(Data):
|
|
|
599
602
|
----------
|
|
600
603
|
points: np.ndarray
|
|
601
604
|
The points, shape: (n_states, n_points, 3)
|
|
602
|
-
data: dict
|
|
605
|
+
data: dict, optional
|
|
603
606
|
The initial data to be stored
|
|
604
|
-
dims: dict
|
|
607
|
+
dims: dict, optional
|
|
605
608
|
The dimensions tuples, same or subset
|
|
606
609
|
of data keys
|
|
610
|
+
variables: list of str
|
|
611
|
+
Add default empty variables with NaN values
|
|
612
|
+
and shape (n_states, n_targets, n_tpoints)
|
|
607
613
|
name: str
|
|
608
614
|
The data container name
|
|
609
615
|
kwargs: dict, optional
|
|
@@ -619,19 +625,28 @@ class TData(Data):
|
|
|
619
625
|
raise ValueError(
|
|
620
626
|
f"Expecting points shape (n_states, n_points, 3), got {points.shape}"
|
|
621
627
|
)
|
|
628
|
+
data = {} if data is None else data
|
|
629
|
+
dims = {} if dims is None else dims
|
|
622
630
|
data[FC.TARGETS] = points[:, :, None, :]
|
|
623
631
|
dims[FC.TARGETS] = (FC.STATE, FC.TARGET, FC.TPOINT, FC.XYH)
|
|
624
632
|
data[FC.TWEIGHTS] = np.array([1], dtype=config.dtype_double)
|
|
625
633
|
dims[FC.TWEIGHTS] = (FC.TPOINT,)
|
|
626
|
-
|
|
634
|
+
if variables is not None:
|
|
635
|
+
for v in variables:
|
|
636
|
+
data[v] = np.full_like(points[:, :, None, 0], np.nan)
|
|
637
|
+
dims[v] = (FC.STATE, FC.TARGET, FC.TPOINT)
|
|
638
|
+
return cls(
|
|
639
|
+
data=data, dims=dims, loop_dims=[FC.STATE, FC.TARGET], name=name, **kwargs
|
|
640
|
+
)
|
|
627
641
|
|
|
628
642
|
@classmethod
|
|
629
643
|
def from_tpoints(
|
|
630
644
|
cls,
|
|
631
645
|
tpoints,
|
|
632
646
|
tweights,
|
|
633
|
-
data=
|
|
634
|
-
dims=
|
|
647
|
+
data=None,
|
|
648
|
+
dims=None,
|
|
649
|
+
variables=None,
|
|
635
650
|
name="tdata",
|
|
636
651
|
**kwargs,
|
|
637
652
|
):
|
|
@@ -646,11 +661,14 @@ class TData(Data):
|
|
|
646
661
|
tweights: np.ndarray, optional
|
|
647
662
|
The target point weights, shape:
|
|
648
663
|
(n_tpoints,)
|
|
649
|
-
data: dict
|
|
664
|
+
data: dict, optional
|
|
650
665
|
The initial data to be stored
|
|
651
|
-
dims: dict
|
|
666
|
+
dims: dict, optional
|
|
652
667
|
The dimensions tuples, same or subset
|
|
653
668
|
of data keys
|
|
669
|
+
variables: list of str
|
|
670
|
+
Add default empty variables with NaN values
|
|
671
|
+
and shape (n_states, n_targets, n_tpoints)
|
|
654
672
|
name: str
|
|
655
673
|
The data container name
|
|
656
674
|
kwargs: dict, optional
|
|
@@ -666,11 +684,19 @@ class TData(Data):
|
|
|
666
684
|
raise ValueError(
|
|
667
685
|
f"Expecting tpoints shape (n_states, n_targets, n_tpoints, 3), got {tpoints.shape}"
|
|
668
686
|
)
|
|
687
|
+
data = {} if data is None else data
|
|
688
|
+
dims = {} if dims is None else dims
|
|
669
689
|
data[FC.TARGETS] = tpoints
|
|
670
690
|
dims[FC.TARGETS] = (FC.STATE, FC.TARGET, FC.TPOINT, FC.XYH)
|
|
671
691
|
data[FC.TWEIGHTS] = tweights
|
|
672
692
|
dims[FC.TWEIGHTS] = (FC.TPOINT,)
|
|
673
|
-
|
|
693
|
+
if variables is not None:
|
|
694
|
+
for v in variables:
|
|
695
|
+
data[v] = np.full_like(tpoints[..., 0], np.nan)
|
|
696
|
+
dims[v] = (FC.STATE, FC.TARGET, FC.TPOINT)
|
|
697
|
+
return cls(
|
|
698
|
+
data=data, dims=dims, loop_dims=[FC.STATE, FC.TARGET], name=name, **kwargs
|
|
699
|
+
)
|
|
674
700
|
|
|
675
701
|
@classmethod
|
|
676
702
|
def from_dataset(
|
|
@@ -515,9 +515,27 @@ class Engine(ABC):
|
|
|
515
515
|
if FC.STATE in out_coords and FC.STATE in model_data.coords:
|
|
516
516
|
coords[FC.STATE] = model_data[FC.STATE].to_numpy()
|
|
517
517
|
|
|
518
|
+
# reducing weights dimensions:
|
|
519
|
+
dvars = {}
|
|
520
|
+
for v, (dims, d) in data_vars.items():
|
|
521
|
+
if (
|
|
522
|
+
dims == (FC.STATE, FC.TURBINE)
|
|
523
|
+
and d.shape[1] == 1
|
|
524
|
+
and algo.n_turbines > 1
|
|
525
|
+
):
|
|
526
|
+
dvars[v] = ((FC.STATE,), d[:, 0])
|
|
527
|
+
elif (
|
|
528
|
+
dims == (FC.STATE, FC.TARGET, FC.TPOINT)
|
|
529
|
+
and goal_data.sizes[FC.TARGET] > n_chunks_targets
|
|
530
|
+
and d.shape[1:] == (n_chunks_targets, 1)
|
|
531
|
+
):
|
|
532
|
+
dvars[v] = ((FC.STATE,), d[:, 0, 0])
|
|
533
|
+
else:
|
|
534
|
+
dvars[v] = (dims, d)
|
|
535
|
+
|
|
518
536
|
return Dataset(
|
|
519
537
|
coords=coords,
|
|
520
|
-
data_vars=
|
|
538
|
+
data_vars=dvars,
|
|
521
539
|
)
|
|
522
540
|
|
|
523
541
|
@abstractmethod
|