SHASTA(Sharp and Smooth Transport Algorithm)是求解二维磁流体动力学问题的单一网格程序.在将其用于磁重联问题的数值模拟时,它被修改成为采用自适应网格方法的程序.修改后的程序可以针对扩散区进行细化计算.在SHASTA程序的自适应计算实现过程中,采用了插入式的自适应修改策略,原二维磁流体力学偏微分方程的求解算法被作为独立单元使用.另外,修改中使用分层的数据结构,将每个细化层次的物理量用二维可变数组描述,并标记磁场和压强分布的陡变区为细化区域,再通过插值的方法得到细化层网格点上的物理量分布和边界条件,最后细化区域的细化计算结果被赋予给其上一层网格,并对其内容进行更新.采用细化计算进行的磁重联的模拟实验表明,相比单一网格计算,细节分辨率得到提高,相应的计算时间的增加则与模拟中的参数选择有关;而自适应程序部分带来的计算精度和稳定性的影响则依赖于边界设置、单步长的推进策略和插值算法.
SHASTA is an explicit code with single grid to solve the resistive magnetohydrodynamics (MHD) equations and is modified via the self-adaptive mesh refinement technique to deal with the magnetic reconnection problems in this paper. Then, the new code is applied to perform the refined calculations in the magnetic diffusion regions, simulating the 2-D unsteady process of the magnetic reconnection. In the process of modifying the single grid SHASTA code, the "plug-and-play" strategy is used and the original algorithm to solve MHD equations is treated as an independent cell. In the calculation, the single data mesh structure is replaced by the hierarchical data structure and parameters on each refined level are described by a 2-D adjustable array. When monitoring the magnetic field and the pressure in the whole simulation domain, the regions where the relevant parameters manifest the largest gradient are flagged, then the boundary conditions and the parameter distributions on the level of refined meshes are deduced via interpolations. Finally, the results of calculations on the refined mesh levels are assigned to the previous level and the existing results are updated. This process is iterated until the calculations carried out in both the refined region and the whole domain region are completed. Compared to those obtained from the old code, the numerical simulation results of the magnetic reconnection performed on the refined meshes manifest rich physical details. The corresponding time used in the experiment of the refined meshes increases apparently, which is related to the selection of the initial parameters in the simulation. On the other hand, the accuracy and the stability of the calculation depend on the boundary condition, the strategy of the integration over each single step as well as the algorithm for interpolation.