AFiD-MHD: A finite difference method for magnetohydrodynamic flows

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 ( R a ) , Prandtl ( P r ) , magnetic Prandtl ( P m ) and Ekman ( E k ) 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.

Authors

Institutions

Publication Details

Journal
Journal of Computational Physics
Published
2024-12-06
DOI
https://doi.org/10.1016/j.jcp.2024.113658
Citations
2
Primary Topic
Fluid Dynamics and Turbulent Flows
Type
article
Field-Weighted Citation Impact
0.75

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

AFiD-MHD: A finite difference method for magnetohydrodynamic flows

Shujaut H. Bader, Xiaojue Zhu
2 citations
Journal of Computational Physics
Fluid Dynamics and Turbulent Flows
0.75
article

AFiD-MHD: A finite difference method for magnetohydrodynamic flows

Shujaut H. Bader, Xiaojue Zhu
article en
2 citations

Abstract

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 ( R a ) , Prandtl ( P r ) , magnetic Prandtl ( P m ) and Ekman ( E k ) 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.

Journal of Computational PhysicsVol. 523
Max Planck Institute for Solar System Research (DE)
Alexander von Humboldt-Stiftung, Deutsche Forschungsgemeinschaft, Max-Planck-Gesellschaft
Openalex Percentile: Top 31%
Fluid Dynamics and Turbulent Flows
0.75
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.