Next Article in Journal
Detection of Strobilurin Fungicides in Trout Streams within an Agricultural Watershed
Next Article in Special Issue
Ratingcurve: A Python Package for Fitting Streamflow Rating Curves
Previous Article in Journal
Microplastic Contamination of Fine-Grained Sediments and Its Environmental Driving Factors along a Lowland River: Three-Year Monitoring of the Tisza River and Central Europe
Previous Article in Special Issue
The Potential of Isotopic Tracers for Precise and Environmentally Clean Stream Discharge Measurements
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hydrodynamic Modeling for Flow and Velocity Estimation from an Arduino Ultrasonic Sensor

by
Tatiane Souza Rodrigues Pereira
1,
Thiago Pires de Carvalho
1,
Thiago Augusto Mendes
2,
Guilherme da Cruz dos Reis
1 and
Klebber Teodomiro Martins Formiga
1,*
1
Graduate Program in Environmental Sciences, School of Civil and Environmental Engineering, Universidade Federal de Goiás (UFG), Goiânia 74605-220, Goiás, Brazil
2
Graduate Program in Technology, Management and Sustainability, Instituto Federal de Educação, Ciência e Tecnologia de Goiás (IFG), Goiânia 74968-755, Goiás, Brazil
*
Author to whom correspondence should be addressed.
Hydrology 2024, 11(2), 12; https://doi.org/10.3390/hydrology11020012
Submission received: 17 November 2023 / Revised: 22 December 2023 / Accepted: 6 January 2024 / Published: 23 January 2024
(This article belongs to the Special Issue Advances in River Monitoring)

Abstract

:
Flow is a crucial variable in water resources, although its determination is challenging. Rating curves are standard but have conceptual limitations, leading to significantly high uncertainties. Hydrodynamic models offer a more precise alternative, but they necessitate continuous measurements of velocities, which are complex and expensive to obtain. Thus, this article aimed to validate a hydrodynamic model that estimates flows and velocities in transient conditions based on water levels measured using a low-cost ultrasonic sensor. The results indicated that these estimates can be reliable if (1) hydrodynamic models are used to represent the flow, (2) the channel bed slope is well represented in the geometric data, and (3) Manning’s coefficients are accurately estimated during calibration. The calculated flow and velocity showed a maximum variation of 40% for the same water level compared to estimates using the rating curve. The model exhibited higher sensitivity in terms of the flow when varying the channel bed slope, highlighting the importance of topographic surveys for the estimates. The validity of the implemented model was assessed with experimental data, indicating precision and reliability for practical applications in natural channels.

1. Introduction

Water flow in watercourses is essential, although its measurement can be difficult, dangerous, time-consuming, and expensive [1,2,3]. Therefore, indirect methods that use secondary flow information, such as the water level, which can be converted into flow using a rating curve, are standard.
A rating curve is a simple and inexpensive method, well-known and accepted by the scientific community, and it is most commonly used for continuous flow monitoring in watercourses [4,5]. However, it is essential to note that using a rating curve may present limitations in terms of accuracy, as in situations of turbulent flow or with rapid water level variations, the rating curve method may not provide reliable flow results. Therefore, its limitations should be considered during its application.
One of the main limitations of the rating curve is that it assumes that the flow regime is permanent. However, the flow in channels, especially for flood regimes, is transient [6,7,8]. Flow conditions change rapidly, affecting the relationship between the water level and discharge [9,10]. Another limitation is the inaccuracy of extrapolating the rating curve to values above the unmeasured values, as the rating curve is based on a limited set of data, which may not represent all the possible flow conditions [11,12,13]. The described behaviors are caused by the hysteresis effect caused by the storage condition in the channel, and they are a phenomenon related to subcritical flow and backwater effect [13].
When considering the existence of a loop in the water level and discharge relationships (dynamic wave), it is found that the rating curve method (kinematic wave) can present high errors [14]. To overcome the limitations of the rating curve method, hydrodynamic models should be used, in which the physical and hydraulic characteristics of the flow in the different sections of the channel are considered. The basis of the equations for these models is the non-kinematic flood wave propagation model, which considers the laws of mass conservation and momentum conservation [15]. However, these models present one main difficulty: validating the results obtained for the flow velocity. In rapid events, the flow velocity is difficult to measure in field conditions, which limits the accuracy of hydrodynamic models, and to validate these models, it is necessary to perform flow measurements throughout the flood cycle. In field conditions, this can be achieved using PIV (Particle Image Velocimetry) methods [16] to estimate the surface discharge velocity, with the mean velocity derived from the surface flow velocity exploring, for example, the entropy method [17]. In the laboratory, high-frequency acoustic velocimeters allow a more accurate flow dynamics analysis under controlled conditions.
Hydrodynamic models can be divided into two main types: those that use high-frequency discharge measurements and those that use only the stage. The first type is more accurate but may be limited in terms of cost and data availability. The second type is more straightforward and economical but may exhibit significant uncertainties in the discharge estimates. The uncertainty analysis of parameters (cross-section geometry and Manning’s coefficient) in transient discharge responses for the second model type has not been widely studied, as these models are typically calibrated with discharge data that do not represent the entire flood cycle.
This article aimed to validate a hydrodynamic model that estimates flows and velocities under transient conditions in an experimental channel based on water level information measured using an ultrasonic sensor [18]. The model was implemented and calibrated using the complete one-dimensional Saint-Venant equations and the Preissmann resolution scheme. The simulation results were validated by comparing them with measured experimental data, highlighting how the hysteresis effect alters flow and velocity estimates.
This article represents a significant contribution to hydrodynamic modeling, as few studies effectively measure flow variables in conjunction with the water level using a high-frequency sampling rate capable of capturing changes in the flow. Typically, measurements are taken at discrete intervals [3,19,20]. Other studies consider only continuous water level measurements, inferring flow from this approach [1,14]. In contrast to commonly employed approaches, this article utilized a Doppler velocimeter with a sampling rate of 25 Hz to continuously obtain the velocity, enabling the assessment of the natural and detailed flow conditions. Additionally, this article demonstrates the feasibility of using low-cost sensors for flow measurement, indicating their applications and limitations.

