h2integrate.converters.wind.wind_pysam

Contents

h2integrate.converters.wind.wind_pysam#

Classes

PYSAMWindPlantPerformanceModel(**kwargs)

An OpenMDAO component that wraps a WindPlant model.

PYSAMWindPlantPerformanceModelConfig(*, ...)

Configuration class for PYSAMWindPlantPerformanceModel.

PySAMPowerCurveCalculationInputs(*[, ...])

Inputs for the calculate_powercurve() function in the PySAM Windpower module.

class h2integrate.converters.wind.wind_pysam.PySAMPowerCurveCalculationInputs(*, elevation=0, wind_default_max_cp=0.45, wind_default_max_tip_speed=60, wind_default_max_tip_speed_ratio=8, wind_default_cut_in_speed=4, wind_default_cut_out_speed=25, wind_default_drive_train=0)#

Inputs for the calculate_powercurve() function in the PySAM Windpower module. The PySAM documentation of the inputs for this function can be found here

Parameters:
  • elevation (int | float)

  • wind_default_max_cp (int | float)

  • wind_default_max_tip_speed (int | float)

  • wind_default_max_tip_speed_ratio (int | float)

  • wind_default_cut_in_speed (int | float)

  • wind_default_cut_out_speed (int | float)

  • wind_default_drive_train (int)

elevation#

elevation in meters. Required if using Weibull resource model, otherwise should be zero. Defaults to 0.

Type:

float

wind_default_max_cp#

max power coefficient. Defaults to 0.45.

Type:

float

wind_default_max_tip_speed#

max tip speed in m/s. Defaults to 60.

Type:

float

wind_default_max_tip_speed_ratio#

max tip-speed ratio. Defaults to 8.

Type:

float

wind_default_cut_in_speed#

cut-in wind speed in m/s. Defaults to 4.

Type:

float

wind_default_cut_out_speed#

cut-out wind speed in m/s. Defaults to 25.

Type:

float

wind_default_drive_train#

integer representing wind turbine drive train type. Defaults to 0. The mapping of drive train number to drive train type is: - 0: 3 Stage Planetary - 1: Single Stage - Low Speed Generator - 2: Multi-Generator - 3: Direct Drive

Type:

int

elevation: int | float#
wind_default_max_cp: int | float#
wind_default_max_tip_speed: int | float#
wind_default_max_tip_speed_ratio: int | float#
wind_default_cut_in_speed: int | float#
wind_default_cut_out_speed: int | float#
wind_default_drive_train: int#
class h2integrate.converters.wind.wind_pysam.PYSAMWindPlantPerformanceModelConfig(*, num_turbines, hub_height, rotor_diameter, turbine_rating_kw, create_model_from='new', config_name='WindPowerSingleOwner', pysam_options={}, run_recalculate_power_curve=True, layout={}, powercurve_calc_config={})#

Configuration class for PYSAMWindPlantPerformanceModel.

Parameters:
  • num_turbines (int)

  • hub_height (float)

  • rotor_diameter (float)

  • turbine_rating_kw (float)

  • create_model_from (str)

  • config_name (str)

  • pysam_options (dict)

  • run_recalculate_power_curve (bool)

  • layout (dict)

  • powercurve_calc_config (dict)

num_turbines#

number of turbines in farm

Type:

int

hub_height#

wind turbine hub-height in meters

Type:

float

rotor_diameter#

wind turbine rotor diameter in meters.

Type:

float

turbine_rating_kw#

wind turbines rated power in kW

Type:

float

create_model_from#
  • 'default': instantiate Windpower model from the default config 'config_name'

  • 'new': instantiate new Windpower model (default). Requires pysam_options.

Type:

str

config_name#

PySAM.Windpower configuration name for non-hybrid wind systems. Defaults to 'WindPowerSingleOwner'. Only used if create_model_from='default'.

Type:

str,optional

pysam_options#

dictionary of Windpower input parameters with top-level keys corresponding to the different Windpower variable groups. (please refer to Windpower documentation here )

Type:

dict, optional

run_recalculate_power_curve#

whether to recalculate the wind turbine power curve. defaults to True.

Type:

bool, optional

num_turbines: int#
hub_height: float#
rotor_diameter: float#
turbine_rating_kw: float#
create_model_from: str#
config_name: str#
pysam_options: dict#
run_recalculate_power_curve: bool#
layout: dict#
powercurve_calc_config: dict#
check_pysam_options()#

Checks that top-level keys of pysam_options dictionary are valid and that system capacity is not given in pysam_options.

Raises:
  • ValueError -- if top-level keys of pysam_options are not valid.

  • ValueError -- if wind_turbine_hub_ht is provided in pysam_options["Turbine"]

create_input_dict()#
Create dictionary of inputs to over-write the default values

associated with the specified Windpower configuration.

Returns:

dict -- dictionary of Turbine group parameters from user-input.

class h2integrate.converters.wind.wind_pysam.PYSAMWindPlantPerformanceModel(**kwargs)#

An OpenMDAO component that wraps a WindPlant model. It takes wind parameters as input and outputs power generation data.

setup()#

Declare inputs and outputs.

Available attributes:

name pathname comm options

format_resource_data(hub_height, wind_resource_data)#

Format wind resource data into the format required for the PySAM Windpower module. The data is formatted as:

  • fields (list[int]): integers corresponding to data type,

    ex: [1, 2, 3, 4, 1, 2, 3, 4]. Ror each field (int) the corresponding data is: - 1: Ambient temperature in degrees Celsius - 2: Atmospheric pressure in in atmospheres. - 3: Wind speed in meters per second (m/s) - 4: Wind direction in degrees east of north (degrees).

  • heights (list[int | float]): floats corresponding to the resource height.

    ex: [100, 100, 100, 100, 120, 120, 120, 120]

  • data (list[list]): list of length equal to n_timesteps with data of

    corresponding field and resource height. ex. if data[t] is [-23.5, 0.65, 7.6, 261.2, -23.7, 0.65, 7.58, 261.1] then: - 23.5 is temperature at 100m at timestep - 7.6 is wind speed at 100m at timestep - 7.58 is wind speed at 120m at timestep

Parameters:
  • hub_height (int | float) -- turbine hub-height in meters.

  • wind_resource_data (dict) -- wind resource data dictionary.

Returns:

dict -- PySAM formatted wind resource data.

recalculate_power_curve(rotor_diameter, turbine_rating_kw)#

Update the turbine power curve for a given rotor diameter and rated turbine capacity.

Parameters:
  • rotor_diameter (int) -- turbine rotor diameter in meters.

  • turbine_rating_kw (float | int) -- desired turbine rated capacity in kW

Returns:

bool -- True if the new power curve has a maximum value equal to turbine_rating_kw

compute(inputs, outputs, discrete_inputs, discrete_outputs)#

Computation for the OM component.

For a template class this is not implement and raises an error.

post_process(show_plots=False)#