Content area
The Hydrologic Engineering Center River Analysis System (HEC-RAS) software package developed by the U.S. The Army Corps of Engineers is a widely used software package designed mainly for modeling steady and unsteady water flow in rivers. Although the software includes tools for implementing basic control elements, HEC-RAS users often require additional unique functions including integration with other software. This is made possible by means of the HEC-RAS Controller, an application programming interface (API) that allows manual interaction with HEC-RAS to enable automated control through user-defined code directly from other programming environments. The main goal of this study was to design a universal software architecture for linking HEC-RAS with Visual Basic using the API, which enables users to enter the unsteady flow boundary condition directly as the demand power output if the river system under analysis includes a hydropower plant. The effectiveness of the proposed approach and its applicability to real-world operational management environments were demonstrated through a case study of the Gabčíkovo hydropower plant on the Danube River in Slovakia. The integration of the HEC-RAS with Visual Basic enabled the simulation of the Danube River's water-level regime within a reasonable time and with adequate accuracy, allowing for the analysis of the impact of daily flow regulation on navigation conditions downstream of the hydropower plant.
Article Highlights
a software interface links HEC-RAS with Visual Basic, enhancing planning the operation of hydropower plant and navigation safety.
automating simulation processes eliminates manual adjustments, saving time and reducing errors in hydropower plant management.
this approach supports better collaboration between energy and hydraulic experts, offering a template for various river systems with hydropower operations.
Introduction
The flow of natural rivers changes significantly, particularly during individual seasons. During the day, the changes in flow were small. However, if a hydropower plant is built on a river with a reservoir that enables flow regulation, changes in flow can be significant even during the day. This is mainly related to the ability of hydropower plant to adapt flexible to the suddenly changing demands of energy supply systems. The daily cyclic increase in flow through the hydropower plant during periods of high electricity demand and the subsequent decrease in flow during periods of low demand caused a complex process of unsteady water flow downstream of the hydropower plant. If a river is used as a waterway, changes in flow can also affect the safety of shipping. For example, an increase in flow speed can cause steering problems for vessels floating downstream. On the other hand, for vessels traveling upstream, this results in increased fuel costs and potential delays. Therefore, the operational requirements for hydropower plants often contradict the navigation demands.
The safe movement of vessels, their maneuverability, and control are directly related to the direction, orientation, and magnitude of the flow velocity vector, the water surface slope, and the temporal variation of these parameters. The operation of hydraulic structures (shiplock, weir, hydropower plant) influences the flow, and through the force exerted by the flowing water, affects the vessel's trajectory. To assess the impact of flow on vessel movement, it is essential to quantify the flow parameters and subsequently evaluate their effects on the vessel's body and movement trajectory. The influence of flow on the trajectory is evident both in open water and in the immediate vicinity of the shiplock. Due to the effects of flow, the vessel may be deviated from the optimal route, or the fairway parameters may be restricted. The flow fluctuations caused by the operation of a hydropower plant are transmitted downstream, resulting in a complex and non-stationary flow process. This can cause:
dynamic phenomena (translational waves) that may lead to vessel collisions with the shore, bridge piers, or other vessels. A sudden increase in discharge through a hydropower plant generates a positive translational wave in the riverbed downstream, while a sudden decrease in discharge results in a negative translational wave. In both cases, the water surface slope can cause a vessel moving against the wave gradient to gradually decrease its speed due to gravity, eventually leading to a complete loss of maneuverability and the vessel being carried by the wave. If the vessel moves in the direction of the wave slope, its speed may increase until its absolute velocity matches the flow velocity, causing a loss of maneuverability and uncontrolled drifting. The impact of the wave on vessel movement depends primarily on the wave parameters (slope, length, propagation speed), vessel characteristics, and the vessel’s direction and speed at the moment of encountering the wave. Translational waves can also pose a risk to moored vessels. On an inclined water surface, gravity can set a moored vessel in motion, gradually increasing its speed until the mooring line is fully tensioned, potentially causing it to snap.
changes in the speed and direction of the flow near the shiplocks, which can adversely affect the vessel’s trajectory, potentially leading to a collision with the approach channel or another vessel. Experience from navigation operations indicates that the most critical area of waterways in terms of navigation safety risks and traffic capacity limitations is the transition from open water to the shiplock area. This is mainly due to the sudden narrowing of the free waterway width to match that of the shiplock or the approach channel. The vessel must reduce its speed when entering the shiplock; however, the entry speed must not be lower than the minimum maneuvering speed. As a result, the vessel may become less controllable, and the effects of the velocity field generated by the operation of other hydraulic structures (hydropower plant, weir) may become more pronounced. The decisive factor is the influence of the transverse velocity components generated by the flow around the approach wall, which act laterally on the vessel’s movement. The current pushes the vessel away from the ideal navigation route, increasing the risk of collision with another vessel or the approach wall. Therefore, maneuvering into the shiplock is demanding and considered one of the most challenging tasks in navigation.
a sudden decrease in the flow and drop in the water level in the river can result in a decrease in the navigable depth and, consequently, a collision of the vessel with the bottom of the fairway. This can lead to the breaking of coupling ropes between vessels, resulting in an accident.
a sudden decrease in water level leading to the breaking of mooring ropes of secured vessels or the dragging of vessel anchors.
Such a navigational accident can have dangerous consequences for crews, passengers, cargo, and vessels themselves and is a serious threat to navigation safety. Planning the operation of hydropower plants with regard to the maintenance of navigation conditions in rivers is an active area of research. This has been confirmed by many scientific publications in recent years [1, 2, 3, 4, 5, 6, 7–8]. However, most of these solutions are limited to introducing a constant minimum flow value to the problem in which the minimum navigational depth is reached.
Figure 1 presents the results of measuring the temporal development of the water level in a river reach downstream of the Gabčíkovo hydropower plant in the Danube in Slovakia. The ford at rkm 1792.1 is located 27 km from the hydropower plant and 19 km from the junction of the old Danube riverbed and waste channel (see Fig. 4). The minimum permitted level at ford (indicated by the dashed red line), below which the safety of navigation could be compromised, corresponds to a steady flow of 1100 m3.s−1 (red hydrograph). However, as shown in Fig. 1, even with the flow through the hydropower plant and the old riverbed, which together have a flow lower than 1100 m3.s−1 (blue and green hydrographs), the minimum permitted level at the ford is not exceeded. This means that the solution based on the flow limit assumption, derived from the steady flow condition, does not correspond to the actual water level conditions during the “load-following” operation of the hydropower plant and may significantly limit the potential of the plant capabilities.
Fig. 1 [Images not available. See PDF.]
Danube River's water level at rkm 1792.1
From the above, it is clear that to rigorously evaluate the impact of hydropower plant operation on navigation safety, tools for modeling unsteady water flow in open channels are necessary. There are several widely used commercial and noncommercial models for simulating the level and flow regime in rivers, such as HEC-RAS [9], MIKE 11 [10], SOBEK by Delft [11] or BASEMENT by ETH [12]. However, in connection with the evaluation of the impact of hydropower plant operations on the flow regime, these models do not allow the hydropower plant to be directly inputted as a control element in the computation or the power output of the plant as a boundary condition in the simulation. The power output of the hydropower plant must be approximated using the flow through the turbines in the individual simulation steps. The relationship between power and flow is nonlinear. In some cases, the power output (depending on the head) can correspond to different flow values varying by several tens of percent. For example, in the case of the Gabčíkovo hydropower plant, a power output of 720 MW can be achieved with a head of 16 m at a flow rate of 5000 m3.s−1. At a head of 20 m, only 3850 m3.s−1 is required. This represents a difference of more than 1200 m3.s−1, which, in the case of the mentioned river reach, corresponds to a difference in water level of nearly 0.5 m. This results in an unacceptable accuracy when simulating the water level related to ensuring navigation safety. The importance of water level simulation accuracy is described in Sect. 4.1.3.
Therefore, when modeling the water level regime, the power output approximation using the flow through the hydropower plant is insufficient and far from the optimal design for the operation of the plant. Moreover, in the real-world electricity market, trading is not conducted based on the flow through a hydropower plant but rather on power output or power blocks.
A partial solution to this problem involves manual operation after each simulation step to determine the head and tail water level values. Subsequently, the corresponding flow values are calculated from the hydropower plant power curves. This flow value was then input as a boundary condition for the simulation in the subsequent computation step. To ensure sufficient accuracy of the simulation, the chosen time steps must be as short as possible. However, this approach is too time-consuming, user-friendly, and practically unusable in real-world planning and operational management of hydropower plants. Therefore, to assess the impact of hydropower plant operation on navigation safety, it is necessary to establish a method for directly inputting boundary conditions, such as the time-varying power output of the hydropower plant, into the unsteady flow simulation without repeating the aforementioned manual steps after each computation step.
In addition to the fact that the HEC-RAS model is free of a professionally developed graphical user interface using high-precision numerical methods for modeling, which ranks it among the most popular models, HEC-RAS on Windows platforms provides its functions through Component Object Model (COM) Automation. This enables developers to control the HEC-RAS using other scripting programming languages. Tasks in HEC-RAS, such as opening and closing models, managing scenarios, setting input data, running simulations, and extracting output data, can be automated using the HEC-RAS Controller, that is, the application programming interface (API). These tools enable developers to design program codes (control modules) that can replace manual user interactions with HEC-RAS by automating their control.
The possibility of integrating HEC-RAS with other programming languages has been presented in various studies. The architecture for linking HEC-RAS with MATLAB to enhance the efficiency of hydraulic system management is detailed in [13]. The integration of HEC-RAS with the multi-objective optimization algorithm NSGA-II in MATLAB for optimizing reservoir system operations during floods was presented in [14]. The use of HEC-RAS and MATLAB integration for optimizing flow management in a system of ten reservoirs is described in [15]. The potential for the automatic calibration of hydraulic model roughness coefficients in HEC-RAS using Python scripts was demonstrated in [16]. The creation of control modules for HEC-RAS using the HEC-RAS controller in Visual Basic or Visual Basic for Applications programming environments is detailed in [17].
However, no published work has described the use of the HEC-RAS Controller to create a control module that enables users to set the unsteady flow boundary condition directly as the power output of a hydropower plant. Therefore, this article describes the universal software architecture proposed by the authors for integrating HEC-RAS with the Visual Basic programming language using an API. This architecture enables users to enter boundary condition values as time-varying power outputs if the river system under analysis includes a hydropower plant. This approach enables simulations to be used for real-world operation of hydropower plants.
Another benefit of integrating HEC-RAS with Visual Basic is that the user interacts with a graphical user interface (GUI) created in Visual Basic and tailored specifically to their needs rather than with a standard HEC-RAS GUI. Furthermore, the development of such an interface enables the energy and electricity trading communities to leverage the expertise of the hydraulic engineering community.
The remainder of this study is structured as follows. Section 2 describes the capabilities of the HEC-RAS Controller in the Visual Basic programming language. Section 3 provides a detailed description of the proposed architecture for integrating Visual Basic with the HEC-RAS. In Sect. 4, the effectiveness of the proposed approach and its applicability to real-world planning and management of hydropower plants are illustrated through a case study of the Gabčíkovo hydropower plant on the Danube River in Slovakia, which is part of the large-scale Gabčíkovo Project (Fig. 4).
Materials and methods
HEC-RAS
HEC-RAS is a software tool developed by the U.S. Army Corps of Engineers, specifically its Hydrologic Engineering Center (HEC). It was designed to simulate water flow in rivers and channels as well as for flood and hydraulic system analyses. The HEC-RAS model allows the modeling of both steady and unsteady flow conditions. The steady flow simulation was based on a simple energy-balance equation. For unsteady flow simulation, HEC-RAS implements a numerical solution to the Saint–Venant equations for 1D flow. The system consists of two partial differential equations.
1
2
where t is the time, x is the distance between two independent variables, xc is the distance along the channel, and xf is the distance along the floodplain. Q is the total discharge in the cross-section, g is the gravitational acceleration, H is the water surface elevation, A is the total cross-sectional area, Ac is the cross-sectional area of the channel, Af is the cross-sectional area of the floodplain parts, Sfc and Sff are the hydraulic slopes describing the friction losses along the channel and floodplain, respectively. The coefficient ϕ describes the discharge distribution between the channel and the floodplain. Equation (1) describes the mass balance in an open channel, and Eq. (2) represents the momentum balance. A more detailed description of the equations is given in [9].HEC-RAS controller
The HEC-RAS Controller is a component of the HEC-RAS software that is used to automate and control simulations in the HEC-RAS environment via scripts and programming. This tool enables users to control HEC-RAS with external programs, which is useful for repeated simulations, optimizations, sensitivity analyses, and integration with other software systems. Simulations can be run and controlled without manual intervention using scripts. This approach is particularly useful in batch analyses, in which many simulations with different input parameters must be performed. The HEC-RAS Controller allows changing the input parameters and model data, such as flow rates, water levels, and river geometry, more directly within the scripts before running the simulation. After the simulation is executed, the HEC-RAS Controller can be used to extract and analyze the results, enabling rapid feedback and further automation of decision-making processes. Owing to the programming interface, HEC-RAS can be integrated with other tools and software packages, such as GIS systems, optimization algorithms, or other engineering and environmental software. Access to the components of the HEC-RAS software is possible because this package is compiled as COM. In this way, HEC-RAS provides objects such as classes, functions, methods, and any program capable of reading COM Dynamic-Link Libraries (DLLs) that can be used to control computations in HEC-RAS. A convenient approach is to use Microsoft Visual Basic 6.0 (VB) or Visual Basic for Applications (VBA). A detailed description of this collection of programming tools is given in [17].
An example of a VB script to open and run the HEC-RAS project is shown in Listing 1. The first step is to initialize the HECRASController variable (line 2). In the next part of the script, the name and path of the specific HEC-RAS project are defined (lines 5 and 6). If the user does not want the HEC-RAS computation window to be visible during the computation, it can be set using the
Listing 1 Script in VB for opening and running the HEC-RAS project
The computed results were written in a DSS file during the unsteady flow simulation. An example of a script in VB for reading the simulation results from the resulting DSS file is shown in Listing 2. The time series of the water surface elevation and flow in any cross-section of the channel can be read using the function
Listing 2 Script in VB for reading results from the DSS file
The HEC-RAS Controller also enables direct manipulation of project data. For example, the Geometry_SetMann method sets the Manning roughness coefficient for a selected cross-section of channel. However, these direct editing methods are limited. Several HEC-RAS input data, such as geometry or flow boundary conditions, are stored in ASCII text files. Therefore, they can be edited relatively easily by using an appropriate VB code.
Listing 3 shows an example of a script that edits text file *.uXX (known as an Unsteady Flow File), in which the parameters related to the boundary and initial conditions of unsteady flow are stored.
Listing 3 Script in VB for editing text file *.uXX (unsteady flow file), where X can be any number
Line 12 rewrites the corresponding line, *.uXX text file containing information regarding the *.rst file (known as the Restart File). The Restart File contains information regarding the initial conditions of unsteady flow for the next simulation step.
In this way, it is possible to edit (modify) any TXT file that contains information about the boundary and initial conditions or other parameters necessary for starting an unsteady flow simulation. This method can fully replace the manual interaction of the user with HEC-RAS after each simulation step using automatic control. The user does not need to interact with the HEC-RAS GUI after each simulation step; instead, advanced tools for creating a GUI in VB [18] enable him to create a custom GUI where only parameters related to the specific simulation can be edited. This approach significantly enhanced the clarity of the simulation. Additionally, VB includes tools for displaying simulation results. The HEC-RAS Controller enables HEC-RAS to run"in the background of the application."Therefore, it is possible to create a"standalone application” that enables the user to enter inputs, execute the simulation(s) in HEC-RAS, and subsequently present the results.
Proposed Visual Basic HEC-RAS interface
The proposed Visual Basic HEC-RAS (VB-HECRAS) interface describes a universal programming architecture that enables the simulation of unsteady flow in a river system where natural flow is regulated by a hydropower plant. Subsequently, the impact of regulated flows on navigation conditions is evaluated for the Tested Production Plan, that is, the production plan that will be implemented. Unlike the HEC-RAS environment, the proposed interface enables users to enter the boundary condition directly as power demand. The interface is shown in Fig. 3.
The entire process of simulation and subsequent evaluation of navigation conditions was managed by the Master Process (control module) programmed in Visual Basic 6.0, a programming language environment. The control module consists of several submodules. These include the procedures used, such as loading inputs, editing plans, running simulations, and writing results. The input data for the simulation were loaded using the
The simulation is divided into two main parts. The first part is the simulation of unsteady flow upstream and downstream of the hydropower plant for an already Realized Production Plan (see Figs. 2 and 3). This part of the process is used to establish the initial unsteady flow conditions for the second calculation step. At this stage, the hydrograph flow through the hydropower plant is already known. Therefore, the unsteady inlet flow boundary condition in the river reach downstream of a hydropower plant can be defined as a Flow Hydrograph. These values, along with data on the actual power output and head/tail water levels, are typically a standard part of the information system of any hydropower plant. In real time, this system gathers data on the operation of the plant and hydraulic structure. If flow data are not available in the system, the flow through the turbines is m3. s−1 can be calculated using the following equation:
3
where P is the power output of the hydropower plant in kW, η is the total efficiency of the hydropower plant, H is the difference in the head and tail water levels in meters, and H is a function of hydropower plant flow. The unsteady outlet flow boundary condition in the river reach upstream of the hydropower plant was given by the Rating Curve.Fig. 2 [Images not available. See PDF.]
Flowchart of the work process
Fig. 3 [Images not available. See PDF.]
Illustration of the VB-HECRAS interface operation
The unsteady inlet flow boundary condition in the river reach upstream of the hydropower plant was defined by the hydrograph of the average inflow into the river system. This is the site where the hydrological forecast was applied. The outlet boundary condition can be entered as the actual time-varying head water level (Stage Hydrograph). The boundary condition data for the first part of the process are stored in the unsteady flow file *.u01, whereas the other simulation parameters are stored in the plan file *.p01. These files are generated as described in Listing 3 by the
The initial unsteady flow conditions in the first step of the process were the actual water levels and flow values at each profile of the geometric model of the simulated river reaches. Therefore, simplification is necessary. In the first step of the process, the initial condition was set as the steady flow water surface elevation (Steady Flow Backwater). Its value was equal to the inflow into the river system at 01 JAN2024 00:00:00. It is clear that this approach to simplifying the initial condition will lead to results that may not accurately reflect reality, particularly in the early phases of the calculation. However, the purpose of this “first step” simulation is not to determine the accurate time development of water levels nor to evaluate the impact of hydropower plant operation on navigation conditions. The sole outcome of the simulation was to generate a restart file *.p01.01 JAN2024 2400.rst. This file contains the simulation results for the time profile 01 JAN2024 24:00:00. The generated Restart File was then used as the initial condition for the simulation in the second step of the solution, starting at 02 JAN2024 00:00:00. Based on the analysis of the calculations presented in Sect. 3, it can be stated that a simulation time interval of 24 h with a calculation time step of at least 5 min is sufficient to generate a Restart file that approximates the actual water levels and flows with adequate accuracy, even in larger river systems. Unsteady flow simulation was initiated using the
The second part of the process involves unsteady flow simulations upstream and downstream of the hydropower plant in the tested (yet unrealized) production plan. This part of the calculation is used to determine how the temporal development of water levels in river reaches is affected by hydropower plant operation and to assess whether the tested production plan will negatively impact the navigation conditions; that is, whether flow fluctuations through turbines will cause minimum navigable depths to not be reached.
As in the first part of the master process, the outlet boundary condition in the river reach downstream of the hydropower plant is determined by the rating (stage-discharge) curve. The inlet boundary condition in the river reach upstream of the hydropower plant was defined using the hydrograph of the forecasted inflow into the river system.
Equation (3) clearly shows that the power output of the hydropower plant is nonlinearly dependent on the flow through the turbines. Therefore, it was not possible to directly determine the hydrograph of the flow through the hydropower plant in the tested production plan. Consequently, the inlet boundary condition in the river reach downstream of the hydropower plant cannot be entered into the flow hydrograph. The same issue applies to the outlet boundary condition for the river to reach the upstream of the hydropower plant. During the test period, the temporal development of the head water levels and flow through the turbines are not yet known. To determine these flows according to Eq. (3), it is necessary to divide the second part of the process into several steps. This enables the calculation of the average flow through the turbines at each time step of the simulation according to the following relation:
4
where PStep number is the average power output in the simulation time step in kW and HStep number−1 is the average difference in the head and tail water levels in the previous simulation time step (in meters). This means that the inlet/outlet boundary condition in the river reach that reaches downstream/upstream of the hydropower plant, that is, the value QStep number, must always be calculated separately for each computation step, always after completing the simulation in the previous step.The unsteady flow boundary condition data were stored in an unsteady flow file *.u02, and the other simulation parameters were stored in a plan file *.p02. These files are rewritten with current values after each step, as per Listing 3, using the
Sufficiently accurate results can be obtained if the length of a single simulation step is not too long. Based on the analysis of the calculations presented in Sect. 4, it can be concluded that a simulation time step length of 5 min is adequate for accurately simulating the actual time development of the water levels and flows. The accuracy of calculating the average turbine flow rate according to Eq. (4) naturally increases as the simulation time step length decreases. Reducing this time-step length to less than 5 min no longer significantly affects the accuracy of the simulation and only results in an increase in the simulation computation time (see Sect. 4.1.4).
The
The interface shown in Fig. 3 consists of 289 steps. The first part of the process represents the period of the already realized production plan from 01 JAN2024 00:00:00 to 01 JAN2024 24:00:00. The tested production plan started at 02 JAN2024 00:00:00 and ended at 02 JAN2024 24:00:00, with each step lasting five minutes. The proposed interface is universal and can be used for any tested production plan length with any step length. However, the length of the first part of the simulation must not be less than 24 h.
Results
Case study – the Gabčíkovo hydropower plant
The effectiveness of the proposed approach described in Sect. 3 and its applicability to the real-world planning and management of hydropower plants were demonstrated through a case study of the Gabčíkovo hydropower plant on the Danube River in Slovakia, where the Gabčíkovo hydropower plant (GHP) is part of the large-scale Gabčíkovo Project on the Danube (Fig. 4).
Fig. 4 [Images not available. See PDF.]
Location of The Gabčíkovo Project in Slovakia
From a conceptual point of view, it is a derivational-type hydropower plant with a total power output of 8 × 90 = 720 MW and a total turbine capacity of 5,000 m3. s−1 and an average annual production of 2,200 GWh. The head varied between 16 and 23.6 m, and the Hrušov Reservoir ensures daily flow regulation from 600 to 5,000 m3. s−1. The reservoir has a capacity of 38.9 million m3. The hydropower plant output can vary throughout the day from 90 to 720 MW, depending on the demands of the energy supply system. The intake channel is 28 km long, and the waste channel is 8 km long. To overcome the head at the hydropower plant, two ship locks with dimensions of 34.0 × 275.0 m are used. International navigation on the Danube is primarily facilitated through intake and waste channels.
The Gabčíkovo Project is a type of multipurpose hydraulic structure. In addition to international navigation and energy production, it ensures flood protection and provides water withdrawals from the Hrušov reservoir. At river kilometer 1696, the Nagymaros Dam was planned to be constructed with a balancing reservoir, intended to maintain navigation conditions downstream of the GHP even during minimum flow through the GHP. However, in the absence of the Nagymaros Dam, minimum navigational depths downstream of the GHP cannot be guaranteed across the full flow regulation range. If the required navigation conditions are not ensured, the safety of international navigation on the Danube may be significantly endangered. The situation is particularly complicated by the presence of the fords between the GHP and Komárno Bridge (see Fig. 4), with a total length of nearly 15 km. Moreover, this the Danube reach is characterized by an intense sediment transport regime. The average annual flow in this Danube reach is approximately 2,000 m3.s−1, but during floods, it can reach up to 10,000 m3.s−1. The highest flows occur in spring and early summer due to snowmelt in the Alps and spring rains. Conversely, low water levels are typical in autumn and winter. During this period, frequent vessel collisions with the bottom of fairway are observed, resulting in broken towlines and a loss of vessel control. To ensure navigation safety on the Danube, it is essential to have a tool which enables the simulation of the Danube River's water-level regime within a reasonable time and with adequate accuracy, allowing for the analysis of the impact of daily flow regulation on navigation conditions downstream of the hydropower plant (Table 1).
Table 1. The parameters of the Gabčíkovo hydropower plant
Parameter | Value |
|---|---|
Location | Gabčíkovo, Slovakia |
River | Danube River |
Type of Dam | Concrete gravity dam |
Installed capacity | 720 MW |
Number of Turbines | 8 Kaplan turbines |
Turbine power output | 90 MW each |
Runner – diameter – number of blades | Ø9300 mm – 4 |
Turbine capacity | 636 m3.s−1 each |
Average annual production | Approximately 2,200 GWh |
Head | 16 ~ 23.6 m |
Reservoir capacity | 38.9 million m3 |
Reservoir area | ~ 40 km2 |
Dam height | 25 m |
Length of Dam | 500 m |
Commissioning year | 1992 |
Primary purpose | Hydropower generation, flood control, navigation improvements |
Operator | Vodohospodárska výstavba |
Flow conditions for navigation
According to the classification of inland waterways of international importance and the definition of convoys, as specified in the European Agreement on Main Inland Waterways of International Importance (AGN) [19], the Danube in the river reach from rkm 1880.2 to rkm 1708.2 is classified under classes VIb and VII. According to the recommendations of the Danube Commission [20], the recommended minimum navigable depth of the Danube waterway for these classes is 2.5 m in river sections with a natural flow regime and 3.5 m in river sections with a dammed water level, plus a safety distance of 2 dm (loose or soft bottom) or 3 dm (rocky bottom) depending on the bottom material. Therefore, the water depths to be secured are 27 and 28 dm, respectively.
This implies that the GHP flow fluctuation caused by the load-following operation must not cause the water depth in the fairway to fall below the recommended minimum navigable depth. If these parameters are not satisfied, the safety of international navigation via the Danube may be at risk. By linking Visual Basic with HEC-RAS, as shown in Figs. 3 and 5, it is possible to evaluate whether the GPH-tested operation will endanger the navigation safety of the Danube from Devín (rkm 1880.2) to the Komárno Bridge (rkm 1767.81).
Fig. 5 [Images not available. See PDF.]
Block diagram of navigation safety assessment using the VB-HECRAS interface
Model setting
The first geometric model of the Danube riverbed from rkm 1880.2 to rkm 1767.81 was created. It consists of 762 cross-sectional profiles, 204 of which make up the old Danube riverbed; that is, the river reaches the junction from the GHP waste channel into the old Danube riverbed. The total length of the modeled reaches was 149.2 km. The geometric model consists of four river reaches (see Table 2).
Table 2. Division of the HEC-RAS geometric model
Name | River reach [km] | Number of cross sections |
|---|---|---|
Devin_GHP | 57.2 | 297 |
Waste_channel | 8.0 | 40 |
Old_Danube_Riverbed | 40.8 | 204 |
Sap_Komarno | 43.2 | 221 |
Σ | 149.2 | 762 |
The inlet boundary condition for unsteady flow in the river reach Devin_GHP in the first step of the simulation (Realized Production Plan) is the actual flow hydrograph at rkm 1880.2—Devín. The next steps of the simulation (Tested Production Plan) were to establish the forecasted flow hydrographs. The outlet boundary condition for the river reach Devin_GHP in the first step of the simulation was the hydrograph of the actual flows through the GHP calculated using Eq. (3). In the following simulation steps, the hydrograph of flows through the GHP is determined according to Eq. (4). The inlet boundary condition for unsteady flow in the river reach Waste_Channel in the first step of the simulation is the hydrograph of actual flows through the GPH calculated using Eq. (3). In the next steps of the simulation, the hydrograph of flows through the GPH was determined according to Eq. (4). The outlet boundary condition for the river reach Sap_Komarno in all steps of the simulation is the rating curve at rkm 1767.81 for the Komárno Bridge. The other boundary conditions were hydrographs of measured or forecasted/planned uniform and lateral inflows/outflows into/from the river system. The boundary condition is also a hydrograph of actual or planned flows into the old Danube riverbed through the weir. The weir increased the water level of the inlet channel.
The simulation range of the model was quite large, from approximately 800 m3. s−1 to a maximum navigable flow of 5400 m3. s−1. Therefore, each reach of the model was divided into several sections (zones) based on the water level in the river to ensure that the roughness coefficients best reflected the relationship between the water level and flow. In some cases, the difference in the roughness coefficients between the individual zones was as high as 40%. Therefore, the calibration process was challenging.
Model calibration
In this study, the measured data from the gauge stations placed in 17 calibration profiles were used to calibrate the simulation model (see Table 3). The data were recorded from 01 JAN2020 to 31DEC2022, with a data recording frequency of 5 min. During this period, the Danube flows ranged from the minimum to the maximum navigable flow. The gauge stations were evenly distributed along the length of the modeled area. In the calibration process, the boundary conditions were input as a hydrograph of the actual flows through the GHP turbines and inflow/outflow hydrographs with a time step of 5 min. The accuracy criterion for the simulation was considered to be the deviation of the simulated water levels from the actual measured data, with a maximum allowed deviation of ± 10 cm during the'Tested production plan'period.
Table 3. The list of calibration and verification profiles
No | Name | rkm | No | Name | rkm | No | Name | rkm |
|---|---|---|---|---|---|---|---|---|
1 | Devín | 1880.20 | 7 | Bodiky | 1830.00 | 13 | Kližská Nemá | 1792.40 |
2 | Bratislava | 1869.30 | 8 | Head water level GHP | 1823.00 | 14 | Gönyű (HU) | 1790.60 |
3 | Rusovce | 1856.40 | 9 | Tail water level GHP | 1823.00 | 15 | Veľké Kosihy | 1787.60 |
4 | Hrušov Reservoir | 1853.10 | 10 | Sap—confluence | 1811.00 | 16 | Zlatná na ostrove | 1778.87 |
5 | Danubiana | 1852.40 | 11 | Medveďov bridge | 1806.35 | 17 | Komárno bridge | 1767.81 |
6 | Culvert | 1835.90 | 12 | Čičov | 1796.25 |
The allowable deviation in the negative direction is related to a safe distance of 2 dm, which is added to the recommended minimum navigable depth (see Sect. 4.1.1). If the simulated water levels do not match the actual water levels but the difference does not exceed the maximum deviation of − 10 cm, vessels in the fairway will still have a 10 cm reserve, preventing the vessel from hitting the bottom of the riverbed. From the perspective of navigation safety, it is clear that allowable deviations in the negative direction are critical. If the simulation indicates that the water depth does not reach 27 dm, there is a risk that vessels could collide with the bottom of fairway. In such cases, it is necessary to modify the GHP production plan and re-evaluate it. Alternatively, the vessels could be managed to ensure they avoid fords during periods when the minimum navigation depths are not reached. The allowable deviation in the positive direction is primarily related to the accuracy of the flow calculation as a boundary condition in the GHP profile according to Eq. (4). The more accurate the water level simulation upstream and downstream of the plant is, the more accurate the calculated head and flow corresponding to the demand turbine output. Calculations have shown that decreasing the required simulation accuracy leads to unacceptable water level simulation results. For instance, lowering the accuracy to ± 20 cm could increase the flow calculation error, according to Eq. (4), by nearly 100 m3/s at a power output of 720 MW. Moreover, this inaccuracy would propagate through subsequent simulation steps due to the “snowball effect.”
As stated in the introduction, approximating the power output of a hydropower plant using the flow through the turbines calculated based on the average head is insufficient for the water level simulation in connection with ensuring navigation conditions. This is demonstrated in Fig. 6. It shows the results of a water level simulation where the flow through turbines was calculated using a constant head (= the actual head at 0:00) and a simulation where the flow through turbines was calculated using the VB HEC-RAS Interface. The results clearly indicate that the"standard"flow derivation used in HEC-RAS significantly compromises the safety of navigation.
Fig. 6 [Images not available. See PDF.]
Comparison of water level simulation using the VB HEC-RAS Interface and the"standard"HEC-RAS—Medveďov gauge station rkm 1806.35
Model Verification
To verify the correctness of the model calibration process, measured data from gauge stations located in the same 17 river profiles used during calibration were used for verification. The data covered the period from 01 JAN2023 to 31DEC2023, with a data recording frequency of 5 min. During the calibration process, the boundary conditions were input as hydrographs of the actual inflows/outflows with a 5-min time step. However, for the GHP, the boundary condition was already entered using the proposed VB-HECRAS interface directly as the actual power output of the GHP in a 5-min time step. The flow through the GHP turbines was calculated using the
During the period from 01 JAN2023 to 31DEC2023, the flows in the Danube ranged from minimum levels to flows of approximately 4000 m3. s−1. This enabled verification of the simulation across a relatively wide range of flows. The required maximum deviation was achieved for all 17 verification profiles. Figure 7 shows the results of the verification of the water-level simulation at the Medveďov gauge station at rkm 1806.35.
Fig. 7 [Images not available. See PDF.]
Verification of the water level calibration process—Medveďov gauge station rkm 1806.35
In addition to correctly setting the roughness coefficients, the maximum simulation step length was also verified to ensure that the difference between the simulated and actual water levels remained within a range of ± 10 cm. The model verification revealed that, particularly in cases of sharp changes in the HPG power outputs accompanied by significant changes in the head over a relatively short period, the required model accuracy was not achieved when the simulation step length exceeded 5 min. It was also found that shortening the simulation step length to less than 5 min did not significantly affect the simulation accuracy and only extended the computational time.
Conclusions and discussion
The aim of the work presented in this study was to integrate HEC-RAS water flow analysis software with the VB/VBA development environment using the API functions of the HEC-RAS Controller. This work builds on the initial steps taken in [17], Chapter 6, Example Applications: Offtake Flows – Pausing HEC-RAS to Make Changes. Unlike the example provided in this study, a VB-HECRAS interface was proposed, which addresses the unsteady flow simulation influenced by hydropower plant operation in a closed-loop system. The input for the simulation can be the demand power outputs, even though it is not possible to directly set such a boundary condition in the HEC-RAS graphical user interface. This approach solves the problem of inefficiency in simulations that arises when boundary conditions are manually entered after each simulation step, making it practically unusable for the operational management of hydropower plants.
The proposed interface allows step-by-step reading and writing of the necessary HEC-RAS files using the HEC-RAS Controller. The simulation did not need to be interrupted to edit the boundary conditions of unsteady flow. These were automatically modified after each step using a series of VB scripts. The interface also enables the extraction and recording of simulation results using the HEC-RAS Controller and then evaluates the safety of waterway conditions affected by hydropower plant operation using VB scripts.
The proposed universal software architecture that links HEC-RAS with VB via an API provides several key advantages.
the automation of the process for entering unsteady flow boundary conditions in the form of a plant power output time series significantly increased the efficiency of the simulation. Users no longer need to manually edit the turbine flow values after each calculation step, thereby saving time and minimizing the risk of human error.
the ability to create a custom graphical user interface in the VB tailored to the specific needs of the user enhances the usability and comfort when working with the system.
the connection between hydraulic engineering and energy management enables experts from both fields to collaborate more effectively and optimize the operation of hydropower plants with regard to navigation safety. Experts in hydropower plant management can also focus on testing the different operational approaches.
Another advantage is that the proposed general software architecture is applicable to virtually all types of river systems that include one or more power plants. The condition for its use is the quality of the input data, which must be sufficient to ensure simulation with the demand accuracy.
Despite these advantages, the proposed architecture has several limitations that must be addressed in future research.
dependence on the accuracy of the input data: The accuracy of the simulations depends on the quality of the input data. It is necessary to ensure that the input data are up-to-date and accurately reflect real conditions. This approach applies not only to hydrological data but also to geometric data of the riverbed. Riverbeds with a significant sediment transport regime require the geometric model to be updated after the passage of riverbed-forming flow.
optimization of computational performance: As model complexity and data volume increase, continuous efforts are required to optimize computational performance to ensure quick and efficient simulation execution. For extensive river systems described by large volumes of geometric data, simulations are significantly slowed down, especially after each simulation step, because of the repeated loading of HEC-RAS and associated files into the memory. The speed of the simulation was also notably affected by the volume of data written in the DSS Results File. For navigation safety assessments, the simulation time can be optimized (shortened) by writing only data from cross-sections where there is the highest potential risk of falling below the minimum navigable depths, that is, at the river fords. In the case study (Section 4.1), having more than 30 cross-sectional profiles significantly affected the computational time. However, the computational time benefits from the fact that post-processing is not necessary because given the nature of the required simulation outputs, post-processing is not necessary.
The efficiency of the proposed approach and its potential for use in a real-world operational management environment were demonstrated through a case study of the Gabčíkovo hydropower plant on the Danube River in Slovakia. The integration of VB and HEC-RAS enabled the analysis of the impact of daily flow regulation on the navigation conditions in the Danube River between Devín and Komárno (approximately 100 km in length) by simulating the water-level regime of the Danube within a reasonable time and with reasonable accuracy (± 10 cm).
Currently, a test software application has been developed based on the interface proposed in this article. The application is an integral part of the planning and operational management system of the Gabčíkovo hydropower plant. It is used to assess the impact of planned operations on navigation safety on the Danube within a 24-h timeframe. The application operates in real time and can alert the operator if the planned daily flow regulation causes minimum navigable depths to not be reached. Consequently, the operator has the option to modify the production plan or take organizational measures to warn affected vessels, ensuring they are not present in critical areas at specific times.
When analyzing the impact of daily flow regulation on navigation conditions downstream of the Gabčíkovo hydropower plant, it was found that traditional methods of setting the minimum flow limit for a hydropower plant as equivalent to the minimum navigable depth are insufficient. The results show that directly inputting the power output of a hydropower plant provides a more realistic representation of the water-level regime and enables more accurate predictions of the navigation conditions in the river. This approach significantly enhances navigation safety while increasing the capabilities of the GHP.
The linking of HEC-RAS with Visual Basic, in addition to enhancing user comfort and facilitating the integration of hydraulic simulations into energy and other engineering processes, significantly contributes to better knowledge sharing between the communities involved in energy and hydraulics.
The results also highlight the potential for further development and application of this integration in various fields, such as optimizing hydropower plant operations, flood control, and other engineering applications.
When using the application to assess the impact of hydropeaking on navigation safety, HEC-RAS 1D can evaluate not only the water level regime (ensuring minimum navigable depths) but also, in line with the defined effects of flow fluctuations on navigation safety outlined at the beginning of the article, the impact of the slope of translational waves and the effect of sudden water level drops on moored vessels. If integrated with HEC-RAS 2D, it would also be possible to assess the impact of changes in transverse flow components on the safe movement of vessels, both in open water and near shiplocks.
Supplementary materials
https://www.hec.usace.army.mil/confluence/rasdocs/rasum/latest, https://www.hec.usace.army.mil/confluence/rasdocs/r2dum/latest, https://learn.microsoft.com/en-us/dotnet/visual-basic/
Acknowledgements
This contribution was developed within the framework and based on the financial support of the Slovak grant scheme VEGA No. 1/0161/24.
Author contributions
Conceptualization: P.Š.; Methodology: P.Š.; Software: P.Š., M.O.; Validation: P.Š., M.O.; Formal analysis: P.Š.; Investigation: P.Š.; M.O.; Resources: P.Š.; Data curation: M.O.; Writing—original draft preparation: P.Š.; Writing—review and editing: P.Š., M.O.; Visualization: P.Š., M.O.; Supervision: P.Š.; Project administration: P.Š. All authors have read and agreed to the published version of the manuscript.
Funding
Scientific Grant Agency of the Ministry of Education, Science, Research, and Sports of the Slovak Republic and Slovak Academy of Sciences (VEGA), No. 1/0161/24.
Data availability
The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.
Declarations
Ethics approval and consent to participate
This article does not contain any studies with human participants or animals performed by any of the authors.
Consent for publication
Not applicable.
Competing interests
The authors declare no competing interests.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
1. Moura De Figueiredo, N; Cavalcante Blanco, CJ; Filho, PC et al. Muwos - multiple use water optimization system for the power generation and navigation trade-offs analysis. Renew Energy; 2023; 203, pp. 205-218. [DOI: https://dx.doi.org/10.1016/j.renene.2022.12.004]
2. Xiangyu, M; Shengli, L; Benxi, L; Hongye, Z; Chuntian, C; Huaying, S. Multi-objective solution and decision-making framework for coordinating the short-term hydropeaking-navigation-production conflict of cascade hydropower reservoirs. J Clean Prod; 2023; [DOI: https://dx.doi.org/10.1016/j.jclepro.2023.138602]
3. Jia, T; Qin, H; Yan, D; Zhang, Z; Liu, B; Li, C; Wang, J; Zhou, J. Short-term multi-objective optimal operation of reservoirs to maximize the benefits of hydropower and navigation. Water; 2019; 11,
4. Tianlong J, Jianzhong Z. A daily power generation optimized operation method of hydropower stations with the navigation demands considered. MATEC Web of Conferences International Symposium on Water System Operations (ISWSO 2018), Volume 246. 2018. https://doi.org/10.1051/matecconf/201824601065
5. Yizi, S; Xiaofei, L; Xuerui, G; Yanxiang, G; Yuntao, Y; Ling, S. Influence of Daily Regulation of a Reservoir on Downstream Navigation. J Hydrol Eng; 2017; [DOI: https://dx.doi.org/10.1061/(ASCE)HE.1943-5584.0001522]
6. Hatamkhani, A; Moridi, A; Haghighi, AT. Incorporating ecosystem services value into the optimal development of hydropower projects. Renew Energy; 2023; 203, pp. 495-505. [DOI: https://dx.doi.org/10.1016/j.renene.2022.12.078]
7. Hatamkhani, A; Shourian, M; Moridi, A. Optimal design and operation of a hydropower reservoir plant using a WEAP-based simulation-optimization approach. Water Resour Manage; 2021; 35, pp. 1637-1652. [DOI: https://dx.doi.org/10.1007/s11269-021-02821-7]
8. Hatamkhania, A; Moridi, A; Randhir, TO. Sustainable planning of multipurpose hydropower reservoirs with environmental impacts in a simulation–optimization framework. Hydrol Res; 2023; 54,
9. Brunner GW. HEC-RAS River Analysis System Hydraulic Reference Manual; US Army Corps of Engineers; Report No. CPD-69; Hydrologic Engineering Center (HEC): Davis, CA, USA. 2016.
10. DHI. MIKE 11—A Modeling System for Rivers and Channels, User Guide, DHI Software, 2017. 2024. https://manuals.mikepoweredbydhi.help/2017/Water_Resources/MIKE11_UserManual.pdf
11. Deltares (2024, July 03). SOBEK Hydrodynamics, Rainfall Runoff and Real Time Control, User Manual, Delft, The Netherlands, 2024. https://content.oss.deltares.nl/sobek2/SOBEK_User_Manual.pdf. Accessed 03 Jul 2024.
12. Bürgler M, Caponi F, Conde D, Kammerer S. BASEMENT Basic Simulation Environment for Simulation of Environmental Flow and Natural Hazard Simulation, System Manuals, ETH - VAW, Zurich, 2022. 2024. http://people.ee.ethz.ch/~basement/baseweb/download/documentation/BMdoc_User_Manual_v3-2-0.pdf
13. Deshays, R; Segovia, P; Duviella, E. Design of a MATLAB HEC-RAS interface to test advanced control strategies on water systems. Water; 2021; 13, 763. [DOI: https://dx.doi.org/10.3390/w13060763]
14. Jonoski A, Popescu I, Zhe S. Optimal operation of flood storage areas in Huai River using coupled HEC-RAS river model and NSGAII global optimization algorithm. In: Proceedings of the 13th International Conference on Hydroinformatics, EPiC Series in Engineering, Volume 3, Pages 1004–1012, Palermo, Italy, 01–07 July 2018.
15. Leon, A; Goodell, Ch. Controlling HEC-RAS using MATLAB. Environ Model Softw; 2016; 84, pp. 339-348. [DOI: https://dx.doi.org/10.1016/j.envsoft.2016.06.026]
16. Dysarz, T. Application of python scripting techniques for control and automation of HEC-RAS simulations. Water; 2018; 10, 1382. [DOI: https://dx.doi.org/10.3390/w10101382]
17. Goodell C. Breaking the HEC-RAS Code: A User's Guide to Automating HEC-RAS. h2ls, Portland, Oregon, United States, 2014, 278 p.
18. Microsoft. Visual Basic 6.0 Programmer's Guide. Microsoft Press, Washington, United States. 1998.
19. European Agreement on Main Inland Waterways of International Importance (AGN), Available online: https://unece.org/texts-and-status. Accessed 03 Jul 2024.
20. Danube Commission. Available online: www.danubecommission.org. Accessed 03 Jul 2024.
Copyright Springer Nature B.V. Apr 2025