No Arabic abstract
Artificial resistivity is included in Smoothed Particle Magnetohydrodynamics simulations to capture shocks and discontinuities in the magnetic field. Here we present a new method for adapting the strength of the applied resistivity so that shocks are captured but the dissipation of the magnetic field away from shocks is minimised. Our scheme utilises the gradient of the magnetic field as a shock indicator, setting {alpha}_B = h|gradB|/|B|, such that resistivity is switched on only where strong discontinuities are present. The advantage to this approach is that the resistivity parameter does not depend on the absolute field strength. The new switch is benchmarked on a series of shock tube tests demonstrating its ability to capture shocks correctly. It is compared against a previous switch proposed by Price & Monaghan (2005), showing that it leads to lower dissipation of the field, and in particular, that it succeeds at capturing shocks in the regime where the Alfven speed is much less than the sound speed (i.e., when the magnetic field is very weak). It is also simpler. We also demonstrate that our recent constrained divergence cleaning algorithm has no difficulty with shock tube tests, in contrast to other implementations.
Numerical methods to improve the treatment of magnetic fields in smoothed field magnetohydrodynamics (SPMHD) are developed and tested. Chapter 2 is a review of SPMHD. In Chapter 3, a mixed hyperbolic/parabolic scheme is developed which cleans divergence error from the magnetic field. Average divergence error is an order of magnitude lower for all test cases considered, and allows for the stable simulation of the gravitational collapse of magnetised molecular cloud cores. The effectiveness of the cleaning may be improved by explicitly increasing the hyperbolic wave speed or by cycling the cleaning equations between timesteps. In the latter, it is possible to achieve DivB=0. Chapter 4 develops a switch to reduce dissipation of the magnetic field from artificial resistivity. Compared to the existing switch in the literature, this leads to sharper shock profiles in shocktube tests, lower overall dissipation of magnetic energy, and importantly, is able to capture magnetic shocks in the highly super-Alfvenic regime. Chapter 5 compares these numerical methods against grid-based MHD methods (using the Flash code) in simulations of the small-scale dynamo amplification of a magnetic field in driven, isothermal, supersonic turbulence. Both codes exponentially amplify the magnetic energy at a constant rate, though SPMHD shows a resolution dependence that arises from the scaling of the numerical dissipation terms. The time-averaged saturated magnetic spectra have similar shape, and both codes have PDFs of magnetic field strength that are log-normal, which become lopsided as the magnetic field saturates. We conclude that SPMHD is able to reliably simulate the small-scale dynamo amplification of magnetic fields. Chapter 6 concludes the thesis and presents some preliminary work demonstrating that SPMHD can activate the magneto-rotational instability in 2D shearing box tests.
We present an updated constrained hyperbolic/parabolic divergence cleaning algorithm for smoothed particle magnetohydrodynamics (SPMHD) that remains conservative with wave cleaning speeds which vary in space and time. This is accomplished by evolving the quantity $psi / c_h$ instead of $psi$. Doing so allows each particle to carry an individual wave cleaning speed, $c_h$, that can evolve in time without needing an explicit prescription for how it should evolve, preventing circumstances which we demonstrate could lead to runaway energy growth related to variable wave cleaning speeds. This modification requires only a minor adjustment to the cleaning equations and is trivial to adopt in existing codes. Finally, we demonstrate that our constrained hyperbolic/parabolic divergence cleaning algorithm, run for a large number of iterations, can reduce the divergence of the field to an arbitrarily small value, achieving $ abla cdot B=0$ to machine precision.
We present Phantom, a fast, parallel, modular and low-memory smoothed particle hydrodynamics and magnetohydrodynamics code developed over the last decade for astrophysical applications in three dimensions. The code has been developed with a focus on stellar, galactic, planetary and high energy astrophysics and has already been used widely for studies of accretion discs and turbulence, from the birth of planets to how black holes accrete. Here we describe and test the core algorithms as well as modules for magnetohydrodynamics, self-gravity, sink particles, H_2 chemistry, dust-gas mixtures, physical viscosity, external forces including numerous galactic potentials as well as implementations of Lense-Thirring precession, Poynting-Robertson drag and stochastic turbulent driving. Phantom is hereby made publicly available.
In numerical simulations, artificial terms are applied to the evolution equations for stability. To prove their validity, these terms are thoroughly tested in test problems where the results are well known. However, they are seldom tested in production-quality simulations at high resolution where they interact with a plethora of physical and numerical algorithms. We test three artificial resistivities in both the Orszag-Tang vortex and in a star formation simulation. From the Orszag-Tang vortex, the Price et. al. (2017) artificial resistivity is the least dissipative thus captures the density and magnetic features; in the star formation algorithm, each artificial resistivity algorithm interacts differently with the sink particle to produce various results, including gas bubbles, dense discs, and migrating sink particles. The star formation simulations suggest that it is important to rely upon physical resistivity rather than artificial resistivity for convergence.
Supersonic turbulence is believed to be at the heart of star formation. We have performed smoothed particle magnetohydrodynamics (SPMHD) simulations of the small-scale dynamo amplification of magnetic fields in supersonic turbulence. The calculations use isothermal gas driven at rms velocity of Mach 10 so that conditions are representative of star-forming molecular clouds in the Milky Way. The growth of magnetic energy is followed for 10 orders in magnitude until it reaches saturation, a few percent of the kinetic energy. The results of our dynamo calculations are compared with results from grid-based methods, finding excellent agreement on their statistics and their qualitative behaviour. The simulations utilise the latest algorithmic developments we have developed, in particular, a new divergence cleaning approach to maintain the solenoidal constraint on the magnetic field and a method to reduce the numerical dissipation of the magnetic shock capturing scheme. We demonstrate that our divergence cleaning method may be used to achieve $ abla cdot {bf B}=0$ to machine precision, albeit at significant computational expense.