SAM

System Advisor Model (SAM)

https://github.com/NREL/SAM

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 46 committers (2.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.3%) to scientific vocabulary

Keywords from Contributors

energy-system photovoltaics renewables renewable-energy energy-system-model transformers interactive mesh charts packaging
Last synced: 10 months ago · JSON representation

Repository

System Advisor Model (SAM)

Basic Info
  • Host: GitHub
  • Owner: NREL
  • License: bsd-3-clause
  • Language: C++
  • Default Branch: patch
  • Size: 1.39 GB
Statistics
  • Stars: 407
  • Watchers: 35
  • Forks: 192
  • Open Issues: 78
  • Releases: 21
Created over 13 years ago · Last pushed 10 months ago
Metadata Files
Readme Contributing License

README.md

System Advisor Model (SAM)

Build

The SAM Open Source Project repository contains the source code, tools, and instructions to build a desktop version of the National Renewable Energy Laboratory's System Advisor Model (SAM). SAM is a simulation program for electricity generation projects. It has models for different kinds of renewable energy systems and financial models for residential, commercial, and utility-scale projects. For more details about SAM's capabilities, see the SAM website at https://sam.nrel.gov/.

For a short video describing the SAM repositories, see https://youtu.be/E5z1iiZfZ3M.

The SAM release notes are in https://github.com/NREL/SAM/blob/gh-pages/doc/releasenotes.html.

The desktop version of SAM for Windows, Mac, or Linux builds from the following open source projects:

  • SSC is a set of "compute modules" that simulate different kinds of power systems and financial structures. It can be run directly using the SAM Software Development Kit. This is the source code for SAM's models, and is the repository to use for researching the algorithms underlying the models.

  • LK is a scripting language that is integrated into SAM. SAM's user interface uses LK to calculate values to display on input pages. The user interface includes a script editor that allows users to write their own scripts from the user interface.

  • wxWidgets is a cross-platform graphical user interface platform used for SAM's user interface, and for the development tools included with SSC (SDKtool) and LK (LKscript).

  • WEX is a set of extensions to wxWidgets for custom user-interface elements developed specifically for SAM, LK script, and DView.

  • Google Test is a C++ test framework that enables comprehensive unit-testing of software. Contributions to the project will eventually be required to have associated unit tests written in this framework.

  • jsoncpp is a C++ library that allows manipulating JSON values, including serialization and deserialization to and from strings.

  • Python/Miniconda is for integration of Python scripts with the SAM user interface.

This repository, SAM, contains the code for SAM's user interface that assigns values to inputs of the SSC compute modules, runs the modules in the correct order, and displays simulation results. It also includes tools for editing LK scripts, viewing time series results, and generating shade data from a 3-dimensional representation of a photovoltaic array or solar hot water collector and nearby shading objects.

The SAM repository also includes two libraries from Sandia National Laboratories, stepwise, and LHS, which are distributed as part of the Dakota platform, licensed under LGPL.

Building SAM

For build instructions see the wiki with specific instructions for:

Contributing

If you would like to report an issue with SAM or make a feature request, please let us know by adding a new issue on the issues page.

If you would like to submit code to fix an issue or add a feature, you can use GitHub to do so. Please see Contributing for instructions.

License

SAM's open source code is copyrighted by the Alliance for Sustainable Energy and licensed with BSD-3-Clause terms, found here.

The stepwise and LHS LGPL licensed libraries from Sandia National Laboratories are pre-compiled Fortran libraries that are included in the SAM repository as binaries in the Sandia folder. You can replace the binaries with different versions by compiling your own version and replacing the binary/executable viles in the Sandia folder.

Citing this package

System Advisor Model Version 2025.4.16 (2025). SAM source code. National Renewable Energy Laboratory. Golden, CO. Accessed April 18, 2025. https://github.com/NREL/SAM

Owner

  • Name: National Renewable Energy Laboratory
  • Login: NREL
  • Kind: organization
  • Location: Golden, CO

GitHub Events

Total
  • Fork event: 58
  • Create event: 133
  • Release event: 3
  • Issues event: 186
  • Watch event: 63
  • Delete event: 125
  • Member event: 2
  • Issue comment event: 189
  • Push event: 512
  • Pull request review comment event: 38
  • Gollum event: 12
  • Pull request event: 247
  • Pull request review event: 164
