Next Article in Journal
Can Property Rights Reform of China’s Agricultural Water Facilities Improve the Quality of Facility Maintenance and Enhance Farmers’ Water Conservation Behavior?—A Typical Case from Yunnan Province, China
Next Article in Special Issue
Binary Coati Optimization Algorithm- Multi- Kernel Least Square Support Vector Machine-Extreme Learning Machine Model (BCOA-MKLSSVM-ELM): A New Hybrid Machine Learning Model for Predicting Reservoir Water Level
Previous Article in Journal
Comparing the Runoff Decompositions of Small Experimental Catchments: End-Member Mixing Analysis (EMMA) vs. Hydrological Modelling
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Development of a Three-Dimensional CFD Model and OpenCV Code by Comparing with Experimental Data for Spillway Model Studies

1
Department of Civil Engineering, Faculty of Engineering and Natural Sciences, Iskenderun Technical University, Iskenderun 31200, Hatay, Turkey
2
Department of Civil Engineering, Bartın University, Bartın 74100, Bartın, Turkey
3
Institute of Environmental Engineering, Faculty of Civil Engineering, Technical University of Košice, Vysokoškolská 4, 040 01 Košice, Slovakia
*
Author to whom correspondence should be addressed.
Water 2023, 15(4), 756; https://doi.org/10.3390/w15040756
Submission received: 3 January 2023 / Revised: 5 February 2023 / Accepted: 7 February 2023 / Published: 14 February 2023
(This article belongs to the Special Issue Modelling and Numerical Simulation of Hydraulics and River Dynamics)

Abstract

:
This article presents a three-dimensional CFD model and OpenCV code by comparing the flow over the spillway with the experimental data for use in spillway studies. A 1/200-scale experimental model of a real dam spillway was created according to Froude similarity. In the experimental studies, velocity and water depth were measured in four different sections determined in the spillway model. A three-dimensional ANSYS Fluent model of the spillway was created and the simulations of the flows occurring during the flood were obtained. In the numerical model, the two-phase VOF model and k-epsilon turbulence model are used. As a result of the numerical analysis, velocity, depth, pressure, and cavitation index values were examined. The velocity and depth values obtained with models were compared and a good agreement was found between the results. In addition, in this study, a different technique based on image processing is developed to calculate water velocity and depth. A floating object was placed in the spillway channel during the experiment and the movement of the object on the water was recorded with cameras placed at different angles. By using the object tracking method, which is an image processing technique, the position of the floating object was determined in each video frame in the video recordings. Based on this position, the velocity of the floating object and its perpendicular distance to the bottom of the channel was determined. Thus, an OpenCV-Python code has been developed that determines the velocity and water depth of the floating object depending on its position. The floating object velocity values obtained by the algorithm were compared with the velocity values measured during the experimental model, and new velocity correction coefficients were obtained for the chute spillways.

1. Introduction

The spillway structures are the most important structures for ensuring the safety of the dam. Their task is to pass the flood discharge downstream of the dams efficiently and safely. These safety structures are designed to operate at a very low risk. Theoretical equations and physical modeling are the two main techniques commonly used to analyze the performance of dam spillways. For a long time, physical scale modeling has been used to design and study hydraulic water structures. Experimental studies for flow over a spillway structure require sensitive measurements and must be appropriately designed to provide reliable information [1]. However, such studies are time-consuming and may adversely affect the cost of the project. Therefore, researchers have sought different methods.
Due to developments in computer technology, numerical simulations for hydrodynamic processes, including flow over spillways, have become widespread. Computational fluid dynamics (CFD) is a branch of computational modeling developed to solve problems involving fluid motion. The methods developed within the scope of CFD aim to analyze the movements of fluids under different conditions. However, the realism and applicability of the data obtained from CFD models is a topic of debate in current discussion and research. In this respect, there is a need to increase and diversify studies for the verification of numerical findings with experiments.
In the literature, numerous studies make experimental and CFD comparisons for spillway modeling. Olsen and Kjellesvig [2] numerically modeled the water flow over a two- and three-dimensional spillway by choosing different geometries to estimate the spillway capacity. The k-ε turbulence model was chosen, and the equations of motion were solved accordingly. Numerical results and experimental studies were compared, and close values were obtained. Dargahi [3] investigated the flow field on a spillway to simulate the flow through a three-dimensional numerical model. The fluid volume (VOF) model was used to calculate the free surface flow over the spillway. The k-epsilon turbulence model was used in the study. The water surface profiles and discharge coefficients were estimated in the range of 1.5–2.9%, depending on the operating height of the spillway. Based on these studies in the literature, the VOF model and the k-epsilon turbulence model were used in the CFD part of this study. Kumcu [4] hydraulic characteristics of Kavsak Dam and Hydroelectric Power Plant (HEPP), which are under construction and built for producing energy in Turkey, were investigated experimentally by physical model studies. In order to evaluate the capability of computational fluid dynamics for modeling spillway flow, a comparative study was carried out by using results obtained from physical modeling and computational fluid dynamics (CFD) simulation. It was shown that there is reasonably good agreement between the physical and numerical models, in terms of flow characteristics. Demeke [5] studied the structure of the Tendaho Dam spillway in Ethiopia. In the spillway structure, under the designed capacity, overflows were observed during a flood and, therefore, a 3D CFD study was carried out. As a result of the studies, it was concluded that the spillway structure was not safe. Green [6] examined three main techniques commonly used to analyze the performance of existing dam spillways. These are theoretical equations, physical modeling, and computational fluid dynamics (CFD). The specified modeling methods were applied for a spillway and comparisons were made. The advantages and disadvantages of each method were discussed. Gadhe [7], in a study, compared the results obtained by the spillway model of the New Umtru Dam with the CFD model. It was observed from the studies that the original design of the spillway and energy dissipater required revision. Several spillway studies have examined the cavitation problem. Cavitation often creates harmful effects on dam spillways. For this reason, researchers have used various velocity measurement techniques, such as Particle Image Velocimeter (PIV) and Acoustic Doppler Velocimeter (ADV) [8,9,10]. ADV was used in this study. Aydın [11] analyzed the spillway aerator of a 100 m high roller-compacted concrete dam using a two-phase computational fluid dynamics model to overcome cavitation damage at the spillway surface. Numerical analysis was performed with prototype dimensions for various flow conditions (5223, 3500, 1750, and 1000 m3/s flow rate) and the obtained results were compared with experimental observations in the literature. Numerical and experimental results have shown that cavitation occurs after a particular downstream point on the surface, based on cavitation indices.
Researchers working on open-channel flow attempt to explain the velocity, one of the most important parameters in open-channel flows. Velocity can be measured with a measuring device and direct methods, or it can be determined by indirect methods such as the float method, or with mathematical models and empirical equations [12,13,14]. The velocity measurement is a task requiring great effort and expense [15].
In open-channel flows, the velocity varies with depth. It is very important to calculate the mean and maximum velocity values in the velocity distribution depending on the depth. Determining the velocity of the free water surface is much easier than determining the mean and maximum velocities in open channels [16]. Free water surface velocity can be easily determined with an object that is movable on the water’s surface and not too heavy, such as leaves, twigs, etc. Other methods, such as acoustics, optics, or floats, are used to estimate surface velocity. However, the cheapest and easiest way to determine water surface velocity is to simply float something down the stream and see how fast it travels [17]. Once the velocity of the floating object is determined, it should be multiplied by the correction coefficients for the mean flow velocity. The correction coefficients vary according to the depth [18]. Researchers have carried out studies in the past to determine these coefficient values [19,20].
Image processing consists of processing images using digital computers. In recent years, its use has increased exponentially in many areas. One of these is in hydraulic science, where observable flow parameters can be studied with this method. Research has been carried out in the past using image processing techniques to determine velocity and water level in open-channel flows. Since the water level can be observed using these two parameters, it can be measured more easily than the velocity [21,22,23]. Because the water velocity changes depending on the depth and cannot be observed, it is more difficult to measure with this method [24,25,26]. The velocity of a floating object on the water, seen in video images, can be determined by image processing methods. The movement of the floating object on the water can be measured by the object detection and tracking method, one of the image processing methods. This is a method of detecting and locating an object which is in motion with the help of a camera. The detection and tracking method is used in different engineering fields such as vehicle tracking in traffic, object detection, and security [27,28]. There are many programming languages and program libraries in which image processing methods can be applied. Recently, Python programming language and OpenCV (Open Source Computer Vision) library are preferred because they are easier to use than others.
The aim of this research is to develop a three-dimensional CFD model and OpenCV code by comparing the flow over the spillway with the experimental data for use in spillway studies. With the CFD model developed and OpenCV code, the flow parameters, flow characteristics, and changes required for the design of the spillway can be obtained in less time and at a lower cost. The CFD model established and OpenCv code can examine the flow parameters of the existing and future spillway structures. The spillway structure chosen for this purpose is the spillway structure of the Çatalan Dam and Hydroelectric Power Plant in Adana, currently in operation. The spillway discharge channel has 2 slopes, of 3% and 17%. The spillway model was created by reducing the dimensions of the prototype spillway structure to Froude similarity at a 1/200 scale. The flood flow rate and inlet velocities that would occur in the prototype spillway structure were also calculated according to Froude similarity in detail and used in the experimental and numerical model setup. Average flow velocities were measured with an acoustic Doppler velocimeter (ADV) device for four different cross-sections (at five points in each cross-section) along the spillway discharge channel. In addition, water depth was measured in four cross-sections (at nine points in each cross-section). After the experimental studies, a three-dimensional CFD model of the spillway model was created. In CFD studies, the ANSYS Fluent program, which can use the VOF method and k-epsilon turbulence model together, was used. The average flow velocities and water depts obtained along the cross-sections by the experiment are compared with the results of the CFD model and shown in tables, graphs, and figures. In addition, the pressure distributions in four different cross-sections were examined with the CFD model. These pressure values were increased to the model scale according to Froude similarity, and the cavitation index was calculated for four sections of the prototype spillway. In the second part of the experimental studies, a colored floating object was placed in the spillway channel and the movement of the object on the water was recorded with cameras placed at different angles. By using the object tracking method, which is an image processing technique, the position of the floating object was determined in each video frame in the video recordings. Based on this position, the velocity of the floating object and its perpendicular distance from the bottom of the channel was determined. Thus, an OpenCV-Python code has been developed that determines the velocity and water depth of the floating object depending on its position. The floating object velocity values obtained by the algorithm were compared with the velocity values measured during the experiment, and new velocity correction coefficients were obtained for the chute spillways.

