PySAM is a Python package for the National Renewable Energy Laboratory’s System Advisor Model (SAM). It is part of the SAM Software Development Kit (SDK), which provides tools for developers who write code that interacts with the SAM Simulation Core (SSC) application programming interface (API).
SSC, SAM, and PySAM are NREL open source code projects hosted on GitHub.com.
SAM is a desktop application with a graphical user interface that provides user access to the SSC inputs and outputs, manages SSC inputs, and provides additional functions for modeling tasks such as sizing system components, calculating SSC inputs from user interface inputs, and parametric and stochastic simulations.
PySAM is a Python package built on the PySSC wrapper for SSC. PySAM provides access to SSC inputs and outputs with some additional functions for building renewable energy models in Python.
The PySAM GitHub repository includes code examples of some common tasks.
SAM’s user interface performs internal calculations to size system components, calculate values for SSC inputs, and other functions that are either not part of SSC or are integrated into the SSC compute modules in a way that is not transparent. Before you create a model in PySAM, create it in SAM and run test simulations to verify that the model works as you expect. Then set it up in PySAM and compare results with SAM. See xxxGotcha for more details.
Recordings of NREL webinars on PySAM are available on the SAM website, along with more information and documentation about SAM.