We will be performing a major infrastructure and web site ugprades on Friday, September 27th 8:00 am - 5:00 pm MST (UTC -7).

The website will be down during that time.

Combining SAM with user-defined scripts

  • spelland74
  • Topic Author
More
22 Feb 2016 20:42 #4091 by spelland74
Combining SAM with user-defined scripts was created by spelland74
Hello,

I am interested in using SAM to run PV simulations. However, I would like in some cases to combine it with in-house scripts (e.g. in Matlab or other language). For example, I would be interested in:
-Trying to estimate different PV module losses: e.g. thermal losses, spectral losses, reflection losses, etc.
-Calculating self-shading losses for arrays of thin film modules
-Replacing certain calculations (e.g. spectral loss calculations) as needed

I was wondering if you could tell me whether in your opinion this is feasible with SAM and, if so, what would be the most appropriate way to do it. I looked at SDK documentation briefly, and modules such as pvsam1, but I get the sense that pvsam1, for instance, includes many different models within it, and that these can't be separated out.

Alternatively, is it possible to have access to the SAM code for different PV models? For example, we have been using PVLIB from the PV Modeling Collaborative: pvpmc.sandia.gov/resources-for-members/pv_lib-toolbox/pv_lib-toolbox-for-python/pv_lib-python-functions-by-category/

I was wondering if SAM functions are available in the same way as PVLIB, so that we can use them in a modular way.

Best regards,
Sophie

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

  • pgilman
More
23 Feb 2016 16:48 #4092 by pgilman
Replied by pgilman on topic Combining SAM with user-defined scripts
Dear Sophie,
We provide descriptions of the algorithms implemented in SAM's models on the Performance Model Documentation  page of this website, but the code itself is not publicly available.
The SDK allows you to run the simulation modules like pvsamv1, but it does not provide access to internal parts of model. You could use your own models for the effects you describe and then apply loss factors to the output ov the SAM module. For example, you could model the effects of self shading by disabling the self-shading model in pvsamv1, making your own self-shading loss calculations, and then applying a loss factor to the output of pvsamv1.
Some of the models in the PV_LIB Toolbox are the same as those in SAM, but the entire SAM code itself is not available there.
Best regards,

Paul.

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

  • pgilman
More
23 Feb 2016 19:05 #4093 by pgilman
Replied by pgilman on topic Combining SAM with user-defined scripts
Dear Sophie,

To follow up on my previous reply, we do have plans to make it possible to replace parts of SAM's detailed photovoltaic model (pvsamv1) with your own models sometime in the 2016-2017 Federal fiscal year. We will redesign the architecture of that module to make it possible to use your own dynamic libraries (dll) with the SSC API to replace certain parts of the pvsamv1 module.

We will begin work on this soon, so if you (or anyone else reading this) have specific suggestions of parts of the PV model that you would like to replace in addition to the ones you list above, please let us know.

Best regards,
Paul.

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

  • pgilman
More
23 Feb 2016 19:09 #4094 by pgilman
Replied by pgilman on topic Combining SAM with user-defined scripts
And, one more thing: In the next version of SAM, due for release next week, there is a new PV self-shading option designed for some types of thin-film modules that uses a simple linear representation of reduction in POA irradiance instead of the more complex model for modules with crystalline silicon cells.

Best regards,
Paul.

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

  • spelland74
  • Topic Author
More
23 Feb 2016 23:58 #4095 by spelland74
Replied by spelland74 on topic Combining SAM with user-defined scripts
Dear Paul,

Thanks for your quick and helpful reply. Sounds like there are many interesting things in the pipeline for SAM, so I'll keep an eye out. Will also let you know if I think of models that we would like to be able to switch out. From our perspective, the best solution would be to have very modular functions (similar to PVLIB), that way it's possible to mix and match, and use in-house replacements as needed.

Thanks again,
Sophie

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

  • spelland74
  • Topic Author
More
24 Feb 2016 00:14 #4096 by spelland74
Replied by spelland74 on topic Combining SAM with user-defined scripts
Follow up question: Out of curiosity, why was the decision made not to make the SAM source code publicly available?

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

Moderators: pgilman
Powered by Kunena Forum