2. Case Study

In this study, a physical model of a spillway structure was created. The spillway structure chosen for this purpose is the spillway structure of the Çatalan Dam and Hydroelectric Power Plant in Adana, currently in operation. Construction on Çatalan Dam began in 1982. The dam is used for electricity generation by the State Hydraulic Works (DSI) and was put into operation in 1997. Çatalan Dam is on the Seyhan River in the Sarıçam district of Adana, one of the important cities of Turkey. The height of the dam body from the foundation is 82 m (70 m from the stream floor), and its crest length is 894 m. The fill volume of the earth- and rockfill-type dam is 17 million m3, the lake area is 81.86 km2, and the reservoir volume is 2126 billion m3. The minimum operating level elevation of the Dam is 115 m, and the maximum operating level elevation is 125 m [29].
The spillway structure belonging to the dam is a spillway with a radial gate. The spillway, designed with a capacity of 10,055 m3 s−1, has 6 chambers, each of which is 11 m wide, 15.60 m high, and equipped with a radial gate. The discharge channel, which extends downstream of the Ogee crested sill, is 81 m wide, 567 m long, and ends with an energy-dissipating pool. The discharge channel slopes are 0.03 and 0.17 and are connected to a vertical curve (Figure 1) [29].

Theoretical Equations of Spillway

In the theoretical study of the spillway project, the spillway discharge capacity was calculated considering that all radial gates would be fully open. Discharge rating curve (Q/H curve) varies with the water level over the crest. The theoretical flow discharge through a spillway can be expressed by [30]:
Q = C 0 L 0 H 0 3 2
L 0 = L n - 2 N K p + K a H 0
where Q denotes the flow discharge, C0 denotes discharge coefficient, L0 denotes effective length of spillway crest or width, and H0 denotes upstream head measured from the crest to the unaffected upstream water stage. Equation (2) is used to determine the effective length L0. Ln is the net length of the crest, N is the number of piers, Kp and Ka are constants depending on the shape of piers and abutments. In this study, Kp of 0.01 Ka 0.1 was used. The discharge coefficient, C0, uses different values. It is influenced by a variety of factors including the depth of approach, relation of the actual crest shape to the ideal nappe shape, upstream face slope, downstream apron interference, and downstream submergence. The C0 coefficient was calculated as 1.97 for the discharge of Q1000 = 10,055 m3 s−1.
The flow over the spillway is open-channel flow. In an open-channel section, the flow rate varies from one point to another. This is due to the shear stress at the bottom and sides of the channel and the presence of the free surface. Flow velocity can have components in all three Cartesian coordinate directions. However, the components of the velocity in the vertical and transverse directions are usually small and can be neglected. Therefore, only the flow velocity downstream needs to be considered. This velocity component varies from surface to depth [31].
In the past, various semi-empirical models have been used to represent the velocity profiles of turbulent open-channel flow. The velocity distribution in the viscous sublayer is generally understood to be linear. In the fully turbulent layer of the inner region, the logarithmic velocity distribution of von Karman and Prandtl, known as the law of the wall, is the universally accepted formula:
U U * = A ln U * y ν + B
where A = 1 / χ , χ = von Karman constant; B = a constant, U * = τ 0 / ρ = shear velocity, τ 0 = shear strees, ρ = density, ν = kinematic viscosity, and y = distance from the wall. The value of B depends on the roughness of the wall surface. Many experimental studies have been performed to determine the A and B values. As a result of the experiments, it was determined that A = 2.5 and B = 5.5 can be used for both smooth pipe flows and smooth open-channel flows [32].
The universal formula used to determine the average velocity and discharge of the current passing through the channel in open channels is the Manning formula:
U a v e = 1 n R 2 3 S 0 1 2
where n = Manning’s constant; R = hydraulic radius, and S0 = slope of channel. The hydraulic radius is defined by dividing the cross-sectional area of the channel by the wet circumference.
The float method is one of the methods used to estimate average velocity. The method is performed as follows: the time elapsed between the start and endpoints of the floating object is measured with a stopwatch, and the velocity of the object is calculated by dividing the distance by this time. This distance is usually 3–10 m, and the experiment is repeated 3 or more times. Then, the resulting surface velocity value is multiplied by a coefficient and the average velocity is obtained. The coefficient values varying with depth are shown in Table 1. The values provided in Table 1 are obtained for open channels with low slope and low flow velocities. To calculate the channel discharge, the channel cross-section is multiplied by the average velocity [18].

3. Experimental Studies

The spillway model was created by reducing the dimensions of the prototype spillway structure with Froude similarity at a 1/200 scale. The flood discharge (supercritical flow) and inlet velocities that would occur in the prototype spillway structure were also calculated according to Froude similarity and are shown in Table 2.
The model scale was determined to fit the hydraulic channel in which the experiments were carried out. A 1/200 scale model was created in accordance with the 3D geometry of the prototype spillway structure (Figure 2). The approach channel, weir, and discharge channel of the spillway model were formed. The energy breaker pool at the end of the spillway structure is not included in the model.
The spillway model was produced in parts, in accordance with the spillway geometry drawn with the AutoCAD 2014 program. The materials used in model making are very light and practical. The parts, made of 5 cm thick Extruded Polystyrene (XPS) styrofoam material, were joined with silicone adhesive. The model, approximately 2 m in length, was formed in 2 parts to be joined later, in the middle, to prevent damage. In order to provide visibility in image processing studies, the edges of the model were covered with glass material. Figure 3 shows the final version of the spillway model.
In this study, a 1/200 scale model of the Çatalan Dam spillway structure was created and experimental studies were carried out in the hydraulic water channel. Experimental studies were carried out on the open-channel setup in Bartın University, central research, hydromechanics laboratory (Figure 4).
The discharge was adjusted with the help of the valve placed at the pump outlet that provides water circulation to the channels, and the flow entering the system was measured with the help of the ultrasonic flow meter (GE Pnametrics, AT 868 AquaTrans Flowmeter model, Clare, Ireland) placed at the pump inlet. Velocity measurements were made at a total of twenty points in four different cross-sections (five points in each cross-section) in the spillway channel with the ADV device (FlowTracker Handheld model, Hemmant, Australia) (Figure 5). Due to the low water depths at the measurement points and the turbulence at the tip of the device, the measurements took a long time and erroneous measurements were repeated.

