## 3 Numerical Modeling  
### Governing Equations  
Numerical simulations are necessary to understand the gas-dynamic processes and piston or projectile movement, and they are straightforward and provide detailed information. A simulation is also a simple method to identify and assess new operating parameters of the test conditions without risk to the facility and hardware, as well as for the validation of new design concepts. The two-stage gas gun driven by detonation involves detonation, flow of gas, motion of the piston and projectile, energy dissipation, and other complex chemical and physical phenomena. A two-dimensional axisymmetric investigation of the tube flows by solving the unsteady Navier-Stokes equation coupled with the heat conduction equation would be a more appropriate method. However, modeling all phenomena in detail is unrealistic in this method. For example, it is challenging to simulate the strong interactions between the detonation waves and the main diaphragm. In addition, the computer resources and simulation time are extensive, even for simple shock tube cases, not to mention the detonation tubes where complicated chemical reactions occur. Thus, a quasi-one-dimensional code is more attractive for the engineering design in the present study. The flow of gas is modeled by the quasi-one-dimensional equations, and the detonation process in the drive gas is described by the two-step chemical reaction model modified by [PERSON] et al. [24]. The equations, written in conservation form, are  
\[A\frac{\partial U}{\partial t}+\frac{\partial AF}{\partial x}-\frac{\partial A }{\partial x}H-S_{c}-AS_{w}\ =\ 0 \tag{2}\]  
where the state vector \(U=(\rho,\,\rho u,\,e,\,\rho\alpha,\,\rho\beta)^{T}\), the flux vector \(F=(\rho u,\,\rho u^{2}+p,\,(e+p)u,\,\rho\alpha u,\,\rho\beta u)^{T}\), the chemical reaction source term \(S_{c}=(0,0,0,\dot{\omega}_{\alpha},\dot{\omega}_{\beta})^{T}\), the wall pressure source term \(H=(0,p,0,0,0)^{T}\)  
Figure 4: Results of high-speed photography with a time interval of 13.3 μs; the projectile has a diameter of 30 mm and the velocity is 2481 m/s; the pressure in the target chamber is 5000 Pa. The optical window was 3320 mm away from the muzzle exit. and the wall-friction and heat-transfer source term \(S_{w}=(0,\,\tau,\,q,\,0,\,0)^{T}\); where \(\rho,\,u,\,e,\,p\), and \(A\) are the density, velocity, total energy, and pressure of the gas, and the cross-sectional area, respectively. \(\tau\) is the wall shear stress and \(q\) is the wall heat flux. \(\alpha\) and \(\beta\), which are associated with the two-step chemical reaction model describing the detonation process, are the process parameter of the chemical induction and the chemical transformation, respectively; \(\dot{\omega}_{\alpha}\) and \(\dot{\omega}_{\beta}\) are the rates of the chemical induction and the chemical transformation, respectively. For the details of this model, please refer to Ref. [24]. For the oxyhydrogen detonation, eight components, H\({}_{2}\), O\({}_{2}\), HO, H\({}_{2}\)O, H\({}_{2}\)O\({}_{2}\), HO\({}_{2}\), O, and H, are taken into account in the computations, and for the methane-oxygen detonation, CH\({}_{4}\), CO\({}_{2}\), and CO are added. Based on this chemical reaction model and the dispersion controlled dissipation scheme proposed by [PERSON] [25], a code has been developed and successfully applied to the simulations of detonation-driven shock tubes [26]. The situation of the two-stage gas gun differs from that of the shock tube due to the presence of the piston and projectile. To account for the effect of the piston or projectile on the gas flow, the motion of it is treated as the moving boundary conditions for the governing Equation (2). The acceleration of the piston or projectile is calculated from its mass and the applied force.