Wind Plant#
Wind Generation class based on PySAM’s Windpower module
Wind Plant Model#
- class hopp.simulation.technologies.wind.wind_plant.WindPlant(site, config)#
Bases:
PowerSource- Parameters:
site (SiteInfo)
config (WindConfig)
- config: WindConfig#
- config_name: str#
- _rating_range_kw: Tuple[int, int]#
- initalize_pysam_turbine_from_turbine_library(turbine_name)#
Initialize PySAM wind turbine from a turbine available in the turbine-models library.
- Parameters:
turbine_name (str) – name of turbine in turbine-models library.
- Raises:
ValueError – rotor diameter from turbine library specs does not match hub-height in WindConfig.
ValueError – hub-height from turbine library specs does not match hub-height in WindConfig.
- initialize_pysam_wind_turbine()#
Initialize wind turbine parameters for PySAM simulation.
- property wake_model: str#
- property num_turbines#
- property rotor_diameter#
- property turb_rating#
kw rating of turbine
- Type:
return
- modify_powercurve(rotor_diam, rating_kw)#
Recalculate the turbine power curve
- Parameters:
rotor_diam – meters
rating_kw – kw
- Returns:
- modify_coordinates(xcoords, ycoords)#
Change the location of the turbines
- Parameters:
xcoords (Sequence)
ycoords (Sequence)
- __init__(site, config)#
Method generated by attrs for class WindPlant.
- Parameters:
site (SiteInfo)
config (WindConfig)
- Return type:
None
- _get_model_dict()#
Convenience method that wraps the attrs.asdict method. Returns the object’s parameters as a dictionary.
- Returns:
dict – The provided or default, if no input provided, model settings as a dictionary.
- Return type:
dict
- property annual_energy_kwh: float#
Annual energy [kWh]
- as_dict()#
Creates a JSON and YAML friendly dictionary that can be save for future reloading. This dictionary will contain only Python types that can later be converted to their proper Turbine formats.
- Returns:
dict – All key, vaue pais required for class recreation.
- Return type:
dict
- assign(input_dict)#
Sets input variables in the PowerSource class or any of its subclasses (system or financial models)
- Parameters:
input_dict (dict)
- property benefit_cost_ratio: float#
Benefit cost ratio [-] = Benefits / Costs
Benefits include (using present values):
PPA, capacity payment, and curtailment revenues
Federal, state, utility, and other production-based incentive income
Salvage value
Costs: uses the present value of annual costs
- calc_capacity_credit_percent(interconnect_kw)#
Calculates the capacity credit (value) using the last simulated year’s max feasible generation profile.
- Parameters:
interconnect_kw (float) – Interconnection limit [kW]
- Returns:
capacity value [%]
- Return type:
float
- calc_gen_max_feasible_kwh(interconnect_kw)#
Calculates the maximum feasible generation profile that could have occurred (year 1)
- Parameters:
interconnect_kw (float) – Interconnection limit [kW]
- Returns:
maximum feasible generation [kWh]
- Return type:
list
- calc_nominal_capacity(interconnect_kw)#
Calculates the nominal AC net system capacity based on specific technology.
- Parameters:
interconnect_kw (float) – Interconnection limit [kW]
- Returns:
system’s nominal AC net capacity [kW]
- calculate_total_installed_cost(cost)#
- Parameters:
cost (float)
- Return type:
float
- property capacity_credit_percent: float#
Capacity credit (eligible portion of nameplate) [%]
- property capacity_factor: float#
System capacity factor [%]
- property capacity_payment: list#
Capacity payment revenue [$]
- property capacity_price: list#
Capacity payment price [$/MW]
- property construction_financing_cost: float#
- copy()#
- Returns:
new instance
- property cost_installed: float#
Net capital cost [$]
- property debt_payment: tuple#
Debt total payment [$]
- property degradation: tuple#
Annual energy degradation [%/year]
- property dispatch#
Dispatch object
- property dispatch_factors: tuple#
Time-series dispatch factors normalized by PPA price [-]
- property energy_purchases: tuple#
Energy purchases from grid [$]
- property energy_sales: tuple#
PPA revenue gross [$]
- property energy_value: tuple#
PPA revenue net [$]
- export()#
- Returns:
dictionary of variables for system and financial
- property federal_depreciation_total: tuple#
Total federal tax depreciation [$]
- property federal_taxes: tuple#
Federal tax benefit (liability) [$]
- classmethod from_dict(data)#
Maps a data dictionary to an attr-defined class.
TODO: Add an error to ensure that either none or all the parameters are passed in
- Parameters:
data (dict) – dict The data dictionary to be mapped.
- Returns:
- cls
The attr-defined class.
- property gen_max_feasible: list#
Maximum feasible generation profile that could have occurred (year 1)
- property generation_profile: list#
System power generated [kW]
- classmethod get_model_defaults()#
Produces a dictionary of the keyword arguments and their defaults.
- Returns:
Dict[str, Any] – Dictionary of keyword argument: default.
- Return type:
Dict[str, Any]
- static import_financial_model(financial_model, system_model, config_name)#
- initialize_financial_values()#
These values are provided as default values from PySAM but should be customized by user
Debt, Reserve Account and Construction Financing Costs are initialized to 0 Federal Bonus Depreciation also initialized to 0
- property insurance_expense: tuple#
Insurance expense [$]
- property internal_rate_of_return: float#
Internal rate of return (after-tax) [%]
- property levelized_cost_of_energy_nominal: float#
Levelized cost (nominal) [cents/kWh]
- property levelized_cost_of_energy_real: float#
Levelized cost (real) [cents/kWh]
- property logger#
- property net_present_value: float#
After-tax cumulative NPV [$]
- property om_capacity#
Capacity-based O&M amount [$/kWcap]
- property om_capacity_expense#
O&M capacity-based expense [$]
- property om_fixed#
Fixed O&M annual amount [$/year]
- property om_fixed_expense#
O&M fixed expense [$]
- property om_production#
Production-based O&M amount [$/Mwh]
- property om_total_expense#
Total operating expenses [$]
- property om_variable#
Production-based O&M amount [$/kWh] For battery: production-based System Costs amount [$/kWh-discharged]
- Type:
For non-battery technologies
- property om_variable_expense#
O&M production-based expense [$]
- plot(figure=None, axes=None, color='b', site_border_color='k', site_alpha=0.95, linewidth=4.0)#
- property ppa_price: tuple#
PPA price [$/kWh]
- set_overnight_capital_cost(overnight_capital_cost)#
Set overnight capital costs [$/kW].
- setup_performance_model()#
Sets up performance model to before simulating power production. Required by specific technologies
- simulate(interconnect_kw, project_life=25, lifetime_sim=False)#
Run the system and financial model
- Parameters:
project_life (int) –
int, Number of year in the analysis period (execepted project lifetime) [years]lifetime_sim –
bool, For simulation modules which support simulating each year of the project_life, whether or not to do so; otherwise the first year data is repeatedinterconnect_kw (float)
- simulate_financials(interconnect_kw, project_life)#
Runs the finanical model for individual sub-systems
- Parameters:
interconnect_kw (float) –
float, Hybrid interconnect limit [kW]project_life (int) –
int, Number of year in the analysis period (execepted project lifetime) [years]
- Returns:
- simulate_power(project_life, lifetime_sim=False)#
Runs the system models for individual sub-systems
- Parameters:
project_life –
int, Number of year in the analysis period (execepted project lifetime) [years]lifetime_sim –
bool, For simulation modules which support simulating each year of the project_life, whether or not to do so; otherwise the first year data is repeated
- Returns:
- property system_nameplate_mw: float#
System nameplate [MW]
- property tax_incentives: list#
The sum of Federal and State PTC and ITC tax incentives [$]
- property total_installed_cost: float#
Installed cost [$]
- property total_revenue: list#
Total revenue [$]
- value(var_name, var_value=None)#
Gets or Sets a variable value within either the system or financial PySAM models. Method looks in system model first. If unsuccessful, then it looks in the financial model.
Note
If system and financial models contain a variable with the same name, only the system model variable will be set.
value(var_name)Gets variable valuevalue(var_name, var_value)Sets variable value- Parameters:
var_name (str) – PySAM variable name
var_value – (optional) PySAM variable value
- Returns:
Variable value (when getter)
- system_capacity_by_rating(wind_size_kw)#
Sets the system capacity by adjusting the rating of the turbines within the provided boundaries.
- Parameters:
wind_size_kw (float) – desired system capacity in kW
- system_capacity_by_num_turbines(wind_size_kw)#
Sets the system capacity by adjusting the number of turbines
- Parameters:
wind_size_kw – desired system capacity in kW
- property system_capacity_kw#
System’s nameplate capacity [kW]
- modify_layout_params(wind_capacity_kW, layout_params, layout_mode=None)#
- Parameters:
wind_capacity_kW (float)
layout_params (dict | WindBoundaryGridParameters | WindBasicGridParameters | WindCustomParameters | WindGridParameters)
layout_mode (str | None)
Wind Plant Configuration#
- class hopp.simulation.technologies.wind.wind_plant.WindConfig(num_turbines, turbine_rating_kw=None, rotor_diameter=None, layout_params=None, hub_height=None, turbine_name=None, turbine_group='none', layout_mode='grid', model_name='pysam', model_input_file=None, rating_range_kw=(1000, 3000), floris_config=None, adjust_air_density_for_elevation=False, resource_parse_method='average', operational_losses=12.83, timestep=(0, 8760), fin_model=None, name='WindPlant', verbose=True, store_turbine_performance_results=False, store_floris_config_dict=True, override_wind_resource_height=False, recalculate_pysam_powercurve=False)#
Bases:
BaseClassConfiguration class for WindPlant.
- Parameters:
num_turbines (int) – number of turbines in the farm
turbine_rating_kw (float) – turbine rating in kW
rotor_diameter (float | int, Optional) – turbine rotor diameter in meters
hub_height (float, Optional) – turbine hub height in meters
turbine_name (str, Optional) – unused currently. Defaults to None.
layout_mode (str) –
- ‘boundarygrid’: regular grid with boundary turbines, requires
WindBoundaryGridParameters as ‘layout_params’
’grid’: regular grid with dx, dy distance, 0 angle; does not require ‘layout_params’
- ’basicgrid’: most-square grid layout, requires WindBasicGridParameters
as ‘layout_params’
’custom’: use a user-provided layout
’floris_layout’: use layout provided in floris_config.
model_name (str) – which model to use. Options are ‘floris’ and ‘pysam’
model_input_file (str) – file specifying a full PySAM input
layout_params (obj | dict, Optional) – layout configuration object corresponding to layout_mode or dictionary.
rating_range_kw (Tuple[int]) – allowable kw range of turbines, default is 1000 - 3000 kW
floris_config (dict | str | Path) – Floris configuration, only used if model_name == ‘floris’
adjust_air_density_for_elevation (bool) – whether to adjust air density for elevation. Defaults to False. Only used if True and
site.elevis not None.resource_parse_method (str) – method to parse wind resource data if using floris and downloaded resource data for 2 heights. Can either be “weighted_average” or “average”. Defaults to “average”.
operational_losses (float, Optional) – total percentage losses in addition to wake losses, defaults based on PySAM (only used for Floris model)
timestep (Tuple[int]) – Timestep (required for floris runs, otherwise optional). Defaults to (0,8760)
fin_model (obj | dict | str) –
Optional financial model. Can be any of the following:
a string representing an argument to Singleowner.default
a dict representing a CustomFinancialModel
an object representing a CustomFinancialModel or Singleowner.Singleowner instance
verbose (bool) – if True, print simulation progress statements. Defaults to True.
store_turbine_performance_results (bool) – If running FLORIS, whether to save speed and power timeseries for each turbine in the farm. Defaults to False.
store_floris_config_dict (bool) – If running FLORIS, whether to store the input dictionary as an attribute. Defaults to True.
override_wind_resource_height (bool) – Whether to ignore a possible discrepancy in wind resource height and the turbine hub-height. Defaults to False.
recalculate_pysam_powercurve (bool) – If True, recalculates the turbine power-curve for the rotor diameter and turbine rating. If False, only scales turbine power-curve for turbine rated power. Defaults to False. Only used if
model_name = 'pysam'turbine_group (str)
name (str)
- num_turbines: int#
- turbine_rating_kw: float | None#
- rotor_diameter: float | None#
- layout_params: dict | WindBoundaryGridParameters | WindBasicGridParameters | WindCustomParameters | WindGridParameters | None#
- hub_height: float | None#
- turbine_name: str | None#
- turbine_group: str#
- layout_mode: str#
- model_name: str#
- model_input_file: str | dict | None#
- rating_range_kw: Tuple[int, int]#
- floris_config: dict | str | Path | None#
- adjust_air_density_for_elevation: bool | None#
- resource_parse_method: str#
- operational_losses: float#
- timestep: Tuple[int, int] | None#
- fin_model: dict | Singleowner | CustomFinancialModel | None#
- name: str#
- verbose: bool#
- store_turbine_performance_results: bool#
- store_floris_config_dict: bool#
- override_wind_resource_height: bool#
- recalculate_pysam_powercurve: bool#
- __init__(num_turbines, turbine_rating_kw=None, rotor_diameter=None, layout_params=None, hub_height=None, turbine_name=None, turbine_group='none', layout_mode='grid', model_name='pysam', model_input_file=None, rating_range_kw=(1000, 3000), floris_config=None, adjust_air_density_for_elevation=False, resource_parse_method='average', operational_losses=12.83, timestep=(0, 8760), fin_model=None, name='WindPlant', verbose=True, store_turbine_performance_results=False, store_floris_config_dict=True, override_wind_resource_height=False, recalculate_pysam_powercurve=False)#
Method generated by attrs for class WindConfig.
- Parameters:
num_turbines (int)
turbine_rating_kw (float | None)
rotor_diameter (float | None)
layout_params (dict | WindBoundaryGridParameters | WindBasicGridParameters | WindCustomParameters | WindGridParameters | None)
hub_height (float | None)
turbine_name (str | None)
model_input_file (str | dict | None)
rating_range_kw (Tuple[int, int])
floris_config (dict | str | Path | None)
adjust_air_density_for_elevation (bool | None)
operational_losses (float)
timestep (Tuple[int, int] | None)
fin_model (dict | Singleowner | CustomFinancialModel | None)
name (str)
verbose (bool)
store_turbine_performance_results (bool)
store_floris_config_dict (bool)
override_wind_resource_height (bool)
recalculate_pysam_powercurve (bool)
- Return type:
None
- _get_model_dict()#
Convenience method that wraps the attrs.asdict method. Returns the object’s parameters as a dictionary.
- Returns:
dict – The provided or default, if no input provided, model settings as a dictionary.
- Return type:
dict
- as_dict()#
Creates a JSON and YAML friendly dictionary that can be save for future reloading. This dictionary will contain only Python types that can later be converted to their proper Turbine formats.
- Returns:
dict – All key, vaue pais required for class recreation.
- Return type:
dict
- classmethod from_dict(data)#
Maps a data dictionary to an attr-defined class.
TODO: Add an error to ensure that either none or all the parameters are passed in
- Parameters:
data (dict) – dict The data dictionary to be mapped.
- Returns:
- cls
The attr-defined class.
- classmethod get_model_defaults()#
Produces a dictionary of the keyword arguments and their defaults.
- Returns:
Dict[str, Any] – Dictionary of keyword argument: default.
- Return type:
Dict[str, Any]
- property logger#