Skip to content

Commit

Permalink
Updating input reference guide for multi-dimensional Cp/Ct data
Browse files Browse the repository at this point in the history
  • Loading branch information
bayc committed Oct 26, 2023
1 parent 10120d9 commit 6057a7e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
9 changes: 9 additions & 0 deletions examples/inputs/gch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ flow_field:
# The wind veer as a constant value for all points in the grid.
wind_veer: 0.0

###
# The conditions that are specified for use with the multi-dimensional Cp/Ct capbility.
# These conditions are external to FLORIS and specified by the user. They are used internally
# through a nearest-neighbor selection process to choose the correct Cp/Ct interpolants
# to use. These conditions are only used with the ``multidim_cp_ct`` velocity deficit model.
multidim_conditions:
Tp: 2.5
Hs: 3.01

###
# Configure the wake model.
wake:
Expand Down
9 changes: 6 additions & 3 deletions floris/simulation/farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ def construct_turbine_correct_cp_ct_for_tilt(self):
)

def construct_turbine_map(self):
if 'multi_dimensional_cp_ct' in self.turbine_definitions[0].keys():
if 'multi_dimensional_cp_ct' in self.turbine_definitions[0].keys() \
and self.turbine_definitions[0]['multi_dimensional_cp_ct'] is True:
self.turbine_map = [
TurbineMultiDimensional.from_dict(turb) for turb in self.turbine_definitions
]
Expand Down Expand Up @@ -291,7 +292,8 @@ def expand_farm_properties(
sorted_coord_indices,
axis=2
)
if 'multi_dimensional_cp_ct' in self.turbine_definitions[0].keys():
if 'multi_dimensional_cp_ct' in self.turbine_definitions[0].keys() \
and self.turbine_definitions[0]['multi_dimensional_cp_ct'] is True:
wd_dim = np.shape(template_shape)[0]
ws_dim = np.shape(template_shape)[1]
if wd_dim != 1 | ws_dim != 0:
Expand Down Expand Up @@ -398,7 +400,8 @@ def calculate_tilt_for_eff_velocities(self, rotor_effective_velocities):
return tilt_angles

def finalize(self, unsorted_indices):
if 'multi_dimensional_cp_ct' in self.turbine_definitions[0].keys():
if 'multi_dimensional_cp_ct' in self.turbine_definitions[0].keys() \
and self.turbine_definitions[0]['multi_dimensional_cp_ct'] is True:
self.turbine_fCts = np.take_along_axis(
self.turbine_fCts_sorted,
unsorted_indices[:,:,:,0,0],
Expand Down
2 changes: 2 additions & 0 deletions floris/simulation/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ class Turbine(BaseClass):
power_thrust_table: PowerThrustTable = field(default=None)
floating_tilt_table: TiltTable = field(default=None)
floating_correct_cp_ct_for_tilt: bool = field(default=None)
power_thrust_data_file: str = field(default=None)
multi_dimensional_cp_ct: bool = field(default=False)

# rloc: float = float_attrib() # TODO: goes here or on the Grid?
# use_points_on_perimeter: bool = bool_attrib()
Expand Down
13 changes: 13 additions & 0 deletions floris/turbine_library/nrel_5MW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,16 @@ power_thrust_table:
- 25.01
- 25.02
- 50.0

###
# A boolean flag used when the user wants FLORIS to use the user-supplied multi-dimensional
# Cp/Ct information.
multi_dimensional_cp_ct: False

###
# The path to the .csv file that contains the multi-dimensional Cp/Ct data. The format of this
# file is such that any external conditions, such as wave height or wave period, that the
# Cp/Ct data is dependent on come first, in column format. The last three columns of the .csv
# file must be ``ws``, ``Cp``, and ``Ct``, in that order. An example of fictional data is given
# in ``floris/turbine_library/iea_15MW_multi_dim_Tp_Hs.csv``.
power_thrust_data_file: '../floris/turbine_library/iea_15MW_multi_dim_Tp_Hs.csv'

0 comments on commit 6057a7e

Please sign in to comment.