2. Materials and Methods

2.1. System Configuration and Monitoring of Levels and Velocities

The procedure for determining discharges was applied to a rectangular channel with a valuable length of 4.0 m, a cross-section of 0.20 m × 0.40 m, and a thin weir without lateral contractions (Figure 1a,d). Two different channel slope configurations were adopted, 0.0055 and 0.008 m m−1, to simulate other events for the subcritical flow regime. The slopes were measured using a Topcon AT-B4A optical level at a horizontal distance of 0.90 m (Figure 1b). The event hydrographs and measurement summaries are presented in Figure 2 and Table 1.
To measure the flow velocities, an acoustic Doppler velocimeter—ADV with an acoustic frequency of 10 MHz and a data acquisition frequency of 25 Hz was used [21] (Figure 1c,d). The ADV calculates the 3D velocity vector v from the movement of particles in the liquid and has an accuracy of 1% of the velocity measurement + 1 mm s−1. In the experiments, the value of the mean deviation observed in the steady state was 0.0059 m s−1, a minor deal, indicating that the ADV is working correctly.
Since only one ADV was available, point-averaged velocity measurements were obtained. The ADV was fixed to the channel at a height of 0.05 m from the bottom and a distance of 0.90 m from the channel entrance to attenuate the turbulence at the door and stabilize the flow, as the channel has a stilling basin.
The water levels were measured using five ultrasonic sensors (Figure 1a,d) with an Arduino Mega 2560 board, with an accuracy of 3.00 mm [22]. The sensor (H1, H2, H3, H4 e H5) configuration in the channel and the sensor selection via a bench test were the same as those in the article by Pereira et al. [18].
Since the ADV and ultrasonic sensors operate at different frequencies, their data were synchronized using a base time value of 0.20 s. This temporal accuracy is satisfactory for the required accuracy.

2.2. The Inverse Model

The inverse model estimates a system’s parameters from observed data. In this case, the inverse model was implemented to estimate the channel discharges from the observed water level data. The model was calibrated by fitting the observed data to find the system parameters, such as the channel roughness.
For modeling, the complete Saint-Venant equations (Equations (1) and (2)) for one-dimensional flow were considered and implemented in a MATLAB environment:
A t + Q x = q
Q t + x β Q 2 A + g A y x + g A S f S 0 = 0
where A is the cross-sectional area (m2); t is the time (seconds); Q is the discharge (m3 s−1); x is the distance in the flow direction (m); q is the lateral inflow discharge per unit length (m3 s−1 m); g is the acceleration due to gravity (m s−2); y is the water depth (m); β is the momentum correction factor; Sf is the energy slope (m m−1); and S0 is the longitudinal bottom slope of the channel (m m−1).
The head loss (Sf) was calculated using the Manning equation (Equation (3)).
S f = Q 2 n 2 A 2 R H 4 / 3
where Q is the discharge (m3 s−1); n is the Manning coefficient; A is the wetted area (m2); and RH is the hydraulic radius (m).
Since the flows considered occur in a subcritical regime, the hydrodynamic model requires, in addition to an initial condition, an upstream boundary condition and a downstream boundary condition [23,24]. Thus, for its resolutions, the numerical method of the Preissmann implicit scheme was used. This method requires only the values of the upstream levels, as only the level in a control section is initially known in the hydrodynamic modeling problem for determining the flow rate of a channel [14].
For the initial condition, the flows were stabilized with a discharge of 5.0 L s−1. The levels at all the sections were determined using the step method for steady-state flow. The upstream boundary condition was obtained by subtracting the calculated water level from the observed water level at the sensor H1 section, and the levels at the sections of sensors H2, H3, H4, and H5 were considered for further assessment of the model results. It is noteworthy that sensor H5 was installed in a section less affected by the backwater effect caused by the spillway, as the downstream reservoir is situated at a lower elevation, approximately 1.50 m, and thus does not interfere with the flow within the channel. The downstream boundary condition was obtained using Equation (4), calibrated according to [14], which describes the flow through a thin rectangular weir with no lateral contractions. This flow enters the problem from the residuals, given by the subtraction between the water levels and the weir discharges at the internal sections where the channel was discretized.
Q w e i r = 0.461 H H w e i r 3 / 2
where Qweir is the discharge of the rectangular weir (m3 s−1); H is the water level upstream of the weir at H5; and Hweir is the height of the weir crest above the water level (m).
Since the proposed modeling problem is indeterminate, the water levels in the weir section are unknown, but they are essential for the estimation of the hydraulic characteristics of the model. Therefore, it was necessary to carry out a calibration process to estimate them. Due to the small number of decision variables, the process was carried out manually, as there was no need for many events to adjust hydrodynamic models. This is because the physical medium is known, and the decision variables of the problem are few. Only the Manning roughness coefficient (n) was adjusted in this case. A sensitivity analysis was also performed to evaluate the sensitivity of the flows and levels to the Manning roughness coefficient (n) and slope (So) (Figure 3).

2.3. Model Calibration

