h2integrate.converters.solar.solar_pysam#
Classes
|
An OpenMDAO component that wraps a SolarPlant model. |
Configuration class for design parameters of the solar pv plant. |
- class h2integrate.converters.solar.solar_pysam.PYSAMSolarPlantPerformanceModelDesignConfig(*, pv_capacity_kWdc, dc_ac_ratio=None, create_model_from='new', tilt=None, tilt_angle_func='none', config_name='PVWattsSingleOwner', pysam_options={})#
- Configuration class for design parameters of the solar pv plant.
PYSAMSolarPlantPerformanceModel which uses the Pvwattsv8 module available in PySAM. PySAM documentation can be found here
- Parameters:
pv_capacity_kWdc (float)
dc_ac_ratio (float)
create_model_from (str)
tilt (float)
tilt_angle_func (str)
config_name (str)
pysam_options (dict)
- pv_capacity_kWdc#
Required, DC system capacity in kW-dc.
- Type:
float
- dc_ac_ratio#
Also known as inverter loading ratio, ratio of max DC output of PV to max AC output of inverter. If None, then uses the default value associated with config_name.
- Type:
float | None
- create_model_from#
'default': instantiate Pvwattsv8 model from the default config 'config_name'
'new': instantiate new Pvwattsv8 model (default). Requires pysam_options.
- Type:
str
- config_name#
PySAM.Pvwattsv8 configuration name for non-hybrid PV systems. Defaults to 'PVWattsSingleOwner'. Only used if create_model_from='default'.
- Type:
str,optional
- tilt#
Panel tilt angle in the range (0.0, 90.0). If None, then uses the default value associated with config_name if create_model_from is 'default' unless tilt_angle_func is either set to 'lat' or 'lat-func'.
- Type:
float | None
- tilt_angle_func#
'none': use value specific in 'tilt' (default).
'lat-func': optimal tilt angle based on the latitude.
'lat': tilt angle equal to the latitude of the solar resource.
- Type:
str
- pysam_options#
dictionary of Pvwatts input parameters with top-level keys corresponding to the different Pvwattsv8 variable groups. (please refer to Pvwattsv8 documentation here )
- Type:
dict, optional
- pv_capacity_kWdc: float#
- dc_ac_ratio: float#
- create_model_from: str#
- tilt: float#
- tilt_angle_func: str#
- config_name: str#
- pysam_options: 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 system_capacity is provided in pysam_options["SystemDesign"]
- create_input_dict()#
- Create dictionary of inputs to over-write the default values
associated with the specified PVWatts configuration.
- Returns:
dict -- dictionary of SystemDesign and SolarResource parameters from user-input.
- class h2integrate.converters.solar.solar_pysam.PYSAMSolarPlantPerformanceModel(**kwargs)#
An OpenMDAO component that wraps a SolarPlant model. It takes solar parameters as input and outputs power generation data.
- setup()#
Declare inputs and outputs.
- Available attributes:
name pathname comm options
- calc_tilt_angle(latitude)#
Calculates the tilt angle of the PV panel based on the tilt option described by design_config.tilt_angle_func.
- Returns:
float -- tilt angle of the PV panel in degrees.
- format_resource_data(solar_resource_data)#
Format solar resource data into the format required for the PySAM PvWattsv8 module. This method includes:
1. Renaming solar resource data keys to the keynames expected by the PvWattsv8 modules 2. Remove any solar resource data that PvWattsv8 does not use.
- Parameters:
solar_resource_data (dict) -- solar resource data dictionary
- Returns:
dict -- PySAM formatted solar resource data
- compute(inputs, outputs, discrete_inputs, discrete_outputs)#
Computation for the OM component.
For a template class this is not implement and raises an error.