What you need to know about SPH

What you need to know about SPH

Paper title: Smoothed Particle Hydrodynamics: Things I wish my mother taught me Author: D. J. Price Author’s Affiliation: Monash Centre for Astrophysics (MoCA), School of Mathematical Sciences, Monash University, Vic 3800, AustraliaThe title of this article caught my eye on the arXiv for two reasons: rarely do authors mention their mother in a paper, and like the author I also wished that my mother (or anyone) had taught me about smoothed particle hydrodynamics. The author soon clarifies that actually it was his PhD supervisor, not his mother, who he wishes had taught him the important details related to simulations, so in fact the rest of the paper pays no further attention to family ties. But, the subject of smoothed particle hydrodynamics (SPH) still fascinates me, and seems to be extremely relevant to current astronomy, so I will summarize the topic here. I should also make the disclaimer that I have never used SPH, so what I present is merely what I have learned from reading the paper.Fundamentals: SPH is a computational method used to model flows, and it is used in a variety of subjects including astrophysics and oceanography. It begins with a known distribution of point-mass particles, and computes density such that density is independent of the following particle characteristics: (1) the absolute positions of the particles, (2) arbitrary rotations, and (3) histories of the particles. Summing up the density comprises what the author calls the fundamental axiom of SPH, as it use discrete particles of fixed mass to describe fluid properties. The resolution of the method (or the smallest step-size that one can take) depends on the...
The Limitations of Smoothed Particle Hydrodynamics

The Limitations of Smoothed Particle Hydrodynamics

Smoothed Particle Hydrodynamics (SPH) is one of the most commonly used techniques for simulating astrophysical fluids. This particular paper focuses on a regime of gas dynamics that is often neglected in astronomy: subsonic turbulence. Just as the air in the upper atmosphere exhibits random motions that can buffet an airplane cabin, the gas in interstellar space also exhibits random, turbulent motions.

Running your first SPH simulation

Running your first SPH simulation

Today’s astrobite will be a sequel to a post I wrote a few months ago on using the smoothed particle hydrodynamics (SPH) code Gadget-2. In the first post, I went over how to install Gadget and showed how to run one of the test cases included in the Gadget distribution. Today, I’d like to show how to set up, run, and analyze a simple hydrodynamics test problem of your own.Perhaps one of the oldest topics in astrophysics is the study of binary stars. In 1767, the British natural philosopher John Michell used an early form of statistical analysis to show that the number of closely separated pairs of stars in the night sky is far higher than what one might expect from a randomly distributed field of stars. How do these binary pairs form? Modern astrophysics offers several answers, and in today’s post, we will focus on one possible mechanism: the direct formation of a binary star pair by the collapse of a rotating isothermal sphere of gas.We will approach this problem using a formulation first proposed by Alan Boss and Peter Bodenheimer in 1979 and later modified by Andreas Burkert and Peter Bodenheimer in 1993. The so-called standard isothermal test case models the gravitational collapse of a one solar mass, spherical, rigidly rotating molecular cloud with a small-amplitude m = 2 density perturbation.If we wish to simulate the collapse, we first need to set up the initial conditions for the simulation.  You can obtain initial conditions files from the following url: http://ngoldbaum.net/astrobites/SICtest.tgz. You can also generate your own initial conditions using the supplied codes. To summarize, the initial conditions are...
Installing and Running Gadget-2

Installing and Running Gadget-2

This is the first of two posts detailing how to install and operate the Gadget-2 hydrodynamics code. Click here for the second post in the series.Today’s astrobite will be another in a series on career advice and useful astronomical tools.  So far, it looks like there’s been a dearth of posts on the tools of theoretical astrophysics, so I thought I’d take the opporunity to show how easy it is to run a simulation using Gadget-2, a smoothed particle hydrodynamics (or SPH) code.  Gadget-2 is open source and publically available, so anyone can run simulations with it.  In a future post, I’ll discuss how to set up and run a simple hydrodynamics test problem.The instructions for installing Gadget-2 will be highly platform dependent.  If you’re running Linux or UNIX, you have all of the tools you will need to compile the codes already. If you’re on a Mac, you’ll need to install and update Xcode, which includes all of the compilers you will need.  On Windows, you’ll probably need to install cygwin which will give your Windows installation full UNIX support. Since I have a Mac, I’m going to focus on getting these codes working on OS X Snow Leopard.  If you have a different system, it might not be possible to follow my instructions exactly.  I’ll be doing all of the simulations for this series of posts on my laptop, a Macbook Pro.First, you will need to download a few software packages. Gadget 2.0.7. Version 1.9 of the GNU scientific library (GSL). Version 2.1.5 of the FFTW fast Fourier transform library. A Message Passing Interface (MPI) library such...