Simulation trails improve accuracy and efficiency in astrophysical simulations

Harnessing expert user insight into simulations gives a promising technique to reduce computational time and improve efficiency in astrophysical simulations.
04 May 2007
Rick Walker, Peter Kenny, and Jingqi Miao
Computational fluid dynamics (CFD) simulation is a powerful tool for astrophysicists investigating cosmological phenomena such as star formation. It provides a basis for testing hypotheses concerning the physical processes occurring in space, where direct experimentation is not possible. Smoothed particle hydrodynamics1 (SPH) is widely used for CFD simulations in astrophysics. A mesh-free approach, it simulates a set of representative particles as they evolve over time. Larger numbers of particles give more accurate results but at the cost of increased computation time. Also, as the particles get closer together the time step used must be decreased to maintain stability. The overall behavior, as shown in Figure 1, involves constraints that can be prohibitive for scientists working with personal computer hardware. Furthermore, since the particles move around, there is no guarantee that areas of interest will contain enough particles to be resolved well.


Figure 1. The execution time to reach a given time point vs number of particles for the old SPH simulation is shown. The execution time increases roughly quadratically with the number of particles.

There are several approaches for tackling the computational complexity issues of SPH. Bate et al.2 place particles in ‘bins’ according to the time step size that each requires, and advance them individually. This ensures the simulation advances at a sensible rate but does not address accuracy concerns. Kitsionas and Whitworth3 apply an automated splitting algorithm to particles to give a guaranteed resolution for the simulation and to ensure that physically based criteria are met. However, it can be hard to determine appropriate values for these criteria. We are working on a new approach called ‘simulation trails’4 that aims to increase both the accuracy and the efficiency of SPH simulations by allowing expert input into a simulation as it progresses.
Our approach, a form of computational steering, involves running the simulation twice: a low particle-count preview run followed by a high particle-count final run. The resolution for the first run is chosen such that the simulation advances quickly enough for interactive feedback. We allow users (experts in the domain) to indicate, on visualizations of the preview results, which regions of space they consider to be interesting. This selection, which may be varied as the simulation advances, forms a ‘trail’ in 3D space marking which areas are important and when. The trail is then followed at a higher resolution using more particles. At each time step, particles within the trail may be split if necessary to maintain a sufficient resolution in that region. Hence the higher resolution and associated higher computational costs are targeted only where and when they are required.
Our application also provides multiple-view visualizations of the current state of the simulation. The user can view isosurfaces, slices, and direct 3D views (see Figure 2) for any of the properties of the particles (density, temperature, chemical composition, etc.). Each of these views supports rotation, zooming, and filtering. Views can be linked so that changes to one view automatically affect the others to which it is linked. This is useful for exploring correlations between properties.


Figure 2. Three views (a 3D plot, an isosurface, and an isoplane) from a multiple-view visualization of Eagle Nebula simulation data from Miao et al.5 The views are linked such that changes to the viewing position or angle of any one view is propagated to the others. This encourages simultaneous exploration of views.
The user selects a region of 3D space by ‘painting’, in broad strokes, on any view. The application then automatically updates the other views to show this selection in context. A user will typically wish to select areas containing interesting features that are currently under-resolved. The process may be repeated for other time steps.

The resulting trail, consisting of areas of space and the periods of time during which they are interesting, is applied when the simulation runs for the second time with a much higher number of particles. The outcome is a set of results that has greater accuracy than a conventional SPH simulation (without splitting) but requires less computation time than results from other existing approaches that involve particle splitting. Figure 3 compares results from our new software with those from a conventional SPH simulation.


Figure 3. (a) The original data with a trail area marked in yellow. Advancing 50 time steps from (a) with no trail results in (b). Advancing 50 time steps from (a) with the trail as indicated results in (c). The highlighted region in (c) contains four times as many particles as in (b), which results in much better resolution.
Simulation trails are a promising technique for improving the overall efficiency of SPH simulations. Our results show that better results can be obtained in less time by harnessing the knowledge of an expert user during the simulation process. Our next steps will be to apply this technique in detail to specific astrophysical problems and to investigate more intuitive ways of highlighting features and mapping trails.



Rick Walker, Peter Kenny
Computing Laboratory,
University of Kent
Canterbury, United Kingdom

Rick Walker is a PhD student in the Computing Laboratory at the University of Kent. He is working in the fields of visualization and computational steering. His current research interests deal with exploratory simulation.
Peter Kenny is a lecturer in computer science at the University of Kent with interests in scientific computing, computer graphics, and image processing. He earned his doctorate in physics from the University of York and has held posts at the Universities of York, Bradford, and Kent and with Plessey Research.
Jingqi Miao
Centre for Astrophysics and Planetary Science,
University of Kent
Canterbury, United Kingdom

Jingqi Miao obtained her BSc (physics) and her MSc (theoretical physics) at Jiangxi Normal University in China and her PhD (theoretical physics) at Hull University in England. She worked as a postdoc in the Engineering Department at Queen Mary College, University of London, from 1998-2000, and as a postdoc in physics at Queen Mary College from 2000-2001. Since 2001, she has worked for the School of Physical Science at the University of Kent as a lecturer.


References:
1. R. A. Gingold, J. J. Monaghan, Smoothed particle hydrodynamics: Theory and application to non-spherical stars, Monthly Notices of the Royal Astronomical Soc. 181, pp. 375-389, Nov. 1977.
2. M. R. Bate, I. A. Bonnell, N. M. Price, Modelling accretion in protobinary systems, Monthly Notices of the Royal Astronomical Soc. 277, pp. 362-376, 1995.
 3. S. Kitsionas and A. P. Whitworth, "Smoothed particle hydrodynamics with particle splitting, applied to self-gravitating collapse," Monthly Notices of the Royal Astronomical Soc. 330, pp. 129-136, Feb. 2002. doi:10.1046/j.1365-8711.2002.05115.x.
 4. Rick Walker, Peter Kenny, and Jingqi Miao, "Exploratory simulation for astrophysics," Proc. SPIE 6495(1), p. 649509, SPIE, 2007. doi:10.1117/12.705586.
 5. J. Miao, G. J. White, R. Nelson, M. Thompson, and L. Morgan, "Triggered star formation in bright-rimmed clouds: the Eagle nebula revisited," Monthly Notices of the Royal Astronomical Soc. 369, pp. 143-155, June 2006.
Recent News
PREMIUM CONTENT
Sign in to read the full article
Create a free SPIE account to get access to
premium articles and original research