Battery¶
Wrapper for SAM Simulation Core model: cmod_battery.cpp
Input Consistency Warning¶
As described in Possible Problems, some input parameters are interdependent but the equations that enforce consistency are not available in this 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:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull
- batt_Qfull_flow
- batt_Qnom
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_choice
- batt_current_discharge_max
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
- dispatch_manual_discharge
- dispatch_manual_gridcharge
- dispatch_manual_percent_discharge
- dispatch_manual_percent_gridcharge
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.
Battery model description
Detailed battery storage model
-
PySAM.Battery.
default
(config) → Battery¶ Use default attributes config options:
- “FuelCellCommercial”
- “FuelCellSingleOwner”
- “GenericBatteryAllEquityPartnershipFlip”
- “GenericBatteryCommercial”
- “GenericBatteryHostDeveloper”
- “GenericBatteryLeveragedPartnershipFlip”
- “GenericBatteryMerchantPlant”
- “GenericBatteryResidential”
- “GenericBatterySaleLeaseback”
- “GenericBatterySingleOwner”
- “GenericBatteryThirdParty”
-
PySAM.Battery.
from_existing
(data, optional config) → Battery¶ Share underlying data with an existing PySAM class. If config provided, default attributes are loaded otherwise.
-
PySAM.Battery.
new
() → Battery¶
-
PySAM.Battery.
wrap
(ssc_data_t) → Battery¶ Use existing PySSC data
Warning
Do not call PySSC.data_free on the ssc_data_t provided to
wrap
Functions¶
-
class
PySAM.Battery.
Battery
¶ 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 = { 'Simulation': { var: val, ...}, ...}
-
execute
(int verbosity) → None¶ Execute simulation with verbosity level 0 (default) or 1
-
export
() → dict¶ Export attributes into nested dictionary
-
unassign
(name) → None¶ Unassign a value in any of the variable groups.
-
value
(name, optional value) → Union[None, float, dict, sequence, str]¶ Get or set by name a value in any of the variable groups.
-
Simulation Group¶
Lifetime Group¶
-
class
PySAM.Battery.Battery.
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
-
inflation_rate
¶ Inflation rate [%]
Constraints: MIN=-99
Required: If not provided, assumed to be 0
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
-
BatterySystem Group¶
-
class
PySAM.Battery.Battery.
BatterySystem
¶ -
assign
() → None¶ Assign attributes from dictionary
BatterySystem_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
batt_ac_dc_efficiency
¶ Inverter AC to battery DC efficiency
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
batt_ac_or_dc
¶ Battery interconnection (AC or DC)
Options: 0=DC_Connected,1=AC_Connected
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
batt_computed_bank_capacity
¶ Computed bank capacity [kWh]
- Changes to this variable may require updating the values of the following:
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_mass
- batt_surface_area
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_computed_series
¶ Number of cells in series
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_computed_strings
¶ Number of strings of cells
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_current_charge_max
¶ Maximum charge current [A]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_current_choice
¶ Limit cells by current or power
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
batt_current_discharge_max
¶ Maximum discharge current [A]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_dc_ac_efficiency
¶ Battery DC to AC efficiency
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
batt_dc_dc_efficiency
¶ System DC to battery DC efficiency
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
batt_inverter_efficiency_cutoff
¶ Inverter efficiency at which to cut battery charge or discharge off [%]
Type: float
-
batt_loss_choice
¶ Loss power input option [0/1]
Options: 0=Monthly,1=TimeSeries
Required: If not provided, assumed to be 0
Type: float
-
batt_losses
¶ Battery system losses at each timestep (kW DC for DC connected, AC for AC connected) [kW]
Required: If not provided, assumed to be 0
Type: sequence
-
batt_losses_charging
¶ Battery system losses when charging (kW DC for DC connected, AC for AC connected) [kW]
Required: If not provided, assumed to be 0
Type: sequence
-
batt_losses_discharging
¶ Battery system losses when discharging (kW DC for DC connected, AC for AC connected) [kW]
Required: If not provided, assumed to be 0
Type: sequence
-
batt_losses_idle
¶ Battery system losses when idle (kW DC for DC connected, AC for AC connected) [kW]
Required: If not provided, assumed to be 0
Type: sequence
-
batt_mass
¶ Battery mass [kg]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_computed_bank_capacity
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_meter_position
¶ Position of battery relative to electric meter
Options: 0=BehindTheMeter,1=FrontOfMeter
Type: float
-
batt_power_charge_max_kwac
¶ Maximum charge power (AC) [kWac]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_power_charge_max_kwdc
¶ Maximum charge power (DC) [kWdc]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_power_discharge_max_kwac
¶ Maximum discharge power (AC) [kWac]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_power_discharge_max_kwdc
¶ Maximum discharge power (DC) [kWdc]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_replacement_capacity
¶ Capacity degradation at which to replace battery [%]
Type: float
-
batt_replacement_option
¶ Enable battery replacement? [0=none,1=capacity based,2=user schedule]
Constraints: INTEGER,MIN=0,MAX=2
Required: If not provided, assumed to be 0
Type: float
-
batt_replacement_schedule_percent
¶ Percentage of battery capacity to replace in each year [%]
Options: length <= analysis_period
Required: True if batt_replacement_option=2
Type: sequence
-
batt_surface_area
¶ Battery surface area [m^2]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_computed_bank_capacity
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
en_batt
¶ Enable battery storage model [0/1]
Required: If not provided, assumed to be 0
Type: float
-
om_replacement_cost1
¶ Cost to replace battery per kWh [$/kWh]
Type: sequence
-
SystemOutput Group¶
-
class
PySAM.Battery.Battery.
SystemOutput
¶ -
assign
() → None¶ Assign attributes from dictionary
SystemOutput_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
annual_energy
¶ Annual Energy [kWh]
Required: If not provided, assumed to be 0
Type: float
-
capacity_factor
¶ Capacity factor [%]
Required: If not provided, assumed to be 0
Type: float
-
gen
¶ System power generated [kW]
Type: sequence
-
Load Group¶
-
class
PySAM.Battery.Battery.
Load
¶ -
assign
() → None¶ Assign attributes from dictionary
Load_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
crit_load
¶ Critical electricity load (year 1) [kW]
Type: sequence
-
load
¶ Electricity load (year 1) [kW]
Type: sequence
-
load_escalation
¶ Annual load escalation [%/year]
Required: If not provided, assumed to be 0
Type: sequence
-
BatteryCell Group¶
-
class
PySAM.Battery.Battery.
BatteryCell
¶ -
assign
() → None¶ Assign attributes from dictionary
BatteryCell_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
LeadAcid_q10_computed
¶ Capacity at 10-hour discharge rate [Ah]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_computed_strings
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
LeadAcid_q20_computed
¶ Capacity at 20-hour discharge rate [Ah]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_computed_strings
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
LeadAcid_qn_computed
¶ Capacity at discharge rate for n-hour rate [Ah]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_computed_strings
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
LeadAcid_tn
¶ Time to discharge [h]
Type: float
-
batt_C_rate
¶ Rate at which voltage vs. capacity curve input
Type: float
-
batt_Cp
¶ Battery specific heat capacity [J/KgK]
Type: float
-
batt_Qexp
¶ Cell capacity at end of exponential zone [Ah]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_computed_bank_capacity
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_Qfull
¶ Fully charged cell capacity [Ah]
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
batt_Qfull_flow
¶ Fully charged flow battery capacity [Ah]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_computed_bank_capacity
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_Qnom
¶ Cell capacity at end of nominal zone [Ah]
- This variable may need to be updated if the values of the following have changed:
- batt_Qfull
- batt_Vnom_default
- batt_ac_dc_efficiency
- batt_ac_or_dc
- batt_chem
- batt_computed_bank_capacity
- batt_current_choice
- batt_dc_ac_efficiency
- batt_dc_dc_efficiency
Type: float
-
batt_Vcut
¶ Cutoff voltage for battery rated capacity [V]
Required: If not provided, assumed to be 0
Type: float
-
batt_Vexp
¶ Cell voltage at end of exponential zone [V]
Type: float
-
batt_Vfull
¶ Fully charged cell voltage [V]
Type: float
-
batt_Vnom
¶ Cell voltage at end of nominal zone [V]
Type: float
-
batt_Vnom_default
¶ Default nominal cell voltage [V]
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
batt_calendar_a
¶ Calendar life model coefficient [1/sqrt(day)]
Required: True if en_batt=1&batt_life_model=0&batt_calendar_choice=1
Type: float
-
batt_calendar_b
¶ Calendar life model coefficient [K]
Required: True if en_batt=1&batt_life_model=0&batt_calendar_choice=1
Type: float
-
batt_calendar_c
¶ Calendar life model coefficient [K]
Required: True if en_batt=1&batt_life_model=0&batt_calendar_choice=1
Type: float
-
batt_calendar_choice
¶ Calendar life degradation input option [0/1/2]
Options: 0=NoCalendarDegradation,1=LithiomIonModel,2=InputLossTable
Required: True if en_batt=1&batt_life_model=0
Type: float
-
batt_calendar_lifetime_matrix
¶ Days vs capacity
Required: True if en_batt=1&batt_life_model=0&batt_calendar_choice=2
Type: sequence[sequence]
-
batt_calendar_q0
¶ Calendar life model initial capacity cofficient
Required: True if en_batt=1&batt_life_model=0&batt_calendar_choice=1
Type: float
-
batt_chem
¶ Battery chemistry
Options: 0=LeadAcid,1=LiIon
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
batt_h_to_ambient
¶ Heat transfer between battery and environment [W/m2K]
Type: float
-
batt_initial_SOC
¶ Initial state-of-charge [%]
Type: float
-
batt_life_model
¶ Battery life model specifier [0/1]
Options: 0=calendar/cycle,1=NMC
Required: If not provided, assumed to be 0
Type: float
-
batt_lifetime_matrix
¶ Cycles vs capacity at different depths-of-discharge
Required: True if en_batt=1&batt_life_model=0
Type: sequence[sequence]
-
batt_maximum_SOC
¶ Maximum allowed state-of-charge [%]
Type: float
-
batt_minimum_SOC
¶ Minimum allowed state-of-charge [%]
Type: float
-
batt_minimum_modetime
¶ Minimum time at charge state [min]
Type: float
-
batt_resistance
¶ Internal resistance [Ohm]
Type: float
-
batt_room_temperature_celsius
¶ Temperature of storage room [C]
Options: length=1 for fixed, # of weatherfile records otherwise
Type: sequence
-
batt_voltage_choice
¶ Battery voltage input option [0/1]
Options: 0=UseVoltageModel,1=InputVoltageTable
Required: If not provided, assumed to be 0
Type: float
-
batt_voltage_matrix
¶ Battery voltage vs. depth-of-discharge
Type: sequence[sequence]
-
cap_vs_temp
¶ Effective capacity as function of temperature [C,%]
Type: sequence[sequence]
-
Inverter Group¶
-
class
PySAM.Battery.Battery.
Inverter
¶ -
assign
() → None¶ Assign attributes from dictionary
Inverter_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
inv_cec_cg_eff_cec
¶ Inverter Coefficient Generator CEC Efficiency [%]
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
inv_cec_cg_paco
¶ Inverter Coefficient Generator Max AC Power [Wac]
Type: float
-
inv_ds_eff
¶ Inverter Datasheet Efficiency [%]
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
inv_ds_paco
¶ Inverter Datasheet Maximum AC Power [Wac]
Type: float
-
inv_pd_eff
¶ Inverter Partload Efficiency [%]
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
inv_pd_paco
¶ Inverter Partload Maximum AC Power [Wac]
Type: float
-
inv_snl_eff_cec
¶ Inverter Sandia CEC Efficiency [%]
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
inv_snl_paco
¶ Inverter Sandia Maximum AC Power [Wac]
Type: float
-
inverter_count
¶ Number of inverters
Type: float
-
inverter_model
¶ Inverter model specifier
Options: 0=cec,1=datasheet,2=partload,3=coefficientgenerator,4=generic
Constraints: INTEGER,MIN=0,MAX=4
Required: If not provided, assumed to be 4
- Changes to this variable may require updating the values of the following:
- LeadAcid_q10_computed
- LeadAcid_q20_computed
- LeadAcid_qn_computed
- batt_Qexp
- batt_Qfull_flow
- batt_Qnom
- batt_computed_bank_capacity
- batt_computed_series
- batt_computed_strings
- batt_current_charge_max
- batt_current_discharge_max
- batt_mass
- batt_power_charge_max_kwac
- batt_power_charge_max_kwdc
- batt_power_discharge_max_kwac
- batt_power_discharge_max_kwdc
- batt_surface_area
Type: float
-
Losses Group¶
BatteryDispatch Group¶
-
class
PySAM.Battery.Battery.
BatteryDispatch
¶ -
assign
() → None¶ Assign attributes from dictionary
BatteryDispatch_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
batt_auto_gridcharge_max_daily
¶ Allowed grid charging percent per day for automated dispatch [kW]
Type: float
-
batt_custom_dispatch
¶ Custom battery power for every time step [kW]
Info: kWAC if AC-connected, else kWDC
Required: True if en_batt=1&batt_dispatch_choice=3
Type: sequence
-
batt_cycle_cost
¶ Input battery cycle degradaton penalty per year [$/cycle-kWh]
Info: length 1 or analysis_period, length 1 will be extended using inflation
Required: True if batt_cycle_cost_choice=1
Type: sequence
-
batt_cycle_cost_choice
¶ Use SAM cost model for degradaton penalty or input custom via batt_cycle_cost [0/1]
Options: 0=UseCostModel,1=InputCost
Required: If not provided, assumed to be 0
Type: float
-
batt_dispatch_auto_can_charge
¶ System charging allowed for automated dispatch? [kW]
Type: float
-
batt_dispatch_auto_can_clipcharge
¶ Battery can charge from clipped power for automated dispatch? [kW]
Type: float
-
batt_dispatch_auto_can_fuelcellcharge
¶ Charging from fuel cell allowed for automated dispatch? [kW]
Type: float
-
batt_dispatch_auto_can_gridcharge
¶ Grid charging allowed for automated dispatch? [kW]
Type: float
-
batt_dispatch_choice
¶ Battery dispatch algorithm [0/1/2/3/4/5]
Options: If behind the meter: 0=PeakShavingLookAhead,1=PeakShavingLookBehind,2=InputGridTarget,3=InputBatteryPower,4=ManualDispatch,5=PriceSignalForecast if front of meter: 0=AutomatedLookAhead,1=AutomatedLookBehind,2=AutomatedInputForecast,3=InputBatteryPower,4=ManualDispatch
Required: True if en_batt=1
Type: float
-
batt_dispatch_update_frequency_hours
¶ Frequency to update the look-ahead dispatch [hours]
Type: float
-
batt_look_ahead_hours
¶ Hours to look ahead in automated dispatch [hours]
Type: float
-
batt_pv_ac_forecast
¶ PV ac power forecast [kW]
Type: sequence
-
batt_pv_clipping_forecast
¶ PV clipping forecast [kW]
Type: sequence
-
batt_target_choice
¶ Target power input option [0/1]
Options: 0=InputMonthlyTarget,1=InputFullTimeSeries
Required: True if en_batt=1&batt_meter_position=0&batt_dispatch_choice=2
Type: float
-
batt_target_power
¶ Grid target power for every time step [kW]
Required: True if en_batt=1&batt_meter_position=0&batt_dispatch_choice=2
Type: sequence
-
batt_target_power_monthly
¶ Grid target power on monthly basis [kW]
Required: True if en_batt=1&batt_meter_position=0&batt_dispatch_choice=2
Type: sequence
-
dispatch_manual_charge
¶ Periods 1-6 charging from system allowed?
Required: True if en_batt=1&batt_dispatch_choice=4
Type: sequence
-
dispatch_manual_discharge
¶ Periods 1-6 discharging allowed?
Required: True if en_batt=1&batt_dispatch_choice=4
- Changes to this variable may require updating the values of the following:
- dispatch_manual_percent_discharge
Type: sequence
-
dispatch_manual_fuelcellcharge
¶ Periods 1-6 charging from fuel cell allowed?
Type: sequence
-
dispatch_manual_gridcharge
¶ Periods 1-6 grid charging allowed?
Required: True if en_batt=1&batt_dispatch_choice=4
- Changes to this variable may require updating the values of the following:
- dispatch_manual_percent_gridcharge
Type: sequence
-
dispatch_manual_percent_discharge
¶ Periods 1-6 discharge percent [%]
Required: True if en_batt=1&batt_dispatch_choice=4
- This variable may need to be updated if the values of the following have changed:
- dispatch_manual_discharge
Type: sequence
-
dispatch_manual_percent_gridcharge
¶ Periods 1-6 gridcharge percent [%]
Required: True if en_batt=1&batt_dispatch_choice=4
- This variable may need to be updated if the values of the following have changed:
- dispatch_manual_gridcharge
Type: sequence
-
dispatch_manual_sched
¶ Battery dispatch schedule for weekday
Required: True if en_batt=1&batt_dispatch_choice=4
Type: sequence[sequence]
-
dispatch_manual_sched_weekend
¶ Battery dispatch schedule for weekend
Required: True if en_batt=1&batt_dispatch_choice=4
Type: sequence[sequence]
-
FuelCell Group¶
PriceSignal Group¶
-
class
PySAM.Battery.Battery.
PriceSignal
¶ -
assign
() → None¶ Assign attributes from dictionary
PriceSignal_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
dispatch_factors_ts
¶ Dispatch payment factor time step
Required: True if forecast_price_signal_model=0&en_batt=1&batt_meter_position=1&ppa_multiplier_model=1
Type: sequence
-
dispatch_sched_weekday
¶ Diurnal weekday TOD periods [1..9]
Info: 12 x 24 matrix
Required: True if en_batt=1&batt_meter_position=1&forecast_price_signal_model=0&ppa_multiplier_model=0
Type: sequence[sequence]
-
dispatch_sched_weekend
¶ Diurnal weekend TOD periods [1..9]
Info: 12 x 24 matrix
Required: True if en_batt=1&batt_meter_position=1&forecast_price_signal_model=0&ppa_multiplier_model=0
Type: sequence[sequence]
-
dispatch_tod_factors
¶ TOD factors for periods 1-9
Required: True if en_batt=1&batt_meter_position=1&forecast_price_signal_model=0&ppa_multiplier_model=0
Type: sequence
-
forecast_price_signal_model
¶ Forecast price signal model selected [0/1]
Options: 0=PPA based,1=Merchant Plant
Constraints: INTEGER,MIN=0,MAX=1
Required: If not provided, assumed to be 0
Type: float
-
mp_ancserv1_revenue
¶ Ancillary services 1 revenue input [ [MW, $/MW]]
Required: True if en_batt=1&batt_meter_position=1&forecast_price_signal_model=1
Type: sequence[sequence]
-
mp_ancserv2_revenue
¶ Ancillary services 2 revenue input [ [MW, $/MW]]
Required: True if en_batt=1&batt_meter_position=1&forecast_price_signal_model=1
Type: sequence[sequence]
-
mp_ancserv3_revenue
¶ Ancillary services 3 revenue input [ [MW, $/MW]]
Required: True if en_batt=1&batt_meter_position=1&forecast_price_signal_model=1
Type: sequence[sequence]
-
mp_ancserv4_revenue
¶ Ancillary services 4 revenue input [ [MW, $/MW]]
Required: True if en_batt=1&batt_meter_position=1&forecast_price_signal_model=1
Type: sequence[sequence]
-
mp_enable_ancserv1
¶ Enable ancillary services 1 revenue [0/1]
Constraints: INTEGER,MIN=0,MAX=1
Required: True if forecast_price_signal_model=1
Type: float
-
mp_enable_ancserv2
¶ Enable ancillary services 2 revenue [0/1]
Constraints: INTEGER,MIN=0,MAX=1
Required: True if forecast_price_signal_model=1
Type: float
-
mp_enable_ancserv3
¶ Enable ancillary services 3 revenue [0/1]
Constraints: INTEGER,MIN=0,MAX=1
Required: True if forecast_price_signal_model=1
Type: float
-
mp_enable_ancserv4
¶ Enable ancillary services 4 revenue [0/1]
Constraints: INTEGER,MIN=0,MAX=1
Required: True if forecast_price_signal_model=1
Type: float
-
mp_enable_energy_market_revenue
¶ Enable energy market revenue [0/1]
Options: 0=false,1=true
Constraints: INTEGER,MIN=0,MAX=1
Required: True if en_batt=1&batt_meter_position=1&forecast_price_signal_model=1
Type: float
-
mp_energy_market_revenue
¶ Energy market revenue input [ [MW, $/MW]]
Required: True if en_batt=1&batt_meter_position=1&forecast_price_signal_model=1
Type: sequence[sequence]
-
ppa_multiplier_model
¶ PPA multiplier model [0/1]
Options: 0=diurnal,1=timestep
Constraints: INTEGER,MIN=0
Required: True if forecast_price_signal_model=0&en_batt=1&batt_meter_position=1
Type: float
-
ppa_price_input
¶ PPA Price Input
Required: True if forecast_price_signal_model=0&en_batt=1&batt_meter_position=1
Type: sequence
-
ElectricityRates Group¶
-
class
PySAM.Battery.Battery.
ElectricityRates
¶ -
assign
() → None¶ Assign attributes from dictionary
ElectricityRates_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
rate_escalation
¶ Annual electricity rate escalation [%/year]
Required: If not provided, assumed to be 0
Type: sequence
-
ur_annual_min_charge
¶ Annual minimum charge [$]
Required: If not provided, assumed to be 0.0
Type: float
-
ur_dc_enable
¶ Enable demand charge [0/1]
Constraints: BOOLEAN
Required: If not provided, assumed to be 0
Type: float
-
ur_dc_flat_mat
¶ Demand rates (flat) table
Required: True if ur_dc_enable=1
Type: sequence[sequence]
-
ur_dc_sched_weekday
¶ Demand charge weekday schedule
Info: 12x24
Type: sequence[sequence]
-
ur_dc_sched_weekend
¶ Demand charge weekend schedule
Info: 12x24
Type: sequence[sequence]
-
ur_dc_tou_mat
¶ Demand rates (TOU) table
Required: True if ur_dc_enable=1
Type: sequence[sequence]
-
ur_ec_sched_weekday
¶ Energy charge weekday schedule
Info: 12x24
Type: sequence[sequence]
-
ur_ec_sched_weekend
¶ Energy charge weekend schedule
Info: 12x24
Type: sequence[sequence]
-
ur_ec_tou_mat
¶ Energy rates table
Type: sequence[sequence]
-
ur_en_ts_buy_rate
¶ Enable time step buy rates [0/1]
Constraints: BOOLEAN
Required: If not provided, assumed to be 0
Type: float
-
ur_en_ts_sell_rate
¶ Enable time step sell rates [0/1]
Constraints: BOOLEAN
Required: If not provided, assumed to be 0
Type: float
-
ur_metering_option
¶ Metering options [0=net energy metering,1=net energy metering with $ credits,2=net billing,3=net billing with carryover to next month,4=buy all - sell all]
Info: Net metering monthly excess
Constraints: INTEGER,MIN=0,MAX=4
Required: If not provided, assumed to be 0
Type: float
-
ur_monthly_fixed_charge
¶ Monthly fixed charge [$]
Required: If not provided, assumed to be 0.0
Type: float
-
ur_monthly_min_charge
¶ Monthly minimum charge [$]
Required: If not provided, assumed to be 0.0
Type: float
-
ur_nm_credit_month
¶ Month of year end payout (true-up) [mn]
Constraints: INTEGER,MIN=0,MAX=11
Required: If not provided, assumed to be 11
Type: float
-
ur_nm_credit_rollover
¶ Apply net metering true-up credits to future bills [0/1]
Constraints: INTEGER,MIN=0,MAX=1
Required: If not provided, assumed to be 0
Type: float
-
ur_nm_yearend_sell_rate
¶ Net metering true-up credit sell rate [$/kWh]
Required: If not provided, assumed to be 0.0
Type: float
-
ur_sell_eq_buy
¶ Set sell rate equal to buy rate [0/1]
Info: Optional override
Constraints: BOOLEAN
Required: If not provided, assumed to be 0
Type: float
-
ur_ts_buy_rate
¶ Time step buy rates [0/1]
Type: sequence
-
ur_ts_sell_rate
¶ Time step sell rates [0/1]
Type: sequence
-
Outputs Group¶
-
class
PySAM.Battery.Battery.
Outputs
¶ -
assign
() → None¶ Assign attributes from dictionary
Outputs_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
annual_export_to_grid_energy
¶ Annual energy exported to grid [kWh]
Type: sequence
-
annual_import_to_grid_energy
¶ Annual energy imported from grid [kWh]
Type: sequence
-
average_battery_conversion_efficiency
¶ Battery average cycle conversion efficiency [%]
Type: float
-
average_battery_roundtrip_efficiency
¶ Battery average roundtrip efficiency [%]
Type: float
-
avg_critical_load
¶ Average critical load met for resilience [kWh]
Type: float
-
batt_DOD
¶ Battery cycle depth of discharge [%]
Type: sequence
-
batt_DOD_cycle_average
¶ Battery average cycle DOD
Type: sequence
-
batt_I
¶ Battery current [A]
Type: sequence
-
batt_SOC
¶ Battery state of charge [%]
Type: sequence
-
batt_annual_charge_energy
¶ Battery annual energy charged [kWh]
Type: sequence
-
batt_annual_charge_from_grid
¶ Battery annual energy charged from grid [kWh]
Type: sequence
-
batt_annual_charge_from_system
¶ Battery annual energy charged from system [kWh]
Type: sequence
-
batt_annual_discharge_energy
¶ Battery annual energy discharged [kWh]
Type: sequence
-
batt_annual_energy_loss
¶ Battery annual energy loss [kWh]
Type: sequence
-
batt_annual_energy_system_loss
¶ Battery annual system energy loss [kWh]
Type: sequence
-
batt_bank_installed_capacity
¶ Battery bank installed capacity [kWh]
Type: float
-
batt_bank_replacement
¶ Battery bank replacements per year [number/year]
Type: sequence
-
batt_capacity_percent
¶ Battery relative capacity to nameplate [%]
Type: sequence
-
batt_capacity_percent_calendar
¶ Battery relative capacity to nameplate (calendar) [%]
Type: sequence
-
batt_capacity_percent_cycle
¶ Battery relative capacity to nameplate (cycling) [%]
Type: sequence
-
batt_capacity_thermal_percent
¶ Battery capacity percent for temperature [%]
Type: sequence
-
batt_conversion_loss
¶ Electricity loss in battery power electronics [kW]
Type: sequence
-
batt_cost_to_cycle
¶ Battery computed cycle degradation penalty [$/cycle-kWh]
Type: sequence
-
batt_cycles
¶ Battery number of cycles
Type: sequence
-
batt_dispatch_sched
¶ Battery dispatch schedule
Type: sequence[sequence]
-
batt_power
¶ Electricity to/from battery [kW]
Type: sequence
-
batt_power_target
¶ Electricity battery power target for automated dispatch [kW]
Type: sequence
-
batt_q0
¶ Battery total charge [Ah]
Type: sequence
-
batt_q1
¶ Battery available charge [Ah]
Type: sequence
-
batt_q2
¶ Battery bound charge [Ah]
Type: sequence
-
batt_qmax
¶ Battery maximum charge with degradation [Ah]
Type: sequence
-
batt_qmaxI
¶ Battery maximum capacity at current [Ah]
Type: sequence
-
batt_qmax_thermal
¶ Battery maximum charge at temperature [Ah]
Type: sequence
-
batt_revenue_charge
¶ Revenue to charge from system [$/kWh]
Type: sequence
-
batt_revenue_clipcharge
¶ Revenue to charge from clipped [$/kWh]
Type: sequence
-
batt_revenue_discharge
¶ Revenue to discharge [$/kWh]
Type: sequence
-
batt_revenue_gridcharge
¶ Revenue to charge from grid [$/kWh]
Type: sequence
-
batt_system_charge_percent
¶ Battery charge energy charged from system [%]
Type: float
-
batt_system_loss
¶ Electricity loss from battery ancillary equipment (kW DC for DC connected, AC for AC connected) [kW]
Type: sequence
-
batt_temperature
¶ Battery temperature [C]
Type: sequence
-
batt_to_grid
¶ Electricity to grid from battery [kW]
Type: sequence
-
batt_to_load
¶ Electricity to load from battery [kW]
Type: sequence
-
batt_voltage
¶ Battery voltage [V]
Type: sequence
-
batt_voltage_cell
¶ Battery cell voltage [V]
Type: sequence
-
cdf_of_surviving
¶ Cumulative probabilities of autonomous hours for resilience
Type: sequence
-
fuelcell_to_batt
¶ Electricity to battery from fuel cell [kW]
Type: sequence
-
gen_without_battery
¶ Energy produced without the battery or curtailment [kW]
Type: sequence
-
grid_power
¶ Electricity to/from grid [kW]
Type: sequence
-
grid_power_target
¶ Electricity grid power target for automated dispatch [kW]
Type: sequence
-
grid_to_batt
¶ Electricity to battery from grid [kW]
Type: sequence
-
grid_to_load
¶ Electricity to load from grid [kW]
Type: sequence
-
market_sell_rate_series_yr1
¶ Market sell rate (Year 1) [$/MWh]
Type: sequence
-
monthly_batt_to_grid
¶ Energy to grid from battery [kWh]
Type: sequence
-
monthly_batt_to_load
¶ Energy to load from battery [kWh]
Type: sequence
-
monthly_grid_to_batt
¶ Energy to battery from grid [kWh]
Type: sequence
-
monthly_grid_to_load
¶ Energy to load from grid [kWh]
Type: sequence
-
monthly_system_to_batt
¶ Energy to battery from system [kWh]
Type: sequence
-
monthly_system_to_grid
¶ Energy to grid from system [kWh]
Type: sequence
-
monthly_system_to_load
¶ Energy to load from system [kWh]
Type: sequence
-
outage_durations
¶ List of autonomous hours for resilience from min to max [hr]
Type: sequence
-
pdf_of_surviving
¶ Probabilities of autonomous hours for resilience
Type: sequence
-
resilience_hrs
¶ Hours of autonomy during outage at each timestep for resilience [hr]
Type: sequence
-
resilience_hrs_avg
¶ Avg hours of autonomy for resilience [hr]
Type: float
-
resilience_hrs_max
¶ Max hours of autonomy for resilience [hr]
Type: float
-
resilience_hrs_min
¶ Min hours of autonomy for resilience [hr]
Type: float
-
survival_function
¶ Survival function of autonomous hours for resilience
Type: sequence
-
system_to_batt
¶ Electricity to battery from system [kW]
Type: sequence
-
system_to_grid
¶ Electricity to grid from system [kW]
Type: sequence
-
system_to_load
¶ Electricity to load from system [kW]
Type: sequence
-