- Posts: 2
PySAM using different batt_bank_power and batt_bank_size
- hanleelalala
- Topic Author
Less
More
07 May 2020 10:49 #8175
by hanleelalala
PySAM using different batt_bank_power and batt_bank_size was created by hanleelalala
Dear Paul,
First, thank you for your effort of doing such important thing!
I am using PySAM to do parametric analysis using PV Battery (detailed). I am using module Pvsamv1 if that's correct. The parameters I want to change is batt_bank_power and batt_bank_size. However, I can't find the exact parameter in pv_model.BatterySystem. The closest thing I can find for batt_bank_size is pv_model.Outputs.batt_bank_installed_capacity and for batt_bank_power there are four similar parameter:
1. pv_model.BatterySystem.batt_power_charge_max_kwac
2. pv_model.BatterySystem.batt_power_charge_max_kwdc
3. pv_model.BatterySystem.batt_power_discharge_max_kwac
4. pv_model.BatterySystem.batt_power_discharge_max_kwdc
I want to ask if there's a function to change four of them at one time given a power I want or should I change them one by one.
If I have to change them one by one, the dc power is close to what I desired, but the ac power are different, is the calculation simply the dc power divided by batt_dc_ac_efficiency or multiply by batt_dc_ac_efficiency? I am asking this because besides batt_dc_ac_efficiency there are a lot of variables such as batt_dc_dc_efficiency and I wonder if the calculation involves these parameters.
Is there anything else I should change besides these four parameters?
Sorry for popping up with a lot of questions and thank you in advance!
Han
First, thank you for your effort of doing such important thing!
I am using PySAM to do parametric analysis using PV Battery (detailed). I am using module Pvsamv1 if that's correct. The parameters I want to change is batt_bank_power and batt_bank_size. However, I can't find the exact parameter in pv_model.BatterySystem. The closest thing I can find for batt_bank_size is pv_model.Outputs.batt_bank_installed_capacity and for batt_bank_power there are four similar parameter:
1. pv_model.BatterySystem.batt_power_charge_max_kwac
2. pv_model.BatterySystem.batt_power_charge_max_kwdc
3. pv_model.BatterySystem.batt_power_discharge_max_kwac
4. pv_model.BatterySystem.batt_power_discharge_max_kwdc
I want to ask if there's a function to change four of them at one time given a power I want or should I change them one by one.
If I have to change them one by one, the dc power is close to what I desired, but the ac power are different, is the calculation simply the dc power divided by batt_dc_ac_efficiency or multiply by batt_dc_ac_efficiency? I am asking this because besides batt_dc_ac_efficiency there are a lot of variables such as batt_dc_dc_efficiency and I wonder if the calculation involves these parameters.
Is there anything else I should change besides these four parameters?
Sorry for popping up with a lot of questions and thank you in advance!
Han
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
11 May 2020 10:08 - 11 May 2020 10:11 #8179
by pgilman
Replied by pgilman on topic PySAM using different batt_bank_power and batt_bank_size
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:
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):
The inverter efficiency (inv_eff) depends on the inverter model:
For an AC-connected battery (batt_ac_or_dc = 1):
Best regards,
Paul.
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:
Code:
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):
Code:
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:
Code:
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):
Code:
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.
Last edit: 11 May 2020 10:11 by pgilman.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
11 May 2020 12:42 - 12 May 2020 10:24 #8180
by pgilman
Replied by pgilman on topic PySAM using different batt_bank_power and batt_bank_size
There is also a "helper function" in PySAM that packages these equations along with others that are necessary to properly size the battery for different chemistries:
github.com/NREL/pysam/blob/master/files/BatteryTools.py
And this test demonstrates how to use the helper function for different battery chemistries:
github.com/NREL/pysam/blob/master/tests/test_BatteryTools.py
Best regards,
Paul.
github.com/NREL/pysam/blob/master/files/BatteryTools.py
And this test demonstrates how to use the helper function for different battery chemistries:
github.com/NREL/pysam/blob/master/tests/test_BatteryTools.py
Best regards,
Paul.
Last edit: 12 May 2020 10:24 by pgilman.
Please Log in or Create an account to join the conversation.
- hanleelalala
- Topic Author
Less
More
- Posts: 2
12 May 2020 10:19 #8189
by hanleelalala
Replied by hanleelalala on topic PySAM using different batt_bank_power and batt_bank_size
Dear Paul:
Thank you sooo much! Really appreciate your work and I'll let you know if I have any more questions!
Thank you sooo much! Really appreciate your work and I'll let you know if I have any more questions!
Please Log in or Create an account to join the conversation.
Moderators: pgilman