Different Values: SAM and PySam

  • Samuel
  • Topic Author
More
27 Jun 2022 12:21 #11186 by Samuel
Different Values: SAM and PySam was created by Samuel
Hello, I'm currently using PySAM (Pvwattsv5) and I'm having different output values ​​than SAM (2018.11.11) with no financial model using the

File Attachment:

File Name: Farol.csv
File Size:395 KB
in attachment. By SAM I generated the Python code (PySSC) and in it I have the same output values ​​as the application, but using the same input values ​​of the code generated in PySAM I having values ​​are a little different.

Output SAM:




Output PySSC (genered code):


Output PySAM: 


PySAM Code:
Code:
import PySAM.Pvwattsv5 as pv system_model = pv.new() systemResource = {     'solar_resource_file': r'C:/SAM/2018.11.11/solar_resource/Farol.csv', } AdjustmentFactors = {     'constant': 2.49,           #Ajuste de perda constante } systemDesign = {     #Parametros do Sistema     'system_capacity': 1333.3299560546875,    #Capacidade     'module_type': 1,                         #Tipo de Modulo (1 - Premium)     'dc_ac_ratio': 1.3333300352096558,     'inv_eff': 97,                            #Eficiencia do Inversor (%)     #Orientacao     'array_type': 0,                          #Tipo de Montagem (0 - Fixed Open Rack)     'tilt': 20,                               #Inclinacao (graus)     'azimuth': 0.0,                           #Azimuth (graus)     'gcr': 0.40000000596046448,                              #Ground Coverage Ratio     #total dc power loss     'losses': 11.424985885620117 } system_model.SolarResource.assign(systemResource) system_model.SystemDesign.assign(systemDesign) system_model.AdjustmentFactors.assign(AdjustmentFactors) system_model.execute(0) print(system_model.Outputs.capacity_factor)

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

  • Paul Gilman
More
18 Jan 2023 17:56 #11841 by Paul Gilman
Replied by Paul Gilman on topic Different Values: SAM and PySam
Hi Samuel,

This relatively small difference is probably due to values being passed to PySAM having more digits to the right of the decimal point than the SAM inputs.

Best regards,
Paul.

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

Moderators: Paul Gilman
Powered by Kunena Forum