Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding PV module unit tests and documentation #79

Merged
merged 44 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
31705ee
created dummy example for amr wind dummy + solar
brookeslawski Nov 27, 2023
471cb76
final commit before creating feature branch
brookeslawski Nov 28, 2023
dead7ce
standalone solar pysam example
brookeslawski Dec 11, 2023
97f0a60
working standalone example of solar pysam model
brookeslawski Dec 12, 2023
79f16e6
removed time as explicit input in step
brookeslawski Dec 12, 2023
58ec136
working example of solar pysam and hercules (but pysam has a bug)
brookeslawski Dec 12, 2023
0957591
changing hardcoded stoptime of 100 s to 1000 s to demo solar module
brookeslawski Dec 12, 2023
19299db
cleaning before pull request review of misha's changes
brookeslawski Dec 13, 2023
14c4e38
working solar pysam example with test amr wind
brookeslawski Dec 14, 2023
46e161e
adding updated results in jupyter notebook
brookeslawski Dec 14, 2023
cc4ee8c
merging NREL/develop into local branch
brookeslawski Dec 14, 2023
466bbd3
trying to run after git pull of develop
brookeslawski Dec 14, 2023
95618db
solar model runs successfully, but there is a time issue
brookeslawski Dec 14, 2023
1c94d37
correcting irradiance field and removing unnecessary comments
brookeslawski Dec 14, 2023
36e105a
removing unnecessary files
brookeslawski Dec 14, 2023
44a7c6e
removing test amr wind and solar example, saving for separate PR
brookeslawski Dec 14, 2023
bc67bcf
adding environment yaml file needed for pysam
brookeslawski Dec 15, 2023
4e43583
updating setup and docs to include pysam and restrict python version
brookeslawski Dec 15, 2023
41e5a47
adding missing csv weather file
brookeslawski Dec 18, 2023
1b07044
Minor changes for running the code
genevievestarke Dec 18, 2023
c4289bb
Minor cleanup in example.
misi9170 Dec 18, 2023
f8f76c0
remove environment.yml
genevievestarke Dec 18, 2023
a2d73ce
Merge in Misha's changes
genevievestarke Dec 18, 2023
68ab725
merging NREL/hercules:develop into local branch
brookeslawski Feb 19, 2024
c575011
Merge branch 'solar-pysam' of github.com:brookeslawski/hercules into …
brookeslawski Feb 19, 2024
0be7f2a
adding solar module unit tests
brookeslawski Feb 19, 2024
74acc0a
adding relative path for pytest functionality
brookeslawski Feb 26, 2024
1e38644
correcting ruff formatting and except
brookeslawski Feb 26, 2024
724112c
more ruff formatting
brookeslawski Feb 26, 2024
ad52112
Merge branch 'develop' of github.com:NREL/hercules into solar-pysam
brookeslawski Feb 26, 2024
3f8ff21
adding skeleton files for solar pv
brookeslawski Feb 26, 2024
22a0051
adding solar pysam description
brookeslawski Feb 26, 2024
83c84bf
removing documentation changes, saving for a separate PR
brookeslawski Feb 26, 2024
829fd49
removing documentation changes, saving for a separate PR
brookeslawski Feb 26, 2024
c9b6b38
removing documentation changes, saving for a separate PR
brookeslawski Feb 26, 2024
6c546a2
adding comments to the tests
brookeslawski Feb 26, 2024
6095ba3
fix comments for PV
brookeslawski Feb 26, 2024
1ad79a7
adding documentation, moving lat long to input file, correcting irrad…
brookeslawski Feb 27, 2024
5fde32a
doc updates, code clean up
brookeslawski Feb 27, 2024
5e905d5
docs updates
brookeslawski Feb 27, 2024
d2ab941
fixing merge conflicts
brookeslawski Feb 27, 2024
a914853
minor cleanup
brookeslawski Feb 28, 2024
5fba773
merging develop branch into local feature branch
brookeslawski Feb 28, 2024
f819252
ruff formatting and minor cleanup
brookeslawski Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ parts:
- caption: Usage
chapters:
- file: order_of_op
- caption: Technologies
chapters:
- file: wind
- file: battery
- file: solar_pv
- caption: Examples
chapters:
- file: examples_overview
- file: examples/06_amr_wind_standin_and_battery









- file: examples/06_amr_wind_standin_and_battery
29 changes: 29 additions & 0 deletions docs/solar_pv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Solar PV

The `SolarPySAM` module uses [PySAM](https://nrel-pysam.readthedocs.io/en/main/overview.html) package for the National Renewable Energy Laboratory's System Advisor Model (SAM) to predict the power output of the solar PV plant. This module uses the [Detailed Photovoltaic model](https://sam.nrel.gov/photovoltaic.html) in [`pvsamv1`](https://nrel-pysam.readthedocs.io/en/main/modules/Pvsamv1.html) to calculate PV electrical output using separate module and inverter models.

### Inputs

`SolarPySAM` requires two input files:
1. A CSV file that specifies the weather conditions (e.g. NonAnnualSimulation-sample_data-interpolated-daytime.csv). This file should include:
- timestamp
- direct normal irradiance (DNI)
- diffuse horizontal irradiance (DHI)
- global horizontal irradiance (GHI)
- wind speed
- air temperature (dry bulb temperature)
2. A JSON file that specifies the PV plant system design (e.g. 100MW_1axis_pvsamv1.json).
The system location (latitude, longitude, and elevation) is specified in the input `yaml` file.

The example folder `07_amr_wind_standin_and_solar_pysam` specifies:
- weather conditions on May 10, 2018 (from [this PySAM example](https://github.com/NREL/pysam/blob/main/Examples/NonAnnualSimulation.ipynb))
- latitude, longitude, and elevation of Golden, CO
- system design information for a 100 MW single-axis PV tracking system generated using the SAM GUI
These inputs can be changed in the `.yaml`, `.json`, and `.csv` files.

### Outputs

The `SolarPySAM` module outputs the AC power (`power_mw`) and the net DC power (`dc_power_mw`) in MW of the PV plant at each timestep, as well as the angle of incidence (`aoi`).

### References
PySAM. National Renewable Energy Laboratory. Golden, CO. https://github.com/nrel/pysam
414 changes: 266 additions & 148 deletions example_case_folders/02_amr_wind_standin_only/test_read_output.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@ py_sims:
py_sim_type: SolarPySAM
weather_file_name: NonAnnualSimulation-sample_data-interpolated-daytime.csv
system_info_file_name: 100MW_1axis_pvsamv1.json
lat: 39.7442
lon: -105.1778
elev: 1829

# capacity: 100 # MW

initial_conditions:

power: 25 # MW
irradiance: 1000
dni: 1000

controller:

Expand Down
Loading
Loading