**1. Introduction**

The emptying procedure in a pipeline generates hydraulic events that can cause problems if air valves are not well sized. In practical applications, engineers follow typical recommendations from the American Water Works Association (AWWA) [1] or manufacturers about sizing and location of air valves along a pipeline in order to avoid subatmospheric pressure that can cause the collapse of the system. It is recommended in a pipeline that the air volume admitted by air valves should be the same as the water volume drained [2]. Consequently, air valves should work in subsonic flow conditions. Air valves should be located at high points, in long horizontal pipe branches, long descents, long ascents, at the decrease in an up-slope and increase in a down-slope of a pipeline, and on the discharge side of deep well pumps and at vertical turbines/pumps [1]. An inappropriate selection of the air valve size and location produces not only subatmospheric pressure but also a slow drainage of the system.

Presently, there are only few studies related to the emptying process in the literature, but they are not focused on practical applications because they do not consider a pipeline with an irregular profile [3] and air valves [4,5].

The analysis of an emptying process is not trivial because it requires the study of a two-phase flow [6–9]. This problem can be studied using one (1D) [10,11], two (2D) [12] or three-dimensional (3D) [13] models. The water phase in the 1D model can be analyzed considering two types of models [14]: (i) elastic models [15,16], which consider the elasticity of the pipe and the water; or (ii) rigid models [17], which ignore the elasticity of them. Normally, elastic models are solved by using the method of characteristics [18,19] and rigid models by using the numerical solutions of ordinary differential equations [3,11,17,20]. In pressurized systems, the air effect can be analyzed as a single-phase flow, where the absolute pressure of the air pocket is computed between two water columns [10,11,21]. Regarding the analysis of 2D and 3D CFD modeling of air-water interface in closed pipes, they are still unyielding in the application of pipeline draining because length and time scales are not appropriate.

This research develops a general 1D mathematical model that can be used for analyzing the behaviour of the main hydraulic variables during the emptying process in a pipeline with an irregular profile and with several air valves installed along it based on formulations of previous works [3,10,11,17,20,22,23]. The proposed model can give important information in real systems about: (i) the risk of collapse of pipeline installations, by checking in a pipe manufacturer characteristics if the stiffness class is appropriate to support the subatmospheric pressure reached during the hydraulic event depending on the type of soil in natural conditions, the type of backfill and the cover depth; (ii) the appropriate selection of the air valve during the emptying process; (iii) the size and the maneuver time of the drain valves; and (iv) the estimation of the drainage time of a pipeline.