Model calibration was performed using Event 1 (EV1), with the remaining three events (EV2, EV3, and EV4) used for validation. The calibration was manual, considering four types of objective functions (OFs): the Nash–Sutcliffe efficiency coefficient (NSE), the root mean square error (RMSE), the percent bias (PBIAS), and the relative error (ER), as defined by Equations (5) to (8). The metrics used to accept, reject, or qualify the model results are established as the U.S. EPA recommends [25]. The root mean square error–ratio of standard deviation of observations (RMSERSR) was also evaluated, as represented by the ratio between the RMSE and the standard deviation of the observed values (SDobs).
N S E = 1 i = 1 t H o b s i , x H c a l i , x 2 i = 1 t H o b s i , x H o b s Mean x 2
R M S E = i = 1 t H o b s i , x H c a l i , x 2 i = 1 t H o b s i , x
P B I A S = i = 1 t H o b s i , x H c a l i , x i = 1 t H o b s i , x 100
E R = i = 1 t H o b s i , x H c a l i , x i = 1 t H o b s i , x 100
where Hobsi,x is the observed water depth at time i in section x; Hcali,x is the calculated water depth at time i in section x; HobsMeanx is the mean water depth in section x; and t is the number of time intervals.
The evaluation metrics were defined based on the recommendations in the literature by Singh et al. [26] and Moriasi et al. [27], which provide a general performance classification for hydrologic simulations. However, we consider these metrics a first reference for evaluating the quality of hydrodynamic simulations, as no established standardization exists for this purpose [28].
Graphical techniques were also used to evaluate the performance of the hydrodynamic model. These techniques allow for a visual comparison of simulated and observed data and provide a first overall view of the model’s performance [28]. Thus, we used line graphs, velocity graphs, and distribution curves of the percentage relative errors (ER) (Figure 4 and Figure 5). For the latter, we established the ER ≤ 5% metric as having moderate accuracy, adopted for acceptable flow measurements [27], and took into account the uncertainty of the sensors and the ADV.

3. Results

