Battwatts¶
Wrapper for SAM Simulation Core model: cmod_battwatts.cpp
Creating an Instance¶
There are three methods to create a new instance of a PySAM module. Using default
populates the newclass’ attributes with default values specific to a config
. Each technology-financialconfiguration corresponds to a SAM GUI configuration. Using new
creates an instance with empty attributes. The wrap
function allows compatibility with PySSC, for details, refer to PySSC.
Battwatts model description
Simplified battery storage model
-
PySAM.Battwatts.
default
(config) → Battwatts¶ Use financial model-specific default attributes config options:
- “PVWattsCommercial”
- “PVWattsResidential”
- “PVWattsThirdParty”
-
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 = { 'BatteryModelSimple': { var: val, ...}, ...}
-
execute
(int verbosity) → None¶ Execute simulation with verbosity level 0 (default) or 1
-
export
() → dict¶ Export attributes into nested dictionary
-
PVWatts Group¶
FinancialAnalysisParameters Group¶
BatteryModelSimple Group¶
-
class
PySAM.Battwatts.Battwatts.
BatteryModelSimple
¶ -
assign
() → None¶ Assign attributes from dictionary
BatteryModelSimple_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
batt_simple_chemistry
¶ float: Battery Chemistry [0=lead acid/1=Li-ion/2]
Required: set to 0 if not provided.
-
batt_simple_dispatch
¶ float: Battery Dispatch [0=peak shaving look ahead/1=peak shaving look behind]
Required: set to 0 if not provided.
-
batt_simple_enable
¶ float: Enable Battery [0/1]
Constraints: BOOLEAN
Required: set to 0 if not provided.
-
batt_simple_kw
¶ float: Battery Power [kW]
Required: set to 0 if not provided.
-
batt_simple_kwh
¶ float: Battery Capacity [kWh]
Required: set to 0 if not provided.
-
batt_simple_meter_position
¶ float: Battery Meter Position [0=behind meter/1=front of meter]
Required: set to 0 if not provided.
-
Common Group¶
-
class
PySAM.Battwatts.Battwatts.
Common
¶ -
assign
() → None¶ Assign attributes from dictionary
Common_vals = { var: val, ...}
-
export
() → dict¶ Export attributes into dictionary
-
ac
¶ sequence: AC inverter power [W]
-
dc
¶ sequence: DC array power [W]
-
inverter_efficiency
¶ float: Inverter Efficiency [%]
-
inverter_model
¶ float: Inverter model specifier
Options: 0=cec,1=datasheet,2=partload,3=coefficientgenerator,4=generic
Constraints: INTEGER,MIN=0,MAX=4
-
ElectricLoadOther 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
¶ sequence: Annual energy exported to grid [kWh]
-
annual_import_to_grid_energy
¶ sequence: Annual energy imported from grid [kWh]
-
average_battery_conversion_efficiency
¶ float: Battery average cycle conversion efficiency [%]
-
average_battery_roundtrip_efficiency
¶ float: Battery average roundtrip efficiency [%]
-
batt_DOD
¶ sequence: Battery cycle depth of discharge [%]
-
batt_I
¶ sequence: Battery current [A]
-
batt_SOC
¶ sequence: Battery state of charge [%]
-
batt_annual_charge_energy
¶ sequence: Battery annual energy charged [kWh]
-
batt_annual_charge_from_grid
¶ sequence: Battery annual energy charged from grid [kWh]
-
batt_annual_charge_from_pv
¶ sequence: Battery annual energy charged from PV [kWh]
-
batt_annual_discharge_energy
¶ sequence: Battery annual energy discharged [kWh]
-
batt_annual_energy_loss
¶ sequence: Battery annual energy loss [kWh]
-
batt_annual_energy_system_loss
¶ sequence: Battery annual system energy loss [kWh]
-
batt_bank_installed_capacity
¶ float: Battery bank installed capacity [kWh]
-
batt_bank_replacement
¶ sequence: Battery bank replacements per year [number/year]
-
batt_capacity_percent
¶ sequence: Battery capacity percent for lifetime [%]
-
batt_capacity_thermal_percent
¶ sequence: Battery capacity percent for temperature [%]
-
batt_conversion_loss
¶ sequence: Electricity loss in battery power electronics [kW]
-
batt_cost_to_cycle
¶ sequence: Computed cost to cycle [$/cycle]
-
batt_cycles
¶ sequence: Battery number of cycles
-
batt_dispatch_sched
¶ sequence[sequence]: Battery dispatch schedule
-
batt_power
¶ sequence: Electricity to/from battery [kW]
-
batt_power_target
¶ sequence: Electricity battery power target for automated dispatch [kW]
-
batt_pv_charge_percent
¶ float: Battery percent energy charged from PV [%]
-
batt_q0
¶ sequence: Battery total charge [Ah]
-
batt_q1
¶ sequence: Battery available charge [Ah]
-
batt_q2
¶ sequence: Battery bound charge [Ah]
-
batt_qmax
¶ sequence: Battery maximum charge with degradation [Ah]
-
batt_qmaxI
¶ sequence: Battery maximum capacity at current [Ah]
-
batt_qmax_thermal
¶ sequence: Battery maximum charge at temperature [Ah]
-
batt_system_loss
¶ sequence: Electricity loss from battery ancillary equipment [kW]
-
batt_temperature
¶ sequence: Battery temperature [C]
-
batt_to_grid
¶ sequence: Electricity to grid from battery [kW]
-
batt_to_load
¶ sequence: Electricity to load from battery [kW]
-
batt_voltage
¶ sequence: Battery voltage [V]
-
batt_voltage_cell
¶ sequence: Battery cell voltage [V]
-
fuelcell_to_batt
¶ sequence: Electricity to battery from fuel cell [kW]
-
gen
¶ sequence: System power generated [kW]
-
grid_power
¶ sequence: Electricity to/from grid [kW]
-
grid_power_target
¶ sequence: Electricity grid power target for automated dispatch [kW]
-
grid_to_batt
¶ sequence: Electricity to battery from grid [kW]
-
grid_to_load
¶ sequence: Electricity to load from grid [kW]
-
monthly_batt_to_grid
¶ sequence: Energy to grid from battery [kWh]
-
monthly_batt_to_load
¶ sequence: Energy to load from battery [kWh]
-
monthly_grid_to_batt
¶ sequence: Energy to battery from grid [kWh]
-
monthly_grid_to_load
¶ sequence: Energy to load from grid [kWh]
-
monthly_pv_to_batt
¶ sequence: Energy to battery from PV [kWh]
-
monthly_pv_to_grid
¶ sequence: Energy to grid from PV [kWh]
-
monthly_pv_to_load
¶ sequence: Energy to load from PV [kWh]
-
pv_to_batt
¶ sequence: Electricity to battery from PV [kW]
-
pv_to_grid
¶ sequence: Electricity to grid from PV [kW]
-
pv_to_load
¶ sequence: Electricity to load from PV [kW]
-