This paper presents the development and validation of a Magnetohydrodynamics (MHD) module integrated into the Xcompact3d framework, an open-source high-order finite-difference suite of solvers designed to study turbulent flows on supercomputers. Leveraging the Fast Fourier Transform library already implemented in Xcompact3d, alongside sixth-order compact finite-difference schemes and a direct spectral Poisson solver, both the induction and potential-based MHD equations can be efficiently solved at scale on CPU-based supercomputers for fluids with strong and weak magnetic field, respectively. Validation of the MHD solver is conducted against established benchmarks, including Orszag-Tang vortex and MHD channel flows, demonstrating the module's capability to accurately capture complex MHD phenomena, providing a powerful tool for research in both engineering and astrophysics. The scalability of the Xcompact3d framework remains intact with the incorporation of the MHD module, ensuring efficient performance on modern high-performance clusters. This paper also presents new findings on the evolution of the Taylor-Green vortex under an external magnetic field for different flow regimes.PROGRAM SUMMARYProgram Title: Xcompact3dCPC Library link to program files:https://doi.org/10.17632/z835zbbs8g.1Developer's repository link:https://github.com/Xcompact3d/Xcompact3dLicensing provisions: BSD 3-Clause LicenseProgramming language: FortranNature of problem: Magnetohydrodynamics.Solution method: High-order finite-difference method and spectral based Poisson solver.Additional comments including restrictions and unusual features: Heterogeneous parallel capabilities with GPUs are under active development.
Read full abstract