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

Add wake deflection to the TurbOPark wake deficit model #439

Merged
merged 6 commits into from
Jul 27, 2022

Conversation

bayc
Copy link
Collaborator

@bayc bayc commented Jun 3, 2022

Feature or improvement description
This PR includes wake deflection in the TurbOPark wake deficit model. Co-created with @rafmudaf.

Related issue, if one exists
None.

Impacted areas of the software
The TurbOPark wake deficit model and the TurbOPark solver.

Additional supporting information
This introduces another for loop to the TurbOPark solver when yaw angles are non-zero. Hopefully this can be optimized further, but the calculation requires the wake centerline position of upstream turbines, where in the current solver schemes, the wake deflection is calculated for all downstream turbines and the effect of that deflection is stored in the wake velocity fields. Here, I assume the wake centerline to be the amount of deflection calculated by the deflection model.

Test results, if applicable
Need to update the regression tests to include yawed results.

Below are the results of a 2 turbine pair, yawing the first turbine 25 degrees and sweeping the second turbine laterally (y-direction), recording its change in power. Beneath that is the result for a 3 turbine array, yawed first turbine, and sweeping the third turbine. The code to reproduce these results is at the bottom.

image

image

import matplotlib.pyplot as plt
import numpy as np

from floris.tools import FlorisInterface

# Initialize FLORIS with the given input file via FlorisInterface.
# For basic usage, FlorisInterface provides a simplified and expressive
# entry point to the simulation routines.
fi_gch = FlorisInterface("inputs/gch.yaml")
fi_turbo = FlorisInterface("inputs/turbopark.yaml")

fi_gch.reinitialize(wind_directions=[270.], wind_speeds=[8.0])
fi_gch.reinitialize(wind_directions=[270.], wind_speeds=[8.0])

# Convert to a simple two turbine layout
y_range = np.arange(-300,300,20.)

x_spacing = 5*126.
nturbs = 2

# Get the base profiles
gch_base = []
turbo_base = []
for y in y_range:
    x_layout = np.array([i*x_spacing for i in range(nturbs)])
    y_layout = np.append(np.array([0.0] * (nturbs - 1)), y)
    fi_gch.reinitialize( layout=( x_layout, y_layout ) )
    fi_turbo.reinitialize( layout=( x_layout, y_layout ) )

    fi_gch.calculate_wake()
    fi_turbo.calculate_wake()

    gch_base.append(fi_gch.get_turbine_powers()[0,0,-1]/1000.)
    turbo_base.append(fi_turbo.get_turbine_powers()[0,0,-1]/1000.)

# Get the yaw profiles
gch_yaw = []
turbo_yaw = []
for y in y_range:
    x_layout = np.array([i*x_spacing for i in range(nturbs)])
    y_layout = np.append(np.array([0.0] * (nturbs - 1)), y)
    fi_gch.reinitialize( layout=( x_layout, y_layout ) )
    fi_turbo.reinitialize( layout=( x_layout, y_layout ) )

    yaw_angles =np.zeros([1,1,nturbs])
    yaw_angles[0,0,0] = 25.

    fi_gch.calculate_wake(yaw_angles = yaw_angles)
    fi_turbo.calculate_wake(yaw_angles = yaw_angles)

    gch_yaw.append(fi_gch.get_turbine_powers()[0,0,-1]/1000.)
    turbo_yaw.append(fi_turbo.get_turbine_powers()[0,0,-1]/1000.)


fig, ax = plt.subplots(1,1)


ax.plot(y_range, gch_base, 'b-',label='gch base')
ax.plot(y_range, turbo_base,'m-', label='turbo base')
ax.grid(True)
ax.legend()


ax.plot(y_range, gch_yaw, 'b--',label='gch yaw')
ax.plot(y_range, turbo_yaw, 'm--',label='turbo yaw')
ax.grid(True)
ax.legend()

plt.show()

@bayc bayc added the enhancement An improvement of an existing feature label Jun 3, 2022
@bayc bayc requested review from paulf81 and rafmudaf June 3, 2022 21:57
@bayc bayc self-assigned this Jun 3, 2022
rotor_diameter_i,
**deflection_model_args
)
if (farm.yaw_angles_sorted == 0).all():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be simplified to

if not np.all(farm.yaw_angles_sorted):
    for ii in range(i):
        etc
        etc

@rafmudaf
Copy link
Collaborator

rafmudaf commented Jun 6, 2022

@bayc I added the yaw reg test case

@bayc bayc merged commit 1d73401 into NREL:develop Jul 27, 2022
@bayc bayc deleted the feature/turbo_park_deflection branch July 27, 2022 22:24
@rafmudaf rafmudaf mentioned this pull request Sep 12, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants