## 2 The Improved Gas Leakage Model of Pressure Pipeline
### The Improved Gas Leakage Model and Its Corresponding Derivation
Bringing the state parameters of the gas at points zero and one into the gas motion Equation (2), the relationship between the Mach number and frictional resistance during adiabatic gas flow can be obtained:  
\[\frac{k+1}{2k}\ln(\frac{{Ma_{1}}^{2}Y_{0}}{{Ma_{0}}^{2}Y_{1}})-k\bigg{(}\frac{ 1}{{Ma_{0}}^{2}}-\frac{1}{{Ma_{1}}^{2}}\bigg{)}+\frac{4 fL_{e}}{D}=0 \tag{4}\]  
Combined with the parameters of the gas at steady state point 0 and Equations (3) and (4), the state parameters of the gas at point 1 can be obtained. For the throttling process one to two of the gas in the pipeline, it is described by the continuity equation, the energy and momentum differential equation, the ideal gas state equation and the isentropic process equation. Differentiating the continuity equation, the gas state equation and the logarithm of the isentropic process equation, respectively, the relationship between the gas parameters and the channel cross-section can be obtained by combining with the momentum differential equation:  
\[\left\{ \begin{array}{ll}\frac{dA}{A}=\big{(}Ma^{2}-1\big{)}\frac{dv}{v}\\ \frac{dp}{p}=\frac{kMa^{2}}{1-Ma^{2}}\frac{dA}{A}\\ \frac{dp}{p}=\frac{Ma^{2}}{1-Ma^{2}}\frac{dA}{A}\\ \frac{dT}{T}=\frac{Ma^{2}(k-1)}{1-Ma^{2}}\frac{dA}{A}\end{array} \right. \tag{5}\]  
The energy equation is integrated and brought into the state parameters of the gas at points 1 and 2, combined with the ideal gas state equation and the continuity equation, the calculation formula of the leakage gas mass flow rate can be obtained:  
\[Q=\sqrt{\frac{M}{ZR}\frac{2k}{k-1}\frac{T_{1}-T_{2}}{\Big{(}\frac{T_{2}}{P_{ 2}A_{2}}\Big{)}^{2}-\Big{(}\frac{T_{1}}{P_{1}A_{1}}\Big{)}^{2}}} \tag{6}\]  
For the secondary expansion process two to three, ignoring the effect of the viscous resistance and heat transfer between the gas and the external space, it is regarded as an adiabatic process and described by the continuity equation and the momentum equation, and the relationship between the gas state parameters can be obtained:  
\[\left\{ \begin{array}{ll}\frac{v_{3}}{v_{2}}=1-\frac{1}{kMa_{2}}^{2}\Big{(} \frac{p_{3}}{P_{2}}-1\Big{)}\\ \frac{v_{3}}{v_{2}}=1+\frac{1}{1-kMa_{2}}^{2}\Big{(}\frac{T_{3}}{T_{2}}-1\Big{)} \end{array} \right. \tag{7}\]  
If the transportation distance, L, of the leaked gas in the pipeline is small, the gas transportation process (zero to one) and the leakage process (one to two) can be combined into a process (zero to two), which is considered to be the isentropic expansion process, and the initial velocity of the gas at point zero is assumed to be zero. Based on the above conditions, the relationship between the leakage rate and the gas state parameters and the Mach number can be obtained. The relationship between the gas state parameters and the Mach number can be expressed by the following equation:  
\[\left\{ \begin{array}{l}\frac{T_{2}}{T_{0}}=\frac{1}{Y_{2}}\\ \frac{p_{2}}{p_{0}}=\left(\frac{1}{Y_{2}}\right)^{\frac{k}{k-1}}\\ \frac{\rho_{1}}{\rho_{0}}=\left(\frac{1}{Y_{2}}\right)^{\frac{1}{k-1}}\end{array} \right. \tag{8}\]  
The relationship between gas leakage mass flow rate and the Mach number can be expressed by the following equation:  
\[Q=A_{or}p_{0}Ma_{2}\sqrt{\frac{kM}{ZRT_{0}}\left(\frac{1}{1+\frac{k-1}{2}Ma_{2 }{}^{2}}\right)^{\frac{k+1}{k-1}}} \tag{9}\]  
It can be seen from Equations (8) and (9) that as the gas pressure \(p_{2}\) in the leakage section decreases, the Mach number of the gas \(Ma_{2}\) and the leakage mass flow rate increase. Since the cross-sectional area of the leakage section is assumed to be constant, the maximum Mach number of the gas in the leakage section can only reach 1, \(Ma_{2}=1\). At this time, the gas in the leakage section is in a sonic flow state, and the leakage mass flow rate also reaches the maximum value. The maximum leakage mass flow rate can be expressed by the following formula:  
\[Q_{\max}=A_{or}p_{0}\sqrt{\frac{kM}{ZRT_{0}}\left(\frac{2}{k+1}\right)^{\frac{ k+1}{k-1}}} \tag{10}\]  
where \(Q_{\max}\) is the maximum leakage mass flow rate, kg/s.