In this study, the slope was measured directly from the canal level measurement to have a process similar to that used in rivers, and only the Manning coefficient (n) was adjusted. The n adjustment process was performed manually for the EV1, resulting in a value of n = 0.011. This value is compatible with that found in the literature for very smooth surfaces [29], as is the case of the evaluated channel, which has glass sidewalls and an acrylic bottom.
The sensitivity analysis showed that discharge is the most sensitive parameter to Manning’s coefficient (n) and slope (So) changes. Height was the least sensitive parameter, with a seven times more minor percentage change than discharge (Figure 3).
Although the two parameters n and So have a minor proportional change compared to the two variables Q and H, the relationship between Q and So was much stronger than the others (Q/n, H/n, and H/So). This result indicates that discharge is significantly sensitive to topography, while height has minor sensitivity (Figure 3).
Events 1 and 4 differ in the height of the weir at the end of the channel, which affects the flow in the analysis section. Event 1 has less interference from the backwater effect, which implies a higher sensitivity of the roughness coefficient (n) to the flow. In Event 4, the velocities are lower, meaning lower energy losses, as reflected in the low sensitivity of both the flow and the height to the roughness coefficient (n). In determining flows through hydrodynamic simulations, topographic data are essential to ensure the reality of the results under all backwater conditions. The roughness coefficient (n) is necessary when the backwater effect in the section is lower, as the flow is more sensitive to this parameter under these conditions.
The quantitative metric results for the different events are presented in Table 2 and Table 3 and Figure 4 and Figure 5.
The results of the metrics indicate that the model simulated the water level trends very well for all the events, with the average NSE values ranging from 0.958 to 0.995 (Table 2), a result corroborated by the graphs (Figure 5). The errors were more significant for the velocities, with the average NSE values ranging from 0.653 to 0.912 (Table 2), with greater dispersion of the values between the curves in the graphs (Figure 4). This is mainly due to the diffusion of the measured velocity data, as the ADV can measure the degree of turbulence in the flow.
EV2 and EV4 had higher water levels and lower velocities (0.20 m–0.38 m s−1), while EV1 and EV3 had lower water levels and higher velocities (0.15 m and 0.49 m s−1) (Table 2). EV2 and EV4 had higher average NSE values (0.983 and 0.984) for the water levels than EV1 and EV3 (NSE 0.965 and 0.952), indicating a better model simulation. The same trend occurred for the velocities, with NSE values of 0.900 and 0.912 for EV2 and EV4, and 0.840 and 0.653 for EV1 and EV3. This is because the turbulence is generally lower in more profound and slower flows, which makes measurements easier. In summary, turbulence can cause readings with greater dispersion, which one-dimensional models do not consider. All the events evaluated were subcritical, as the ADV can only be used in water depths greater than 5 cm.
A simple and manual model adjustment produced good results consistent with the channel’s physical characteristics. Therefore, the model can be used in situations with limited velocity data, using only water level data and a topographic survey that can represent the slope of the channel bed.
When the metrics used to evaluate the model, RMSE, RMSE–RSR, PBIAS, and ER (Table 3), were analyzed, it was observed that they produced results similar to the NSE. EV1 and EV3 showed poorer simulation quality, while EV2 and EV4 showed better quality. The slope was unnecessary, as EV1 and EV3 had similar depths, and the spillway drowned the flow in the EV2 and EV4 events.
Table 3 shows that the model performed well in terms of the calibration and validation for the water levels and velocities, with average RMSEs less than half the standard deviation of the observations, except for the EV3 velocity, which was overestimated by ≈ 0.025 m s−1. The overestimation of the EV3 velocity is evident when comparing the observed and calculated mean velocity values, which were higher than 5% of the observed mean.
The model performed well for the residual variation of the water levels and velocities in the calibration and validation, with an average RMSERSR less than 0.50, except for the EV3 velocity, which was considered good, with an RMSERSR of 0.59 (Table 3). These values indicate that the model’s performance for the residual variation of the levels and velocities was excellent most of the time, since 0.50 is considered a more rigorous classification [27].
The model also performed well, with a mean PBIAS of less than ±10% for the calibration and validation (Table 3). The PBIAS values ranged from −2.10% to 0.40% for the water levels and −3.40% to 4.10% for the velocities. Most of the time, the average of the calculated values was higher than the observed values.
According to Table 3, the model performed excellently for the levels, with a mean ER of less than 5% for the calibration and validation. The performance for the velocities was lower, with a mean ER of greater than 5% (calibration = 9.73% and validation 7.69–13.27%). The greater variation for the velocities is due to the variability of the ADV measurements, which can measure 3D flow and determine turbulence.
Graphically (Figure 4 and Figure 5), it is observed that the calculated values closely followed the observed values in the calibration (Figure 4a and Figure 5a) and validation (Figure 4b–d and Figure 5b–d), even for unfavorable flow conditions. This indicates that the model can simulate flow across the states examined. The model also reproduced the flow propagation, with peaks coinciding at the four observed points.
For the levels, the distributed ER was higher for EV1 and EV3 (Figure 4a,c), reaching 9.98%. The errors were smaller for EV2 and EV4 (Figure 4b,d), not exceeding 7.41%. The most significant errors occurred at the beginning of the simulation when the model was still warming up. The slightest errors occurred in the peak flow region, with higher observed water levels. The model did not show a trend of overestimation or underestimation, indicating that it has good predictability.
For the velocities (Figure 5), the errors increased as the velocity increased due to the increased turbulence. In Event 3, the velocity measurements at the first and second peaks exhibited discontinuous values compared to those observed in the other three events. The distributed ER was larger for all the events, but more than 85% of the errors were less than 20%, and more than 4% were less than 40%.
Therefore, the model presented excellent results for the trends of the water levels and velocities. From a more conservative perspective, it can be considered satisfactory. The good fits are evidenced by the statistical metrics, which agree with the graphical results.
To evaluate the transient effect on the relationship between the velocity and level, speed and level data were compared by segment for the EV1 inlet section (Figure 6). The division of the event into segments was carried out by peak to isolate the effects of hysteresis and, thus, achieve a better visualization.
The loop-shaped rating curve displays two distinct curves, one for the flood rise and another for the recession. During the rising limb, the maximum discharge (Qmax) and maximum velocity (Vmax) of the flow coincide, but at a level (h) that differs from the maximum depth (Hmax). This divergence contrasts with the steady flows, where the relationship is linear and the Qmax or Vmax corresponds to the same point as Hmax on the Cartesian x-y-axis.
In transient flows, this deviation occurs due to the increase in the local and convective acceleration terms during the flood rise, resulting in an increase in the velocity and, consequently, the flow rate at that specific point. During the flood recession, the opposite occurs, resulting in a lower flow rate for the same water level h. Thus, in transient flows, the same depth, h, can correspond to two different flow rates, depending on whether the flood wave is rising or receding. In contrast, in uniform or steady permanent flows, the acceleration terms are disregarded or simplified in the statistical formulation, and therefore, they are represented by a single curve.
The existence of the hysteresis loop in the peaks 1, 2, 3, and 5 is confirmed in this way (Figure 6a–d). In these cases, the relationship between the water level and velocity is biunivocal, meaning that for the same water level (h), there are two distinct values of velocities (VF and VR). This phenomenon, known as hysteresis, indicates that the hydrodynamic model accurately represents this behavior. This assertion is supported by traditional rating curves represented by the solid black lines for steady or stable flow. These curves exhibit a one-to-one relationship between the water level (h) and velocity (Ve).
For peak 1 (Figure 6a), the maximum velocity on the rising limb (VR) was 0.70 m s−1 (0.017 m3 s−1) at a level of 0.121 m. At the same level, the recession limb (VF) velocity was 0.42 m s−1 (0.010 m3 s−1). The difference between the VR and VF was 0.28 m s−1 (0.007 m3 s−1), corresponding to 40%. The traditional rating curve underestimates the VR by 23% and overestimates the VF by 29%.
Peaks 2, 3, and 5 (Figure 6b–d) exhibited the same behavior as peak 1, with differences between the VR and VF velocities of, respectively, 34% (0.27 m s−1 and 0.007 m3 s−1), 20% (0.14 m s−1 and 0.004 m3 s−1), and 32% (0.23 m s−1 (0.006 m3 s−1). The hydrographs of the transient flow variables do not occur simultaneously as they do for permanent flow. This is because the maximum levels (Hmax) do not correspond to the maximum velocities (Vmax) and, consequently, to the maximum discharges (Qmax), which tend to occur before these levels are reached.
Also, when the measured velocities (Ve) were compared to the predicted velocities based on the rating curves (VR) and full-flow velocities (VF) for peaks 2, 3, and 5, it was found that, for peak 2, the Ve was underestimated by −0.19 m s−1 (−0.005 m3 s−1) (24%) relative to the VR and overestimated by 0.08 m s−1 (0.002 m3 s−1) (15%) to the VF. For peak 3, the Ve was overestimated by 0.02 m s−1 (0.001 m3 s−1) (3%) in both the rising and receding limbs of the flood wave relative to the VR and by 0.16 m s−1 (0.004 m3 s−1) (28%) to the VF. For peak 5, the Ve was underestimated by −0.13 m s−1 (−0.003 m3 s−1) (18%) relative to the VR and overestimated by 0.1 m s−1 (0.003 m3 s−1) (21%) to the VF. For peak 4, analyzing the hysteresis behavior was impossible due to the relatively small wave amplitude, between 0.10 and 0.14 m, which was not considered.
It was also found that, even for a specific level, the velocity values can vary from event to event. For example, for the peaks at the level of 0.14 m, the observed deviations were 0.69, 0.78, 0.70, and 0.63 m s−1 in the rising limb and 0.58, 0.55, 0.58, and 0.58 m s−1 in the receding stem. The mean of the deviations found was 0.70 m s−1 (0.020 m3 s−1) for the rising limb and 0.57 m s−1 (0.016 m3 s−1) for the receding limb.
The deviations found are consistent with the physical concept of hysteresis, which is influenced by the system’s memory effect [30,31]. In the case studied, the flow remaining time may be one of the factors influencing the observed deviations. These deviations can be larger between the middle of the rise and the depletion curves, where the hysteresis width is greater. Therefore, these deviations may be even more significant for flows in natural channels due to friction between the channel walls and the bottom.

4. Discussion

The article focuses on the hydrodynamic simulation of transient flow in a rectangular channel based on continuous data concerning the water levels and velocities for flow estimation. The hydrodynamic model was implemented and calibrated against the water level and velocity data obtained from a laboratory experiment.
This article presents a relevant contribution by assessing the measurement of continuous velocities using high-frequency acoustic Doppler velocimeters (ADVs) in transient flows to validate the results obtained from simulations with a hydrodynamic model that employs only the water levels as upstream boundary conditions. While hydrodynamic concepts are well-known and discussed, there is a lack of studies evaluating the velocity changes during rapid flow transitions, where typically only point data have been employed.
The results indicated that the hydrodynamic model exhibits a more monotonic behavior in terms of the water levels and velocities, as it does not account for local turbulence in its formulation. Local turbulence is responsible for small fluctuations in the water surface, manifested as noise. These noises can be mitigated by more sensitive sensors or filtering techniques.
The instantaneous variations in the velocity values were highly pronounced. The acoustic Doppler velocimeter (ADV) employed can measure velocity in all three spatial axes. Consequently, the determined value represents the velocity vector aligned with the flow, and due to its high spatial resolution (25 Hz), it can capture information on turbulent changes, which were found to be substantial during the assessed events. However, when evaluating the velocity profiles themselves, they appear to be close and fluctuate within the range of values calculated by the models for over 90% of the simulated time. This suggests two key observations: firstly, the hydrodynamic model, as currently developed, is incapable of simulating turbulent flow changes within intervals shorter than 1 s. Nevertheless, it effectively represents the average velocity values.
Some studies have conducted velocity measurements in turbulent flows but employed high time intervals. For instance, [3,19,20] worked with point measurements of the discharge, capturing only a single point per assessed event and not tracking the rising and falling phases of the hydrograph. These intervals may surpass the time scale of the velocity fluctuations, potentially losing crucial information about the flow turbulence. In our case, applying a data filter to the velocities might reduce these fluctuations, but it could also result in the loss of significant details, such as the chaotic nature of the actual flow, which deviates from the mean values obtained in the model. They acknowledge these modeling limitations and remember that preserving the chaotic aspects of natural flow is essential for comprehensive understanding.
However, the model successfully replicated the flow behavior at both levels and velocities, employing the channel’s inlet level as a boundary condition. As measuring the water level is more straightforward and cost-effective than measuring the velocity, its measurement, along with a hydrodynamic model, has been demonstrated to be efficient and supported by the velocimeter measurements.
The observed hysteresis effect was significant, indicating that using the rating curve as a method for determining flow in transient flow conditions is unsuitable. Although the simulations were conducted in a small-scale channel with pronounced temporal variations in flow, both the measured and calculated values demonstrate that the errors in flow estimates using the rating curve can be substantial. In our conditions, the errors reached up to 40%. This underscores the need for a more comprehensive study to assess the limitations of the rating curve as a source of flow data in rivers.
The ultrasonic sensors are promising water level measurement and flow estimation tools, as they demonstrate good accuracy, low cost, and quick and straightforward data acquisition. Furthermore, using open-source code enables control over the entire process and real-time visualization of all the variables returned by the sensor. Expanding this application to field conditions, such as rivers, with the development of stream gauges, represents a forthcoming challenge, as it would make data acquisition accessible to a broader audience.
In general, the implications of the study results indicate that the implemented model can accurately estimate discharge rates, making it suitable for water resources management. The findings can also contribute to a better understanding of the behavior of transient flows and aid in developing practical applications for simulating flows in natural channels. However, it is crucial to emphasize that the study was conducted in a rectangular channel with controlled flow conditions. Additional investigations in natural channels are required to validate the study results under real-world conditions.

5. Conclusions

We investigated the flow and velocity estimates generated from implementing a hydrodynamic model that utilizes only continuous water level information measured using ultrasonic sensors as the upstream boundary conditions for transient flow. The results demonstrated that the sensors are a reliable source for acquiring water level data, and the model could accurately estimate the flows and velocities for turbulent flows influenced by hysteresis effects. This accuracy is contingent upon conducting a thorough topographic survey to define the channel bed slope and accurately estimating the Manning coefficient during calibration. These findings align with the initial objective proposed in this article.
The calculated discharge and velocity showed a maximum variation of 40% for the same level compared to those estimated with the rating curve method. Thus, the results showed that hysteresis is an essential factor affecting the estimated discharge values in natural watercourses.
The results’ implications are significant, as the implemented model has proven capable of accurately estimating flow rates, enabling its use for water resources management and the simulation of flows in natural channels. However, it is emphasized that further studies under actual conditions, particularly in natural channels, are necessary to validate the results thoroughly.
The objective functions (FOs) and the general performance classifications used proved suitable for assessing the model predictions, although no studies were found recommending or not recommending their applications for evaluating hydrodynamic models. The Kling–Gupta efficiency (KGE), proposed by [32] and modified by [33], although commonly employed for calibration in hydrology, was not utilized in this study as the focus was on isolated events without base flow periods. In such cases, the NSE and RMSE are more suitable performance indicators. However, if the study had assessed a continuous hydrological model, we acknowledge that the KGE would be a better option.
We recommend considering the application of a filter for the velocities in future works to reduce the noise generated in the data acquisition process. For future studies, we suggest fixing the water level, altering the Manning coefficient by 0.1 and 0.5, respectively, and evaluating the Nash–Sutcliffe efficiency (NSE) values. This approach allows for assessing the sensitivity of the Manning coefficient to the water levels and flows for comparison purposes despite acknowledging that the flows are highly sensitive to the Manning coefficient variations, as explained here.
Moreover, assessing the continuous velocity measurements in transient flows and discussing the limitations of the hydrodynamic model contribute to advancing knowledge in the field, providing crucial insights for improving future research and practical applications. In summary, the results of this study offer relevant support for developing more precise and reliable methodologies for estimating the flows and velocities in natural channels, thereby enhancing the management of water resources and the safety of hydraulic infrastructure projects by reducing uncertainties in estimated flows.

Author Contributions

Conceptualization, T.S.R.P., T.P.d.C., T.A.M. and G.d.C.d.R.; methodology, T.S.R.P., T.P.d.C., T.A.M. and K.T.M.F.; software, T.S.R.P., T.P.d.C., T.A.M. and K.T.M.F.; validation, T.S.R.P., T.P.d.C., T.A.M. and K.T.M.F.; formal analysis, T.S.R.P., T.P.d.C., T.A.M. and K.T.M.F.; investigation, T.S.R.P., T.P.d.C., T.A.M. and G.d.C.d.R.; resources, K.T.M.F.; data curation, T.S.R.P., T.P.d.C., T.A.M. and K.T.M.F.; writing—original draft preparation, T.S.R.P., T.P.d.C., T.A.M., G.d.C.d.R. and K.T.M.F.; writing—review and editing, T.S.R.P., T.P.d.C., T.A.M., G.d.C.d.R. and K.T.M.F.; visualization, T.S.R.P., T.P.d.C., T.A.M., G.d.C.d.R. and K.T.M.F.; supervision, T.A.M. and K.T.M.F.; project administration, K.T.M.F.; funding acquisition, K.T.M.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by funding from National Council for Scientific and Technological Development of Brazil (CNPq)—Chamada CNPq 25/2021—Pós-Doutorado Júnior—PDJ 2021 and CAPES.

Data Availability Statement

Data are contained within the article.

Acknowledgments

The authors are grateful to CAPES and National Council for Scientific and Technological Development of Brazil (CNPq)—Chamada CNPq 25/2021—Pós-Doutorado Júnior—PDJ 2021 for the financial support that made this work possible.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Aricò, C.; Nasello, C.; Tucciarelli, T. Using unsteady-state water level data to estimate channel roughness and discharge hydrograph. Adv. Water Resour. 2009, 32, 1223–1240. [Google Scholar] [CrossRef]
  2. Perumal, M.; Moramarco, T.; Sahoo, B.; Barbetta, S. On the practical applicability of the VPMS routing method for rating curve development at ungauged river sites. Water Resour. 2010, 46, 1–9. [Google Scholar] [CrossRef]
  3. Corato, G.; Ammari, A.; Moramarco, T. Conventional point-velocity records and surface velocity observations for estimating high flow discharge. Entropy J. 2014, 16, 5546–5559. [Google Scholar] [CrossRef]
  4. Dottori, F.; Martina, M.; Todini, E. A dynamic rating curve approach to indirect discharge measurement. Hydrol. Earth Syst. Sci. 2009, 13, 847–863. [Google Scholar] [CrossRef]
  5. Rennie, C.; Hoitink, A.J.F.; Muste, M. Experimental Hydraulics: Methods, Instrumentation, Data Processing and Management, Volume II: Instrumentation and Measurement Techniques; CRC Press: Boca Raton, FL, USA, 2017. [Google Scholar]
  6. Damangir, H.; Abedini, M.J. System identification and subsequent discharge estimation based on level data alone—Gradually varied flow condition. Flow Meas. Instrum. 2014, 36, 24–31. [Google Scholar] [CrossRef]
  7. Yang, T.H.; Ho, J.Y.; Hwang, G.D.; Lin, G.F. An indirect approach for discharge estimation: A combination among microgenetic algorithm, hydraulic model, and in situ measurement. Flow Meas. Instrum. 2014, 39, 46–53. [Google Scholar] [CrossRef]
  8. Muste, M.; Lee, K.; Kim, D.; Bacotiu, C.; Oliveros, M.R.; Cheng, Z.; Quintero, F. Revisiting hysteresis of flow variables in monitoring unsteady streamflows. J. Hydraul. Res. 2020, 58, 867–887. [Google Scholar] [CrossRef]
  9. Muste, M.; Ho, H.C.; Kim, D. Considerations on direct stream flow measurements using video imagery: Outlook and research needs. J. Hydro-Environ. Res. 2011, 4, 289–300. [Google Scholar] [CrossRef]
  10. Herschy, R.W. Streamflow Measurement; E & F N SPON: London, UK, 1995. [Google Scholar]
  11. Brusa, L.C.; Clarke, R.T. Erros envolvidos na estimativa da vazão máxima utilizando curva-chave. Estudo de caso: Bacia do rio Ibicuí, RS. Rev. Bras. Recur. Hídricos 1999, 4, 91–95. [Google Scholar] [CrossRef]
  12. Sahoo, B.; Perumal, M.; Moramarco, T.; Barbetta, S. Rating Curve Development at Ungauged River Sites using Variable Parameter Muskingum Discharge Routing Method. Water Resour. Manag. 2014, 28, 3783–3800. [Google Scholar] [CrossRef]
  13. Reis, G.C.; Pereira, T.S.R.; Faria, G.S.; Formiga, K.T.M. Analysis of the Uncertainty in Estimates of Manning’s Roughness Coefficient and Bed Slope Using GLUE and DREAM. Water 2020, 12, 3270. [Google Scholar] [CrossRef]
  14. Oliveira, F.A.; Pereira, T.S.R.; Soares, A.K.; Formiga, K.T.M. Uso de modelo hidrodinâmico para determinação da vazão a partir de medições de nível. Rev. Bras. De Recur. Hídricos—RBRH 2016, 21, 707–718. [Google Scholar] [CrossRef]
  15. Cunge, J.A.; Holly, F.M.; Verwey, A. Practical Aspects of Computational River Hydraulics; Pitman Advanced Publishing Program: Boston, MA, USA, 1980. [Google Scholar]
  16. Adrian, R.J. Particle-imaging technologies for experimental fluid mechanics. Annu. Rev. Fluid Mech. 1991, 23, 261–304. [Google Scholar] [CrossRef]
  17. Choo, T.H.; Hong, S.H.; Yoon, H.C.; Yun, G.S.; Chae, S.K. The estimation of discharge in unsteady flow conditions, showing a characteristic loop form. Environ. Earth Sci. 2015, 73, 4451–4460. [Google Scholar] [CrossRef]
  18. Pereira, T.S.R.; de Carvalho, T.P.; Mendes, T.A.; Formiga, K.T.M. Evaluation of Water Level in Flowing Channels Using Ultrasonic Sensors. Sustainability 2022, 14, 5512. [Google Scholar] [CrossRef]
  19. Corato, G.; Moramarco, T.; Tucciarelli, T. Discharge estimation combining flow routing and occasional measurements of velocity. Hydrol. Earth Syst. Sci. 2011, 15, 2979–2994. [Google Scholar] [CrossRef]
  20. Bahmanpouri, F.; Gualtieri, C.; Chanson, H. Flow Patterns and Free-Surface Dynamics in Hydraulic Jump on Pebbled Rough Bed. Water Manag. 2023, 176, 32–49. [Google Scholar] [CrossRef]
  21. NORTEK AS. NORTEK Manuals: The Comprehensive Manual for Velocimeters—Vector—Vectrino—Vectrino Profiler. 2018, pp. 1–119. Available online: https://www.nortekgroup.com/assets/software/N3015-030-Comprehensive-Manual-Velocimeters_1118.pdf (accessed on 16 November 2023).
  22. Cytron Technologies. Product User’s Manual—hc-sr04 Ultrasonic Sensor; Cytron Technologies: Pulau Pinang, Malaysia, 2013. [Google Scholar]
  23. Akan, A.O. Open Channel Hydraulics; Elsevier: Amsterdam, The Netherlands, 2006. [Google Scholar]
  24. Aricò, C.; Corato, G.; Tucciarelli, T.; Meftah, M.B.; Petrillo, A.F.; Mossa, M. Discharge estimation in open channels by means of water level hydrograph analysis. J. Hydraul. Res. 2010, 48, 612–619. [Google Scholar] [CrossRef]
  25. U.S. EPA. Guidance for Quality Assurance Project Plans for Modeling; EPA QA/G-5M, Report EPA/240/R-02/007, Office of Environmental Information; EPA: Washington, DC, USA, 2002.
  26. Singh, J.; Knapp, H.V.; Demissie, M. Hydrologic Modeling of the Iroquois River Watershed Using HSPF and SWAT; Series ISWS CR 2004-08; Illinois State Water Survey: Champaign, IL, USA, 2004. [Google Scholar]
  27. Moriasi, D.N.; Arnold, J.G.; Van Liew, M.W.; Bingner, R.L.; Harmel, R.D.; Veith, T.L. Model Evaluation Guidelines for Systematic Quantification of Accuracy in Watershed Simulations. Am. Soc. Agric. Biol. Eng. 2007, 50, 885–900. [Google Scholar] [CrossRef]
  28. ASCE. Criteria for evaluation of watershed models. J. Irrig. Drain. Eng. 1993, 119, 429–442. [Google Scholar] [CrossRef]
  29. Chaudhry, M.H. Open-Channel Flow, 2nd ed.; Springer: Berlin, Germany, 2006. [Google Scholar]
  30. Visintin, A. Differential Models of Hysteresis; Springer Science & Business Media: New York, NY, USA, 2013. [Google Scholar]
  31. Chen, P.; Bai, X.; Qian, L.; Choi, S. An Approach for Hysteresis Modeling Based on Shape Function and Memory Mechanism. IEEE/ASME Trans. Mechatron. 2018, 23, 1270–1278. [Google Scholar] [CrossRef]
  32. Gupta, H.V.; Kling, H.; Yilmaz, K.K.; Martinez, G.F. Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling. J. Hydrol. 2009, 377, 80–91. [Google Scholar] [CrossRef]
  33. Kling, H.; Fuchs, M.; Paulin, M. Runoff conditions in the upper Danube basin under an ensemble of climate change scenarios. J. Hydrol. 2012, 424, 264–277. [Google Scholar] [CrossRef]
Figure 1. Experimental channel: (a) weir, (b) optical level, (c) ultrasonic sensors and acoustic Doppler velocimeter—ADV and (d) technical drawing of the channel.
Figure 1. Experimental channel: (a) weir, (b) optical level, (c) ultrasonic sensors and acoustic Doppler velocimeter—ADV and (d) technical drawing of the channel.
Hydrology 11 00012 g001
Figure 2. Water levels and velocities observed with ultrasonic sensors and an ADV.
Figure 2. Water levels and velocities observed with ultrasonic sensors and an ADV.
Hydrology 11 00012 g002
Figure 3. Sensitivity analysis of n and S0 for Events 1 and 4.
Figure 3. Sensitivity analysis of n and S0 for Events 1 and 4.
Hydrology 11 00012 g003
Figure 4. Observed and calculated water levels for the events and errors as a function of the time and observed values.
Figure 4. Observed and calculated water levels for the events and errors as a function of the time and observed values.
Hydrology 11 00012 g004
Figure 5. Observed and calculated velocities and errors as a function of the observed values.
Figure 5. Observed and calculated velocities and errors as a function of the observed values.
Hydrology 11 00012 g005
Figure 6. Hysteresis phenomenon for the calibration of event EV1 and the respective hystereses by the peak, where the solid red lines are observed values, the solid black lines are calculated values, and the dashed black lines are values of the traditional rating curve for uniform or steady flow. The subscripts h, Hmax, VF, Ve, VR, and Vmax are the level, maximum level, velocity at depletion, stable flow velocity (traditional rating curve or for uniform steady flow), velocity at the ascent, and maximum velocity, respectively.
Figure 6. Hysteresis phenomenon for the calibration of event EV1 and the respective hystereses by the peak, where the solid red lines are observed values, the solid black lines are calculated values, and the dashed black lines are values of the traditional rating curve for uniform or steady flow. The subscripts h, Hmax, VF, Ve, VR, and Vmax are the level, maximum level, velocity at depletion, stable flow velocity (traditional rating curve or for uniform steady flow), velocity at the ascent, and maximum velocity, respectively.
Hydrology 11 00012 g006
Table 1. Summary of the variables used for the different events. Hweir is the weir height, Qmean is the mean discharge, Vmean is the mean velocity, Level H1 is the water level at the channel entrance, Levelweir is the water level at the channel exit near the weir, and Fr is the Froude number.
Table 1. Summary of the variables used for the different events. Hweir is the weir height, Qmean is the mean discharge, Vmean is the mean velocity, Level H1 is the water level at the channel entrance, Levelweir is the water level at the channel exit near the weir, and Fr is the Froude number.
EventsHweir (m)Bottom Slope (m m−1)PeakQmean (L s−1)Vmean
(m s−1)
Level H1 (m)Levelweir (m)FrDuration (s)
EV10.050.0055150.2970.931.070.10200
2100.4421.191.320.13
3150.5541.401.500.15
4200.6101.601.700.15
EV20.10.0055150.2421.401.700.07200
2100.2921.731.860.07
3150.3801.972.030.09
4200.4672.192.270.10
EV30.050.008150.3400.771.000.12500
2100.5121.041.220.16
3150.6291.271.430.18
4200.6341.441.600.17
EV40.10.008150.2151.311.540.06500
2100.3301.591.800.08
3150.4101.842.000.10
4200.4802.062.190.11
Table 2. Summarizes the mean of values for the calibration and validation events.
Table 2. Summarizes the mean of values for the calibration and validation events.
EV1EV2
EventsNSERMSE (m s−1 and m)PBIAS (%)ER (%)EventsNSERMSE (m s−1 and m)PBIAS (%)ER (%)
Vel10.8400.06690.449.73Vel20.9000.0473−1.9911.46
H20.9580.004390.392.99H20.9810.00392−0.471.70
H30.9680.00392−0.112.34H30.9920.00259−0.011.16
H40.9700.00392−1.282.31H40.9790.00392−1.471.76
H50.9640.00392−2.102.76H50.9810.00392−1.611.83
EV3EV4
EventsNSERMSE (m s−1 and m)PBIAS (%)ER (%)EventsNSERMSE (m s−1 and m)PBIAS (%)ER (%)
Vel30.6530.0826−5.2813.27Vel40.9120.0384−1.007.69
H20.9650.003922.273.59H20.9930.00238−0.081.06
H30.9600.004572.313.48H30.9950.002380.410.98
H40.9340.006084.114.45H40.9830.003460.151.68
H50.9480.00551−3.424.00H50.9640.00521−2.662.64
Table 3. Summary of observed and calculated means, standard deviations, root mean square error (RMSE), and root mean square error–the ratio of the standard deviation of observations (RMSE–RSR), for calibration and validation events.
Table 3. Summary of observed and calculated means, standard deviations, root mean square error (RMSE), and root mean square error–the ratio of the standard deviation of observations (RMSE–RSR), for calibration and validation events.
EventsMEANObs
(m s−1 and m)
SDObsMEANCal
(m s−1 and m)
SDCalSDObs/2RMSE
(m s−1 and m)
RMSE–RSR
(RMSE/SDObs)
EV1
Vel10.5230.1670.5200.1500.0840.06690.400
H20.1220.0210.1220.0230.0110.004390.206
H30.1280.0220.1280.0040.0110.003920.180
H40.1310.0230.1320.0240.0110.003920.171
H50.1330.0240.1360.0240.0120.003920.165
EV2
Vel20.3740.1500.3820.1430.0750.04730.316
H20.1770.0290.1780.0290.0150.003920.135
H30.1830.0290.1830.0300.0150.002590.089
H40.1840.0280.1870.0300.0140.003920.139
H50.1880.0290.1910.0300.0150.003920.133
EV3
Vel30.4390.1400.4630.1370.0700.08260.589
H20.1030.0220.1010.0230.0110.003920.177
H30.1110.0230.1090.0240.0110.004570.199
H40.1220.0240.1170.0240.0120.006080.256
H50.1200.0240.1240.0250.0120.005510.228
EV4
Vel40.3670.1290.3710.1300.0650.03840.297
H20.1610.0290.1610.0280.0140.002380.083
H30.1690.0280.1690.0280.0140.002380.087
H40.1760.0260.1760.0280.0130.003460.132
H50.1780.0270.1830.0280.0140.005210.191
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Pereira, T.S.R.; de Carvalho, T.P.; Mendes, T.A.; Reis, G.d.C.d.; Formiga, K.T.M. Hydrodynamic Modeling for Flow and Velocity Estimation from an Arduino Ultrasonic Sensor. Hydrology 2024, 11, 12. https://doi.org/10.3390/hydrology11020012

AMA Style

Pereira TSR, de Carvalho TP, Mendes TA, Reis GdCd, Formiga KTM. Hydrodynamic Modeling for Flow and Velocity Estimation from an Arduino Ultrasonic Sensor. Hydrology. 2024; 11(2):12. https://doi.org/10.3390/hydrology11020012

Chicago/Turabian Style

Pereira, Tatiane Souza Rodrigues, Thiago Pires de Carvalho, Thiago Augusto Mendes, Guilherme da Cruz dos Reis, and Klebber Teodomiro Martins Formiga. 2024. "Hydrodynamic Modeling for Flow and Velocity Estimation from an Arduino Ultrasonic Sensor" Hydrology 11, no. 2: 12. https://doi.org/10.3390/hydrology11020012

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop