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: default of turbine_grid_points=3 not close to convergence #499

Open
Bartdoekemeijer opened this issue Sep 15, 2022 · 3 comments
Assignees
Labels
backlog Tasks that need to be done but aren't scheduled. Higher priority than ideas-list. bug Something isn't working documentation floris.simulation

Comments

@Bartdoekemeijer
Copy link
Collaborator

Bug description
Setting turbine_grid_points = 3 gives fairly coarse results in densely spaced farms and is not necessarily close to convergence. The error can be in the order of 5%. The variable turbine_grid_points must be set to 10 or higher to get close to convergence. Is this the expected behavior?

To Reproduce
Here is a minimal example to reproduce the problem:

import matplotlib.pyplot as plt
import numpy as np
import yaml

from floris.tools import FlorisInterface


# Instantiate FLORIS with the GCH model
with open('inputs/gch.yaml', 'r') as file:
    input_dict = yaml.safe_load(file)
    solver_dict = input_dict["solver"]

# Set up a 4-turbine wind farm with some partial overlap
D = 126.
spacing = 3.5
layout_x = np.array([0, D*1*spacing, D*2*spacing, D*3*spacing])
layout_y = [0, 0, 0.5 * D, -0.5 * D]

grid_points_array = range(2, 40)
farm_power_array = np.zeros(len(grid_points_array))
for ii, no_rotor_points in enumerate(grid_points_array):
    print("Evaluating FLORIS with {} grid points.".format(no_rotor_points))
    
    # Update number of rotor points
    solver_dict["turbine_grid_points"] = no_rotor_points

    fi = FlorisInterface(input_dict)
    fi.reinitialize(layout = [layout_x, layout_y], wind_speeds=[8.0])

    # Calculate wind farm power
    fi.calculate_wake()
    farm_power_array[ii] = fi.get_farm_power()[0][0]

# Plot
fig, ax = plt.subplots()
ax.plot(grid_points_array, farm_power_array, '-o')
ax.plot([0, grid_points_array[-1]], 2 * [farm_power_array[-1]], '--')
ax.plot([0, grid_points_array[1]], 2 * [farm_power_array[1]], '--')
ax.grid(True)
ax.set_xlabel('Number of rotor points (-)')
ax.set_ylabel('Farm power (W)')
plt.show()

With a spacing of 3.5 D:
image
Where the error between the farm power with turbine_grid_points=3 is about 6% off the converged value.

And convergence with a spacing of 5.0 D:
image
Where the error is about 4% off the converged value.

Expected behavior
The default setting of turbine_grid_points = 3 would be closer to convergence (less than 1% error).

Floris Version
FLORIS 3.1.1 from the GitHub repository main branch (c2006b).

System Information (please complete the following information):

  • OS: Ubuntu 20.04.5 LTS.
  • Library versions
    • matplotlib=3.5.3
    • numpy=1.23.3
    • scipy=1.9.1
@mr483
Copy link

mr483 commented Sep 26, 2022

On a related note, I recently found when doing some analysis of external wakes in FLORIS that I had a difference of around 6% in velocity deficit at the downstream turbine when comparing the values calculated using a turbine grid resolution of 10 with the velocity profile calculated via full_flow_sequential_solver(). I then realized this is due to the coarse resolution (3) in this solver. I understand this may be necessary for very large parks to keep the calculation times reasonable for the flow fields, but it may be useful to expose this setting to the user in the interface functions (e.g,. calculate_horizontal_plane()) just to be clear that a different resolution is used than the one set in the config file.

@rafmudaf rafmudaf added bug Something isn't working v3.3 labels Jan 26, 2023
@rafmudaf rafmudaf self-assigned this Jan 26, 2023
@rafmudaf rafmudaf added this to the v3.4 milestone May 3, 2023
@rafmudaf
Copy link
Collaborator

This is address in #649. A cubature integration method has been introduced improving the grid-convergence substantially. That pull request introduces the infrastructure for this, but it does little verification and validation. Future work will evaluate the improvement with the ultimate goal of making the cubature integration method the default over the current square grid and mid-point integration method.

@rafmudaf rafmudaf modified the milestones: v3.4, v3.5 May 12, 2023
@rafmudaf
Copy link
Collaborator

#649 is included in v3.4, but I've changed this issue to the v3.5 milestone to capture that this will be finalized in that release.

@rafmudaf rafmudaf modified the milestones: v3.5, v4.0 Aug 2, 2023
@rafmudaf rafmudaf added the backlog Tasks that need to be done but aren't scheduled. Higher priority than ideas-list. label Nov 29, 2023
@rafmudaf rafmudaf removed this from the v4.0 milestone Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Tasks that need to be done but aren't scheduled. Higher priority than ideas-list. bug Something isn't working documentation floris.simulation
Projects
None yet
Development

No branches or pull requests

3 participants