Battwatts¶
Wrapper for SAM Simulation Core model: cmod_battwatts.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:
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.
Battwatts model description
Simplified battery storage model
-
PySAM.Battwatts.
default
(config) → Battwatts¶ Use default attributes config options:
- “PVWattsBatteryCommercial”
- “PVWattsBatteryHostDeveloper”
- “PVWattsBatteryResidential”
- “PVWattsBatteryThirdParty”
-
PySAM.Battwatts.
from_existing
(data, optional config) → Battwatts¶ Share underlying data with an existing PySAM class. If config provided, default attributes are loaded otherwise.
-
PySAM.Battwatts.
new
() → Battwatts¶
-
PySAM.Battwatts.
wrap
(ssc_data_t) → Battwatts¶ Use existing PySSC data
Warning
Do not call PySSC.data_free on the ssc_data_t provided to
wrap
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
-
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
() → 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
¶ Enable lifetime simulation [0/1]
Options: 0=SingleYearRepeated,1=RunEveryYear
Constraints: BOOLEAN
Required: If not provided, assumed to be 0
Type: float
-
Battery Group¶
-
class
PySAM.Battwatts.Battwatts.
Battery
¶ -
assign
() → None¶ Assign attributes from dictionary
Battery_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
ac
¶ AC inverter power [W]
Type: sequence
-
batt_custom_dispatch
¶ Battery Dispatch [kW]
Required: True if batt_simple_dispatch=2
Type: sequence
-
batt_simple_chemistry
¶ Battery Chemistry [0=LeadAcid,1=Li-ion/2]
Required: If not provided, assumed to be 0
Type: float
-
batt_simple_dispatch
¶ Battery Dispatch [0=PeakShavingLookAhead,1=PeakShavingLookBehind,2=Custom]
Required: If not provided, assumed to be 0
Type: float
-
batt_simple_enable
¶ Enable Battery [0/1]
Constraints: BOOLEAN
Required: If not provided, assumed to be 0
Type: float
-
batt_simple_kw
¶ Battery Power [kW]
Required: If not provided, assumed to be 0
Type: float
-
batt_simple_kwh
¶ Battery Capacity [kWh]
Required: If not provided, assumed to be 0
Type: float
-
batt_simple_meter_position
¶ Battery Meter Position [0=BehindTheMeter,1=FrontOfMeter]
Required: If not provided, assumed to be 0
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¶
Outputs Group¶
-
class
PySAM.Battwatts.Battwatts.
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
¶ System power generated [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
-