Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report: Cumulative Curl does not work with the turbine_cubature_grid solver #970

Open
Bartdoekemeijer opened this issue Aug 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working floris.simulation v4 Focus of FLORIS v4

Comments

@Bartdoekemeijer
Copy link
Collaborator

The CC model does not support turbine_cubature_grid solver

An error is raised when trying to run the cc model with the turbine_cubature_grid solver.

How to reproduce

Here's a minimal reproducible example:

from floris import FlorisModel

fmodel = FlorisModel("inputs/cc.yaml")
fmodel.set(solver_settings={"type": "turbine_cubature_grid", "turbine_grid_points": 3})
fmodel.run()
fmodel.get_turbine_powers()

Relevant output

This is the output of the example code, raising an error in turbine.py at line 301 (definition of thrust_coefficient):

Exception has occurred: ValueError
non-broadcastable output operand with shape (1,3) doesn't match the broadcast shape (1,1,9,3)
  File "/mnt/c/Users/Bart.Doekemeijer/OneDrive - Shell/Documents/python_scripts/floris_v4/floris/core/turbine/turbine.py", line 301, in thrust_coefficient
    thrust_coefficient += (
  File "/mnt/c/Users/Bart.Doekemeijer/OneDrive - Shell/Documents/python_scripts/floris_v4/floris/core/solver.py", line 511, in cc_solver
    turb_Cts = thrust_coefficient(
               ^^^^^^^^^^^^^^^^^^^
  File "/mnt/c/Users/Bart.Doekemeijer/OneDrive - Shell/Documents/python_scripts/floris_v4/floris/core/core.py", line 177, in steady_state_atmospheric_condition
    cc_solver(
  File "/mnt/c/Users/Bart.Doekemeijer/OneDrive - Shell/Documents/python_scripts/floris_v4/floris/floris_model.py", line 483, in run
    self.core.steady_state_atmospheric_condition()
  File "/mnt/c/Users/Bart.Doekemeijer/OneDrive - Shell/Documents/python_scripts/floris_v4/examples/test_cc_with_cubature_grid.py", line 5, in <module>
    fmodel.run()
ValueError: non-broadcastable output operand with shape (1,3) doesn't match the broadcast shape (1,1,9,3)

Floris version

FLORIS v4.1.1, on commit 044ab0ff31.

System Information

  • OS: Ubuntu 22.04.3 LTS
  • Python version: 3.11.8
  • Library versions
    • numpy==1.26.4
    • numexpr==2.10.1
    • scipy==1.14.0
@Bartdoekemeijer Bartdoekemeijer added bug Something isn't working floris.simulation v4 Focus of FLORIS v4 labels Aug 22, 2024
@rafmudaf rafmudaf self-assigned this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working floris.simulation v4 Focus of FLORIS v4
Projects
None yet
Development

No branches or pull requests

2 participants