Submit manuscript...
eISSN: 2577-8242

Fluid Mechanics Research International Journal

Research Article Volume 3 Issue 1

MATLAB for Iteration: Hydraulic modeling for environmental engineering students

Tasnim Almoulki,1 Kaan Yetilmezsoy2

1Undergraduate Student, Yildiz Technical University, Turkey
2Associate Professor, Yildiz Technical University, Turkey

Correspondence: Kaan Yetilmezsoy, Associate Professor, Department of Environmental Engineering, Faculty of Civil Engineering, Yildiz Technical University, Davutpasa Campus, 34220, Esenler, Istanbul, Turkey, Tel +902123835376

Received: March 14, 2019 | Published: March 22, 2019

Citation: Almoulki T, Yetilmezsoy K. MATLAB for Iteration: Hydraulic modeling for environmental engineering students. Fluid Mech Res Int. 2019;3(1):24-28. DOI: 10.15406/fmrij.2019.03.00049

Download PDF

Abstract

The wide spread of obtainable, personal computers has opened doors to vast computational capabilities which enforced educational systems especially engineering programs to develop proficiency in using computers along with experiments and theories. Teaching techniques have changed accordingly, and appropriate methods were required. An example of that development was shown in the course of Hydraulics given to Environmental Engineering undergraduate students. Students in the past spent much time on the iterative solving method used in hydraulic problems and expended a lot of energy to find the solutions. Today instead, a commonly known program called MATLAB has proven efficiency and brought great easiness which not only assisted engineers in their work but also allowed them to drive more attention on reasoning and interpretation. In this regard, three examples of hydraulic problems related to determining the minimum diameter of a pipe, the depth of uniform flow in an open channel, and the hydraulic load over a sharp-crested weir are explained with fully executable MATLAB codes for the solution. This study requires basic understanding of Hydraulics and familiarity with MATLAB. It benefits any branch of engineering concerned with hydraulics.

Keywords: iterative-based problems, hydraulics, MATLAB, engineering problems, calculations, solving methods

Introduction

The importance and advantages of technology and computers are familiar to everyone. In fact, not implementing computer-based tasks and technological activities in our educational systems would be a contradictory behavior to the rhythm of our everyday-life. Thus, it is essential to teach students about computational methods, modeling knowledge and simulation experience that will allow them to gain keen insights on the real-world problems that they will face in their future careers.1,2

When solving engineering problems (especially iterative-based problems) using conventional hand calculations, time is consumed significantly, and big amounts of energy are expended. Furthermore, consistent results become elusive when the numbers of inputs increase, or simple blunders arise.

Therefore, instead of getting trapped in such endless cycles, and wasting time on the solving process itself, computer programs provide an alternative for such calculations and eventually, great easiness for engineers. This way, more emphasis can be placed on the interpretation of data and the development of intuition and common sense among students.3

In this study, the solution of three hydraulic iterative-based problems is shown using one of the most important programs among engineers which is MATLAB. This program helps obtaining numerous, accurate and quick values for the solutions. 

Representation of iterative hydraulic problems

The term Hydraulics is related to the application of Fluid Mechanics’ principles to water engineering structures, and civil and environmental engineering facilities. The main parameters of a hydraulic study are the geometry of the channel, the properties of the flowing fluid and the flow parameters.4,5 For the following examples, primary recognition of MATLAB is considered in addition to the governing system of equations used in Hydraulics since our aim here is to show a methodology rather than discuss prior explanations.

Problem 1: Determining the minimum diameter of a pipe (Figure 1). 

Problem 2: Determining the depth of uniform flow in an open channel (Figure 2). 

Problem 3: Determining the hydraulic load over a sharp-crested weir (Figure 3). 

Figure 1 Schematic for Problem 1. Water at 20°C is to be transported in a 120-m-long plastic pipeline at a flow rate of 0.25m3/s. The roughness height for this pipe’s material is 0.0015mm.6 If the head loss in the pipe is not supposed to exceed 10m, determine the minimum diameter (D) of the pipe to ensure the assigned value of the maximum head loss.

Figure 2 Schematic for Problem 2. The flow rate passing through an open finished-concrete channel of a trapezoidal cross section is 6.4m3/sec. The side surface slope (m) is 2:1 and the energy grade line slope (bed slope for normal flow) is 1.4m/km. The Manning coefficient for an open channel with finished-concrete surfaces is 0.012, and the bottom width of this channel is 4 m. The flow is steady and uniform, and the bottom slope is constant.5 The roughness of the wetted surface of the channel and the friction coefficient are assumed to be constant. Determine the depth of uniform flow and other dimensions of the channel.

Figure 3 Schematic for Problem 3. A sharp-crested weir is a vertical plate placed in a channel that forces the liquid to flow through an opening to measure the flow rate.5 The flow rate passing over a sharp-crested Bazin weir7 is 2.2m3/s. If the height of this weir (w) that will be located into a 3-m wide rectangular channel is 3.2m, determine the hydraulic load (h) or the effective head flowing over the weir crest.

Computational procedure

The use of computer graphic visualization and animation is an effective method for displaying large volumes of model input and output.8 In this study, computer-based solutions are conducted by writing scripts in the M-file Editor within the framework of: MATLAB® R2018a software (V9.4.0.813654, 64-bit (win64), Academic License Number: 40578168, MathWorks Inc., Natick, MA) running on a Casper Excalibur (Intel® CoreTM i7-7700HQ CPU, 2.81GHz, 16GB of RAM, 64-bit) Windows 10 PC platform. For a visual understanding of the implemented computational procedure, pictorial diagrams for each hydraulic problem are depicted in (Figure 4–6).

Figure 4 A visual representation of the solution methodology for problem 1.

Figure 5 A visual representation of the solution methodology for problem 2.

Figure 6 A visual representation of the solution methodology for problem 3.

MATLAB-based solutions

Calculations are conducted for each problem by running the MATLAB scripts presented in (Table 1–3) of the Appendix. The scripts are evaluated in the Editor Window and the outputs for various input variables are shown in (Figure 7–9).

Figure 7 Contents of the workspace window after running of the script for problem 1.

Figure 8 Contents of the workspace window after running of the script for problem 2.

Figure 9 Contents of the workspace window after running of the script for problem 3.

Conclusion

By using the solving methods above, we reduced time, got more detailed, less error-prone solutions. And because of its accuracy, more comparisons and design trials can be performed. The solution time for the studied hydraulic cases was obtained as 0.2374, 0.2053, and 0.1446 (seconds) respectively, which reveals that the proposed MATLAB methodology gave quantitative results in a computational time that doesn’t exceed a few seconds. As a conclusion, using a program such as MATLAB in hydraulic problems gives us a chance to explore more design options in which allows us to find the best and most efficient design every time.

Appendix

Fully executable MATLAB codes of the three iterative-based problems are presented in the following three tables (Table 1–3).

Table 1 Script for determining the minimum diameter of the pipe

Table 2 Script for determining the depth of uniform flow in an open channel

Table 3 Script for determining the hydraulic load over a sharp-crested weir

Acknowledgments

None.

Conflicts of interest

The author declare there is no conflicts of interest.

References

Creative Commons Attribution License

©2019 Almoulki, et al. This is an open access article distributed under the terms of the, which permits unrestricted use, distribution, and build upon your work non-commercially.