Pumping Pressure Estimation Using Famous Turbulent Fluid Mechanics Equations Through Python Simulations

One of the most important tasks when designing a pumping system is for the engineer or specialist to know the components to be used including the pumps. Knowledge about the project helps to achieve a more economical system with less risk of failure. One of these failures may result in the insertion of a pump that does not generate the proper pressure, causing the system not to function as designed. To know the pumping pressure in a system containing one pump, one long pipe and one reservoir, it is necessary to know which are the possible equations that could calculate the friction factor f more accurately to obtain the pressure. The main equation used in the turbulent regime, where Reynolds number Re (Re> 4,000), is the Colebrook equation and it is a nonlinear equation and it requires numerical programs to calculate the factor friction. Other equations are apparently simpler to employ, but are limited by the Reynolds Re number and / or the relative roughness. The purpose of this paper is to know which of the famous equations in the turbulent regime Haaland, Blasius, Prandtl, von Karman could be used to design a bomb when confronted with the calculations obtained by the Colebrook equation. The simulations were programmed in Python and the pumping pressure values and the error percentage were compared.


Introduction
The art of programming consists of applying a programming language to solve some kind of problem, seeking a solution in a faster and more efficient way [1].
Python is associated with the family of big killer snakes like those that appear in the films Python (2000) and Boa x Python (2002). The python snakes are large, usually between 4.5 and 6 m in size, but they are not poisonous, being native to Africa. Therefore, the help pages, forums and program development environments, there is a snake logo. However, in fact, the name Python was not in homage to this family of snakes, but to the author's favored program called "Monty Python's Flying Circus" [2].
In the late 1980s in the Netherlands, the Python programming language began to be developed by Guido van Rossum. After creating several versions like 0.9.0 and 1.0, Guido developed version 1.2 in the United States. As of version 2.0, the software has become free. Python has some relevant features, some of which are [ Programming is undoubtedly used in many areas, the art of programming can be developed by anyone, as long as they are aware of logic, choose a program and have a problem to solve. In this way it becomes possible to make use of a programming language to solve problems of fluid mechanics. The resolution of this type of problem is very important in the case of industries that make a great transport of daily fluids, as is the case of a sugar-alcohol plant, which transports fluid in both the liquid and the gaseous state [4]. Through Colebrook formulas we can delineate the Moody-Rouse diagram which is of great importance to help solve one of the major problems in pipes which is the loss of load h l caused by frictional effects on the flow in section pipes constant (Darcy-Weisbach equation) [5].
The head loss h lt can be determined if is provided the pressure difference between any two points in a piping system or if is summed the major losses h l due to frictional effects in fully in constant-area tubes, and h lm , resulting from entrances, fittings, areas changes, etc [5]. In many works is done the head loss calculation to select a pump. In this work, the pump pressure will be calculated with the head loss equations.
In [6] the problem reported is about using the Colebrook equation to calculate the friction factor precisely because it is an implicit equation and requires more computational time. So for large piping systems, other equations could be substituted. The authors worked with more than thirty explicit equations and they compared the value obtained with the value given by the Colebrook equation, besides also comparing with computational time.
The calculation of the dimensioning of diameters in systems in distribution water is a problem involving a friction factor which is treated in [7]. This diameter in addition to meeting the needs of the system, it should also have the lowest annual cost of installation and operation. The authors chose to calculate the economic diameter using the Bresse formula, the Method Based on Pipe Weight (MBPW) and Method of the Linear Variation of Pipe Costs (MLVPC).
The equation that determines the real costs of the commercial pipe diameters is apparently laborious but, easily implemented with the computational tools currently available. Such equation contains the friction factor f, which the authors report can be retrieved from Colebrook-White equation.
The pressure loss in pressurized pipes can be determined by Darcy-Weisbach equation, which contains the friction factor f as a variable. Due to the difficulty in calculating the friction factor using the Colebrook equation, authors [8] used six equations and for each one, fifteen values of is the relative surface roughness were applied.
Change of speed in a rotating pump that works with variable speed changes its flow and its efficiency. The authors [9] studied two equations to calculate this efficiency in three speed reductions and compared the values with about fifty pumps. The expression of the efficiency curve can be expressed by a set of variables, including the friction factor. Thus, in order to calculate the efficiency of a pump, it is necessary to accurate friction factor values.
The pressure drop due to friction can be easily calculated for a straight pipe section using a series of equations easily found in the literature on the subject of fluid mechanics. However, when introducing a bend to the pipe section there is a change flow direction and calculations need to be more accurate. In [10] the research was based on determining the pressure loss due to the several contributing factors, the bend angle, radius of curvature, flow velocity and pipe diameter. Per unit length the proposed head loss depends on the friction factor. The author informs that the friction factor, f, can be found from Moody's diagram or a formula approximating Moody's diagram such as Haaland's or Colebrook's equation. Thus, the head loss value it can be influenced by a friction factor value not calculated precisely.
To investigate different friction models for oscillating flow, [11] proposes to perform simulations and compare them with experimental results from a small-scale test rig. Per unit length the proposed head loss is dependent on the friction factor. Thus, this value needs to be precisely calculated so that the value simulated and experimental model can get closer to each other.
In [12], the author proposes a work aiming at to select a water feed pump in a steam generation system. The calculation of head loss defines the available Net Positive Suction Head (NPSH).
A work that involves selecting a pump for a borehole, it is showed in [13].

Getting Equations in Laminar and Turbulent Regime
The laminar flow is a smooth, quiet, grouped flow, this flow usually occurs with fluids of great viscosity and at low speeds. Already the turbulent flow is when disordered, irregular, with random movements, this flow is common among fluids with lower viscosities. According to [14] a flow that hour is laminar time is turbulent is known as transitory. Experiments by Osborn Reynolds in the year 1880 gave rise to the Reynolds number, Re, the non-dimensional number that is used as a key parameter to determine which flow regime in the pipes.
According to [14], the flow in a circular tube is defined as laminar, transition flow and turbulent according to the Reynolds number: Re ≤ 2,300 laminar regimes Re≤ 2,300 ≤ 4,000 transition flow Re ≥ 4,000 turbulent flow The equation (1) for the laminar regime in a circular pipe is given by [14]: In [14], it is found that Cyril F. Colebrook where: ε//D: relative roughness, Re: Reynolds number, f: friction factor. According to the authors [14], the Colebrook equation has been considered as the most accurate law of resistance to runoff and has been used in a universal way today. This formula carries with it a peculiarity, since the variable f exists on both sides of the equation, with no possibility of isolation, which ends up making its calculation more complex to be calculated manually, because in addition to labor it would take a long time to reach the results, and with the use of a computational method besides an almost immediate result the precision becomes much greater.

Haaland Equation
A simpler equation to be calculated than the Colebrook equation for not having the presence of both f in the equation, but according to authors such as [14], their results if compared in some cases there may be variations that reach up to 2% of difference. Therefore, if the calculation requires a more accurate result it is advisable to use the Colebrook equation. The Haaland formula is represented in equation (3):

Blasius Equation
In [14][15][16][17], it is stated that for a turbulent regime the equation known as Blasius correlation can be used within the range of Re equal to 4,000 to 10 5 given by (4): Observing equation (4) it can be concluded that it does not vary as a function of relative roughness.

Vón Karman Equation
When the Reynolds number is too high, the curves in the Moody diagram are almost horizontal, and this fact makes the friction factor not dependent on Re in this region. The greater the roughness with Re ∞, the faster the curve resembles a straight line, making f practically constant. In [14] is the Colebrook equation in which Re ∞, known as Vón Karman's equation:
The equation for h l is [5]: where f: friction factor, L= pipe length, D= inside pipe diameter.
The equation for h lm [5]: where K = minor head loss coefficient. The model of the system used in this work is shown in figure 1. Consider a horizontal pipe with 200 m in length and a diameter variable connected to a large deep reservoir of 15 m. At the end of the pipe there is a pump that pumps water at 20°C in the volumetric flow rate 0.02 m 3 /s. For this problem p 1 = p pump , p 2 = 0, ie, ∆p = p pump , 9 : = 9 : , 9 : ~0, K=1, α 1 =1,0, z 1 = 0, z 2 = 10 m, ρ= 999 kg/m 3 e µ= 1,0*10 -3 kg/(m.s). Replacing these values in (7) the new equation is: Gauge pressure can be calculated by: The velocity is found by: where Q: volumetric flow rate. The Reynolds Number for flow in pipes is defined as: where: E: viscosity of the fluid. Briefly, the system designed in this article assumes the following settings, which will be inserted into the Python program script.

Testing the Program
The Colebrook equation was inserted into Python software to calculate the friction factor f and construct the Moody Diagram. Firstly, it was checked whether the values found in the equation were in agreement with those cited in the literature. The comparison is shown in table 1. Table 1. Factor of friction presented in [14] for Re= 10 6

Statistical Comparison of Equations
The five equations of the turbulent regime were submitted to different values of diameter D and relative roughness.
First, the velocity is calculated by the flow rate value by equation (12). With the flow in hand, the Reynolds number is calculated (13) and thus the friction factor for each of the equations is determined. The pumping pressure was calculated by the equation (11). equations: Haaland, Blasius, Prandtl and vón Karman, is compared with the pressure calculated using the Colebrook equation, to verify the validity of each of these equations in the values proposed diameter and roughness (table 3). This comparison used the data from table 2 and equation (14).

Conclusion
The Python program lives up all expectations to calculate all values needed to get to the pumping pressure, which was the goal in this program. Even when the equation is not linear like equation (2), the friction factor can be calculated with values very close to those found in the literature, as shown in Table 1.
The Table 3 can be analyzed based on the usage limit of each one of the equations already explained in section 2. Consider the percentage error using the Haaland equation to calculate pumping pressure. According to the theory, there is a slight difference between the Haaland and Colebrook equation, so it was this percentage could be expected to be very low. The calculation, according to this table showed values from 0 to 1%, really proving that it could be using the Haaland equation to calculate the pumping pressure with the values used relative roughness, diameter, length, flow rate used in this simulation.
If the friction factor is calculated using the Blasius equation, only where the Reynolds number was less than 10 5 is that the error percentage has a null value. That is, for values of lines 0, 1, 2, 6, 7, 8, 12, 13, and 14, the percentage error presented very high values, and thus, the Blasius equation could not be used.
Notice the rows 0 through 5 in the Prandtl percentage error column. The values range from 0 to 1, as expected, since the Prandtl equation is limited for low roughness.
The von Karman equation should be used to calculate the friction factor when Reynolds number and roughness have high values, i.e. expected that the equation is more efficient on lines 12 through 17, where the percentage error varied very little from 0 to 3.
For a system similar to that of figure 1, it is recommended to use the Haaland equation for the Reynolds number and relative roughness similar to that used in this work. For a high Re, the three equations: Blasius, Prandlt and von Karman present pumping pressures higher than that calculated by the Colebrook equation, therefore, it is better not to use them, except in two cases: with low roughness the pumping pressure can still be calculated using the Prandlt equation or with high roughness, the von Karman equation.
For other reservoir sizes, pipe length or diameter, it is recommended to redo this simulation and evaluate which friction factor equations could be used to calculate the pumping pressure with a low relative error.