4. CFD Model Studies

The flow over the spillway is an open-channel flow. In an open-channel flow, the flowing fluid has a free surface at atmospheric pressure and the driving force is gravity. When the literature is examined, it is seen that such free surface flow is simulated by the fluid volume (VOF) method as water–air two-phase flow problems. Flows over the spillway are high velocity and turbulent. According to the literature, the standard k-ε turbulence model can be used in the three-dimensional numerical simulation of the flow.

4.1. Basic Equations

The investigated open-channel flow is a 3D, turbulent, steady free surface flow.
Continuity equation:
ρ t + ρ u i x i = 0
Momentum equation:
ρ u i t + x j ρ u i u j = - P x i + x j μ + μ t u i x j + u j x i
Turbulence kinetic energy (k) equation:
ρ k t + ρ u i k x i = x i μ + μ t σ k k x i + G - ρ ε
Turbulence dissipation rate energy (ε) equation:
ρ ε t + ρ u i ε x i = x i μ + μ t σ ε ε x i + C 1 ε ε k G - C 2 ε ρ ε 2 k
where t is the time; ui is the velocity components; xi is the coordinate components; ρ is the density; µ is the molecular viscosity coefficient; P is the correct pressure; µt is the turbulent viscosity coefficient, which can be derived from the turbulent kinetic energy k and turbulent dissipation rates:
μ t = ρ C μ k 2 ε
G = μ t μ i x j + u j x i u i x j
where σk and σε are turbulence Prandtl numbers for the k and ε equation, respectively, σk = 1.0, σε = 1.3, C1ε and C2ε are ε equation constants, C1ε = 1.44, and C2ε = 1.92. Cμ = 0.09 is a constant determined experimentally, as described in [33].

4.2. Volume of Fluid (VOF) Model

In this study, the VOF method was used to calculate the water–air interface. This method was used for two-phase air–water flow simulation to compute the free surface of the flow. The VOF method essentially determines whether the element volumes in the computational mesh are empty, partially filled, or completely filled with water. Representing the volumetric filling ratio of the mesh elements, the mesh element is fully filled for F = 1, empty (filled with air) for F = 0, and partially filled with water for 0 < F < 1 [34]. In this approach, the tracking interface between air and water is accomplished by the solution of a continuity equation for the volume fraction of water:
α w t + α w u i x i = 0
where αw is the volume fraction of water. In each cell, the sum of the volume fractions of air and water is unity. Volume fractions of air, denote by αa, can be provided as shown in [33]:
α w + α a = 1 ; 0 α w 1

4.3. Boundary Conditions for Spillway

A 1/200 scale geometry of the spillway model was made with the GAMBIT 2.2.30 drawing program. Approximately 800,000 mesh triangles were created within this geometry (Figure 6). The mesh qualities were controlled with equiangular skewness, equalized skewness, and aspect ratio in the GAMBIT program. The skewness error increased in the model due to the shape of the spillway. These errors were defined and corrected by increasing the amount of mesh with GAMBIT. However, when the mesh becomes smaller, the amount of mesh is increased. This requires additional computing capacity and time. The mesh independence test of the numerical model, the number of mesh triangles, and the spillway outlet velocity were compared; the results are shown in the Figure 7. When the figure is examined, the change in velocity values decreases after a certain amount of mesh. This showed that the flow velocity results were independent of the amount of mesh.
The three-dimensional geometry was created, and the boundary conditions of the flow formed in the spillway were defined. Accordingly, the boundary conditions of the three-dimensional numerical model were defined as follows: the approach channel was defined as six different surface velocity inputs at the entrance. The spillway outlet and its upper surfaces were defined as the pressure outlet. All other surfaces of the model were defined as the wall condition (Figure 6). In case of a flood flow of 10,055 m3 s−1, the covers were fully opened and the floodwater height was calculated as 25 m in the approach channel. In CFD analysis, this value was adjusted according to the model scale, and the water inlet height was defined as 12.5 cm. In addition, in accordance with the prototype spillway project, the approach channel length was 15 m, and the length between the approach channel and the spillway outlet was 402 m. At the beginning of the approach channel, numerical analysis was initiated with the velocity values provided in Table 2.
Velocities on spillway wall faces were obtained using the standard wall function based on the recommendation of Launder and Spalding [35]. This wall function accepts a log law velocity profile close to the wall, and is determined as follows [36]:
u p u * = 1 K ln E u * y p v
where “up” is the average stream flow velocity at the “p” point; “K” is the von Karman constant (0.418); “yp” is the distance from point p to the wall; empirical constant “E” has the value of 9.79; and “u*” is the friction velocity. The “u” uniform velocity distribution is provided to the horizontal velocity component in the x-direction at the inflow boundary. The vertical velocity component “v” in the y-direction is set to zero. The inlet velocity field to the channel consists of a forward “u” horizontal velocity and zero “v” vertical velocities at all points except points close to the channel.
The wall y+ is a dimensionless distance similar to the local Reynolds number that is often used in CFD to describe how coarse or fine a mesh is for a given flow. It determines whether the effects in cells adjacent to the wall are laminar or turbulent.
y + = u τ y ν
u τ = τ w ρ
where uτ is the friction velocity, y is the height from the wall to the midpoint of the wall-adjacent cells, v is the kinematic viscosity, τw is the wall shear stress, and ρ is the fluid density at the wall. Values of y+ close to the lower bound (y+ ≈ 30) are most desirable for wall functions, whereas values of y+ ≈ 1 are better for near-wall modelling [37,38].
The flow on the spillway passes around five sluice pillars on the sill structure, resulting in six different entry velocities. Then, it flows from three separate branches with two separating walls on the discharge channel. In spillway projects, when the gates are fully open at the time of flooding, the initial velocities in the approach channel were adjusted according to Froude similarity for the 1/200 scale model and these values were used in CFD analyses. Initial velocity values are provided in Table 2.
In the time-dependent solution process, the initial condition is F = 1 at the entrance boundary of the solution region, and F = 0 at the exit boundary of the other regions and the solution region. The time step for the turbulence model used in the numerical modeling is Δt = 0. It was chosen as 0.1 s and a solution was made for 120 s, during which the numerical solution became stable. The numerical solution of the fundamental equations according to the boundary conditions was carried out using the ANSYS Fluent package program, based on the finite volume method.

4.4. Numerical Solver

When the velocity fields into the spillway channel have complex currents such as circulation flow, problems regarding turbulent flow and secondary flow arise because the spillway channel flows are nonlinear and the velocity and pressure field are interdependent. These problems are solved using the “Coupled” procedure approach. This procedure is the iteration method and is based on the prediction-corrector approach. ANSYS Fluent (Release 19 version, USA) provides the option to choose “Coupled” pressure–velocity coupling algorithms. Since the spillway channel flow is unsteady, the fully implicit scheme was used for converting the discrete equations in the present model to provide a stable and realistic solution for the large time steps. The full implicit scheme is used in the model, since the flow is unstable and the analysis time is very long [39,40,41,42,43]. Numerical model flows were simulated in an approximately 2 m long spillway channel, similar to the experimental flow. As an initial state, the inlet channel was first filled with air and water. Then, the water in the approach channel was released into the free flow from the spillway discharge channel at determined velocities. The calculation continued for about 120 s, at which point the front had already crossed the downstream boundary and any change in flow area would be negligible. Numerical analyses were carried out with ANSYS Fluent Release 19. A workstation with a 4-core Xeon 4.0 GHz processor and 32 GB Random Access Memory (RAM) was used in the numerical analysis. The analysis took approximately 12 h. Discretization methods and solver settings are presented in Table 3. Convergence criteria, discretization methods, etc., are shown in Table 3.

