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 fix: Add variable wind shear to GCH calculations #679

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions floris/simulation/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def sequential_solver(
ct_i,
TSR_i,
axial_induction_i,
flow_field.wind_shear,
)
effective_yaw_i += added_yaw

Expand Down Expand Up @@ -178,6 +179,7 @@ def sequential_solver(
ct_i,
TSR_i,
axial_induction_i,
flow_field.wind_shear,
)

if model_manager.enable_yaw_added_recovery:
Expand Down Expand Up @@ -377,6 +379,7 @@ def full_flow_sequential_solver(
ct_i,
TSR_i,
axial_induction_i,
flow_field.wind_shear,
)
effective_yaw_i += added_yaw

Expand Down Expand Up @@ -406,6 +409,7 @@ def full_flow_sequential_solver(
ct_i,
TSR_i,
axial_induction_i,
flow_field.wind_shear,
)

# NOTE: exponential
Expand Down Expand Up @@ -554,6 +558,7 @@ def cc_solver(
turb_Cts[:, :, i:i+1],
TSR_i,
axial_induction_i,
flow_field.wind_shear,
scale=2.0,
)
effective_yaw_i += added_yaw
Expand Down Expand Up @@ -584,6 +589,7 @@ def cc_solver(
turb_Cts[:, :, i:i+1],
TSR_i,
axial_induction_i,
flow_field.wind_shear,
scale=2.0,
)

Expand Down Expand Up @@ -784,6 +790,7 @@ def full_flow_cc_solver(
turb_Cts[:, :, i:i+1],
TSR_i,
axial_induction_i,
flow_field.wind_shear,
scale=2.0,
)
effective_yaw_i += added_yaw
Expand Down Expand Up @@ -814,6 +821,7 @@ def full_flow_cc_solver(
turb_Cts[:, :, i:i+1],
TSR_i,
axial_induction_i,
flow_field.wind_shear,
scale=2.0,
)

Expand Down Expand Up @@ -948,6 +956,7 @@ def turbopark_solver(
ct_i,
TSR_i,
axial_induction_i,
flow_field.wind_shear,
)
effective_yaw_i += added_yaw

Expand Down Expand Up @@ -1009,6 +1018,7 @@ def turbopark_solver(
ct_i,
TSR_i,
axial_induction_i,
flow_field.wind_shear,
)

if model_manager.enable_yaw_added_recovery:
Expand Down
11 changes: 6 additions & 5 deletions floris/simulation/wake_deflection/gauss.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def wake_added_yaw(
ct_i,
tip_speed_ratio,
axial_induction_i,
wind_shear,
scale=1.0,
):
"""
Expand Down Expand Up @@ -284,7 +285,7 @@ def wake_added_yaw(
eps_gain = 0.2
eps = eps_gain * D # Use set value

vel_top = ((HH + D / 2) / HH) ** 0.12 * np.ones((1, 1, 1, 1, 1))
vel_top = ((HH + D / 2) / HH) ** wind_shear * np.ones((1, 1, 1, 1, 1))
Gamma_top = gamma(
D,
vel_top,
Expand All @@ -293,7 +294,7 @@ def wake_added_yaw(
scale,
)

vel_bottom = ((HH - D / 2) / HH) ** 0.12 * np.ones((1, 1, 1, 1, 1))
vel_bottom = ((HH - D / 2) / HH) ** wind_shear * np.ones((1, 1, 1, 1, 1))
Gamma_bottom = -1 * gamma(
D,
vel_bottom,
Expand Down Expand Up @@ -359,6 +360,7 @@ def calculate_transverse_velocity(
ct_i,
tsr_i,
axial_induction_i,
wind_shear,
scale=1.0,
):
"""
Expand All @@ -379,8 +381,7 @@ def calculate_transverse_velocity(
eps_gain = 0.2
eps = eps_gain * D # Use set value

# TODO: wind sheer is hard-coded here but should be connected to the input
vel_top = ((HH + D / 2) / HH) ** 0.12 * np.ones((1, 1, 1, 1, 1))
vel_top = ((HH + D / 2) / HH) ** wind_shear * np.ones((1, 1, 1, 1, 1))
Gamma_top = sind(yaw) * cosd(yaw) * gamma(
D,
vel_top,
Expand All @@ -389,7 +390,7 @@ def calculate_transverse_velocity(
scale,
)

vel_bottom = ((HH - D / 2) / HH) ** 0.12 * np.ones((1, 1, 1, 1, 1))
vel_bottom = ((HH - D / 2) / HH) ** wind_shear * np.ones((1, 1, 1, 1, 1))
Gamma_bottom = -1 * sind(yaw) * cosd(yaw) * gamma(
D,
vel_bottom,
Expand Down