-
Notifications
You must be signed in to change notification settings - Fork 21
Additional pvwatts fixes #252
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,31 +1,34 @@ | ||||||
| # Solar PV | ||||||
|
|
||||||
| The solar PV modules use the [PySAM](https://nrel-pysam.readthedocs.io/en/main/overview.html) package for the National Laboratory of the Rockies's System Advisor Model (SAM) to predict the power output of the solar PV plant. | ||||||
| Hercules uses NREL [PySAM](https://nrel-pysam.readthedocs.io/en/main/overview.html) to drive NREL [System Advisor Model (SAM)](https://sam.nrel.gov) PV technology models. | ||||||
|
|
||||||
| Presently only one solar simulator is available | ||||||
| The only solar implementation currently in Hercules is: | ||||||
|
|
||||||
| 1. **`SolarPySAMPVWatts`** - Uses the [PVWatts model](https://sam.nrel.gov/photovoltaic.html) in [`Pvwattsv8`](https://nrel-pysam.readthedocs.io/en/main/modules/Pvwattsv8.html), which calculates estimated PV electrical output with configurable efficiency and loss parameters. This model is less detailed but more time-efficient, making it suitable for longer duration simulations (approximately 1 year). Set `component_type: SolarPySAMPVWatts` in the component's YAML section. The section key is a user-chosen `component_name` (e.g. `solar_farm`); see [Component Names, Types, and Categories](component_types.md) for details. | ||||||
| 1. **`SolarPySAMPVWatts`** — [PVWatts](https://sam.nrel.gov/photovoltaic.html) via PySAM [`Pvwattsv8`](https://nrel-pysam.readthedocs.io/en/main/modules/Pvwattsv8.html). It is fast and suitable for long runs (e.g. about one year). Set `component_type: SolarPySAMPVWatts` in the component YAML. The section key is a user-chosen `component_name` (e.g. `solar_farm`); see [Component Names, Types, and Categories](component_types.md). | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
| ## Inputs | ||||||
|
|
||||||
| Both models require an input weather file: | ||||||
| 1. A CSV file that specifies the weather conditions (e.g. NonAnnualSimulation-sample_data-interpolated-daytime.csv). This file should include: | ||||||
| - timestamp (see [timing](timing.md) for time format requirements). Each `time_utc` timestamp marks the **start of a reporting period**; irradiance and weather values on that row are treated as period averages. See [Time Interpretation](timing.md#time-interpretation-inputs-vs-internal-values) for how Hercules converts these to instantaneous values. | ||||||
| - direct normal irradiance (DNI) | ||||||
| - diffuse horizontal irradiance (DHI) | ||||||
| - global horizontal irradiance (GHI) | ||||||
| - wind speed | ||||||
| - air temperature (dry bulb temperature) | ||||||
| The solar component requires a weather time-series file. Supported formats are CSV, pickle (`.p`), Feather (`.f`/`.ftr`), and Parquet. The file should include: | ||||||
|
|
||||||
| - A `time_utc` column (see [timing](timing.md) for time format requirements). Each `time_utc` value marks the **start of a reporting period**; irradiance and weather on that row are period averages. See [Time Interpretation](timing.md#time-interpretation-inputs-vs-internal-values) for how Hercules converts them to instants. | ||||||
| - DNI, DHI, and GHI in columns whose names include the usual “Direct Normal…”, “Diffuse Horizontal…”, and “Global Horizontal…” substrings (see the solar module’s column lookup) | ||||||
| - Wind speed | ||||||
| - Air temperature (dry-bulb) | ||||||
|
|
||||||
|
|
||||||
| The system location (latitude, longitude, and elevation) is specified in the input `yaml` file. | ||||||
|
|
||||||
|
|
||||||
| ## Outputs | ||||||
|
|
||||||
| The solar module output is the DC power (`power`) in kW of the PV plant at each timestep. Using DC power makes the parameters `inv_eff` and `dc_to_ac_ratio` irrelevant. The `system_capacity` parameter represents the DC system capacity under Standard Test Conditions. | ||||||
| At each time step, `h_dict[component_name]` is updated with: | ||||||
|
|
||||||
| - **`power`** (kW): **AC** plant power (PVWatts `Outputs.ac`, W → kW), then the AC setpoint is applied so this is the *delivered* AC when curtailment is active. | ||||||
| - **`dc_power_uncurtailed`** (kW): uncurtailed **pre-inverter** DC (PVWatts `Outputs.dc`, W → kW). It is not curtailed with the AC setpoint. | ||||||
|
|
||||||
| The YAML **`system_capacity`** is the **DC** array capacity at STC (kW), as in PVWatts. Inverter sizing and AC clipping follow PVWatts `SystemDesign` (including `dc_ac_ratio`); defaults can be changed under `pysam_options` (see below). | ||||||
|
|
||||||
| The PVWatts model is configured with the following default parameters for utility-scale installations: | ||||||
| - **Module type**: Standard crystalline silicon (module_type = 0) | ||||||
|
|
@@ -44,7 +47,7 @@ solar_farm: | |||||
| SystemDesign: | ||||||
| array_type: 3.0 # single axis backtracking | ||||||
| azimuth: 170.0 | ||||||
| dc_ac_ratio: 1.0 # Force to 1.0 | ||||||
| dc_ac_ratio: 1.0 # kWac nameplate / kWdc STC; common default | ||||||
|
||||||
| dc_ac_ratio: 1.0 # kWac nameplate / kWdc STC; common default | |
| dc_ac_ratio: 1.0 # kWdc STC / kWac nameplate; common default |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -56,7 +56,7 @@ def _setup_model_parameters(self, h_dict): | |||||
| hercules_defaults = { | ||||||
| "array_type": 3.0, # single axis backtracking | ||||||
| "azimuth": 180.0, | ||||||
| "dc_ac_ratio": 1.0, # default is 1.0 so there are no inverter losses. | ||||||
| "dc_ac_ratio": 1.0, # inverter kWac nameplate / array kWdc STC; 1.0 is a common default | ||||||
|
||||||
| "dc_ac_ratio": 1.0, # inverter kWac nameplate / array kWdc STC; 1.0 is a common default | |
| "dc_ac_ratio": 1.0, # array kWdc STC / inverter kWac nameplate; 1.0 is a common default |
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.
The
initial_conditionsdescription says PVWatts overwrites these with modeled values on init, butSolarPySAMPVWattscurrently leavesself.powerset to the configured placeholder until the firststep()(onlydc_power_uncurtailedgets set from the precomputed array during init). Please either adjust this documentation to match current behavior or update initialization/metadata sopowerreflects the modeled initial AC value.