5. Image Processing Studies

5.1. Image Processing: Python-OpenCV

Image processing can be defined as a method of performing operations on an image to obtain an enhanced image or extract some useful information from it. Nowadays, image processing is a rapidly developing technology and constitutes the main research area in the engineering and computer science disciplines. Python is one of the widely used programming languages for this purpose. Its libraries and tools help in achieving the task of image processing efficiently. One of these libraries is OpenCV, which stands for Open Source Computer Vision Library. This library consists of many optimized algorithms used for image processing. These algorithms can be used to detect and recognize faces, identify objects, classify human actions in videos, track camera movements, track moving objects, etc. [44]. Moving object detection and tracking algorithms are used in this study.

5.2. Motion Detection and Tracking Algorithm

Motion detection and tracking are important in image processing. Motion detection and tracking can be performed in three ways: background subtraction, frame subtraction, and optical flow technique. The background subtraction technique was used in this study. Background subtraction is a widely used approach for detecting moving objects in videos from static cameras. The rationale in the approach is that of detecting the moving objects from the difference between the current frame and a reference frame, often referred to as the “background image” or “background model”. Background subtraction is usually performed if the image is a part of a video stream [45]. In the next step, the moving object is tracked by framing it for each video frame. In the final step, the average velocity is calculated by dividing the distance traveled of the object, from its starting point, by the elapsed time. In this study, the object detection and tracking algorithm, using motion, is shown in the flowchart (Figure 8).

5.3. Experimental Design and Equipment

During the experiment, a floating object was placed at the entrance of the spillway model and its movement on the model was recorded with cameras placed at different angles. The cameras are standard cell phone cameras, providing 1080p (1920 × 1080) images at 30 frames per second, recorded in AVI (audio video interleave) format. An orange-colored, standard table tennis ball with a diameter of 40 mm and a weight of 2.7 g was chosen as the floating object. While making this selection, attention was paid to ensure that it was light enough to be ignored and in a color that could be noticed in the video recording. In addition, papers of black and white colors pasted into the test channel were used as reference points of known length. In total, 2 papers pasted side by side were placed so that the distance between the centers of the circles on them was 20 cm. For the centers of the circles to be better determined during image processing, the circles were divided into four equal quadrants, with black and white colors diagonally opposed so that the center of the circle could be better selected, due to the contrast created (Figure 9).

5.4. Video and Data Processing

During the experiment, video cameras were fixed in order to observe the spillway model from a wide angle. A tennis ball was placed on the water flow so that it would pass through the right, middle, and left chute channels separated by the separation walls of the spillway discharge channel. The movement of the floating object on the water was recorded with a video camera. The images obtained were preprocessed before being used in the created algorithm. In this part, the images were been cropped to prevent other movements outside the experimental setup. The prepared images were processed in the developed OpenCV-Python code. The code consists of four main parts. In the first stage, video images were read and image frames were created. In the second stage, the images were passed through filtering techniques for the detection and tracking of the floating object. In the third stage, the velocity of the object being tracked was calculated. In the final stage, the distance difference, time difference, velocity value, and lines representing the measured sections were displayed on the screen (Figure 10, Figure 11 and Figure 12).

6. CFD Model Results

At the end of the studies, it was observed that both the physical model and the numerical model (10,055 m3 s−1) transferred the flood discharge downstream safely. Figure 13 shows the general view of the flow resulting from the CFD analysis on the spillway model. When Figure 13 is examined, it is observed that the side walls of the spillway chute channel are sufficient for the flood flow. However, overflows were observed at some points near Cross-section 1 of the separating walls of the chute channel. The velocity and water depth of the physical model and numerical model results are compared in tables, figures, and graphs below. Comparisons, mean absolute error (MAE), root-mean-square error (RMSE), and average percent error (APE) values are calculated and shown in the tables. MAE, RMSE, APE equations provided as:
M A E = 1 N i = 1 N Y i o b s e r v e d - Y i e s t i m a t e
R M S E = 1 N i = 1 N Y i o b s e r v e d - Y i e s t i m a t e 2
A P E = 100 N i = 1 N Y i o b s e r v e d - Y i e s t i m a t e Y i o b s e r v e d
where “N” is the number of points measured, “Yi observed” is the experiment measured, and “Yi estimate” is the CFD measured.

6.1. Comparison of Velocity

Experimental and numerical model velocity values are shown in Table 4 and, comparatively, in the graphs in Figure 14. Table 4 shows the error rates by comparing the experimental and CFD analysis results.
When the table and graph are examined, the percentages of APE error in the sections were found to be 13.4, 7.2, 13.8, and 10.0. It can be seen that the error percentage of the velocities is less at the midpoints than at the edges. The percentage of error (N1 point) in Column 1 was higher than the others in all four cross-sections. Since the N1 point is close to the right side-wall of the chute channel, we believe that the turbulence occurring at this point may have caused errors in the measurements.
The velocity value contours and depth–velocity profiles obtained as a result of the CFD analysis on the spillway model are provided in Figure 15, Figure 16, Figure 17 and Figure 18 for four cross-sections. In all figures, it is seen that the velocity values increase from the wall edges to the center. If the velocity values in the cross-sections are examined, it can be observed that the velocity values of the air phase are lower after the water–air separation line. It can be observed that the velocity values were close to each other and the amount of increase was low in Cross-sections 1–3, which had a low slope (3%). However, with the increase of the slope (17%), the velocity value in Cross-section 4, located at the exit of the spillway, is higher than the others, as expected.

6.2. Comparison of Water Depth

The water depths measured as a result of CFD analysis are shown in Figure 19 in the general view for four cross-sections. Experimental and numerical model water depths are compared in the graphs in Figure 20 and in Table 5. Table 5 shows the error percentages by comparing the experimental and CFD analysis results.
According to the graphs in Table 5 and Figure 20, the experiment and CFD analysis’ water depth measurements appear to be quite compatible with each other. When Table 5 is examined, the highest APE, 3.8%, is in Cross-section 2. In points other than this, the error percentages vary around 1–2%. The cause of the error is turbulent fluctuations created by the incoming flood flow.
The water depths obtained as a result of the CFD analysis are provided for the four cross-sections in Figure 21, Figure 22, Figure 23 and Figure 24. It is seen that the water depths in Cross-sections 1–3, which have a 3% slope, were around 3.5 cm; this fell below 3 in Cross-section 4, which had a 17% slope. As expected, the depth decreases as the flow rate increases. When the figures of Cross-sections 1 and 2 are examined, it is observed that the water depths in the right and left chute channels are higher than that in the middle chute channel. On the other hand, in Cross-sections 3 and 4, the water depths in the right, left, and middle chute channels are similar. When the figures are examined, at no point did the water height exceed the side-wall height. However, at some points, it rose above the separation walls in the middle of the chute channels. Depths H3 and H7 in Cross-section 1 can be provided as examples of this; as long as the flood stays in the chute, the situation is not problematic.

6.3. Investigation of Pressure in CFD Model

The flow of water in the spillway discharge channels in the flood regime causes low pressures. In some regions, cavitation is observed due to negative pressure. Cavitation causes structural deterioration [6]. For this purpose, pressure controls should be made in the spillway discharge channels. It was observed that the pressure values decreased for each of the four sections (Figure 25, Figure 26, Figure 27 and Figure 28).
As expected, the pressure decreased with an increase in velocity. Graphs expressing vertical pressure distributions show the dynamic effect and deviation due to channel slope and flow velocity.

