Skip to main content
v2026.11,986 entries · CC-BY 4.0

System Advisor Model (SAM): Install, Run and Read Results

NLR’s System Advisor Model (SAM, formerly NREL): current version, install on Windows, macOS or Linux, first run, reading results and PySAM.

Written and maintained by CASRAI Editorial Board

Published

On this page

The System Advisor Model (SAM) is a free desktop application from the National Laboratory of the Rockies (NLR, formerly the National Renewable Energy Laboratory, NREL) for techno-economic analysis of energy technologies. You pick a performance model for the power system and, optionally, a financial model, run a simulation, and read energy output and cost metrics such as capacity factor, LCOE and IRR. This guide covers installing the current release, a step-by-step first run, reading the Results tabs, the PySAM route for scripted work, and neighbouring tools, all from NLR’s own documentation.

What the System Advisor Model is used for in research

SAM answers one family of question: given a technology, a site and a financial structure, how much energy does the system produce and what does the project cost per unit of energy? NLR describes it as a free desktop application for techno-economic analysis, and lists its users as project managers, engineers, policy analysts, technology developers and researchers (SAM home page, read 2026-12-03).

What software is commonly used in renewable energy projects?

There is no single standard, because tools differ in scope. SAM is one widely documented option because a single file combines a physical performance model with a financial model. It covers photovoltaic systems from utility scale to rooftop, wind, concentrating solar power, industrial process heat, marine energy, solar water heating, fuel cells, geothermal, biomass combustion and high-concentration PV. Neighbouring tools cover narrower jobs: NLR’s PVWatts estimates photovoltaic energy production, REopt evaluates and sizes distributed energy resources, and the open-source PyPSA framework optimises whole power systems (see the alternatives section below).

What is NREL SAM?

NREL SAM is the same program as SAM: the System Advisor Model, developed by a U.S. Department of Energy national laboratory. NREL has been renamed the National Laboratory of the Rockies, so current pages, downloads and documentation carry the NLR name (sam.nlr.gov) while older papers and forum posts say NREL. The two names refer to one tool.

Where battery storage fits

For storage research, SAM’s relevant coverage is battery storage for lithium-ion, lead-acid and flow chemistries, in both front-of-meter and behind-the-meter configurations. Financial structures include residential, commercial, third-party ownership and power purchase agreement (PPA) projects. Because the same file holds the dispatch of the battery and the project cash flow, a storage study can report technical and financial outputs from one run. For the physics of cells rather than system economics, see the CASRAI guide to battery modeling, and for chemistry-specific background the guide to flow batteries.

How to install or access the System Advisor Model

SAM is downloaded from the official download page at sam.nlr.gov/download.html. As of 2026-12-03 the current version is SAM 2026.7.3 (SSC 308), with installers for Windows, macOS and Linux. The data table below compares the routes. Use the official page only, so that the installer is the one NLR signs and publishes.

Windows

SAM 2026.7.3 requires Windows 11 or 10 (64-bit). Double-click the installer (sam-windows-2026-7-3.exe) and follow the installation wizard. By default SAM installs in the c:/SAM/2026.7.3 folder.

The installer is digitally signed, but sam.exe and the SSC library (ssc.dll) are not, and SAM depends on third-party libraries that may not be signed. If Windows Smart App Control is on, it blocks SAM with an error such as “sam.exe – Invalid Image”. The download page states that the only workaround is to turn Smart App Control off: from the Start menu type “Smart App Control”, click Open, then choose Off. It also notes that Windows 11 versions not updated since December 2025 do not offer the on/off option.

macOS

SAM 2026.7.3 requires macOS 12 Monterey or later. Double-click the package (sam-macos-2026-7-3.pkg) to run the installation program.

Linux

Linux uses a .run installer. In a terminal, make the file executable and run it, then start SAM:

chmod u+x ./sam-linux-2026-7-3.run./sam-linux-2026-7-3.run./SAM

First run and versions

On first launch SAM asks you to register. Type your email address and click Register to receive a free software key, or paste an existing key and click Confirm. A lost key can be re-sent by clicking Confirm with the key box empty. New versions install side by side with older ones and run independently, so you can rerun an old study in the version that produced it and compare results across versions. For a reproducible research record, note the SAM version and SSC number in your methods; see CASRAI’s note on computational reproducibility.

How to run a battery or hybrid model step by step

