*2.1. Momentum and Continuity Equations*

The derivation starts from the equation of momentum of two-phase vapor–liquid flow in a freely oriented conduit:

$$\frac{\partial}{\partial t}(\rho\_m v\_m A) + \frac{\partial}{\partial \mathbf{x}}\left(\rho\_m v\_m^2 A\right) + A \frac{\partial p}{\partial \mathbf{x}} + \pi D \tau\_m + \mathbf{g} \rho\_m A \sin \theta = 0 \tag{1}$$

in which *ρ<sup>m</sup>* being the mixture density is calculated:

$$
\rho\_m = \alpha \rho\_l + (1 - \alpha)\rho\_\upsilon. \tag{2}
$$

Please note that this starting momentum equation, as well as the set of the continuity equations (Equation (4), is identical to the one discussed in the IAHR Synthetic Report [37]. After the differentiation and ordering, one gets the following form:

$$\frac{\rho\_m \upsilon\_m}{A} \frac{dA}{dt} + \rho\_m \frac{d\upsilon\_m}{dt} + \rho\_m \upsilon\_m \frac{\partial \upsilon\_m}{\partial \mathbf{x}} + \upsilon\_m \frac{d\rho\_m}{dt} + \frac{\partial p}{\partial \mathbf{x}} + \frac{2}{R} \tau\_m + \mathcal{g}\rho\_m \sin\theta = 0. \tag{3}$$

For the sake of simplicity, let us assume that the pipe is horizontal, i.e., *θ* = 0. Thus, the last term on the left-hand side of the above equation (Equation (3) is zero. Now, let us write the continuity equations written separately for the gas and liquid phase, respectively:

$$\begin{aligned} \frac{\partial}{\partial t} (\rho\_\upsilon (1 - \alpha) A) + \frac{\partial}{\partial x} (\rho\_\upsilon (1 - \alpha) A v\_\upsilon) &= 0 \\ \frac{\partial}{\partial t} (\rho\_l \alpha A) + \frac{\partial}{\partial x} (\rho\_l \alpha A v\_l) &= 0 \end{aligned} \tag{4}$$

where α—volumetric fraction of liquid.

Adding the continuity equations (Equation (4) together for the respective phases gives:

$$\frac{\partial}{\partial t}(\rho\_\upsilon(1-\mathfrak{a})A + \rho\_l\mathfrak{a}A) + \frac{\partial}{\partial \mathfrak{x}}(\rho\_\upsilon(1-\mathfrak{a})A\upsilon\_\upsilon + \rho\_l\mathfrak{a}A\upsilon\_l) = 0. \tag{5}$$

Next, assuming that a homogeneous bubbly flow takes place, then the dispersed vapor phase does have the same velocity as the surrounding continuous liquid phase *vv* = *vl* = *vm* :

$$\frac{\partial}{\partial t}A\rho\_m + \frac{\partial}{\partial x}(Av\_m\rho\_m) = 0.\tag{6}$$

By making differentiation and ordering in Equation (6), the following result is obtained:

$$A\frac{d\rho\_m}{dt} + \rho\_m \frac{dA}{dt} + A\rho\_m \frac{\partial v\_m}{\partial \mathbf{x}} = 0.\tag{7}$$

Dividing Equation (7) by *Aρm*, the first useful form of this equation is derived:

$$\frac{1}{\rho\_m} \frac{d\rho\_m}{dt} + \frac{1}{A} \frac{dA}{dt} + \frac{\partial v\_m}{\partial x} = 0. \tag{8}$$

However, when one multiplies Equation (7) by *vm* and then divides by A, we get the second useful form of Equation (7):

$$
\upsilon\_m \frac{d\rho\_m}{dt} + \frac{\rho\_m \upsilon\_m}{A} \frac{dA}{dt} + \upsilon\_m \rho\_m \frac{\partial \upsilon\_m}{\partial \mathfrak{x}} = 0. \tag{9}
$$

Using the above Equation (9) and the fact that the analyzed system is horizontal, the momentum Equation (3) can be reduced to a simpler form:

$$
\rho\_m \frac{dv\_m}{dt} + \frac{\partial p}{\partial \mathbf{x}} + \frac{2}{R} \tau\_m = 0. \tag{10}
$$

Please note that Equation (10) reduces to the equation of a single-phase flow (continuous liquid phase) when no cavitation occurs (mean values of pressure in an analyzed cross-section are larger than the vapor pressure).

The next step is to derive the continuity equation. From the works [22,37,38], it follows that in bubble flow and plastic pipes, the fluid elasticity (separately defined for liquid and vapor) and the pipe deformation can be defined as follows:

$$\frac{1}{\rho\_l} \frac{d\rho\_l}{dt} = \frac{1}{\mathcal{K}\_l} \frac{dp}{dt}; \frac{1}{\rho\_v} \frac{d\rho\_v}{dt} = \frac{1}{\mathcal{K}\_v} \frac{dp}{dt} \text{ and } \frac{1}{A} \frac{dA}{dt} = \frac{\Xi}{\mathcal{E}} \frac{dp}{dt} + 2\frac{d\varepsilon\_r}{dt} \tag{11}$$

where Ξ = *<sup>D</sup> <sup>e</sup> ξ*—enhanced pipe restraint factor. The first two equations represent liquid and vapor elasticity, respectively, whereas the third one defines pipe deformation (the right-hand one). The derivation of the first two ones is straightforward. This is not the case for the third one—its derivation is presented in Appendix A.

The total derivative of Equation (2) mixture density *ρ<sup>m</sup>* is:

$$\frac{d\rho\_m}{dt} = a\frac{d\rho\_l}{dt} + (\rho\_l - \rho\_v)\frac{d\alpha}{dt} + (1 - \alpha)\frac{d\rho\_v}{dt}.\tag{12}$$

When Equations (11) and (12) are used in the continuity equation, Equation (8), one gets:

$$
\rho \left[ \rho\_m \frac{\Xi}{E} + \frac{a \rho\_l}{K\_l} + \frac{(1 - a) \rho\_v}{K\_v} \right] \frac{dp}{dt} + (\rho\_l - \rho\_v) \frac{da}{dt} + 2\rho\_m \frac{d\varepsilon\_r}{dt} + \rho\_m \frac{\partial v\_m}{\partial x} = 0. \tag{13}
$$

In addition, a constant pressure wave speed is assumed. In the proposed model, the value of the speed will be assumed for the steady flow occurring before the water hammer event. Then, there is only pure liquid phase (*α* = 1). The last term of the square bracket in Equation (13) vanishes, and the formula under square bracket reduces to:

$$\mathbf{c}^{-2} = \left[\rho\_l \left(\frac{\Xi}{E} + \frac{1}{K\_l}\right)\right] \tag{14}$$

which is the pressure wave speed of the pure liquid phase. The above wave speed equation includes elastic effects of the fluid (*Kl*) and of the pipe wall (*E*). Enhanced pipe restraint factor Ξ is calculated in a different way in thin ((*D*/*e*) < 25) and thick-walled pipelines [2].

Equation (14) governs the final form of the continuity equation for unsteady flows in plastic pipes:

$$\frac{1}{c^2}\frac{dp}{dt} + (\rho\_l - \rho\_\upsilon)\frac{d\mathfrak{a}}{dt} + 2\rho\_m \frac{d\varepsilon\_r}{dt} + \rho\_m \frac{\partial \upsilon\_m}{\partial \mathfrak{x}} = 0. \tag{15}$$

In non-slip flow conditions, the proportion of the dispersed phase is of a statistical nature; i.e., the volumetric concentration and the mass are equal to the corresponding dynamic shares—the transport concentration and the degree of dryness [39,40]. Then, the following relationship applies in non-slip flows: *vm* = *v*/*α*, and the final set of fundamental equations (appropriately momentum and continuity) is as follows:

$$\begin{cases} \rho\_m \frac{d}{dt} \left(\frac{\upsilon}{a}\right) + \frac{\partial p}{\partial x} + \frac{2}{R} \tau\_m = 0 \\\\ \frac{1}{c^2} \frac{dp}{dt} + (\rho\_l - \rho\_\upsilon) \frac{d\alpha}{dt} + 2\rho\_m \frac{d\varepsilon\_r}{dt} + \rho\_m \frac{\partial}{\partial x} \left(\frac{\upsilon}{a}\right) = 0 \end{cases} \tag{16}$$

The term *v*/*α* indicates the difference between the velocities of the liquid and vapor phase.
