NatLabRockies / NatLabRockies/floris

Gauss velocity deficit fails with 0 m/s inflow

Open
#1,069 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement ideas-list
Dominant language
Python
Stars
301
Forks
188
PR merge metrics
No merged PRs in 30d

Description

Simple gauss fails at 0 m/s

If you run the Gauss velocity deficit model without secondary_steering, yaw_added_recovery, enable_transverse_velocities, the model returns NaN when you provide an inflow of 0 m/s.

How to reproduce

I took the gch.yaml in the inputs folder, and changed:

  # Can be "true" or "false".
  enable_secondary_steering: false

  ###
  # Can be "true" or "false".
  enable_yaw_added_recovery: false

  ###
  # Can be "true" or "false".
  enable_transverse_velocities: false

Then, a simple script:

fmodel = FlorisModel("inputs/gch.yaml")
fmodel.set(layout_x=[0, 500.0], layout_y=[0.0, 0.0],wind_directions=np.array([270.0]), wind_speeds=[0])
fmodel.run()
turbine_powers = fmodel.get_turbine_powers() / 1000.0

Relevant output

turbine_powers returns nan for each of the two turbines, rather than expected 0.

The problem is coming from :
sigma_z0 = rotor_diameter_i * 0.5 * np.sqrt(uR / (u_initial + u0))

which returns nan when u_initial and u0 are 0.

Floris version

FLORIS v4.2.2 (actually discovered the issue in older version, but then separately installed 4.2.2 and saw it still exists).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by searching the FLORIS source for the sigma_z0 calculation shown in the issue, then reproduce the case using inputs/gch.yaml with the three steering and transverse-velocity options disabled and a 0 m/s inflow. Done means the two-turbine example returns zero power values rather than NaN.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.