You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/how_to/create_hydro_datasets.md
+262-5Lines changed: 262 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
In the current version of `PowerSystems.jl` there is support and testing for hydropower generation plants with the following structures:
4
4
5
-
## Shared upstream reservoir
5
+
## Shared Upstream Reservoir
6
6
7
7
```mermaid
8
8
flowchart TB
@@ -18,13 +18,127 @@ flowchart TB
18
18
19
19
```
20
20
21
-
For this model, attach an upstream [`HydroReservoir`](@ref) to any number of [`HydroTurbine`](@ref)s. This can model different power house elevations to consider the effect of the elevation and pressure heads
22
-
on the specific turbines inside of a power plant.
21
+
For this model, attach an upstream [`HydroReservoir`](@ref) to any number of [`HydroTurbine`](@ref)s. This can model different power house elevations to consider the effect of the elevation and pressure heads on the specific turbines inside of a power plant.
## Head and Tail Reservoirs for Pumped Hydropower Plants
25
140
26
-
For this model, attach two [`HydroReservoir`](@ref)s to any number of [`HydroPumpTurbine`](@ref)s. The turbine and reservoirs structs store the elevations in each case calculate adequately the elevation and pressure heads for
27
-
the facility.
141
+
For this model, attach two [`HydroReservoir`](@ref)s to any number of [`HydroPumpTurbine`](@ref)s. The turbine and reservoir structs store the elevations to calculate the elevation and pressure heads for the facility.
28
142
29
143
```mermaid
30
144
flowchart TB
@@ -37,3 +151,146 @@ flowchart TB
37
151
C --- D
38
152
B --- D["Tail Reservoir"]
39
153
```
154
+
155
+
### Example: Pumped Hydro with Head and Tail Reservoirs
156
+
157
+
```julia
158
+
# Create a HydroPumpTurbine
159
+
pump_turbine =HydroPumpTurbine(;
160
+
name ="PumpTurbine1",
161
+
available =true,
162
+
bus = bus,
163
+
active_power =50.0,
164
+
reactive_power =10.0,
165
+
rating =200.0,
166
+
active_power_limits = (min =20.0, max =200.0), # Generation mode
167
+
reactive_power_limits = (min =-100.0, max =100.0),
168
+
active_power_limits_pump = (min =30.0, max =180.0), # Pumping mode
169
+
outflow_limits = (min =0.0, max =500.0),
170
+
powerhouse_elevation =400.0,
171
+
base_power =100.0,
172
+
ramp_limits = (up =20.0, down =20.0),
173
+
time_limits =nothing,
174
+
status = PSY.PumpHydroStatusModule.PumpHydroStatus.OFF,
-`turbine_type::HydroTurbineType`: Type of turbine (e.g., `HydroTurbineType.UNKNOWN`, `HydroTurbineType.FRANCIS`, `HydroTurbineType.PELTON`, `HydroTurbineType.KAPLAN`)
236
+
-`conversion_factor::Float64`: Conversion factor from flow/volume to energy (m³ -> p.u-hr)
237
+
-`outflow_limits::Union{Nothing, MinMax}`: Turbine outflow limits in m³/s
238
+
-`travel_time::Union{Nothing, Float64}`: Downstream travel time in hours from reservoir to turbine
239
+
240
+
### HydroReservoir
241
+
242
+
Key fields for [`HydroReservoir`](@ref):
243
+
244
+
-`storage_level_limits::MinMax`: Storage level limits (in m³, m, or MWh based on `level_data_type`)
245
+
-`initial_level::Float64`: Initial level as fraction of `storage_level_limits.max`
246
+
-`inflow::Float64`: Water refilling the reservoir (m³/h or MW)
247
+
-`outflow::Float64`: Water naturally leaving the reservoir (m³/h or MW)
248
+
-`spillage_limits::Union{Nothing, MinMax}`: Water spillage limits
249
+
-`level_targets::Union{Nothing, Float64}`: Target level at simulation end as fraction of max
250
+
-`intake_elevation::Float64`: Height of intake in meters above sea level
251
+
-`head_to_volume_factor::ValueCurve`: Head to volume relationship
252
+
-`upstream_turbines::Vector{HydroUnit}`: Turbines feeding into this reservoir (tail reservoir)
253
+
-`downstream_turbines::Vector{HydroUnit}`: Turbines fed by this reservoir (head reservoir)
254
+
-`upstream_reservoirs::Vector{Device}`: Reservoirs feeding spillage into this reservoir
255
+
-`level_data_type::ReservoirDataType`: Data type (e.g., `ReservoirDataType.USABLE_VOLUME`, `ReservoirDataType.HEAD`, `ReservoirDataType.ENERGY`)
256
+
257
+
### HydroPumpTurbine
258
+
259
+
Key fields specific to [`HydroPumpTurbine`](@ref):
260
+
261
+
-`active_power_limits::MinMax`: Power limits for turbine (generation) mode
262
+
-`active_power_limits_pump::MinMax`: Power limits for pump mode
263
+
-`status::PumpHydroStatus`: Operating status (`PumpHydroStatus.OFF`, `PumpHydroStatus.PUMP`, `PumpHydroStatus.GEN`)
264
+
-`efficiency::TurbinePump`: Separate efficiencies for turbine and pump modes `(turbine = 0.9, pump = 0.85)`
265
+
-`transition_time::TurbinePump`: Time to switch modes `(turbine = 0.25, pump = 0.25)`
266
+
-`minimum_time::TurbinePump`: Minimum operating time in each mode `(turbine = 1.0, pump = 1.0)`
267
+
268
+
## Helper Functions
269
+
270
+
### Linking Turbines to Reservoirs
271
+
272
+
-`set_downstream_turbine!(reservoir, turbine)`: Link a single turbine as downstream of reservoir
273
+
-`set_downstream_turbines!(reservoir, turbines)`: Link multiple turbines as downstream
274
+
-`set_upstream_turbine!(reservoir, turbine)`: Link a single turbine as upstream of reservoir
275
+
-`set_upstream_turbines!(reservoir, turbines)`: Link multiple turbines as upstream
276
+
277
+
### Checking Connections
278
+
279
+
-`has_downstream_turbine(reservoir)`: Check if any downstream turbines are attached
280
+
-`has_downstream_turbine(reservoir, turbine)`: Check if specific turbine is downstream
281
+
-`has_upstream_turbine(reservoir)`: Check if any upstream turbines are attached
282
+
-`has_upstream_turbine(reservoir, turbine)`: Check if specific turbine is upstream
283
+
284
+
### Retrieving Connected Components
285
+
286
+
-`get_downstream_turbines(reservoir)`: Get vector of downstream turbines
287
+
-`get_upstream_turbines(reservoir)`: Get vector of upstream turbines
288
+
-`get_connected_head_reservoirs(sys, turbine)`: Get reservoirs where turbine is downstream
289
+
-`get_connected_tail_reservoirs(sys, turbine)`: Get reservoirs where turbine is upstream
290
+
-`get_turbine_head_reservoirs_mapping(sys)`: Get mapping of all turbines to head reservoirs
291
+
-`get_turbine_tail_reservoirs_mapping(sys)`: Get mapping of all turbines to tail reservoirs
292
+
293
+
### Removing Connections
294
+
295
+
-`remove_turbine!(reservoir, turbine)`: Remove a specific turbine connection
296
+
-`clear_turbines!(reservoir)`: Remove all turbine connections from reservoir
0 commit comments