Grid

Electric grid model

PySAM.Grid.default(config) Grid

Load defaults for the configuration config. Available configurations are:

  • “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”

  • “GenericPVWattsWindFuelCellBatteryHybridHostDeveloper”

  • “GenericPVWattsWindFuelCellBatteryHybridSingleOwner”

  • “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”

  • “MEwaveBatterySingleOwner”

  • “MEwaveSingleOwner”

  • “MSLFAllEquityPartnershipFlip”

  • “MSLFLeveragedPartnershipFlip”

  • “MSLFMerchantPlant”

  • “MSLFSaleLeaseback”

  • “MSLFSingleOwner”

  • “MSPTAllEquityPartnershipFlip”

  • “MSPTLeveragedPartnershipFlip”

  • “MSPTMerchantPlant”

  • “MSPTSaleLeaseback”

  • “MSPTSingleOwner”

  • “PVBatteryAllEquityPartnershipFlip”

  • “PVBatteryCommercial”

  • “PVBatteryHostDeveloper”

  • “PVBatteryLeveragedPartnershipFlip”

  • “PVBatteryMerchantPlant”

  • “PVBatteryResidential”

  • “PVBatterySaleLeaseback”

  • “PVBatterySingleOwner”

  • “PVBatteryThirdParty”

  • “PVWattsBatteryCommercial”

  • “PVWattsBatteryHostDeveloper”

  • “PVWattsBatteryResidential”

  • “PVWattsBatteryThirdParty”

  • “PVWattsWindBatteryHybridHostDeveloper”

  • “PVWattsWindBatteryHybridSingleOwner”

  • “PVWattsWindFuelCellBatteryHybridHostDeveloper”

  • “PVWattsWindFuelCellBatteryHybridSingleOwner”

  • “PVWattsAllEquityPartnershipFlip”

  • “PVWattsCommercial”

  • “PVWattsCommunitySolar”

  • “PVWattsHostDeveloper”

  • “PVWattsLCOECalculator”

  • “PVWattsLeveragedPartnershipFlip”

  • “PVWattsMerchantPlant”

  • “PVWattsNone”

  • “PVWattsResidential”

  • “PVWattsSaleLeaseback”

  • “PVWattsSingleOwner”

  • “PVWattsThirdParty”

  • “PhotovoltaicWindBatteryHybridHostDeveloper”

  • “PhotovoltaicWindBatteryHybridSingleOwner”

  • “PhysicalTroughAllEquityPartnershipFlip”

  • “PhysicalTroughLCOECalculator”

  • “PhysicalTroughLeveragedPartnershipFlip”

  • “PhysicalTroughMerchantPlant”

  • “PhysicalTroughNone”

  • “PhysicalTroughSaleLeaseback”

  • “PhysicalTroughSingleOwner”

  • “StandaloneBatteryAllEquityPartnershipFlip”

  • “StandaloneBatteryCommercial”

  • “StandaloneBatteryHostDeveloper”

  • “StandaloneBatteryLeveragedPartnershipFlip”

  • “StandaloneBatteryMerchantPlant”

  • “StandaloneBatteryResidential”

  • “StandaloneBatterySaleLeaseback”

  • “StandaloneBatterySingleOwner”

  • “StandaloneBatteryThirdParty”

  • “WindPowerAllEquityPartnershipFlip”

  • “WindPowerCommercial”

  • “WindPowerLCOECalculator”

  • “WindPowerLeveragedPartnershipFlip”

  • “WindPowerMerchantPlant”

  • “WindPowerNone”

  • “WindPowerResidential”

  • “WindPowerSaleLeaseback”

  • “WindPowerSingleOwner”

Note

Some inputs do not have default values and may be assigned a value from the variable’s Required attribute. See variable attribute descriptions below.

PySAM.Grid.from_existing(data, optional config) Grid

Share data with an existing PySAM class. If optional config is a valid configuration name, load the module’s defaults for that configuration.

PySAM.Grid.new() Grid
PySAM.Grid.wrap(ssc_data_t) Grid

Load data from a PySSC object.

Warning

Do not call PySSC.data_free on the ssc_data_t provided to wrap()

Grid is a wrapper for the SSC compute module cmod_grid.cpp

Interdependent Variables

The variables listed below are interdependent with other variables. If you change the value of one of these variables, you may need to change values of other variables. The SAM user interface manages these interdependent variables, but in PySAM, it is up to you change the value of all interdependent variables so they are consistent. See Interdependent Variables for examples and details.

  • None

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

get_data_ptr() Pointer

Get ssc_data_t pointer

replace(dict) None

Replace attributes from nested dictionary, except for Outputs. Unassigns all values in each Group then assigns from the input dict.

nested_dict = { 'Lifetime': { var: val, ...}, ...}

unassign(name) None

Unassign a value in any of the variable groups.

value(name, optional value) 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(dict) None

Assign attributes from dictionary, overwriting but not removing values.

Lifetime_vals = { var: val, ...}

export() dict

Export attributes into dictionary.

replace(dict) None

Replace attributes from dictionary, unassigning values not present in input dict.

Lifetime_vals = { var: val, ...}

analysis_period

Lifetime analysis period [years]

Info: The number of years in the simulation

Required: Required if system_use_lifetime_output=1

Type:

float

system_use_lifetime_output

Lifetime simulation [0/1]

Options: 0=SingleYearRepeated,1=RunEveryYear

Constraints: BOOLEAN

Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.

Type:

float

SystemOutput Group

class PySAM.Grid.Grid.SystemOutput
assign(dict) None

