Grid¶
Wrapper for SAM Simulation Core model: cmod_grid.cpp
Input Consistency Warning¶
As described in Possible Problems, some input parameters are interdepedent but the equations accounting for these interdependencies that enforce consistency among these input parameters are not available in the PySAM module. Therefore, the onus is on the PySAM user to check that interdependencies are correctly handled. The variables which may require additional logic include:
Provided for each of these inputs is a list of other inputs that are potentially interdependent.
Creating an Instance¶
Refer to the Initializing a Model page for details on the different ways to create an instance of a PySAM class.
Grid model description
Electric grid model
-
PySAM.Grid.
default
(config) → Grid¶ Use default attributes config options:
- “BiopowerAllEquityPartnershipFlip”
- “BiopowerLCOECalculator”
- “BiopowerLeveragedPartnershipFlip”
- “BiopowerMerchantPlant”
- “BiopowerNone”
- “BiopowerSaleLeaseback”
- “BiopowerSingleOwner”
- “DSLFAllEquityPartnershipFlip”
- “DSLFCommercial”
- “DSLFLCOECalculator”
- “DSLFLeveragedPartnershipFlip”
- “DSLFMerchantPlant”
- “DSLFNone”
- “DSLFSaleLeaseback”
- “DSLFSingleOwner”
- “FlatPlatePVAllEquityPartnershipFlip”
- “FlatPlatePVCommercial”
- “FlatPlatePVHostDeveloper”
- “FlatPlatePVLCOECalculator”
- “FlatPlatePVLeveragedPartnershipFlip”
- “FlatPlatePVMerchantPlant”
- “FlatPlatePVNone”
- “FlatPlatePVResidential”
- “FlatPlatePVSaleLeaseback”
- “FlatPlatePVSingleOwner”
- “FlatPlatePVThirdParty”
- “FuelCellCommercial”
- “FuelCellSingleOwner”
- “GenericBatteryAllEquityPartnershipFlip”
- “GenericBatteryCommercial”
- “GenericBatteryHostDeveloper”
- “GenericBatteryLeveragedPartnershipFlip”
- “GenericBatteryMerchantPlant”
- “GenericBatteryResidential”
- “GenericBatterySaleLeaseback”
- “GenericBatterySingleOwner”
- “GenericBatteryThirdParty”
- “GenericCSPSystemAllEquityPartnershipFlip”
- “GenericCSPSystemCommercial”
- “GenericCSPSystemLCOECalculator”
- “GenericCSPSystemLeveragedPartnershipFlip”
- “GenericCSPSystemMerchantPlant”
- “GenericCSPSystemNone”
- “GenericCSPSystemSaleLeaseback”
- “GenericCSPSystemSingleOwner”
- “GenericSystemAllEquityPartnershipFlip”
- “GenericSystemCommercial”
- “GenericSystemHostDeveloper”
- “GenericSystemLCOECalculator”
- “GenericSystemLeveragedPartnershipFlip”
- “GenericSystemMerchantPlant”
- “GenericSystemNone”
- “GenericSystemResidential”
- “GenericSystemSaleLeaseback”
- “GenericSystemSingleOwner”
- “GenericSystemThirdParty”
- “GeothermalPowerAllEquityPartnershipFlip”
- “GeothermalPowerLCOECalculator”
- “GeothermalPowerLeveragedPartnershipFlip”
- “GeothermalPowerMerchantPlant”
- “GeothermalPowerNone”
- “GeothermalPowerSaleLeaseback”
- “GeothermalPowerSingleOwner”
- “HighXConcentratingPVAllEquityPartnershipFlip”
- “HighXConcentratingPVLCOECalculator”
- “HighXConcentratingPVLeveragedPartnershipFlip”
- “HighXConcentratingPVMerchantPlant”
- “HighXConcentratingPVNone”
- “HighXConcentratingPVSaleLeaseback”
- “HighXConcentratingPVSingleOwner”
- “MSLFAllEquityPartnershipFlip”
- “MSLFCommercial”
- “MSLFLCOECalculator”
- “MSLFLeveragedPartnershipFlip”
- “MSLFMerchantPlant”
- “MSLFNone”
- “MSLFSaleLeaseback”
- “MSLFSingleOwner”
- “MSPTAllEquityPartnershipFlip”
- “MSPTLeveragedPartnershipFlip”
- “MSPTMerchantPlant”
- “MSPTSaleLeaseback”
- “MSPTSingleOwner”
- “PVBatteryAllEquityPartnershipFlip”
- “PVBatteryCommercial”
- “PVBatteryHostDeveloper”
- “PVBatteryLeveragedPartnershipFlip”
- “PVBatteryMerchantPlant”
- “PVBatteryResidential”
- “PVBatterySaleLeaseback”
- “PVBatterySingleOwner”
- “PVBatteryThirdParty”
- “PVWattsBatteryCommercial”
- “PVWattsBatteryHostDeveloper”
- “PVWattsBatteryResidential”
- “PVWattsBatteryThirdParty”
- “PVWattsAllEquityPartnershipFlip”
- “PVWattsCommercial”
- “PVWattsHostDeveloper”
- “PVWattsLCOECalculator”
- “PVWattsLeveragedPartnershipFlip”
- “PVWattsMerchantPlant”
- “PVWattsNone”
- “PVWattsResidential”
- “PVWattsSaleLeaseback”
- “PVWattsSingleOwner”
- “PVWattsThirdParty”
- “PhysicalTroughAllEquityPartnershipFlip”
- “PhysicalTroughCommercial”
- “PhysicalTroughLCOECalculator”
- “PhysicalTroughLeveragedPartnershipFlip”
- “PhysicalTroughMerchantPlant”
- “PhysicalTroughNone”
- “PhysicalTroughSaleLeaseback”
- “PhysicalTroughSingleOwner”
- “WindPowerAllEquityPartnershipFlip”
- “WindPowerCommercial”
- “WindPowerLCOECalculator”
- “WindPowerLeveragedPartnershipFlip”
- “WindPowerMerchantPlant”
- “WindPowerNone”
- “WindPowerResidential”
- “WindPowerSaleLeaseback”
- “WindPowerSingleOwner”
-
PySAM.Grid.
from_existing
(data, optional config) → Grid¶ Share underlying data with an existing PySAM class. If config provided, default attributes are loaded otherwise.
-
PySAM.Grid.
new
() → Grid¶
-
PySAM.Grid.
wrap
(ssc_data_t) → Grid¶ Use existing PySSC data
Warning
Do not call PySSC.data_free on the ssc_data_t provided to
wrap
Functions¶
-
class
PySAM.Grid.
Grid
¶ This class contains all the variable information for running a simulation. Variables are grouped together in the subclasses as properties. If property assignments are the wrong type, an error is thrown.
-
assign
(dict) → None¶ Assign attributes from nested dictionary, except for Outputs
nested_dict = { 'Lifetime': { var: val, ...}, ...}
-
execute
(int verbosity) → None¶ Execute simulation with verbosity level 0 (default) or 1
-
export
() → dict¶ Export attributes into nested dictionary
-
value
(name, optional value) → Union[None, float, dict, sequence, str]¶ Get or set by name a value in any of the variable groups.
-
Lifetime Group¶
-
class
PySAM.Grid.Grid.
Lifetime
¶ -
assign
() → None¶ Assign attributes from dictionary
Lifetime_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
analysis_period
¶ Lifetime analysis period [years]
Info: The number of years in the simulation
Required: True if system_use_lifetime_output=1
Type: float
-
system_use_lifetime_output
¶ Lifetime simulation [0/1]
Options: 0=SingleYearRepeated,1=RunEveryYear
Constraints: BOOLEAN
Required: If not provided, assumed to be 0
Type: float
-
GridLimits Group¶
-
class
PySAM.Grid.Grid.
GridLimits
¶ -
assign
() → None¶ Assign attributes from dictionary
GridLimits_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
enable_interconnection_limit
¶ Enable grid interconnection limit [0/1]
Info: Enable a grid interconnection limit
Type: float
-
grid_curtailment
¶ Grid curtailment as energy delivery limit (first year) [MW]
Required: False
Type: sequence
-
grid_interconnection_limit_kwac
¶ Grid interconnection limit [kWac]
Type: float
-
SystemOutput Group¶
-
class
PySAM.Grid.Grid.
SystemOutput
¶ -
assign
() → None¶ Assign attributes from dictionary
SystemOutput_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
annual_energy
¶ Annual Energy AC (year 1) [kWh]
Type: float
-
gen
¶ System power generated [kW]
Info: Lifetime system generation
Type: sequence
-
Load Group¶
-
class
PySAM.Grid.Grid.
Load
¶ -
assign
() → None¶ Assign attributes from dictionary
Load_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
load
¶ Electricity load (year 1) [kW]
Type: sequence
-
load_escalation
¶ Annual load escalation [%/year]
Required: If not provided, assumed to be 0
Type: sequence
-
Outputs Group¶
-
class
PySAM.Grid.Grid.
Outputs
¶ -
assign
() → None¶ Assign attributes from dictionary
Outputs_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
annual_ac_curtailment_loss_kwh
¶ Annual Energy loss from curtailment (year 1) [kWh]
Type: float
-
annual_ac_curtailment_loss_percent
¶ Annual Energy loss from curtailment (year 1) [%]
Type: float
-
annual_ac_interconnect_loss_kwh
¶ Annual Energy loss from interconnection limit (year 1) [kWh]
Type: float
-
annual_ac_interconnect_loss_percent
¶ Annual Energy loss from interconnection limit (year 1) [%]
Type: float
-
annual_energy_pre_curtailment_ac
¶ Annual Energy AC pre-curtailment (year 1) [kWh]
Type: float
-
annual_energy_pre_interconnect_ac
¶ Annual Energy AC pre-interconnection (year 1) [kWh]
Type: float
-
capacity_factor_curtailment_ac
¶ Capacity factor of the curtailment (year 1) [%]
Type: float
-
capacity_factor_interconnect_ac
¶ Capacity factor of the interconnection (year 1) [%]
Type: float
-
gen
¶ System power generated [kW]
Type: sequence
-
system_pre_curtailment_kwac
¶ System power before grid curtailment [kW]
Type: sequence
-
system_pre_interconnect_kwac
¶ System power before grid interconnect [kW]
Type: sequence
-