SPH & Hierarchical tree method

July 29th, 2009

I now have a fairly good understanding of the mathematics behind SPH.  It is fundamentally a fluid technique.  The fact that it uses “particles” to represent the fluid does not make it an N-body method. The “particles” are merely tracers–a way to store the data describing the fluid properties at various points in space.  There are two levels of smoothing involved when the method is used for gravitationally interacting fluids.  First there is the ordinary smoothing, characterized by the smoothing length h. This parameter determines the size of the smoothing kernel–essentially the spatial extent of each particle.  The second type of smoothing is called “softening”.  It is characterized by the softening length \varepsilon and its purpose it to avoid singularities or near-singularities in the gravitational potential.  Thus SPH-based galaxy simulations codes cannot resolve fine details such as individual stars in galaxies unless the smoothing and softening parameters are set to zero, in which case the technique is really no longer SPH.  The method also has great difficulty handling shocks properly with a finite number of particles.

The hierarchical tree method is a way of improving the efficiency of N-body simulations by effectively smoothing the distant particle distribution.  In the TreeSPH code, which was the precursor to GADGET, an oct-tree is created which allows the particles to be sorted spatially.  Multipole moments of blocks of space are calculated in the process of contructing the oct-tree.  for each particle, the gravitational force is calculated by descending down the oct-tree toward that particle and collecting data along the way.  The nearest-neighbor particles are treated as pure particles and gravitational forces are computed directly as in an N-body code.  The field of the next-nearest neighbors is calculated form the multipole moments of small “cells” of space.  As the distance from the particle increases, the cells grow larger.   This approximation greatly improves the efficiency of the force calculation.

Other than learning about SPH and TreeSPH, I’ve been tinkering with C++, just getting some practice and becoming more familiar with the compiler.  I’ll read a description of the GADGET-2 code.  I found out that it is written in C and it uses MPI, rather than OpenMP.

I’ve installed IFrIT, which looks like a good tool for visualizing output from the simple programs that I plan to write this summer. sites.google.com/site/ifrithome/Home

Sagittarius A* , Jets, visualization

July 27th, 2009

It turns out that reading Binney and Tremaine has paid off. It’s much easier to read research papers now that I know a large portion of the vocabulary.

Today I read an annual review about Sagittarius A* at the center of the Milky Way. It was a pretty rich source of information. The most interesting part was the discussion of the processes which might cause the jets associated with AGN (the ideas which had been proposed as of 2001, anyway)

I read a great paper by John Dubinski called “Visualizing astrophysical N-body systems”. The paper gives an overview of the history of N-body simulations and visualizations, describes visualization fundamentals, describes the state of the art techniques,  and discusses what will be done next.  I’m interested in getting a copy of Dubinski’s MYRIAD visualization software library, since it is apparently the best and it’s free.  It may be more practical to use one of the simpler codes mentioned in the paper first though.  Unlike the space weather world that I was working in, the galactic simulation world seems to be almost entirely open-source!

Dubinski’s paper led me to one of the first N-body animations from the 1970s: mindcine.com/toomre/

links to all papers discussed in this research log can be found in the reading list

Finished with Binney & Tremaine

July 24th, 2009

I have finished reading Binney and Tremaine’s  Galactic Dynamics book. I will read the updated material from the second edition of the text next week.

I’ve compiled a rather long list of reading material here.  The list includes Annual Reviews, papers by Gaby, Bruno, and Phil Hopkins et al. as well as papers on n-body simulation, SPH, and the GADGET code.

I am also compiling a list of useful links here.

The reading list and various programming projects should occupy my time for the next few months.

Stellar collisions, binaries, core collapse

July 22nd, 2009

I finished reading an introduction to stellar collisions, the formation and effects of binaries, and core collapse.  The topics are interrelated and must be included in a good galaxy simulation.  The problem is that properly modeling the interactions between stars while simultaneously modeling the global galaxy evolution is very computationally expensive.  However it is necessary if the formation and growth of black holes in the nuclei of galaxies and globular clusters is to be consistently modeled.

Kinetic theory & GADGET-2

July 21st, 2009

After a bit of tinkering I was able to compile “Hello World!” programs in Fortran and C++.  Now I need to figure out which one would be better to use for the upcoming programs and I need to learn more about Python.

I discovered that Phil Hopkins is a year younger than me and he is now a post-doc at Berkeley. He and many of the other people in this field use the same code called GADGET-2: http://www.mpa-garching.mpg.de/gadget/.