Assign attributes from dictionary, overwriting but not removing values.

SystemOutput_vals = { var: val, ...}

export() dict

Export attributes into dictionary.

replace(dict) None

Replace attributes from dictionary, unassigning values not present in input dict.

SystemOutput_vals = { var: val, ...}

annual_energy

Annual Energy AC (year 1) [kWh]

INOUT: This variable is both an input and an output to the compute module.

Type:

float

energy_hourly_kW

Power output of array [kW]

Info: Lifetime system generation

INOUT: This variable is both an input and an output to the compute module.

Type:

sequence

gen

System power generated [kW]

Info: Lifetime system generation

INOUT: This variable is both an input and an output to the compute module.

Type:

sequence

Load Group

class PySAM.Grid.Grid.Load
assign(dict) None

Assign attributes from dictionary, overwriting but not removing values.

Load_vals = { var: val, ...}

export() dict

Export attributes into dictionary.

replace(dict) None

Replace attributes from dictionary, unassigning values not present in input dict.

Load_vals = { var: val, ...}

crit_load

Critical electricity load (year 1) [kW]

Type:

sequence

grid_outage

Grid outage in this time step [0/1]

Options: 0=GridAvailable,1=GridUnavailable,Length=load

INOUT: This variable is both an input and an output to the compute module.

Type:

sequence

load

Electricity load (year 1) [kW]

INOUT: This variable is both an input and an output to the compute module.

Type:

sequence

load_escalation

Annual load escalation [%/year]

Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.

Type:

sequence

Monthly Group

class PySAM.Grid.Grid.Monthly
assign(dict) None

Assign attributes from dictionary, overwriting but not removing values.

Monthly_vals = { var: val, ...}

export() dict

Export attributes into dictionary.

replace(dict) None

Replace attributes from dictionary, unassigning values not present in input dict.

Monthly_vals = { var: val, ...}

monthly_energy

AC energy (year 1) [kWh/mo]

INOUT: This variable is both an input and an output to the compute module.

Constraints: LENGTH=12

Type:

sequence

GridLimits Group

class PySAM.Grid.Grid.GridLimits
assign(dict) None

Assign attributes from dictionary, overwriting but not removing values.

GridLimits_vals = { var: val, ...}

export() dict

Export attributes into dictionary.

replace(dict) None

Replace attributes from dictionary, unassigning values not present in input dict.

GridLimits_vals = { var: val, ...}

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 for configuration with default inputs. May be required if a variable dependent on its value changes. Example: For the Detailed PV - Single Owner configuration, only Subarray 1 is enabled in the configuration defaults, so Subarray 2 inputs would not be required; if Subarray 2 is enabled, then Subarray 2 inputs is required.

Type:

sequence

grid_interconnection_limit_kwac

Grid interconnection limit [kWac]

Type:

float

HybridCosts Group

class PySAM.Grid.Grid.HybridCosts
assign(dict) None

Assign attributes from dictionary, overwriting but not removing values.

HybridCosts_vals = { var: val, ...}

export() dict

Export attributes into dictionary.

replace(dict) None

Replace attributes from dictionary, unassigning values not present in input dict.

HybridCosts_vals = { var: val, ...}

degradation

Annual AC degradation [%]

Required: False. Automatically set to 0.0 if not assigned explicitly or loaded from defaults.

Type:

sequence

land_area

Total land area [acres]

Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.

Type:

float

om_capacity

Capacity-based O&M amount [$/kWcap]

Info: !battery,!fuelcell

Required: False. Automatically set to 0.0 if not assigned explicitly or loaded from defaults.

Type:

sequence

om_capacity_escal

Capacity-based O&M escalation [%/year]

Required: False. Automatically set to 0.0 if not assigned explicitly or loaded from defaults.

Type:

float

om_fixed

Fixed O&M annual amount [$/year]

Info: !battery,!fuelcell

Required: False. Automatically set to 0.0 if not assigned explicitly or loaded from defaults.

Type:

sequence

om_fixed_escal

Fixed O&M escalation [%/year]

Required: False. Automatically set to 0.0 if not assigned explicitly or loaded from defaults.

Type:

float

om_land_lease

Land lease cost [$/acre]

Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.

Type:

sequence

om_land_lease_escal

Land lease cost escalation [%/yr]

Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.

Type:

float

om_production

Production-based O&M amount [$/MWh]

Info: !battery,!fuelcell

Required: False. Automatically set to 0.0 if not assigned explicitly or loaded from defaults.

Type:

sequence

om_production_escal

Production-based O&M escalation [%/year]

Required: False. Automatically set to 0.0 if not assigned explicitly or loaded from defaults.

Type:

float

total_installed_cost

Total installed cost [$]

Required: True

Type:

float

Outputs Group

class PySAM.Grid.Grid.Outputs
assign(dict) None

Assign attributes from dictionary, overwriting but not removing values.

Outputs_vals = { var: val, ...}

export() dict

Export attributes into dictionary.

replace(dict) None

Replace attributes from dictionary, unassigning values not present in input dict.

Outputs_vals = { var: val, ...}

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_distribution_time

Annual energy production as function of time [kW]

Type:

sequence[sequence]

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 based on AC electricity after curtailment and AC interconnection limit [%]

Type:

float

capacity_factor_interconnect_ac

Capacity factor based on AC interconnection limit [%]

Type:

float

cf_land_lease_expense

Land lease expense [$]

Type:

sequence

full_load

Electricity load prior to grid outage (year 1) [kW]

Type:

sequence

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