Hi Han,
The automatic battery bank sizing option in the SAM desktop application is not available in PySAM. The user interface performs a series of sizing calculations and checks to ensure all of the inputs to the pvsamv1 battery model are correct that are not available in PySAM.
In PySAM, you must specify the number of cells in series and the number of strings of cells to size the battery bank.
The DC battery bank capacity (kW DC) and voltage (VDC) are defined as:
batt_computed_bank_capacity = batt_Qfull * batt_computed_voltage * batt_bank_nstrings * 0.001
batt_computed_voltage = batt_Vnom_default * batt_bank_ncells_serial
The AC charge and discharge rates (kW AC) depend on whether the battery is AC- or DC-connected.
For a DC-connected battery (batt_ac_or_dc = 0):
batt_bank_power_discharge_ac = batt_computed_bank_capacity * inv_eff
batt_bank_power_charge_ac = batt_computed_bank_capacity / inv_eff
The inverter efficiency (inv_eff) depends on the inverter model:
if (inverter_model== 0)
inv_eff = inv_snl_eff_cec
else if (inverter_model == 1)
inv_eff = ${inv_ds_eff}
else if (inverter_model == 2)
inv_eff = ${inv_pd_eff}
else if (inverter_model == 3)
inv_eff = ${inv_cec_cg_eff_cec}
inv_eff *= batt_dc_dc_efficiency * 0.01 * 0.01
For an AC-connected battery (batt_ac_or_dc = 1):
batt_bank_power_discharge_ac =batt_computed_bank_capacity * ( batt_dc_ac_efficiency * 0.01)
batt_bank_power_charge_ac = batt_computed_bank_capacity / ( batt_dc_ac_efficiency * 0.01 )
Best regards,
Paul.