Magnetohydrodynamics modeling in Python : simulating magnetic fluids.
The purpose of this work is to present a gentle first introduction to numerical magnetohydrodynamics at the advanced undergraduate level. We first present the necessary background physics, building up the magnetohydrodynamics equations piece by piece. Then, we present numerical methods to discretize the equations. In addition to the traditional finite difference method, we present stable and nonstandard discretization methods employed in THE.ARGO, a minimalist magnetohydrodynamics code written in Python by this author. A backtracking scheme is used to discretize advection and diffusion and is guaranteed to be stable. Our nonstandard discretization is an atypical use of Fast Fourier Transforms to find the fluid pressure. Last, we present test problems validating the physical accuracy of THE.ARGO's unusual methods. We hope this work will provide students with some foundation before delving into the nasty traditional codes written in C and Fortran. Additionally, we hope the scientific community may benefit from our presentation of the nonstandard techniques we used to discretize the magnetohydrodynamics equation. Unlike common methods, our schemes guarantee stability, allowing larger time steps than the Courant conditions permits.
Show FileMIME type:application/pdf