AFiD-MHD: A finite difference method for magnetohydrodynamic flows

被引:0
|
作者
Bader, Shujaut H. [1 ]
Zhu, Xiaojue [1 ]
机构
[1] Max Planck Inst Solar Syst Res, D-37077 Gottingen, Germany
关键词
ROTATING SPHERICAL-SHELL; HEAT-TRANSFER; INNER-CORE; CONVECTION; MAGNETOCONVECTION; SIMULATION; GEODYNAMO; CODE; EQUATIONS; MODELS;
D O I
10.1016/j.jcp.2024.113658
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
In this work, we present a three-dimensional (3D) finite difference solver for magnetohydrodynamic flows under the assumption of Boussinesq convection in a plane layer. Following the approach of Verzicco and Orlandi (J. Comput. Phys., vol. 123, 1996) for non-magnetic flows, the components of the velocity and magnetic vector fields are discretized on a staggered grid using a conservative second-order centered finite difference scheme. The equations in the primitive variables are advanced in time with a fractional-step third-order Runge-Kutta (RK3) scheme, in combination with the Crank-Nicolson scheme for the implicit terms. At the end of every time step, the divergence free condition on the magnetic field is imposed via a scalar divergence-cleaning step with a modified, staggered stencil that involves the projection of the magnetic field computed by the finite difference scheme onto the subspace of divergence free fields. It is shown that the projection method has minimal impact on the order of accuracy of the base scheme. Additionally, in an alternative implementation, the solenoidality of the magnetic field is also ensured by recasting the induction equation in terms of a vector potential, and the application of the Coulomb gauge which assumes the vector potential to be divergence free. The method is also able to handle the governing equations in the quasi-static limit; where a strong imposed magnetic field simplifies the system of equations to an explicit computation of the Lorentz body force. The solver is parallelized using MPI where the domain is pencil-decomposed in the two periodic directions. Based on this parallelization, only the diffusive terms with the derivatives in the wall-normal direction are treated implicitly. In the case of plane layer dynamo simulations, the code is validated for perfectly conducting and pseudovacuum BCs at different Rayleigh (Ra), Prandtl (Pr), magnetic Prandtl (Pm) and Ekman (Ek) numbers. In addition to that, validation for the cases of two-dimensional and three-dimensional quasi-static magnetoconvection close and away from the onset of convection is also demonstrated.
引用
收藏
页数:21
相关论文
共 50 条