These are the basic steps from SAM’s Getting Started help topic (read 2026-12-03). The menu text is the same whatever technology you model; only the model names you pick change.

  1. Create a project. On the Welcome page that appears when SAM starts, click Start a new project.
  2. Choose models. Your project is a performance model for the power system and an optional financial model for the project’s financial structure. Click the performance model name in the list, then click the financial model that appears in the list to its right. For a storage or hybrid study, choose from the battery and hybrid entries; the PySAM documentation’s list of SAM configurations shows names of this form, for example Battery, Hybrid and Custom Generation Profile-Battery (Generic Battery), each paired with financial models such as single owner, commercial owner or merchant plant.
  3. Click OK. SAM creates a new file and fills every input with values from its default values database.
  4. Review inputs. Open each input page in turn and read the default assumptions before changing any of them. Defaults are a starting point, not a site-specific data set.
  5. Run a simulation. Click Simulate at the bottom left of the main window.
  6. Review results. A summary appears in the Metric table; detailed graphs and tables are on the Results page.

Change one input at a time and rerun when you are testing a hypothesis. The same file then documents what produced each result. For a structured way to rank which inputs matter, see the guide to tornado diagrams for sensitivity analysis.

How to read the System Advisor Model output

After a simulation SAM displays results from both models, and any graph or table on the results pages can be exported to Excel or text files (Results help topic, read 2026-12-03). Click Simulate to run and display results, or Switch to Results to look at existing results without rerunning. If tabs do not fit your screen width, the ellipsis shows the hidden ones.

Performance model tabs

  • Summary: the Metrics table and graphs such as total annual electrical output and capacity factor.
  • Losses: an energy loss diagram, not available for every performance model.
  • Graphs: user-built graphs of hourly, monthly, annual and single-value variables.
  • Data: tables of hourly, monthly and annual results.
  • Time series: time series and statistical graphs of hourly or sub-hourly data.
  • Profiles: time series shown as daily profiles by month.
  • Statistics: mean, maximum, minimum, sum, standard deviation, and average daily minimum and maximum of time series data.
  • Heat map: one year of time series in a colour-coded two-dimensional view.

Financial model tabs and how the two connect

The financial model takes the sum of the performance model’s 8,760 hourly output values in kWh as the system’s total annual electrical output. It then calculates cash flow from the inputs on the Installation Costs, Operating Costs and Financial Parameters pages. Its Summary tab shows the Metrics table with LCOE, PPA price, IRR and payback period, plus graphs of after-tax cash flow. Cash Flow shows the project cash flow in detail, Data builds tables of cost, cash flow and metrics, and Time series data shows time-dependent electricity sales and price data.

The practical reading order is: check annual output and capacity factor on the performance Summary, look at hourly or monthly behaviour on Time series or Profiles to see whether the dispatch is plausible, then read LCOE, PPA price, IRR and payback on the financial Summary. Because the financial result is derived from the annual output, an implausible capacity factor makes every financial metric suspect.

Scripting SAM with PySAM

PySAM is a Python package for SAM and part of the SAM Software Development Kit (SDK). It is built on the PySSC wrapper of the SAM Simulation Core (SSC). The PySAM documentation expects you to know SAM well enough to create and run models and to identify input and output variable names.

  1. Install: pip install nlr-pysam (PySAM 8.0.0 and newer use the nlr-pysam name, older releases are nrel-pysam; supports Python 3.8 to 3.14). With Anaconda: conda install nrel::nrel-pysam, or conda install nlr::nlr-pysam once Anaconda has been updated. The nlr-pysam name distinguishes it from the unrelated pysam package for genomic data.
  2. Build the case in SAM and run it.
  3. On SAM’s Case menu click Generate code and choose PySAM JSON at the bottom of the list. This creates a folder with a JSON file of inputs and SSC library files.
  4. Write a Python script that creates the model in PySAM, reads the JSON inputs, sets any modified values, runs the model and reads outputs. File menu, Inputs browser, shows each input’s SSC variable name next to its SAM label.

The documentation recommends this route (build in SAM, export inputs) over building from defaults in Python, which it says makes unexpected results harder to troubleshoot. Compare the SAM Annual AC output against the script’s output to confirm the two agree. For general Python workflow, see the CASRAI guide to IPython.

