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

Enable solve_for_points() with CC model #1058

Merged
merged 6 commits into from
Feb 5, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@


# User options
# FLORIS model to use (limited to Gauss/GCH, Jensen, and empirical Gauss)
floris_model = "gch" # Try "gch", "jensen", "emgauss"
# FLORIS model to use (legacy Turbopark not available)
floris_model = "gch" # Try "gch", "cc", "jensen", "emgauss", "turboparkgauss"
# Option to try different met mast locations
met_mast_option = 0 # Try 0, 1, 2, 3

Expand Down
8 changes: 5 additions & 3 deletions floris/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,15 @@ def solve_for_points(self, x, y, z):

vel_model = self.wake.model_strings["velocity_model"]

if vel_model == "cc" or vel_model == "turbopark":
if vel_model == "turbopark":
raise NotImplementedError(
"solve_for_points is currently only available with the "+\
"gauss, jensen, and empirical_gauss models."
"solve_for_points is not available for the legacy \'turbopark\' model. "
"However, it is available for \'turboparkgauss\'."
)
elif vel_model == "empirical_gauss":
full_flow_empirical_gauss_solver(self.farm, self.flow_field, field_grid, self.wake)
elif vel_model == "cc":
full_flow_cc_solver(self.farm, self.flow_field, field_grid, self.wake)
else:
full_flow_sequential_solver(self.farm, self.flow_field, field_grid, self.wake)

Expand Down
16 changes: 8 additions & 8 deletions floris/core/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def cc_solver(
flow_field.turbulence_intensity_field_sorted_avg = np.mean(
turbine_turbulence_intensity,
axis=(2,3)
)
)[:, :, None, None]


def full_flow_cc_solver(
Expand Down Expand Up @@ -774,7 +774,7 @@ def full_flow_cc_solver(
yaw_angles=turbine_grid_farm.yaw_angles_sorted,
tilt_angles=turbine_grid_farm.tilt_angles_sorted,
power_setpoints=turbine_grid_farm.power_setpoints_sorted,
awc_modes=turbine_grid_farm.awc_modes,
awc_modes=turbine_grid_farm.awc_modes_sorted,
awc_amplitudes=turbine_grid_farm.awc_amplitudes_sorted,
thrust_coefficient_functions=turbine_grid_farm.turbine_thrust_coefficient_functions,
tilt_interps=turbine_grid_farm.turbine_tilt_interps,
Expand All @@ -794,7 +794,7 @@ def full_flow_cc_solver(
yaw_angles=turbine_grid_farm.yaw_angles_sorted,
tilt_angles=turbine_grid_farm.tilt_angles_sorted,
power_setpoints=turbine_grid_farm.power_setpoints_sorted,
awc_modes=turbine_grid_farm.awc_modes,
awc_modes=turbine_grid_farm.awc_modes_sorted,
awc_amplitudes=turbine_grid_farm.awc_amplitudes_sorted,
axial_induction_functions=turbine_grid_farm.turbine_axial_induction_functions,
tilt_interps=turbine_grid_farm.turbine_tilt_interps,
Expand Down Expand Up @@ -937,7 +937,7 @@ def turbopark_solver(
yaw_angles=farm.yaw_angles_sorted,
tilt_angles=farm.tilt_angles_sorted,
power_setpoints=farm.power_setpoints_sorted,
awc_modes=farm.awc_modes,
awc_modes=farm.awc_modes_sorted,
awc_amplitudes=farm.awc_amplitudes_sorted,
thrust_coefficient_functions=farm.turbine_thrust_coefficient_functions,
tilt_interps=farm.turbine_tilt_interps,
Expand All @@ -956,7 +956,7 @@ def turbopark_solver(
yaw_angles=farm.yaw_angles_sorted,
tilt_angles=farm.tilt_angles_sorted,
power_setpoints=farm.power_setpoints_sorted,
awc_modes=farm.awc_modes,
awc_modes=farm.awc_modes_sorted,
awc_amplitudes=farm.awc_amplitudes_sorted,
thrust_coefficient_functions=farm.turbine_thrust_coefficient_functions,
tilt_interps=farm.turbine_tilt_interps,
Expand All @@ -978,7 +978,7 @@ def turbopark_solver(
yaw_angles=farm.yaw_angles_sorted,
tilt_angles=farm.tilt_angles_sorted,
power_setpoints=farm.power_setpoints_sorted,
awc_modes=farm.awc_modes,
awc_modes=farm.awc_modes_sorted,
awc_amplitudes=farm.awc_amplitudes_sorted,
axial_induction_functions=farm.turbine_axial_induction_functions,
tilt_interps=farm.turbine_tilt_interps,
Expand Down Expand Up @@ -1027,7 +1027,7 @@ def turbopark_solver(
yaw_angles=farm.yaw_angles_sorted,
tilt_angles=farm.tilt_angles_sorted,
power_setpoints=farm.power_setpoints_sorted,
awc_modes=farm.awc_modes,
awc_modes=farm.awc_modes_sorted,
awc_amplitudes=farm.awc_amplitudes_sorted,
thrust_coefficient_functions=farm.turbine_thrust_coefficient_functions,
tilt_interps=farm.turbine_tilt_interps,
Expand Down Expand Up @@ -1122,7 +1122,7 @@ def turbopark_solver(
flow_field.turbulence_intensity_field_sorted_avg = np.mean(
turbine_turbulence_intensity,
axis=(2, 3)
)
)[:, :, None, None]


def full_flow_turbopark_solver(
Expand Down