# Numerical Simulation and Design of a High-Temperature, High-Pressure Fluid Transport Pipe
## 2 Methodology and Implementation
### Theoretical Approach
#### 2.2.2 Gas Leakage  
The velocity, pressure, and temperature of the fluid in the chamber and the barrel can be determined from the following governing equations, which reflect the conservations of mass, momentum, and energy when a projectile moves with time. The set of equations that governs a compressible fluid flow include the continuity equation and the unsteady Navier-Stokes equation. These are solved using the Ansys Fluent CFD software in their conservation forms [21; 22]. The conservation of mass is represented by the continuity equation and can be written as  
\[\frac{\partial\rho}{\partial t}+\
abla\big{(}\rho\overset{\rightarrow}{v} \big{)}=S_{m}, \tag{12}\]  
where \(\rho\) is the density, \(t\) is time, \(\overset{\rightarrow}{v}\) is the velocity vector, and \(S_{m}\) is a source term that represents the mass added to the continuous phase from the dispersed second phase (e.g., due to vaporization of liquid droplets) and any user-defined sources. In other words, the source term refers to the external mass addition that occurs inside the system, not the boundary. The source term is assumed to be zero because there is no external mass added to inside the hand caliber, and gas leakage occurs at the boundary.  
The conservation of momentum is represented by the Navier-Stokes equation and can be expressed as  
\[\frac{\partial\left(\rho\overrightarrow{v}\right)}{\partial t}+\
abla\cdot \left(\rho\overrightarrow{v}\overrightarrow{v}\right)=-\
abla P+\
abla\left( \overrightarrow{\tau}\right)+\rho\overrightarrow{g}+\overrightarrow{f}, \tag{13}\]  
where P is the pressure, \(\overrightarrow{g}\) is the gravitation vector, and \(\overrightarrow{f}\) is the external body force. Here, the viscous stress tensor, \(\overrightarrow{\tau}\), is described as  
\[\overrightarrow{\tau}=\mu\left[\left(\
abla\overrightarrow{v}+\
abla \overrightarrow{v}\right)-\frac{2}{3}\
abla\cdot\overrightarrow{v}I\right], \tag{14}\]  
where \(\rho\overrightarrow{g}\) and I are the gravitational body force and unit tensor, respectively. As the fluid flow inside the hand caliber is mainly determined by the chamber pressure, these forces are neglected. \(\rho\overrightarrow{g}\) and \(\overrightarrow{f}\) are assumed to be zero.  
The total energy, E\({}_{\rm T}\), of the flow is described using the energy equation:  
\[\frac{\partial\left(\rho\mathrm{E}_{\rm T}\right)}{\partial t}+\
abla\left( \left(\rho\mathrm{E}_{\rm T}+\mathrm{P}\right)\overrightarrow{v}\right)= \
abla\cdot\left(\left(\mathrm{k}+\mathrm{k}_{\rm f}\right)\
abla\mathrm{T} \right)+\phi, \tag{15}\]  
\[\mathrm{E}_{\rm T}=\mathrm{h}-\frac{\mathrm{P}}{\rho}+\frac{\
abla^{2}}{2}, \tag{16}\]  
where h is enthalpy, which is related to the specific internal energy; k\({}_{\rm t}\) is the turbulent thermal conductivity, which depends on the turbulence model being used; k is the thermal conductivity; T is the temperature; and V is the velocity. Furthermore, \(\phi\) is the dissipation function that represents the work done against viscous forces, which is irreversibly converted into internal energy. Here,  
\[\phi=\left(\overrightarrow{\tau}\cdot\
abla\right)\overrightarrow{v}. \tag{17}\]