Running SAM .lk script from Python

  • Paul Gilman
More
16 Dec 2020 22:49 #9124 by Paul Gilman
Replied by Paul Gilman 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.

Please Log in or Create an account to join the conversation.

  • Joel Bulow
  • Topic Author
More
17 Dec 2020 00:21 #9127 by Joel Bulow
Replied by Joel Bulow 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

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
17 Dec 2020 20:56 #9130 by Paul Gilman
Replied by Paul Gilman 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.

Please Log in or Create an account to join the conversation.

  • Joel Bulow
  • Topic Author
More
28 Jan 2021 00:24 #9243 by Joel Bulow
Replied by Joel Bulow 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

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
28 Jan 2021 22:53 #9245 by Paul Gilman
Replied by Paul Gilman 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.

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum