Review of Open Source Tools for PV Modeling

Solar power researchers and engineers are developing a growing number of open source software tools for energy modeling. This paper and its accompanying website aim to catalog these tools. We also discuss the challenges and opportunities for funding open source PV software and for maintaining the open source PV modeling community.


I. INTRODUCTION
Open source software is code that is publicly available and free to use according to the terms of a license [1]. Open source software is used across industry from start-ups to Fortune 500 companies, academia, and national laboratories. The open source PV modeling community continues to grow, as well. Therefore, it is important to evaluate the benefits and challenges of open source software in the solar industry.
The purpose of this paper is to: 1. Promote the use of open source software in the PV modeling community, 2. Summarize the state of open source for PV modeling, and 3. Stimulate discussion of how to support open source PV modeling projects in the future. Open source software can be beneficial for a number of reasons. It encourages reproducibility and replicability in scientific studies [2]. Open source analyses complement scientific publications by encouraging transparency and collaboration, e.g. [3][4][5]. According to GitHub, open source software promotes collaboration, adoption, and transparency [6]. Google states that open source is good engineering economics in its open source guide [7]. In the PV industry, open source software may reduce project financing soft costs because algorithms and implementations are transparent and have been vetted by users, so they are inherently less risky.
Open source software also has a number challenges [8]. These challenges include funding, community, version control, programming expertise, quantifying impact, and professional credit. We will discuss these challenges in the context of PV modeling. Table 1 shows a summary of the open source PV modeling tools known to the authors as of this writing. Please see the companion website openpvtools.readthedocs.io for an updated list [9]. Here, we briefly describe each tool.

II. OPEN SOURCE PV MODELING TOOLS
PVLib Matlab is a general purpose PV modeling toolkit for the Matlab platform [10]. It is primarily developed at Sandia National Laboratories, but contains contributions from members of the PV Performance Modeling Collaborative (PVPMC; see www.pvpmc.org). PVLib Matlab includes extensive documentation and extensive examples.
PVLib Python is a general purpose PV modeling toolkit written in Python [11]. PVLib Python originated as a port of PVLib Matlab and contains many of the Matlab project's features. The PVLib Python and Matlab projects are developed independently, but some developers contribute to both projects. PVLib Python is a dependency of other open source tools. PVLib Python includes extensive function-level documentation, and a collection of examples in its online documentation and Jupyter notebooks.
System Advisory Model is a popular desktop application for PV, CSP, wind, and financial modeling [12]. It is developed at the National Renewable Energy Laboratory. SAM has a MIT license for commercial entities and a GPL 3 license for national labs, universities, and non-profits. The SAM Simulation Core (SSC) is the computational library for SAM. NREL has also developed the SAM SDK for writing scripts to interact with SAM and the SSC.
rdtools is a library for PV degradation analysis. It is developed at NREL and written in Python [13]. It includes a Jupyter notebook with an example analysis. rdtools uses PVLib Python.
PVFree is a web application and API for obtaining PV modeling parameters.
SolarUtils is a package that contains Python wrappers for NREL's solar position and spectral decomposition packages (written in C). It was developed by SunPower.
Pecos is a performance monitoring tool originally developed for PV but with applications to other systems [14].

Pecos includes online documentation and examples. Pecos uses PVLib Python. It is developed at Sandia and written in Python.
SolPy is a general purpose PV modeling tool.
PVMismatch is a tool for IV curves for modules with heterogeneous cells. It is developed at SunPower and written in Python.
photovoltaic is a general purpose PV modeling package. It is developed at Arizona State University for educational use. It is written in Python.
feedinlib is a tool for PV time series modeling. It is part of the Open Energy Modelling Framework.
CASSYS is a simulation tool for grid-tied PV systems. CASSYS is developed by Canadian Solar O&M Inc [15]. The user interface is a Microsoft Excel spreadsheet, and the calculations are run by a program. CASSYS includes a user guide, a model-description document (useful for general PV modeling), and a comparison to PVSyst document.
BifacialPV is a tool for bifacial PV modeling and includes functions for self-shading, back surface irradiance, and tracking. It is written in Python.
solaR is a general purpose tool for PV time series modeling written for the R programming language [16]. It includes functions and classes for calculating solar radiation, transposition, and PV power.
pvfactors is a tool for diffuse shading and bifacial irradiance modeling [17]. It is written in Python.

III. FUNDING
Funding for open source PV modeling software may be categorized by funding source (public or private) and by funding kind (direct or indirect). Here, we define direct funding as resources that are specifically allocated for developers to support or create an open source tool. In contrast, we define indirect funding as resources that are used A challenge for open source software is that direct funding for it is inconsistent. This is especially true for funding that goes towards maintaining existing functionality rather than adding new features. Indirect funding of open source PV software has enabled packages such as PVLib Python to receive minor, regular updates. Whether or not indirect funding is sufficient for the long-term health of a project is an open question.
Funding agencies demand to know the impact of their awards, however, it can be difficult to accurately quantify the impact of an open source software project. This is especially true if the project is used by or incorporated into additional projects. The developers of many of the tools described here have made efforts towards cataloging their impacts but are often able to report only statistics indicating interest, such as numbers of downloads and webpage views. To our knowledge, there is no comprehensive public repository with this information for open source PV tools.
Most public funding for open source PV modeling software has been through the U.S. Department of Energy's Office of Energy Efficiency and Renewable Energy. EERE proposals often require data management plans that describe how a project's data, including software code, will be disseminated. EERE's data management plan instructions suggest open source and websites such as GitHub as acceptable methods to disseminate results. Funding agencies could provide further indirect support for open source software by explicitly encouraging open source by-products of funding.
Some users of open source PV tools may be interested in providing relatively small amounts of funding to sustain or improve the tools that they use. However, many of the lead developers of the projects discussed here are employed by government labs, universities, or large companies. Contracting with large institutions can be difficult, and this effectively creates a minimum contract value that is often more than a single user can contribute. We suggest that the open source PV tools developers explore alternatives such as spin-off companies focused on open source development, utilizing intermediaries such as the Numfocus organization or donations through a university foundation, and micropayment methods such as Patreon.

IV. COMMUNITY
User and developer communities ultimately drive the success or failure of an open source project. Developing these communities is a challenging task. The PVPMC has helped to establish a community that supports many of the projects discussed here. A challenge going forward is to grow the community while maintaining or improving its character.
The open source PV modeling community should recognize that professional conduct is critical to attracting potential contributors, encouraging diversity, and increasing the overall impact of a project. The challenge for open source leaders is to create systems that promote positive contributors and prevent negative contributions. The open source PV modeling community is currently small enough that many contributors know each other, and this may help to maintain the professionalism of the community. As PV grows globally, we hope that our open source communities will also grow. Additional efforts, such as implementing a code of conduct for open source projects and meetings [18], may be useful for maintaining a positive, collaborative environment as the community grows.

V. ADDITIONAL CHALLENGES AND OPPORTUNITIES
Here we discuss miscellaneous additional challenges and opportunities for open source PV modeling. Some would-be contributors are deterred by unfamiliarity with open source tools such as version control and the GitHub website. Contributors may also be deterred by a feeling that their code is not of sufficient quality, and by a projects lack of support for helping potential contributors improve their code. The PVPMC has previously invited talks on open source tooling, and this may be an area to further develop. Inspiration may be found by looking at related fields. For example, the American Meteorological Society's annual conference includes a Symposium on Advances in Modeling and Analysis Using Python. A similar software-focused session could be added to the PVSC or other PV-related conferences. The 2018 AMS Python Symposium included a "Show me your stack!" panel session in which the community could learn how four different developers approach problems.

VI. CONCLUSIONS
The PV modeling community is developing a set of open source tools that are growing in popularity. Outstanding challenges include identifying sustainable funding sources for project maintenance and expansion, maintaining a positive, collaborative environment as the community grows, and lowering barriers to entry.