6.4. Investigation of Cavitation on Prototype Spillway

In cases where the flow velocity is more than 25–30 m/s, the risk of cavitation can be observed on the spillways [11,46]. The reason for this is the formation of steam bubbles in the stream that can damage the concrete as a result of the pressure in the stream decreasing to the value of the vapor pressure. The bubbles which are consequently formed impact the concrete surface at high velocity, condense, and cause wear. This wear damage, which is small in the beginning, increases over time and reaches large sizes. This causes serious risks in the structure. The type of damage that occurs in the structure in this way is called cavitation damage. The damage on the spillway thus caused is calculated with the dimensionless “cavitation index”. In this calculation method, pressure (P) and average velocity (U) values taken from certain points along the channel are used. Falvey [47] stated that in cases where this calculated dimensionless cavitation index value is lower than 0.20, cavitation damage is highly likely to occur. At a point in the current, the cavitation index is calculated by the following expression:
σ = P T - P v 1 2 ρ U 2
where σ is the cavitation index; PT is the absolute pressure (Pa), including atmospheric pressure; Pv is the vapor pressure of the water (Pa); ρ is the density; and U is the velocity of the water. The calculated cavitation indices are presented in Table 6. While making the calculations, we considered the average temperature as 20 °C, the vapor pressure (Pv) value as 2338 Pa, and the atmospheric pressure (Patm) as 92,801 Pa. The pressure and velocity values obtained with the model were increased in scale ratio according to Froude similarity and the pressure and velocity values were determined for the prototype spillway.
When the table is examined, it can be observed that the cavitation index values gradually decrease along the discharge channel. In the prototype spillway, there is no risk of cavitation, as the index values are above 0.2 at all points in the sections.

7. Image Processing Results

The velocity algorithm, shown in Figure 9, was created using the images captured by Camera 2, and the water depth algorithm was created with the images captured by Camera 1.

7.1. Velocity Algorithm Results

The relationship between the average flow velocity measured by the ADV device during the experiment and the floating object velocity calculated with the OpenCV code was examined. These two velocity values were scaled, and new correction coefficients were obtained. These results are shown and discussed in Table 7. When Table 7 is examined, it is seen that the velocity of the floating body in x direction increases gradually in parallel with the water velocity and the slope of the spillway. The correction coefficients provided in Table 1 of the Case Study section, ranging from 0.66 to 0.88, were obtained for open channels with low slopes and low flow velocity. Thus, the coefficients were calculated as ranging from 0.37-1.03 in chute spillway flows with high slope and high velocity. In addition, OpenCV code screens are provided for four sections in Figure 29.

7.2. Water Depth Algorithm Results

The images obtained with Camera 1 during the experiment were transferred to OpenCV code and the water depths were calculated depending on the position of the floating object. The water depth values obtained were compared with the water depths measured during the experiment and are shown in Table 8. When Table 8 is examined, it is observed that, depending on the position of the floating body in x direction, the water depths and the spillway gradually decrease parallel to the slope. The MAE, RMSE, and APE values for the 12 measured points were 0.592, 0.628, and 18.8%, respectively.
In Figure 30, OpenCV code screens that measure depth for four sections are provided.
The water depths observed along the X direction in the experiment, calculated with the OpenCV code, are shown in the graph in Figure 31. When the graph is examined, it is seen that the water depths are compatible with each other.

8. Conclusions

In this research, a three-dimensional CFD model and OpenCV code were developed by comparing the flow over the spillway with experimental data to be used in spillway studies. The results obtained were as follows:
-
It was observed that both the physical model and the numerical model (10,055 m3 s−1) transfer the flood discharge downstream safely.
-
The average velocity values measured with the ADV device generally increased along the discharge channel. We observed that the increase in velocity values was low in the cross-sections where the slope was 3%, and the velocity increase was higher in the cross-section where the slope was 17%. The velocity values increased from the wall edges to the center.
-
The error rates between the experimental and numerical analysis rates were obtained in Section 3, with the highest APE error percentage value of 13.8, as a result of the examination.
-
As a result of the studies, it was determined that the APE error rate between the experimental and numerical analysis’ water depth results was around 1.7–3.8% at most measurement points.
-
Cavitation index values were calculated as above 0.2 in all sections of the prototype spillway. Thus, there is no risk of cavitation in the spillway discharge channel.
-
It has been observed that the error rate of the water depths obtained with the newly developed float method based on image processing is higher than the simulation results when compared with the experiments.
-
With the developed float method, velocity correction coefficients were obtained for the chute spillway depending on the velocity of the floating object.

Author Contributions

Conceptualization, M.Z. and F.Ü.; methodology, E.G.; software, H.V.; validation, F.Ü., M.Z. and E.G.; formal analysis, H.V.; investigation, H.V.; resources, E.G.; writing—original draft preparation, H.V.; writing—review and editing, F.Ü.; visualization, M.Z.; supervision, E.G.; project administration, F.Ü.; funding acquisition, M.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Not applicable.

Acknowledgments

