- Posts: 5423
Running SAM .lk script from Python
- pgilman
Less
More
16 Dec 2020 15:49 #9124
by pgilman
Replied by pgilman on topic Running SAM .lk script from Python
Hi Joel,
The general definition is:
DC - AC Ratio = Array DC Nameplate Capacity (kWdc) / Inverter AC Nameplate Capacity (kWac)
To calculate the ratio, assuming you are using the Sandia Inverter model and CEC Module Model with Database Paramters model, you could write Python code based on this pseudocode:
pdc = get( cec_imp_ref ) * get( cec_v_mp_ref)
pac = get( inv_snl_paco )
dc_ac_ratio = pdc / pac
Where get() is whatever function you are using to read the values of SSC input variables. Those values should all be in kW,.
Thanks,
Paul.
The general definition is:
DC - AC Ratio = Array DC Nameplate Capacity (kWdc) / Inverter AC Nameplate Capacity (kWac)
To calculate the ratio, assuming you are using the Sandia Inverter model and CEC Module Model with Database Paramters model, you could write Python code based on this pseudocode:
pdc = get( cec_imp_ref ) * get( cec_v_mp_ref)
pac = get( inv_snl_paco )
dc_ac_ratio = pdc / pac
Where get() is whatever function you are using to read the values of SSC input variables. Those values should all be in kW,.
Thanks,
Paul.
Please Log in or Create an account to join the conversation.
- joel3003
- Topic Author
Less
More
- Posts: 9
16 Dec 2020 17:21 #9127
by joel3003
Replied by joel3003 on topic Running SAM .lk script from Python
Hi Paul,
Thank you so much! This is very helpful to what I am doing. Just wondering, how would the pseudocode formulas you have written change if I am using CEC for both the inverter and the module? Specifically, I am using "CEC Performance Model with Module Database" and "Inverter CEC Database".
Thanks,
Joel
Thank you so much! This is very helpful to what I am doing. Just wondering, how would the pseudocode formulas you have written change if I am using CEC for both the inverter and the module? Specifically, I am using "CEC Performance Model with Module Database" and "Inverter CEC Database".
Thanks,
Joel
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
17 Dec 2020 13:56 #9130
by pgilman
Replied by pgilman on topic Running SAM .lk script from Python
Hi Joel,
The "Inverter CEC Database" model is the same as the Sandia Inverter model, whose input variable names mostly start with "inv_snl_". Sorry these model names are so confusing.
Thanks,
Paul.
The "Inverter CEC Database" model is the same as the Sandia Inverter model, whose input variable names mostly start with "inv_snl_". Sorry these model names are so confusing.
Thanks,
Paul.
Please Log in or Create an account to join the conversation.
- joel3003
- Topic Author
Less
More
- Posts: 9
27 Jan 2021 17:24 #9243
by joel3003
Replied by joel3003 on topic Running SAM .lk script from Python
Hi Paul,
Thanks for your help - I have managed to solve the issue!
A follow up question: How would I be able to tell if my simulation is using the '6par_' module parameters as opposed to the 'cec_' module parameters? Does it always default to cec? or is there a way to change the simulation between using 6par and cec for the modules?
Kind regards,
Joel
Thanks for your help - I have managed to solve the issue!
A follow up question: How would I be able to tell if my simulation is using the '6par_' module parameters as opposed to the 'cec_' module parameters? Does it always default to cec? or is there a way to change the simulation between using 6par and cec for the modules?
Kind regards,
Joel
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
28 Jan 2021 15:53 #9245
by pgilman
Replied by pgilman on topic Running SAM .lk script from Python
Hi Joel,
Use 'module_model' to set the model option. There is a description here:
nrel-pysam.readthedocs.io/en/master/modules/Pvsamv1.html#module-group
Best regards,
Paul.
Use 'module_model' to set the model option. There is a description here:
nrel-pysam.readthedocs.io/en/master/modules/Pvsamv1.html#module-group
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman