# Safety Assessment of Gas Pipelines Crossing River through Hydrodynamic Analysis
## 2 Materials and Methods
### Numerical Models and Governing Equations  
To implement the hydrodynamic safety assessment, two widely applied models, HEC-RAS and SMS (RMA2 and SED2D), were employed. The HEC-RAS model was used to simulate long-term riverbed changes. The long-term simulation assumed that historical discharge patterns in the study area continued for a 20-year period, and flow rates were analyzed considering hydrological assessments from the river management agency. The operational lifespan of gas pipelines generally spans several decades, during which rivers undergo natural topographical changes and sediment transport processes. In the long-term simulation, a period of 20 years was set to evaluate these riverbed changes. This 20-year period enables the analysis of how cumulative riverbed variations over this duration affect the stability of the pipelines. This facilitates the identification of long-term risk factors and the establishment of preventive maintenance and management strategies. Riverbed changes were analyzed using design frequencies and flood volumes as outlined in the river management plan. The governing equations for the 1D unsteady flow analysis in HEC-RAS consist of the continuity equation and the momentum equation. The continuity equation represents the concept of mass conservation within the system and is expressed as follows:  
\[\frac{\partial A}{\partial t}+\frac{\partial Q}{\partial x}-q_{1}=0 \tag{3}\]  
where  
\(x=\) Distance along the channel;  
\(t=\) Time;  
\(Q=\) Flow rate;  
\(A=\) Cross-sectional area;  
\(q_{1}=\) Lateral inflow unit distance. Equation (3) represents the principle of mass conservation within a river system. Rather than a traditional algebraic equation, it serves as a continuity equation, explaining the temporal and spatial variations in flow and cross-sectional area. This equation can be interpreted as follows. \(\frac{\partial A}{\partial t}\) represents the rate of change of the cross-sectional flow area over time, \(\frac{\partial Q}{\partial x}\) expresses the spatial rate of change of the flow rate, and \(q_{1}\) refers to the lateral inflow per unit distance along the river channel. This equation balances the inflow and outflow, ensuring mass conservation within the system. It is used to calculate how flow evolves over time, accounting for lateral inflows and spatial variations in flow. This relationship is essential for the accurate hydrodynamic modeling of rivers. The momentum equation is based on the principle that the change in momentum is equal to the external forces acting on the system and can be expressed as Equation (4) for a single reach. \[\frac{\partial Q}{\partial t}+\frac{\partial(VQ)}{\partial x}+gA\left(\frac{ \partial z}{\partial x}+S_{f}\right)=0 \tag{4}\]  
where  
\(g=\) Acceleration of gravity;  
\(S_{f}=\) Friction slope;  
\(V=\) Velocity. Detailed theoretical background information can be found in the _Hydraulic Reference Manual_ published by the HEC-RAS river analysis system [37]. The SMS model was applied to calculate the hydrodynamic flow behavior and interpret the extent of riverbed changes. Floods are major factors that rapidly increase river flow velocity and discharge, promoting changes in the riverbed and riverbanks. Under such extreme hydrodynamic conditions, buried gas pipelines are at a higher risk of exposure or damage. Therefore, in the short-term simulation, potential flood events were modeled to evaluate the stability of the pipelines under extreme conditions. This approach allows for the analysis of immediate impacts on the pipelines during flood scenarios and the identification of risk factors. RMA2 of the SMS model was utilized to derive velocity field results corresponding to flood occurrences. Additionally, short-term riverbed changes were simulated using the sediment transport model, SED2D, in the SMS suite. The governing equations of RMA2 and SED2D are as follows. RMA2 solves the depth-integrated equations of fluid mass and momentum conservation in two horizontal directions. \[