The authors thank the General Directorate of State Hydraulic Works, Technical Research and Quality Control Department (DSI TAKK) for its support of this study. This work was supported by the Slovak Research and Development Agency under the Contract no. APVV-20-0281. The authors are grateful for the support of the project and HUSKROUA/1901/8.1/0088.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Willey, J.; Ewing, T.; Wark, B.; Lesleighter, E. Complementary Use of Physical and Numerical Modelling Techniques in Spillway Design Refinement. In Proceedings of the ICOLD, 24th Commission Internationale Des Grands Barrages, Kyoto, Japan, 2–8 June 2012. [Google Scholar]
  2. Olsen, N.R.B.; Kjellesvig, H.M. Three-Dimensional Numerical Flow Modelling for Estimation of Spillway Capacity. J. Hydraul. Res. 1998, 36, 775–784. [Google Scholar] [CrossRef]
  3. Dargahi, B. Experimental Study and 3D Numerical Simulations for a Free-Overflow Spillway. J. Hydraul. Eng. 2006, 132, 899–907. [Google Scholar] [CrossRef]
  4. Kumcu, S.Y. Investigation of Flow over Spillway Modeling and Comparison between Experimental Data and CFD Analysis. KSCE J. Civ. Eng. 2017, 21, 994–1003. [Google Scholar] [CrossRef]
  5. Demeke, G.K.; Asfaw, D.H.; Shiferaw, Y.S. 3D Hydrodynamic Modelling Enhances the Design of Tendaho Dam Spillway, Ethiopia. Water 2019, 11, 82. [Google Scholar] [CrossRef]
  6. Green, J. Comparison of Modelling Techniques for Assessment of Spillways. Dams Reserv. 2019, 29, 97–105. [Google Scholar] [CrossRef]
  7. Gadhe, V.; Patil, R.G.; Bhosekar, V.V. Performance Assessment of Upgraded Spillway—Case Study. ISH J. Hydraul. Eng. 2021, 27, 327–335. [Google Scholar] [CrossRef]
  8. Ge, M.; Petkovšek, M.; Zhang, G.; Jacobs, D.; Coutier-Delgosha, O. Cavitation Dynamics and Thermodynamic Effects at Elevated Temperatures in a Small Venturi Channel. Int. J. Heat Mass Transf. 2021, 170, 120970. [Google Scholar] [CrossRef]
  9. Ge, M.; Manikkam, P.; Ghossein, J.; Subramanian, R.K.; Coutier-Delgosha, O.; Zhang, G. Dynamic Mode Decomposition to Classify Cavitating Flow Regimes Induced by Thermodynamic Effects. Energy 2022, 254, 124426. [Google Scholar] [CrossRef]
  10. Ge, M.; Zhang, G.; Petkovšek, M.; Long, K.; Coutier-Delgosha, O. Intensity and Regimes Changing of Hydrodynamic Cavitation Considering Temperature Effects. J. Clean. Prod. 2022, 338, 130470. [Google Scholar] [CrossRef]
  11. Aydin, M.C.; Isik, E.; Ulu, A.E. Numerical Modeling of Spillway Aerators in High-Head Dams. Appl. Water Sci. 2020, 10, 42. [Google Scholar] [CrossRef] [Green Version]
  12. Yorke, T.H.; Oberg, K.A. Measuring River Velocity and Discharge with Acoustic Doppler Profilers. Flow Meas. Instrum. 2002, 13, 191–195. [Google Scholar] [CrossRef]
  13. Al-Khatib, I.A.; Gogus, M. Prediction Models for Discharge Estimation in Rectangular Compound Broad-Crested Weirs. Flow Meas. Instrum. 2014, 36, 1–8. [Google Scholar] [CrossRef]
  14. Sahu, M.; Khatua, K.K.; Mahapatra, S.S. A Neural Network Approach for Prediction of Discharge in Straight Compound Open Channel Flow. Flow Meas. Instrum. 2011, 22, 438–446. [Google Scholar] [CrossRef]
  15. Chiu, C.-L.; Said, C.A.A. Maximum and Mean Velocities and Entropy in Open-Channel Flow. J. Hydraul. Eng. 1995, 121, 26–35. [Google Scholar] [CrossRef]
  16. USGS.gov. USGS Science in Your Watershed—General Introduction and Hydrologic Definitions. Available online: https://www.usgs.gov/ (accessed on 12 October 2021).
  17. Genç, O.; Ardiçlioğlu, M.; Ağiralioğlu, N. Calculation of Mean Velocity and Discharge Using Water Surface Velocity in Small Streams. Flow Meas. Instrum. 2015, 41, 115–120. [Google Scholar] [CrossRef]
  18. USBR. Water Masurement Manual; Water Resources Technical Publicationcations, Inc.: Highlands Ranch, CO, USA, 1997.
  19. Marjang, N.; Merkley, G.P. Surface Velocity Coefficients for Application of the Float Method in Rectangular and Compound Open Channels. Irrig. Sci. 2009, 27, 457–470. [Google Scholar] [CrossRef]
  20. Kra, E.Y.; Merkley, G.P. Mathematical Modeling of Open-Channel Velocity Profiles for Float Method Calibration. Agric. Water Manag. 2004, 70, 229–244. [Google Scholar] [CrossRef]
  21. Misra, S.K.; Thomas, M.; Kambhamettu, C.; Kirby, J.T.; Veron, F.; Brocchini, M. Estimation of Complex Air–Water Interfaces from Particle Image Velocimetry Images. Exp. Fluids 2006, 40, 764–775. [Google Scholar] [CrossRef]
  22. Lin, Y.-T.; Lin, Y.-C.; Han, J.-Y. Automatic Water-Level Detection Using Single-Camera Images with Varied Poses. Measurement 2018, 127, 167–174. [Google Scholar] [CrossRef]
  23. Ljubicic, R.; Vicanovic, I.; Zindovic, B.; Kapor, R.; Savic, L. Image Processing for Hydraulic Jump Free-Surface Detection. In Proceedings of the 38th IAHR World Congress—“Water: Connecting the World”, The International Association for Hydro-Environment Engineering and Research (IAHR), Beijing, China, 1–6 September 2019; Volume 38, pp. 1073–1082. [Google Scholar]
  24. Shin, S.S.; Park, S.D.; Lee, S.K. ScienceDirect Measurement of Flow Velocity Using Video Image of Spherical Float. Procedia Eng. 2016, 154, 885–889. [Google Scholar] [CrossRef] [Green Version]
  25. Shin, S.S.; Park, S.D. Application of Spherical-Rod Float Image Velocimetry for Evaluating High Flow Rate in Mountain Rivers. Flow Meas. Instrum. 2021, 78, 101906. [Google Scholar] [CrossRef]
  26. Tsubaki, R.; Fujita, I.; Tsutsumi, S. Measurement of the Flood Discharge of a Small-Sized River Using an Existing Digital Video Recording System. J. Hydro-Environ. Res. 2011, 5, 313–321. [Google Scholar] [CrossRef]
  27. Li, D.; Liang, B.; Zhang, W. Real-Time Moving Vehicle Detection, Tracking, and Counting System Implemented with OpenCV. In Proceedings of the 2014 4th IEEE International Conference on Information Science and Technology, Shenzhen, China, 26–28 April 2014; pp. 631–634. [Google Scholar]
  28. Chandan, G.; Jain, A.; Jain, H. Mohana Real Time Object Detection and Tracking Using Deep Learning and OpenCV. In Proceedings of the 2018 International Conference on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India, 11–12 July 2018; pp. 1305–1308. [Google Scholar]
  29. DSI. Çatalan Dam Spillway Model Experiments Report; DSI: Ankara, Turkey, 1985. [Google Scholar]
  30. Reclamation, B. (Ed.) Design of Small Dams; U.S. Government Printing Office: Washington, DC, USA, 1977. [Google Scholar]
  31. Chaudhry, M.H. Open-Channel Flow, 2nd ed.; Springer: Boston, MA, USA, 2008; ISBN 9780387301747. [Google Scholar]
  32. Kirkgöz, M.S.; Ardiçlioğlu, M. Velocity Profiles of Developing and Developed Open Channel Flow. J. Hydraul. Eng. 1997, 123, 1099–1105. [Google Scholar] [CrossRef]
  33. ANSYS. FLUENT Theory Guide; ANSYS Inc: Canonsburg, PA, USA, 2015. [Google Scholar]
  34. Hirt, C.W.; Nichols, B.D. Volume of Fluid (VOF) Method for the Dynamics of Free Boundaries. J. Comput. Phys. 1981, 39, 201–225. [Google Scholar] [CrossRef]
  35. Launder, B.; Spalding, D. Lectures in Mathematical Models of Turbulence; Academic Press: Cambridge, MA, USA, 1972. [Google Scholar]
  36. Üneş, F.; Ağiralioğlu, N. Numerical Investigation of Temporal Variation of Density Flow and Parameters. J. Appl. Fluid Mech. 2017, 10, 81–94. [Google Scholar] [CrossRef]
  37. Gerasimov, A. Modelling Turbulent Flows with FLUENT; Fluent Europe Ltd.: Sheffield, UK, 2006. [Google Scholar]
  38. Lodh, B.K.; Das, A.K.; Singh, N. Investigation of Turbulence for Wind Flow over a Surface Mounted Cube Using Wall Y+ Approach. Indian J. Sci. Technol. 2017, 10, 1–11. [Google Scholar] [CrossRef]
  39. Unes, F.; Varcin, H. 3-D Real Dam Reservoır Model for Seasonal Thermal Densıty Flow. Environ. Eng. Manag. J. 2017, 16, 2009–2024. [Google Scholar] [CrossRef]
  40. Üneş, F.; Varçin, H. Investigation of Seasonal Thermal Flow in a Real Dam Reservoir Using 3-D Numerical Modeling. J. Hydrol. Hydromech. 2015, 63, 38–46. [Google Scholar] [CrossRef]
  41. Üneş, F. Investigation of Density Flow in Dam Reservoirs Using a Three-Dimensional Mathematical Model Including Coriolis Effect. Comput. Fluids 2008, 37, 1170–1192. [Google Scholar] [CrossRef]
  42. Üneş, F. Analysis of Plunging Phenomenon in Dam Reservoirs Using Three-Dimensional Density Flow Simulations. Can. J. Civ. Eng. 2008, 35, 1138–1151. [Google Scholar] [CrossRef]
  43. Üneş, F.; Varçin, H. Investigation of Plunging Depth and Density Currents in Eğrekkaya Dam Reservoir. Tek. Dergi 2012, 23, 5725–5750. [Google Scholar]
  44. OpenCV. OpenCV Official Website. Available online: https://opencv.org/about/ (accessed on 20 October 2021).
  45. Mukherjee, A. Motion Analysis in Video Surveillance Using Edge Detection Techniques. IOSR J. Comput. Eng. 2013, 12, 10–15. [Google Scholar] [CrossRef]
  46. Chanson, H. Turbulent Air-Water Flows in Hydraulic Structures: Dynamic Similarity and Scale Effects. Environ. Fluid Mech. 2009, 9, 125–142. [Google Scholar] [CrossRef] [Green Version]
  47. Falvey, H.T. Cavitation in Chutes and Spillways. Engineering Monograph 42. In Water Resources Technical Publication; US Printing Office, Bureau of Reclamation: Denver, CO, USA, 1990. [Google Scholar]
Figure 1. Çatalan Dam spillway structure. 1–6 numbers indicate chambers and arrows indicate 3% and 17% slopes in the discharge channel.
Figure 1. Çatalan Dam spillway structure. 1–6 numbers indicate chambers and arrows indicate 3% and 17% slopes in the discharge channel.
Water 15 00756 g001
Figure 2. Section of the Çatalan Dam spillway structure (flow inlet part) [29].
Figure 2. Section of the Çatalan Dam spillway structure (flow inlet part) [29].
Water 15 00756 g002
Figure 3. (a) 1/200 scale 3D numerical spillway model; (b) 1/200 scale experimental spillway model.
Figure 3. (a) 1/200 scale 3D numerical spillway model; (b) 1/200 scale experimental spillway model.
Water 15 00756 g003
Figure 4. Model image of the spillway in the experiment: (a) top view; (b) flow inlet part; (c) flow output part.
Figure 4. Model image of the spillway in the experiment: (a) top view; (b) flow inlet part; (c) flow output part.
Water 15 00756 g004
Figure 5. Velocity measurement points and location (distances from starting point) of the spillway model in the hydraulic water channel (top view).
Figure 5. Velocity measurement points and location (distances from starting point) of the spillway model in the hydraulic water channel (top view).
Water 15 00756 g005
Figure 6. Mesh in the three-dimensional spillway model and boundary conditions.
Figure 6. Mesh in the three-dimensional spillway model and boundary conditions.
Water 15 00756 g006
Figure 7. Grid independence test (number of cells vs. velocity at the spillway outlet).
Figure 7. Grid independence test (number of cells vs. velocity at the spillway outlet).
Water 15 00756 g007
Figure 8. Flowchart for object detection and tracking using the background subtraction method.
Figure 8. Flowchart for object detection and tracking using the background subtraction method.
Water 15 00756 g008
Figure 9. The apparatus and equipment used in the experiment.
Figure 9. The apparatus and equipment used in the experiment.
Water 15 00756 g009
Figure 10. The OpenCV code stages: (a) reading current video image; (b) image filtering for floating object detection and tracking; (c) calculation of the velocity of the tracked object (Red lines indicate cross-section locations, blue lines indicate the distance of the float from the origin).
Figure 10. The OpenCV code stages: (a) reading current video image; (b) image filtering for floating object detection and tracking; (c) calculation of the velocity of the tracked object (Red lines indicate cross-section locations, blue lines indicate the distance of the float from the origin).
Water 15 00756 g010
Figure 11. The OpenCV code stages: (a) reading current video image; (b) image filtering for floating object detection and tracking; (c) calculation of the water depth according the tracked object (The yellow lines show the cross-section locations, the green line the base of the spillway model).
Figure 11. The OpenCV code stages: (a) reading current video image; (b) image filtering for floating object detection and tracking; (c) calculation of the water depth according the tracked object (The yellow lines show the cross-section locations, the green line the base of the spillway model).
Water 15 00756 g011
Figure 12. The OpenCV code screens: (a) Cam 2, image velocity algorithm; (b) Cam 1, image water depth algorithm (Yellow lines show cross-section locations, the green line is the base of the spillway model, and the purple line is the buoyancy trajectory).
Figure 12. The OpenCV code screens: (a) Cam 2, image velocity algorithm; (b) Cam 1, image water depth algorithm (Yellow lines show cross-section locations, the green line is the base of the spillway model, and the purple line is the buoyancy trajectory).
Water 15 00756 g012
Figure 13. CFD analysis water surface overview and measurement cross-sections.
Figure 13. CFD analysis water surface overview and measurement cross-sections.
Water 15 00756 g013
Figure 14. CFD and experiment results for velocity fluctuations: (a) Cross-section 1; (b) Cross-section 2; (c) Cross-section 3; (d) Cross-section 4.
Figure 14. CFD and experiment results for velocity fluctuations: (a) Cross-section 1; (b) Cross-section 2; (c) Cross-section 3; (d) Cross-section 4.
Water 15 00756 g014
Figure 15. CFD velocity contours and depth-velocity distributions for Cross-section 1.
Figure 15. CFD velocity contours and depth-velocity distributions for Cross-section 1.
Water 15 00756 g015
Figure 16. CFD velocity contours and depth-velocity distributions for Cross-section 2.
Figure 16. CFD velocity contours and depth-velocity distributions for Cross-section 2.
Water 15 00756 g016
Figure 17. CFD velocity contours and depth-velocity distributions for Cross-section 3.
Figure 17. CFD velocity contours and depth-velocity distributions for Cross-section 3.
Water 15 00756 g017
Figure 18. CFD velocity contours and depth-velocity distributions for Cross-section 4.
Figure 18. CFD velocity contours and depth-velocity distributions for Cross-section 4.
Water 15 00756 g018
Figure 19. CFD analysis of water depths contours for four cross-sections.
Figure 19. CFD analysis of water depths contours for four cross-sections.
Water 15 00756 g019
Figure 20. CFD and experiment results for water depths: (a) Cross-section 1; (b) Cross-section 2; (c) Cross-section 3; (d) Cross-section 4.
Figure 20. CFD and experiment results for water depths: (a) Cross-section 1; (b) Cross-section 2; (c) Cross-section 3; (d) Cross-section 4.
Water 15 00756 g020
Figure 21. CFD water depth contours for Cross-section 1.
Figure 21. CFD water depth contours for Cross-section 1.
Water 15 00756 g021
Figure 22. CFD water depth contours for Cross-section 2.
Figure 22. CFD water depth contours for Cross-section 2.
Water 15 00756 g022
Figure 23. CFD water depth contours for Cross-section 3.
Figure 23. CFD water depth contours for Cross-section 3.
Water 15 00756 g023
Figure 24. CFD water depth contours for Cross-section 4.
Figure 24. CFD water depth contours for Cross-section 4.
Water 15 00756 g024
Figure 25. CFD pressure contours and depth-pressure distributions for Cross-section 1.
Figure 25. CFD pressure contours and depth-pressure distributions for Cross-section 1.
Water 15 00756 g025
Figure 26. CFD pressure contours and depth-pressure distributions for Cross-section 2.
Figure 26. CFD pressure contours and depth-pressure distributions for Cross-section 2.
Water 15 00756 g026
Figure 27. CFD pressure contours and depth-pressure distributions for Cross-section 3.
Figure 27. CFD pressure contours and depth-pressure distributions for Cross-section 3.
Water 15 00756 g027
Figure 28. CFD pressure contours and depth-pressure distributions for Cross-section 4.
Figure 28. CFD pressure contours and depth-pressure distributions for Cross-section 4.
Water 15 00756 g028
Figure 29. Floating object velocity values obtained with OpenCV code: (a) Cross-section 1; (b) Cross-section 2; (c) Cross-section 3; (d) Cross-section 4. (Red lines indicate cross-section locations, blue lines indicate the distance of the float from the origin).
Figure 29. Floating object velocity values obtained with OpenCV code: (a) Cross-section 1; (b) Cross-section 2; (c) Cross-section 3; (d) Cross-section 4. (Red lines indicate cross-section locations, blue lines indicate the distance of the float from the origin).
Water 15 00756 g029
Figure 30. OpenCV code display of the water depth obtained according to the position of the floating object: (a) Cross-section 1; (b) Cross-section 2; (c) Cross-section 3; (d) Cross-section 4.
Figure 30. OpenCV code display of the water depth obtained according to the position of the floating object: (a) Cross-section 1; (b) Cross-section 2; (c) Cross-section 3; (d) Cross-section 4.
Water 15 00756 g030
Figure 31. Experimental and OpenCV coded water depth along the X direction.
Figure 31. Experimental and OpenCV coded water depth along the X direction.
Water 15 00756 g031
Table 1. Coefficients to correct surface float velocities to average channel velocities [18].
Table 1. Coefficients to correct surface float velocities to average channel velocities [18].
Average Depth (m)Coefficient
0.300.66
0.610.68
0.910.70
1.220.72
1.520.74
1.830.76
2.740.77
3.660.78
4.570.79
>6.100.80
Table 2. Froude similarity values for prototype and model.
Table 2. Froude similarity values for prototype and model.
ParametersDimensionFroude Scale RatioPrototype ValueSimilarity AccountModel Value
SpillwayWidthLλ = (1/200)82.5 mLp∗λ41.25 cm
Height34 m17 cm
Length402 m201 cm
Discharge (Q)L3T−1λ5/210,055 m3 s−1Qp∗λ5/217.7 lt s−1
Velocity (V)Inlet 1LT−1λ1/26.5 m s−1Vp∗λ1/20.46 m s−1
Inlet 26 m s−10.42 m s−1
Inlet 35.52 m s−10.39 m s−1
Inlet 45.42 m s−10.38 m s−1
Inlet 55.4 m s−10.36 m s−1
Inlet 65.9 m s−10.42 m s−1
Table 3. Numerical model details.
Table 3. Numerical model details.
Solver SetSolverPressure-Based
Space–Time3D, Unsteady
ModelMultiphase ModelVOF
Viscous Modelk-ε
PhasePrimary PhaseAir
Secondary PhaseWater
DiscretizationPressurePresto
MomentumSecond Order Upwind
Pressure–Velocity CouplingMethodCoupled
Convergence CriterionResiduals0.001 (Continuity)
0.001 (Momentum)
Table 4. Comparison of experiment and CFD velocity values.
Table 4. Comparison of experiment and CFD velocity values.
Cross-Section No. Column No.Location at y Direction (m)Experimental Results (m s−1)CFD Results (m s−1)MAERMSEAPE%
Cross-Section 1N10.02501.2051.3770.1610.16713.4
N20.11501.0941.332
N30.20251.3781.266
N40.29001.4031.276
N50.37751.1441.299
Cross-Section 2N10.02501.1011.3210.0840.1157.2
N20.11501.2081.31
N30.20251.2881.28
N40.29001.2941.288
N50.37751.2231.305
Cross-Section 3N10.02501.0681.3810.1580.18013.8
N20.11501.2981.231
N30.20251.1431.327
N40.29001.1751.281
N50.37751.2241.342
Cross-Section 4N10.02501.4911.8210.1600.19610.0
N20.11501.7851.725
N30.20251.6021.861
N40.29001.8061.700
N50.37751.7931.748
Table 5. Comparison of experiment and CFD water depth values.
Table 5. Comparison of experiment and CFD water depth values.
Cross-Section No.Column No.Location at y Direction (cm)Experimental Results (cm)CFD Results (cm)MAERMSEAPE%
Cross-Section 1H11.00002.9002.8650.0740.0802.2
H26.43753.0003.085
H311.87503.5003.435
H414.62503.2003.135
H520.25003.0002.955
H625.87503.0002.945
H728.62503.8003.655
H834.06253.6003.525
H939.50003.5003.405
Cross-Section 2H11.00003.5003.6150.1370.1433.8
H26.43753.6003.515
H311.87503.6003.405
H414.62503.6003.405
H520.25003.7003.525
H625.87503.5003.405
H728.62503.5003.395
H834.06253.9003.765
H939.50004.0003.865
Cross-Section 3H11.00003.4003.5150.0810.0842.3
H26.43753.6003.615
H311.87503.7003.615
H414.62503.5003.415
H520.25003.5003.415
H625.87503.5003.415
H728.62503.6003.515
H834.06253.5003.415
H939.50003.5003.415
Cross-Section 4H11.00003.0002.950.0500.0501.7
H26.43752.9002.85
H311.87502.8002.75
H414.62503.0002.95
H520.25003.0002.95
H625.87503.0002.95
H728.62503.0002.95
H834.06253.0002.95
H939.50003.0002.95
Table 6. Cavitation indices for prototype spillway.
Table 6. Cavitation indices for prototype spillway.
Cross-Section No. Column No.Location at y Direction (m)Model Pressure Pm (Pa)Prototype Pressure Pp (Pa)Total Pressure Pt (Pa)Model Velocity Um (m s−1)Prototype Velocity Up (m s−1) Cavitation   Index   σ
Cross-Section 1N10.0250324.36064,872.000157,673.0001.37719.4740.82
N20.1150381.47676,295.200169,096.2001.33218.8370.94
N30.2025320.44964,089.800156,890.8001.26617.9040.97
N40.2900357.58171,516.200164,317.2001.27618.0451.00
N50.3775310.58262,116.400154,917.4001.29918.3710.91
Cross-Section 2N10.0250350.54670,109.200162,910.2001.32118.6820.92
N20.1150313.74262,748.400155,549.4001.31018.5260.89
N30.2025319.89163,978.200156,779.2001.28018.1020.94
N40.2900297.64759,529.400152,330.4001.28818.2150.91
N50.3775345.26969,053.800161,854.8001.30518.4550.94
Cross-Section 3N10.0250231.06046,212.000139,013.0001.38119.5300.72
N20.1150224.24044,848.000137,649.0001.23117.4090.89
N30.2025197.06039,412.000132,213.0001.32718.7670.74
N40.2900214.19442,838.800135,639.8001.28118.1160.81
N50.3775222.32744,465.400137,266.4001.34218.9790.75
Cross-Section 4N10.0250134.87426,974.800119,775.8001.82125.7530.35
N20.1150149.62029,924.000122,725.0001.72524.3950.41
N30.2025153.90030,780.000123,581.0001.86126.3190.35
N40.2900151.55530,311.000123,112.0001.70024.0420.42
N50.3775130.17026,034.000118,835.0001.74824.7200.38
Table 7. Velocity correction coefficients for the current spillway model experiment.
Table 7. Velocity correction coefficients for the current spillway model experiment.
Cross-Section No. Location at x Direction (m)Section Slope%Average Water Velocity (m s−1)Average Floating Object Velocity (m s−1)Coefficient
Crossssection 10.36631.0941.0611.03
Cross-section 20.76631.2881.3940.92
Cross-section 31.26631.1432.7880.41
Cross-section 42.01171.6024.4240.36
Table 8. Comparison of experiment and CFD water depth values.
Table 8. Comparison of experiment and CFD water depth values.
Cross-SectionObservation No.Location at x Direction (m)Experimental Water Depth Results (cm)OpenCV Code Water Depth Results (cm)MAERMSEAPE%
10.1663.5004.3000.5920.62818.8
Section 1 20.3663.5004.200
30.5663.3003.900
Section 2 40.7663.5004.000
50.9663.4004.000
61.1663.1004.100
Section 3 71.2663.4004.200
81.3163.4003.900
91.3662.8003.300
101.5662.5003.100
111.7662.5002.300
Section 4 121.9662.5002.300
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

Varçin, H.; Üneş, F.; Gemici, E.; Zelenakova, M. Development of a Three-Dimensional CFD Model and OpenCV Code by Comparing with Experimental Data for Spillway Model Studies. Water 2023, 15, 756. https://doi.org/10.3390/w15040756

AMA Style

Varçin H, Üneş F, Gemici E, Zelenakova M. Development of a Three-Dimensional CFD Model and OpenCV Code by Comparing with Experimental Data for Spillway Model Studies. Water. 2023; 15(4):756. https://doi.org/10.3390/w15040756

Chicago/Turabian Style

Varçin, Hakan, Fatih Üneş, Ercan Gemici, and Martina Zelenakova. 2023. "Development of a Three-Dimensional CFD Model and OpenCV Code by Comparing with Experimental Data for Spillway Model Studies" Water 15, no. 4: 756. https://doi.org/10.3390/w15040756

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