Troubleshooting the System Advisor Model

  • “sam.exe – Invalid Image” on Windows. Windows Smart App Control is on. Turn it off in Windows settings, as described in the install section; the download page names this as the only workaround.
  • SAM will not start on an older macOS. The download page notes that, for some older macOS versions, the Gatekeeper security feature may prevent SAM starting. SAM 2026.7.3 itself requires macOS 12 Monterey or later.
  • Lost software key. Open registration, click Confirm without typing a key, and the key is emailed to you.
  • Results differ between versions. Versions install side by side and are independent; run the study in each and compare, then record which version produced the reported numbers.
  • Cannot find a variable name for a script. Use File, Inputs browser in SAM, or the LK script editor, as the PySAM Getting Started page advises.
  • Unexpected PySAM results. Rebuild the case in SAM, regenerate the PySAM JSON and compare outputs, instead of debugging a model built from defaults.

Free alternatives to the System Advisor Model

These are tools whose own documentation describes a related purpose. They are not drop-in substitutes: each answers a narrower or different question.

Tool What its own documentation says it does Source
PVWatts Calculator (NLR) Web calculator for photovoltaic energy estimates from inputs such as system size, module type, array type, losses, tilt and azimuth. It cautions that predictions carry inherent assumptions and uncertainties. pvwatts.nlr.gov
REopt (NLR) Web tool to evaluate economic viability of hybrid distributed energy resources for grid-tied and off-grid buildings, campuses and microgrids; optimise system mix, sizing and dispatch; estimate how long a system sustains critical loads in an outage. Open-source code is linked from the site. reopt.nlr.gov
PyPSA Open-source Python framework for optimising and simulating power and energy systems, including variable wind and solar, inter-temporal storage and sector coupling; aimed at researchers, planners and utilities with basic coding aptitude. docs.pypsa.org

Use SAM when you want a project-level performance and cash-flow model in one file; use PVWatts for a quick photovoltaic yield estimate; use REopt when the question is optimal sizing of distributed resources; and use PyPSA when the question is system-wide optimisation. CASRAI covers the last in its guide to PyPSA.

Frequently asked questions

What software is commonly used in renewable energy projects?

Researchers commonly use project-level modelling tools such as SAM, PVWatts and REopt for performance and economics, and open frameworks such as PyPSA for system-level optimisation. SAM is distinct in pairing a performance model with a financial model in one file.

What is NREL SAM?

It is the System Advisor Model, a free techno-economic desktop application developed by the U.S. national laboratory now named the National Laboratory of the Rockies (formerly NREL). Current downloads are at sam.nlr.gov.

What are examples of energy management systems?

SAM, PVWatts and REopt are planning and modelling tools: they estimate and optimise how an energy system could perform, rather than operating a building or plant in real time. Operational energy management systems are a separate software category that this guide does not cover.

Where can I download the System Advisor Model?

From the official download page at sam.nlr.gov/download.html. The current release is SAM 2026.7.3, with Windows, macOS and Linux installers, and registration on first run gives a free key.

Is there a System Advisor Model PDF?

SAM’s help system is published as a website (the download page links it as Help System as Website), and the download page links release notes for each version. Older general-description PDFs describe earlier versions, so use the current help for menu names.

Sources

Data: SAM 2026.7.3 and PySAM installation routes by platform

Compares the installation routes for NLR's System Advisor Model and its PySAM Python package: platform requirement, package format and the install action, compiled from the official SAM download page and PySAM installation documentation read on 2026-12-03.

Period covered: 2026.

SAM 2026.7.3 and PySAM installation routes by platform
RouteRequirement or packageInstall action
SAM for WindowsWindows 11/10 (64-bit); sam-windows-2026-7-3.exeDouble-click the .exe and follow the wizard; default folder c:/SAM/2026.7.3
SAM for macOSmacOS 12 Monterey or later; sam-macos-2026-7-3.pkgDouble-click the package to run the installer
SAM for Linuxsam-linux-2026-7-3.runchmod u+x ./sam-linux-2026-7-3.run; ./sam-linux-2026-7-3.run; start with ./SAM
PySAM via PyPInlr-pysam, Python 3.8 to 3.14pip install nlr-pysam
PySAM via Anacondanrel-pysam (nlr-pysam after Anaconda update)conda install nrel::nrel-pysam

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · full access

Ask about System Advisor Model (SAM): Install, Run and Read Results

Full access: large monthly usage, up to 10 source passages behind each answer, and MCP and API access for Claude Code, Codex and other CLIs. Cancel any time.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →