## 2 Model Derivation
### Continuity Equation  
The continuity equation for liquid can be written as follows:  
\[\frac{1}{a^{2}}\cdot\frac{\partial p}{\partial t}+\rho\cdot\
abla\cdot\mathbf{ v}=0, \tag{1}\]  
where relation between density and pressure for barotropic fluid \(\mathrm{d}\rho=\frac{\mathrm{d}p}{a^{2}}\) is included [19], which is a common practice for liquids. Integration over the liquid volume \(\mathrm{d}V\) (see Figure 1) yields:  
\[\frac{\mathrm{d}V}{a^{2}}\cdot\frac{\partial p}{\partial t}+\rho\cdot\left(Q_{ 2}-Q_{1}+\int\limits_{P}\mathbf{v}\cdot\mathbf{n}\cdot\mathrm{d}P\right)=0. \tag{2}\]  
Flow rates \(Q_{1}\) and \(Q_{2}\) are associated with the corresponding cross-sections \(S_{1}\) and \(S_{2}\). Pressure \(p\) is now the mean value over the entire volume \(V\) of liquid at one time instant. Considering \(Q_{2}=Q_{1}+\frac{\partial Q}{\partial x}\cdot\mathrm{d}x\), it is possible to write Equation (2) in the form of Equation (3), where the volume \(\mathrm{d}V=S\cdot\mathrm{d}x\):  
\[\frac{S}{a^{2}}\cdot\frac{\partial p}{\partial t}+\rho\cdot\frac{\partial Q}{ \partial x}+\rho\cdot\frac{\int\limits_{P}\mathbf{v}\cdot\mathbf{n}\cdot \mathrm{d}P}{\mathrm{d}x}=0. \tag{3}\]Because the flow in a pipe is being solved, only the one dimensional case can be considered. Thus, the space coordinate \(x\) has only one dimension that is associated with the pipe axis. The integral over the pipe inner surface \(P\) equals zero when the pipe wall is rigid and leak-proof. However, usually, pipe elasticity allows pipe wall deformations and reduces the sound speed in the system.  
The behavior of the pipe wall can be described using the Kelvin-Voigt model; see Figure 2.  
Using force balance and deforming properties of the model, it is possible to derive:  
\[\sigma = \sigma_{E}+\sigma_{b}, \tag{4}\] \[\sigma_{E} = E\cdot\varepsilon,\] (5) \[\sigma_{b} = b\cdot\frac{\partial\varepsilon}{\partial t}, \tag{6}\]  
where subscripts refer to the corresponding parts of the body in Figure 2.  
For a polymeric material pipe a more complex Kelvin-Voigt model must be used. For this case it is complicated to find the appropriate material constants. A detailed discussion of this problem is written in [20; 21].  
When the Laplace transform with zero initial conditions is applied to Equations (4) to (6), one can obtain:  
\[\tilde{\sigma}=(E+s\cdot b)\cdot\tilde{\varepsilon}, \tag{7}\]  
where the expression in parenthesis is complex Young's modulus \(E_{c}\).  
In the case of a thin wall, the stress and velocity of the wall can be computed according to the following equations:  
\[\sigma = \frac{D}{2\cdot t_{w}}\cdot p, \tag{8}\] \[v = \frac{D}{2}\cdot\frac{\partial\varepsilon}{\partial t}, \tag{9}\]  
Figure 1: Element of a pipe with flowing liquid.  
Figure 2: Kelvin–Voigt model of the body.  
and after the Laplace transform:  
\[\partial\;\;= \frac{D}{2\cdot t_{w}}\cdot\bar{p}, \tag{10}\] \[\partial\;\;= \frac{D}{2}\cdot s\cdot\bar{\varepsilon}. \tag{11}\]  
The combination of Equations (7), (10) and (11) yields a relationship between the wall velocity and pressure in the pipe after the Laplace transform:  
\[\partial=s\cdot\frac{D^{2}}{4\cdot E_{c}\cdot t_{w}}\cdot\bar{p}. \tag{12}\]  
The wall velocity has a radial direction and is non-zero when the pressure changes (pipe is expanding or contracting).  
When the Laplace transform is applied to Equation (3), it is possible to obtain a continuity equation in the form of Equation (13). Relationship (12) is substituted for velocity in the integral over the surface \(P\).  
\[\left(\frac{1}{a^{2}}+\frac{\rho\cdot D}{E_{c}\cdot t_{w}}\right)\cdot S\cdot s \cdot\bar{p}+\rho\cdot\frac{\partial\bar{Q}}{\partial x}=0. \tag{13}\]  
When the complex speed of sound Equation (14) is introduced, one obtains the final shape of the continuity equation for the liquid in a pipe Equation (15).  
\[a_{c} = a\cdot\sqrt{\frac{E_{c}\cdot t_{w}}{E_{c}\cdot t_{w}+a^{2}\cdot \rho\cdot D}}, \tag{14}\] \[0 = \frac{\rho\cdot a_{c}^{2}}{S}\cdot\frac{\partial\bar{Q}}{ \partial x}+s\cdot\bar{p}. \tag{15}\]