SolTrace
A software tool developed at NREL to model concentrating solar power (CSP) systems and analyze their optical performance.
https://github.com/NREL/SolTrace
Category: Renewable Energy
Sub Category: Photovoltaics and Solar Energy
Last synced: about 3 hours ago
JSON representation
Repository metadata
SolTrace
- Host: GitHub
- URL: https://github.com/NREL/SolTrace
- Owner: NREL
- License: other
- Created: 2017-06-29T15:20:21.000Z (almost 8 years ago)
- Default Branch: develop
- Last Pushed: 2025-04-23T21:00:33.000Z (7 days ago)
- Last Synced: 2025-04-27T13:02:02.556Z (3 days ago)
- Language: C++
- Homepage: https://www.nrel.gov/csp/soltrace.html
- Size: 95 MB
- Stars: 45
- Watchers: 16
- Forks: 39
- Open Issues: 25
- Releases: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
README.md
SolTrace
The SolTrace Open Source Project repository contains the source code, tools, and instructions to build a desktop version of the National Renewable Energy Laboratory's SolTrace. SolTrace is a software tool developed at NREL to model concentrating solar power (CSP) systems and analyze their optical performance. Although ideally suited for solar applications, the code can also be used to model and characterize many general optical systems. The creation of the code evolved out of a need to model more complex solar optical systems than could be modeled with existing tools. For more details about SolTrace's capabilities, see the SolTrace website. For details on integration with SAM, see the SAM website.
The desktop version of SolTrace for Windows or Linux builds from the following open source projects:
-
LK is a scripting language that is integrated into SAM and allows users to add functionality to the program.
-
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). The current version of SAM uses wxWidgets 3.1.0.
-
WEX is a set of extensions to wxWidgets for custom user-interface elements used by SAM, and by LKscript and DView, which are integrated into SAM.
-
This repository, SolTrace, provides the user interface to assign values to inputs of the computational modules, run the modules in the correct order, and display calculation results. It also includes tools for editing LK scripts and viewing ray intersection and flux map data.
SolTrace Python API
Users can also run simulations via the pysoltrace
SolTrace Python API found in the folder app/deploy/api
. Example files for running the API are found in the app/deploy/api/examples
subfolder. Documentation is available in HTML or PDF format in the corresponding API subfolder.
The pysoltrace
API is capable of running multi-threaded simulations, generating flux maps, creating 3D interactive trace plots, and provides other capabilities that are found in the SolTrace graphical interface. The functionality and flexibility of the API generally exceeds that of the graphical interface.
The API requires the compiled coretrace library. Project files for building this library are generated using CMake as outlined in the steps below. It is possible to build only coretrace and not build the graphical interface by following the steps 1-7, but only building the coretrace_api
project in step 7.vii.
Steps for Building SolTrace
These are the general steps you need to follow to set up your computer for developing SolTrace:
-
Set up your development tools:
- Windows: Visual Studio 2022 Community or other editions available at https://www.visualstudio.com/.
- Linux: g++ compiler available at http://www.cprogramming.com/g++.html or as part of the Linux distribution.
-
Download and install CMake 3.28 or higher from https://cmake.org/download/ with the
Add CMake to the System Path for ...
option selected. -
Download the wxWidgets 3.2.4 source code for your operating system from https://www.wxwidgets.org/downloads/.
-
Build wxWidgets.
-
In Windows, create the WXMSW3 environment variable on your computer to point to the wxWidgets installation folder, or Linux, create the dynamic link
/usr/<USERNAME>/local/bin/wx-config-3
to point to/path/to/wxWidgets/bin/wx-config
. -
As you did for wxWidgets, clone (download) the LK and WEX repositories and then (Windows only) create an environment variable pointing to the project folder.
Open a Git Bash window and navigate to the WEX directory. Check out the following tag:
cd wex git checkout tags/2021.12.02.r2.ssc.274
-
Run CMake to create the project build files
-
Copy the file
parent-dir-CMakeLists.txt
into the parent directory also containingsoltrace/ lk/ wex/
andwxwidgets-3.x.x/
folders. -
Rename this file to
CMakeLists.txt
before running cmake. You may need to temporarily rename any other file in this directory with the same name.E.g., the file should be at
C:/stdev/CMakeLists.txt
-
Create a directory in the main parent folder to store the build files.
E.g.,C:/stdev/build-soltrace/
-
Open a shell or command window, and navigate to the build folder you just created.
-
Copy the following cmake command to the shell and run. Replace the cmake target with a supported generator
cmake -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DCMAKE_SYSTEM_VERSION=10.0 -DSAM_SKIP_TOOLS=1 ..
-
Confirm the project files built. If running visual studio, you should see a
soltrace_ui.sln
file in the build-soltrace/ directory. -
Build all files. The output is stored in the soltrace repository folder, e.g.,
C:/stdev/soltrace/app/deploy/soltrace.exe
.Note that output is NOT stored in the
build-soltrace/
directory!
-
Contributing
If you would like to report an issue with SolTrace 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
SolTrace's open source code is copyrighted by the Alliance for Sustainable Energy and licensed under a mixed MIT and GPLv3 license. It allows for-profit and not-for-profit organizations to develop and redistribute software based on SolTrace under terms of an MIT license and requires that research entities including national laboratories, colleges and universities, and non-profit organizations make the source code of any redistribution publicly available under terms of a GPLv3 license.
Citing SolTrace
We appreciate your use of SolTrace, and ask that you appropriately cite the software in exchange for its open-source publication. Please use one of the following references in documentation that you provide on your work. For general usage citations, the preferred option is:
Wendelin, T. (2003). "SolTRACE: A New Optical Modeling Tool for Concentrating Solar Optics." Proceedings of the ISEC 2003: International Solar Energy Conference, 15-18 March 2003, Kohala Coast, Hawaii. New York: American Society of Mechanical Engineers, pp. 253-260; NREL Report No. CP-550-32866.
For citations in work that involves substantial development or extension of the existing code, the preferred option is:
Wendelin, T., Wagner, M.J. (2018). "SolTrace Open-Source Software Project: github.com/NREL/SolTrace". National Renewable Energy Laboratory. Golden, Colorado.
Owner metadata
- Name: National Renewable Energy Laboratory
- Login: NREL
- Email:
- Kind: organization
- Description:
- Website: http://www.nrel.gov
- Location: Golden, CO
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/1906800?v=4
- Repositories: 599
- Last ynced at: 2024-12-18T09:41:07.898Z
- Profile URL: https://github.com/NREL
GitHub Events
Total
- Create event: 4
- Issues event: 4
- Release event: 1
- Watch event: 1
- Delete event: 3
- Issue comment event: 5
- Member event: 1
- Push event: 45
- Pull request review comment event: 24
- Pull request event: 14
- Pull request review event: 22
- Fork event: 8
Last Year
- Create event: 4
- Issues event: 4
- Release event: 1
- Watch event: 1
- Delete event: 3
- Issue comment event: 5
- Member event: 1
- Push event: 45
- Pull request review comment event: 24
- Pull request event: 14
- Pull request review event: 22
- Fork event: 8
Committers metadata
Last synced: 8 days ago
Total Commits: 142
Total Committers: 11
Avg Commits per committer: 12.909
Development Distribution Score (DDS): 0.62
Commits in past year: 63
Committers in past year: 5
Avg Commits per committer in past year: 12.6
Development Distribution Score (DDS) in past year: 0.365
Name | Commits | |
---|---|---|
Mike Wagner | m****r@n****v | 54 |
Davis | m****2@n****v | 40 |
Milo Davis | M****s@n****v | 15 |
jannamartinek | j****k@n****v | 13 |
Bill Hamilton | w****n@n****v | 6 |
Mike Wagner | m****2@w****u | 6 |
nickdiorio | n****o@g****m | 3 |
Jonathan Maack | j****k@n****v | 2 |
Taylor Brown | 6****5 | 1 |
Brooke Stanislawski | 3****i | 1 |
Wagner | m****r@n****v | 1 |
Committer domains:
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 32
Total pull requests: 34
Average time to close issues: 4 months
Average time to close pull requests: 5 months
Total issue authors: 20
Total pull request authors: 10
Average comments per issue: 1.09
Average comments per pull request: 0.35
Merged pull request: 27
Bot issues: 0
Bot pull requests: 0
Past year issues: 3
Past year pull requests: 9
Past year average time to close issues: 4 days
Past year average time to close pull requests: 5 days
Past year issue authors: 3
Past year pull request authors: 4
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.56
Past year merged pull request: 7
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- tamirlance (6)
- mjwagner2 (5)
- oriolgalceran (2)
- yx526 (2)
- alexgrdem (2)
- austinmiller17 (1)
- LiuZengqiang (1)
- Samuel139 (1)
- JawwadAga (1)
- aface0427 (1)
- qualand (1)
- giogio8427 (1)
- chetan201 (1)
- Gablegritule (1)
- jmaack24 (1)
Top Pull Request Authors
- mjwagner2 (16)
- qualand (4)
- Amiable-Vagabond (3)
- jmaack24 (3)
- taylorbrown75 (2)
- jannamartinek (2)
- fenollp (1)
- sacorbet97 (1)
- giogio8427 (1)
- brookeslawski (1)
Top Issue Labels
- bug (2)
- enhancement (2)
- question (2)
- documentation (2)
- help wanted (2)
Top Pull Request Labels
- enhancement (5)
- documentation (2)
- linux-support (2)
- bug (2)
Package metadata
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
proxy.golang.org: github.com/nrel/soltrace
- Homepage:
- Documentation: https://pkg.go.dev/github.com/nrel/soltrace#section-documentation
- Licenses:
- Latest release: v3.4.0+incompatible (published 6 months ago)
- Last Synced: 2025-04-29T14:04:09.753Z (1 day ago)
- Versions: 2
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 6.999%
- Average: 8.173%
- Dependent repos count: 9.346%
Score: -Infinity