I began reading about the application of kinetic theory to gravitationally bound particles today. I already had an introduction to the subject when I was reading for my proposal assignment, so it was nice to see the theory presented more thoroughly. The most interesting feature, theoretically speaking, is the negative heat capacity caused by gravitation. Removing energy from a system with negative heat capacity makes the system’s temperature increase!

As with much of the rest of the book, this section contains some silly attempts to derive analytic approximations for things which can only be studied properly through simulation.  Analytic arguments in systems as complex and asymmetric as clusters and galaxies seem to only be useful for building a vocabulary with which to describe phenomena.

Dynamical friction

July 19th, 2009

I’ve begun reading about collisions of galaxies.  The first topic in the chapter was dynamical friction.  There is a very clever derivation in section 7.1 of Binney and Tremaine.  If I taught a class on galactic dynamics, I would definitely include this derivation.

Spiral structure summary and Warps

July 18th, 2009

I finished reading the introduction to spiral structure.  This entry is a very brief overview.

Observations: The vast majority of spiral arms are observed to be trailing the rotation of the stars (i.e. the relationship between the pattern and rotation direction is the same as in the case of hurricanes  and cyclones on Earth).  Most spiral galaxies containing prominent arms only have two spiral arms, but some have more. The number density of all stellar types is higher in the arms, but the distribution of young blue stars is much narrower than the older stars.

Anti-spiral theorem and consequences: If spiral galaxies are in a steady state, the cause of the spiral pattern cannot be solely time-reversible physics. Otherwise, trailing patterns and leading patterns would be equally likely.   If time-reversible processes are the cause of the arms, then spiral galaxies are not in a steady state.

Lin-Shu hypothesis: Spiral arms are quasi-static density waves.  The density wave is caused by a combination of orbital resonances in a rotating potential and instabilities which arise in thin (quasi 2D) potentials.  The Swing Amplifier helps to enhance the pattern. Stars and clouds of gas drift into and out of the arms but the overall pattern is relatively fixed.

Swing amplification: A disturbance (density perturbation) which is arranged in a leading, rather than trailing, pattern unwinds, then propagates through the central part of the galaxy and emerges as an amplified disturbance with a trailing pattern.  This was not explained very well in the text.

Some alternatives to Lin-Shu: Spiral arms could be transient and in a state of constant renewal.  There is a “detonation wave” theory that states that star formation induces more star formation and thus the spiral arms are like the front line of a forest fire.  Some spirals could be induced from the recent interaction between galaxies or from the perturbations due to a satellite galaxy.  The spirals could also be caused by the rotating oval or bar-shaped potential at the center of the galaxy.


Warps: Disk galaxies are observed to be “warped” on their outer edges.  If a cylindrical coordinate system is defined at the center of the galaxy with z perpendicular to the disk, the matter in the outer regions is seen to be displaced in the +z direction in some regions and in the -z direction in other regions.  The cause of this warping is not understood.

Spiral structure

July 16th, 2009

Today I began reading about various theories of spiral structure formation.  This is a very interesting topic–mostly because no one has conclusively explained the phenomena.  There are several hypothesis about how the spiral structure forms and evolves.  I’ll summarize some of the ideas on Saturday after I finish reading an overview of the subject.

Stability and Python

July 15th, 2009

I have now read the first half of Binney and Tremaine.  Today’s main topic was the stability of self-gravitating systems of particles.  As of the late 1980′s the purely analytical methods for determining stability were clever, but not very applicable to real galaxies.  At least one of the “laws” described in the text was known to not agree with numerical simulations of N-body systems.

I’m considering the possibility of using Python along with either C++ or Fortran when I write the programs this summer and fall.  Python is very powerful and essentially platform-neutral.  It’s supposedly easy to learn, and it has a huge library.  There is even a module called Pyfits that enables FITS file manipulation.  I’ve seen people use  Python very effectively in data visualization, of course it requires finding the right software for the visualzation task at hand.  Python just serves as the glue that holds the main structure together.  I’ll have to ask Andrew Corrigan more about this since he’s an expert.  That reminds me:  I need to find out what people are working on in some of the other departments at UCR.

Equilibrium & relaxation

July 14th, 2009

Today I completed chapter 4 of Binney and Tremaine. The key topics were equilibrium configurations and relaxation processes. Toward the end of the chapter, numerical simulation of the relaxation process was discussed. I’m becoming more exciting about writing and testing the simple N-body codes so I can see this first-hand.