Abstract:
Background The numerical simution of two-dimensional magnetohydrodynamics(MHD) is of great importance for understanding the evolution of magnetic fields and fluid flows in various physical systems. However, accurate and efficient simulation of MHD problems still faces challenges in handling the coupling between velocity and magnetic fields, the divergence-free constraint, and the parallel scalability of the algorithm.
Objective This paper aims to develop a two-dimensional magnetohydrodynamics (MHD) numerical method based on a local spectral method, and to evaluate its accuracy, stability, and parallel performance.
Methods In time advancement, a third-order Karniadakis (BDF3/AB3) semi-implicit splitting scheme is adopted, and each calculation step is decomposed into an “explicit prediction–projection–diffusion” process. For spatial discretization, a hybrid spectral discretization is adopted, which combines local FFT (fast Fourier transform) of MDLF/LFB in the x-direction and global FFT in the y-direction, and the sub-domain assembly is completed by folding continuation and interface matching.
Results 1)Introducing the magnetic field evolution into the chain of velocity projiection and diffusion solution.2) Establishing the Helmholtz sub-problem to magnetic diffusion and solving it together with velocity diffusion..For spatial discretization,a hybrid spectral discretization of local FFT(fast Fourier transform)of MDLF/LFB in the x-direction and global FFT in the y-direction is adopted,and the sub-domain assembly is completed by folding continuation and interface matching.The numerical example of the linear incompressible Alfvén wave shows that the phase and dispersion errors remain stable over time ;in the numerical example of the decay of the Taylor-Green type structure, The decay laws of kinetic enery/magnetic energy can be accurately reproduced, \nabla \cdot \bfu and \nabla \cdot \bfB the divergence-free constraints of and are strictly satisfied,.3)Verify through small-scale shared memory,the parallel test results show that the overall speed-up ratio of a single step of this method can reach 2.5-5.0.
Conclusion The proposed method is effective for the numerical simulation of two-dimensional MHD. It can accurately reproduce the decay laws and maintain the divergence-free constraints, while achieving satisfactory parallel speed-up. The method provides a reliable approach for further large-scale MHD simulations.