# Multi-Region OpenFOAM Solver Development for Compact Toroid Transport in Drift Tube
## 4 Numerical Simulation of CT Magnetohydrodynamics
### Influence of Inner Electrode End Geometry on CTs  
By comparing the simulation results of the cylindrical inner electrode and the conical inner electrode, significant differences in the magnetic field evolution of the compact toroid under the two structures can be observed. Figure 9a,b, respectively, show the distributions of poloidal magnetic flux at time \(t=0,\ 2,\ 5\ \upmu\)s in the two cases. The definition of poloidal magnetic flux is  
\[\psi_{pol}=\int B_{z}\cdot dS_{p} \tag{37}\]  
where \(S_{p}\) is a circular area with radius \(r\) starting from the \(z\)-axis. The color shade reflects the magnitude of the magnetic flux. The scale above represents the coordinate along the \(z\)-axis in meters. The results show that in the case of the cylindrical inner electrode, the originally closed magnetic field structure near the end region of the inner electrode (located near the \(z\)-axis) is disrupted, and the outer magnetic field is stretched in the negative z-direction. In contrast, under the conical inner electrode structure, the magnetic field structure is better preserved, and the overall distribution is more complete.  
In addition, Figure 10a,b show the distribution of density and magnetic flux density magnitude along the radial direction (r-direction) near the CT density peak (located at \(z=0.305\) m for Case 1 and \(z=0.335\) m for Case 2) at time \(t=5\ \upmu\)s. The comparison clearly shows that under the conical inner electrode configuration, the density peak is steeper and more concentrated (the maximum density for the cylindrical inner electrode is approximately \(6.4\times 10^{-5}\) kg/m\({}^{3}\), and that for the conical inner electrode is approximately \(8.1\times 10^{-5}\) kg/m\({}^{3}\)), indicating that the introduction of the transition region improves the confinement effect of the CT. Meanwhile, in the area near the \(z\)-axis, the magnetic field strength under the cylindrical inner electrode is generally slightly higher, which is likely caused by velocity non-uniformity.  
Based on the spatial distribution of velocity, Figure 10c,d compare the velocity components in the radial direction, including the radial component \(U_{r}\) and the axial component \(U_{z}\). Figure 10c displays results for Case 1 at \(t=0.5\ \upmu\)s, \(z=-0.1\) m; Figure 10d displays results for Case 2 at \(t=1\ \upmu\)s, \(z=-0.05\) m. (Here, the z-coordinates indicate locations where velocity variations are most pronounced, and the times correspond to moments when the compact torus traverses these positions.) A considerable variation in velocity is observed in the region \(0\ \text{m}\leq r\leq 0.03\ \text{m}\) under the configuration of a cylindrical inner electrode. In the case of the conical inner electrode, the presence of a transitional region effectively reduces the velocity gradient in the corresponding area, resulting in a smoother propagation process of the CT.  
This indicates that the geometric structure at the end of the inner electrode has a significant influence on the motion of the CT within the drift tube. In addition to serving as an accelerating component in the acceleration zone, the inner electrode also acts as a perfectly conducting wall, providing effective confinement for the CT. However, for a cylindrical inner electrode, this confinement effect abruptly disappears at the electrode's terminal point, where the original wall boundary is suddenly replaced by a free boundary, leading to rapid changes in both magnetic field and velocity in that region. By incorporating a conical transition section at the end of a cylindrical inner electrode, the velocity variation can be effectively mitigated, thereby facilitating stable transport of the CT. Moreover, this structural modification significantly enhances the confinement capability and better preserves the integrity of the magnetic field configuration.  
Figure 9: (**a**,**b**) display the simulation results for Case 1 and Case 2, respectively, showing the distribution of poloidal magnetic flux at \(t=0,\,2,\,5\,\upmu\)s.