Battwatts¶
Simplified battery storage model
-
PySAM.Battwatts.
default
(config) → Battwatts¶ Load defaults for the configuration
config
. Available configurations are:- “PVWattsBatteryCommercial”
- “PVWattsBatteryHostDeveloper”
- “PVWattsBatteryResidential”
- “PVWattsBatteryThirdParty”
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.Battwatts.
from_existing
(data, optional config) → Battwatts¶ Share data with an existing PySAM class. If
optional config
is a valid configuration name, load the module’s defaults for that configuration.
-
PySAM.Battwatts.
new
() → Battwatts¶
-
PySAM.Battwatts.
wrap
(ssc_data_t) → Battwatts¶ Load data from a PySSC object.
Warning
Do not call PySSC.data_free on the ssc_data_t provided to
wrap()
Battwatts is a wrapper for the SSC compute module cmod_battwatts.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.Battwatts.
Battwatts
¶ 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
-
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) → Union[None, float, dict, sequence, str]¶ Get or set by name a value in any of the variable groups.
-
Lifetime Group¶
-
class
PySAM.Battwatts.Battwatts.
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
¶ Enable 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
-
Battery Group¶
-
class
PySAM.Battwatts.Battwatts.
Battery
¶ -
assign
(dict) → None¶ Assign attributes from dictionary, overwriting but not removing values.
Battery_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary.
-
replace
(dict) → None¶ Replace attributes from dictionary, unassigning values not present in input
dict
.Battery_vals = { var: val, ...}
-
ac
¶ AC inverter power [W]
Type: sequence
-
batt_custom_dispatch
¶ Battery Dispatch [kW]
Required: Required if batt_simple_dispatch=2
Type: sequence
-
batt_simple_chemistry
¶ Battery Chemistry [0=LeadAcid,1=Li-ion/2]
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
Type: float
-
batt_simple_dispatch
¶ Battery Dispatch [0=PeakShavingLookAhead,1=PeakShavingLookBehind,2=Custom]
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
Type: float
-
batt_simple_enable
¶ Enable Battery [0/1]
Constraints: BOOLEAN
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
Type: float
-
batt_simple_kw
¶ Battery Power [kW]
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
Type: float
-
batt_simple_kwh
¶ Battery Capacity [kWh]
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
Type: float
-
batt_simple_meter_position
¶ Battery Meter Position [0=BehindTheMeter,1=FrontOfMeter]
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
Type: float
-
crit_load
¶ Critical electricity load (year 1) [kW]
Type: sequence
-
dc
¶ DC array power [W]
Type: sequence
-
inverter_efficiency
¶ Inverter Efficiency [%]
Constraints: MIN=0,MAX=100
Type: float
-
load
¶ Electricity load (year 1) [kW]
Type: sequence
-
Load Group¶
-
class
PySAM.Battwatts.Battwatts.
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, ...}
-
grid_outage
¶ Grid outage in this time step [0/1]
Options: 0=GridAvailable,1=GridUnavailable,Length=load
Type: sequence
-
load_escalation
¶ Annual load escalation [%/year]
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
Type: sequence
-
run_resiliency_calcs
¶ Enable resilence calculations for every timestep [0/1]
Options: 0=DisableCalcs,1=EnableCalcs
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
Type: float
-
GridLimits Group¶
-
class
PySAM.Battwatts.Battwatts.
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
-
Outputs Group¶
-
class
PySAM.Battwatts.Battwatts.
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_crit_load
¶ Critical load energy (year 1) [kWh]
Type: float
-
annual_crit_load_unmet
¶ Critical load energy unmet (year 1) [kWh]
Type: float
-
annual_crit_load_unmet_percentage
¶ Critical load unmet percentage (year 1) [%]
Type: float
-
annual_energy_distribution_time
¶ Annual energy production as function of time [kW]
Type: sequence[sequence]
-
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
-
annual_outage_losses_unmet
¶ Battery and system losses unmet energy (year 1) [kWh]
Type: float
-
average_battery_conversion_efficiency
¶ Battery average cycle conversion efficiency [%]
Type: float
-
average_battery_roundtrip_efficiency
¶ Battery average roundtrip efficiency [%]
Type: float
-
avg_critical_load
¶ Hours of autonomy during grid outage critical load met [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
¶ Battery loss from 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 AC [kW]
Type: sequence
-
batt_power_dc
¶ Electricity to/from battery DC [kW]
Type: sequence
-
batt_power_target
¶ Electricity battery power target for automated dispatch [kW]
Type: sequence
-
batt_pvs_PV_ramp_interval
¶ PV smoothing PV power sampled [kW]
Type: sequence
-
batt_pvs_P_pv_ac
¶ PV smoothing PV power before smoothing [kW]
Type: sequence
-
batt_pvs_battpower
¶ PV smoothing battpower [kW]
Type: sequence
-
batt_pvs_battsoc
¶ PV smoothing battery SOC [%]
Type: sequence
-
batt_pvs_curtail
¶ PV smoothing curtailed power [kW]
Type: sequence
-
batt_pvs_energy_to_grid_percent
¶ PV smoothing energy to grid percent (loss due to curtail and battery loss) [%]
Type: float
-
batt_pvs_energy_to_grid_percent_sam
¶ PV smoothing energy to grid percent actual (loss due to curtail and battery loss) [%]
Type: float
-
batt_pvs_forecast_pv_energy
¶ PV smoothing PV power forecast [kW]
Type: sequence
-
batt_pvs_outpower
¶ PV smoothing outpower [kW]
Type: sequence
-
batt_pvs_violation_count
¶ PV smoothing violation count
Type: float
-
batt_pvs_violation_list
¶ PV smoothing violation
Type: sequence
-
batt_pvs_violation_percent
¶ PV smoothing violation percent (of all intervals-including nighttime) [%]
Type: float
-
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
¶ Battery loss from ancillary equipment [kW]
Type: sequence
-
batt_temperature
¶ Battery temperature [C]
Type: sequence
-
batt_to_grid
¶ Electricity to grid from battery AC [kW]
Type: sequence
-
batt_to_inverter_dc
¶ Electricity to inverter from battery DC [kW]
Type: sequence
-
batt_to_load
¶ Electricity to load from battery AC [kW]
Type: sequence
-
batt_to_system_load
¶ Electricity to system loads from battery AC [kW]
Type: sequence
-
batt_voltage
¶ Battery voltage [V]
Type: sequence
-
batt_voltage_cell
¶ Battery cell voltage [V]
Type: sequence
-
cdf_of_surviving
¶ Hours of autonomy during grid outage cumulative probabilities
Type: sequence
-
crit_load
¶ Critical load in this timestep [kW]
Type: sequence
-
crit_load_unmet
¶ Critical load unmet in this timestep [kW]
Type: sequence
-
fuelcell_to_batt
¶ Electricity to battery from fuel cell AC [kW]
Type: sequence
-
gen
¶ System power generated [kW]
Type: sequence
-
gen_without_battery
¶ Power produced without the battery or curtailment [kW]
Type: sequence
-
grid_power
¶ Electricity to/from grid AC [kW]
Type: sequence
-
grid_power_target
¶ Electricity grid power target for automated dispatch [kW]
Type: sequence
-
grid_to_batt
¶ Electricity to battery from grid AC [kW]
Type: sequence
-
grid_to_load
¶ Electricity to load from grid AC [kW]
Type: sequence
-
interconnection_loss
¶ Electricity loss due to curtailment interconnection outage [kW]
Type: sequence
-
market_sell_rate_series_yr1
¶ Power price for battery dispatch [$/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_batt_to_system_load
¶ Energy to system loads from battery [kWh]
Type: sequence
-
monthly_crit_load
¶ Critical load energy [kWh]
Type: sequence
-
monthly_crit_load_unmet
¶ Critical load energy unmet [kWh]
Type: sequence
-
monthly_crit_load_unmet_percentage
¶ Critical load unmet percentage [%]
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_interconnection_loss
¶ Energy loss due to curtailment, interconnection, or outage [kWh]
Type: sequence
-
monthly_outage_losses_unmet
¶ Battery and system losses unmet energy [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
¶ Hours of autonomy during grid outage hour list from min to max [hr]
Type: sequence
-
outage_losses_unmet
¶ Battery and system losses unmet in this timestep [kW]
Type: sequence
-
pdf_of_surviving
¶ Hours of autonomy during grid outage probabilities
Type: sequence
-
resilience_hrs
¶ Hours of autonomy during grid outage at each timestep [hr]
Type: sequence
-
resilience_hrs_avg
¶ Hours of autonomy during grid outage average [hr]
Type: float
-
resilience_hrs_max
¶ Hours of autonomy during grid outage maximum [hr]
Type: float
-
resilience_hrs_min
¶ Hours of autonomy during grid outage minimum [hr]
Type: float
-
survival_function
¶ Hours of autonomy during grid outage survival function
Type: sequence
-
system_to_batt
¶ Electricity to battery from system AC [kW]
Type: sequence
-
system_to_batt_dc
¶ Electricity to battery from system DC [kW]
Type: sequence
-
system_to_grid
¶ Electricity to grid from system AC [kW]
Type: sequence
-
system_to_load
¶ Electricity to load from system AC [kW]
Type: sequence
-