-
Notifications
You must be signed in to change notification settings - Fork 42
Moving from HOPP wave to native H2I pysam wave #825
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5225fd0
Moving from HOPP wave to native H2I pysam wave
johnjasa ad128e0
Updated changelog
johnjasa e64b38a
Adding wave doc pages
johnjasa 109cf77
Add missing resource file
johnjasa 5a1f286
Fixed docs for wave API
johnjasa a88d047
PR feedback for wave cleanup
johnjasa 556ec4e
Updating wave examples
johnjasa 1c7bc75
Merge branch 'develop' into move_wave
johnjasa da12eb2
Merging
johnjasa 9c2a548
Updated test filepath
johnjasa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| (wave_resource)= | ||
| # Wave Resource: Model Overview | ||
|
|
||
| The wave resource model reads and processes ocean wave data for use in the H2I framework. It expects a CSV file containing timeseries significant wave height (Hs) and energy period (Te) data, and outputs hourly arrays suitable for the {ref}`wave_performance` model. | ||
|
|
||
| The wave resource file format follows the [DOE Water Power Technologies Office (WPTO) US Wave Dataset](https://developer.nrel.gov/docs/wave/wave-hindcast-download-v1/) convention. Wave resource files for US coastal locations can be downloaded via the [MHKiT-Python](https://mhkit-software.github.io/MHKiT/) library or the WPTO Hindcast dataset API. | ||
|
|
||
| ```{note} | ||
| H2I expects the wave resource data to be in a timeseries format (not a joint probability distribution). | ||
| If the source file contains data at a coarser-than-hourly resolution (e.g., 3-hourly), H2I will | ||
| linearly interpolate the values to produce an 8760-hour annual timeseries. | ||
| ``` | ||
|
|
||
| ## File Format | ||
|
|
||
| The wave resource CSV file should be in the following format: | ||
|
|
||
| - Row 1: Column names for metadata fields. | ||
| - Row 2: Metadata values (latitude, longitude, water depth, data source, etc.). | ||
| - Row 3: Column headings for the timeseries data: | ||
| `Year`, `Month`, `Day`, `Hour`, `Minute`, `Significant Wave Height`, `Energy Period`. | ||
| - Rows 4+: Hourly or sub-hourly data values: | ||
| - `Significant Wave Height` in meters [m]. | ||
| - `Energy Period` in seconds [s]. | ||
|
|
||
| ## Configuration | ||
|
|
||
| The wave resource is declared in `plant_config.yaml` under the site resources: | ||
|
|
||
| ```yaml | ||
| sites: | ||
| site: | ||
| resources: | ||
| wave_resource: | ||
| resource_model: WaveResource | ||
| resource_parameters: | ||
| resource_dir: resource_files/wave/ | ||
| resource_filename: wave_lat43.81_lon-124.82__2010.csv | ||
| resource_year: 2010 | ||
| ``` | ||
|
|
||
| The `resource_year` parameter is used to generate the hourly timestamp arrays (year, month, day, hour, minute) that are passed internally to the PySAM MhkWave model in timeseries mode. | ||
|
|
||
| The wave resource outputs are connected to the wave performance model via `resource_to_tech_connections` in `plant_config.yaml`: | ||
|
|
||
| ```yaml | ||
| resource_to_tech_connections: | ||
| - [site.wave_resource, wave, significant_wave_height] | ||
| - [site.wave_resource, wave, energy_period] | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| (wave_performance)= | ||
| # Wave Energy Models | ||
|
|
||
| ## PySAM Wave Performance Model | ||
|
|
||
| The **PySAM Wave Performance Model** simulates electricity generation from **wave energy converter (WEC) devices** using a timeseries wave resource. The model wraps the [PySAM MhkWave module](https://nrel-pysam.readthedocs.io/en/main/modules/MhkWave.html) implementation of the wave energy performance model used in the [System Advisor Model (SAM)](https://sam.nlr.gov/). | ||
|
|
||
| This component integrates the PySAM **MhkWave** module into an H2I performance model. To use this model, specify `"PySAMWavePerformanceModel"` as the performance model. | ||
|
|
||
| The model converts a wave resource timeseries (significant wave height and energy period) and a device power matrix into: | ||
| - timeseries electricity generation | ||
| - total energy production over the simulation period | ||
| - annualized energy production | ||
| - system capacity factor | ||
|
|
||
| ### Model Overview | ||
|
|
||
| The model represents an array of wave energy converters operating in an ocean wave resource. Electricity production is calculated at each timestep by looking up device power output in the wave power matrix using the instantaneous significant wave height (Hs) and energy period (Te), then scaling by the number of devices. | ||
|
|
||
| The model operates in timeseries mode (`wave_resource_model_choice = 1`) and requires hourly Hs and Te arrays. Use the {ref}`wave_resource` component to read and interpolate wave data files to the required hourly resolution. | ||
|
|
||
| (pysam-options-wave)= | ||
| #### PySAM Options | ||
|
|
||
| A user can specify any of the attributes available within the [MhkWave module](https://nrel-pysam.readthedocs.io/en/main/modules/MhkWave.html) using the `pysam_options` dictionary. The top-level keys correspond to the variable groups in the MhkWave module. | ||
|
|
||
| The most common use is to override the default loss parameters: | ||
|
|
||
| ```yaml | ||
| pysam_options: | ||
| MHKWave: | ||
| loss_array_spacing: 0.0 # array-spacing loss [%] | ||
| loss_resource_overprediction: 0.0 # resource overprediction loss [%] | ||
| loss_transmission: 2.0 # transmission loss [%] | ||
| loss_downtime: 5.0 # availability loss [%] | ||
| loss_additional: 0.0 # additional loss [%] | ||
| ``` | ||
|
|
||
| By default all losses are set to zero. Override via `pysam_options` to model realistic system availability. | ||
|
|
||
| #### Wave Power Matrix | ||
|
|
||
| The `wave_power_matrix` is a 2-D lookup table of device power output [kW] as a function of significant wave height Hs [m] and energy period Te [s]. It must be provided as a list of rows: | ||
|
|
||
| - Row 0: Te bin centers [s] (header row; first element is 0.0) | ||
| - Rows 1+: Each row starts with the Hs bin center [m], followed by the device power output [kW] at each Te bin | ||
|
|
||
| Example (3-row excerpt): | ||
|
|
||
| ```yaml | ||
| wave_power_matrix: | ||
| - [0.0, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5] | ||
| - [0.25, 0.0, 0.0, 0.0, 0.0, 0.4, 0.6, 0.8, 1.0, 1.1, 1.1] | ||
| - [0.75, 0.0, 0.0, 0.0, 0.0, 3.2, 5.3, 7.4, 9.1, 9.8, 9.5] | ||
| ``` | ||
|
|
||
| The power matrix format follows the SAM convention and can be exported from SAM for any supported reference model. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
examples/09_co2/direct_ocean_capture/tech_inputs/default_fin_config.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes glad we are oxford comma people here