Last Year
  • Fork event: 58
  • Create event: 133
  • Release event: 3
  • Issues event: 186
  • Watch event: 63
  • Delete event: 125
  • Member event: 2
  • Issue comment event: 189
  • Push event: 512
  • Pull request review comment event: 38
  • Gollum event: 12
  • Pull request event: 247
  • Pull request review event: 164

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 14,279
  • Total Committers: 46
  • Avg Commits per committer: 310.413
  • Development Distribution Score (DDS): 0.723
Past Year
  • Commits: 504
  • Committers: 10
  • Avg Commits per committer: 50.4
  • Development Distribution Score (DDS): 0.677
Top Committers
Name Email Commits
Steve Janzou s****u@n****v 3,954
Paul Gilman p****n@e****t 1,699
Aron Dobos a****s@o****m 1,406
Ty Neises t****s@n****v 1,212
Janine Freeman j****n@n****v 1,040
Prilliman M****n@n****v 888
Paul Gilman c****n@g****m 823
dguittet d****t@n****v 659
nickdiorio n****o@g****m 597
Nick DiOrio n****o@n****v 489
Brian Mirletz b****z@n****v 415
Taylor Brown 6****5 177
Tom Ferguson t****n@n****v 145
Ben Elliston b****e@a****u 133
Michael Wagner m****r@n****v 119
Parangat Bhaskar p****4@g****m 97
Matthew Boyd m****d@g****m 96
Matthew Boyd m****d@n****v 80
janinefreeman j****n@n****v 69
David Ryberg u****m 46
Daniel Thom d****m@n****v 22
WHamilt2 w****n@n****v 17
Parangat Bhaskar p****r@n****v 16
dguittet 12
abhisheksparikh a****5@g****m 9
Brown t****2@n****v 9
Steven Janzou s****e@j****m 7
Boyd m****d@n****v 6
dependabot[bot] 4****] 4
Michael Berg b****1@g****m 3
and 16 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 482
  • Total pull requests: 734
  • Average time to close issues: 10 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 44
  • Total pull request authors: 14
  • Average comments per issue: 1.16
  • Average comments per pull request: 0.73
  • Merged pull requests: 664
  • Bot issues: 0
  • Bot pull requests: 6
Past Year
  • Issues: 107
  • Pull requests: 276
  • Average time to close issues: 19 days
  • Average time to close pull requests: 4 days
  • Issue authors: 12
  • Pull request authors: 10
  • Average comments per issue: 0.32
  • Average comments per pull request: 0.8
  • Merged pull requests: 235
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cpaulgilman (177)
  • brtietz (93)
  • mjprilliman (47)
  • sjanzou (38)
  • janinefreeman (30)
  • williamhobbs (16)
  • tyneises (12)
  • dguittet (12)
  • taylorbrown75 (12)
  • Matthew-Boyd (3)
  • qualand (3)
  • softwareengineerprogrammer (2)
  • nickdiorio (2)
  • mr1001v (2)
  • ErieRenaissance (2)
Pull Request Authors
  • cpaulgilman (195)
  • sjanzou (149)
  • brtietz (126)
  • mjprilliman (103)
  • tyneises (53)
  • dguittet (39)
  • taylorbrown75 (20)
  • janinefreeman (18)
  • berg-michael (9)
  • qualand (8)
  • dependabot[bot] (6)
  • Matthew-Boyd (6)
  • williamhobbs (1)
  • burundiocibu (1)
Top Labels
Issue Labels
bug (252) wishlist (67) enhancement (57) dev bug (38) UI (34) pv (32) added to release notes (26) architecture (25) financial (22) csp (22) battery (21) utility rate (16) new feature (14) hybrid (11) wontfix (8) geothermal (7) wind (6) weather (3) marine (3) lk (2) good first issue (2) solar water heating (1) help wanted (1)
Pull Request Labels
added to release notes (201) bug (93) UI (62) enhancement (35) battery (33) dev bug (28) pv (24) financial (20) csp (19) geothermal (15) requires help revision (15) marine (10) new feature (9) utility rate (6) dependencies (6) architecture (3) wind (2) weather (1) hybrid (1)

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
  • jwlawson/actions-setup-cmake v1.12 composite