Hydromagnetic waves in an expanding universe -- cosmological MHD code tests using analytic solutions
arXiv:2203.11887 · doi:10.1093/mnras/stac1882
Abstract
We describe how analytic solutions for linear hydromagnetic waves can be used for testing cosmological magnetohydrodynamic (MHD) codes. We start from the comoving MHD equations and derive analytic solutions for the amplitude evolution of linear hydromagnetic waves in a matter-dominated, flat Einstein-de-Sitter (EdS) universe. The waves considered are comoving, linearly polarized Alfvén waves and comoving, magnetosonic (fast) waves modified by self-gravity. The solution for compressible waves is found for a general adiabatic index and we consider the limits of hydrodynamics without self-gravity in addition to the full solution. In addition to these analytic solutions, the linearized equations are solved numerically for a CDM cosmology. We use the analytic and numeric solutions to compare with results obtained using the cosmological MHD code AREPO and find good agreement when using a sufficient number of grid points. We interpret the numerical damping clearly evident in simulations with few grid points by further deriving the Alfvén wave solution including physical Navier-Stokes viscosity. A comparison between Alfvén wave simulations and theory reveals that the dissipation can be described by a numerical viscosity coefficient where is the scale factor. We envision that our examples could be useful when developing a new cosmological MHD code or for regression testing of existing codes.
20 pages, 9 figures, published in MNRAS, python code available at https://github.com/tberlok/comoving_mhd_waves
References in corpus (15)
- Athena: A New Code for Astrophysical MHD
- Simulating cosmic structure formation with the GADGET-4 code
- Detecting shock waves in cosmological smoothed particle hydrodynamics simulations
- Large-scale dark matter simulations
- Resolved magnetic dynamo action in the simulated intracluster medium
- Cosmological MHD simulation of a cooling flow cluster
- The effect of magnetic fields on properties of the circumgalactic medium
- Introducing SPHINX-MHD: The Impact of Primordial Magnetic Fields on the First Galaxies, Reionization, and the Global 21cm Signal
- A small-scale dynamo in feedback-dominated galaxies - III. Cosmological simulations
- Magnetogenesis around the first galaxies: the impact of different field seeding processes on galaxy formation
- The impact of magnetic fields on cosmological galaxy mergers. I: Reshaping gas and stellar discs
- Primordial magnetic fields and CMB anisotropies
- WOMBAT: A Scalable and High Performance Astrophysical MHD Code
- Braginskii viscosity on an unstructured, moving mesh accelerated with super-time-stepping
- Cosmic magnetic fields with MASCLET: an application to galaxy clusters