Table of Contents
Fetching ...

Treecode2: The Power of Pluralism. I. Static Tests

Joshua E. Barnes

TL;DR

Treecode2 introduces tree averaging by randomly affine-transforming the root cell coordinates at each timestep to statistically restore translational and rotational invariance in oct-tree N-body force calculations. The paper provides static tests showing improved potentials, accelerations, and reduced bulk forces/torques when averaging over many tree coordinate systems, and analyzes the trade-offs in computation time and error correlations. It also discusses softening corrections and the limits of averaging, noting that while invariance improves, exact momentum conservation is not guaranteed due to intrinsic force-structure asymmetries. The results establish a foundation for applying averaging dynamically in time-stepping to achieve better energy and angular momentum conservation, with dynamical tests reserved for the follow-up work.

Abstract

I describe an `oct-tree' N-body code which randomly shifts, reorients, and resizes the root cell at each time step. Averaging over a plurality of root cell positions and orientations statistically restores translational and rotational invariance. The potentials and forces which result can be much more accurate than those obtained from a single force calculation. In this paper, the principle of averaging is tested on static configurations. The next paper will show how this technique can substantially improve global energy, momentum, and angular momentum conservation at a negligible computational cost.

Treecode2: The Power of Pluralism. I. Static Tests

TL;DR

Treecode2 introduces tree averaging by randomly affine-transforming the root cell coordinates at each timestep to statistically restore translational and rotational invariance in oct-tree N-body force calculations. The paper provides static tests showing improved potentials, accelerations, and reduced bulk forces/torques when averaging over many tree coordinate systems, and analyzes the trade-offs in computation time and error correlations. It also discusses softening corrections and the limits of averaging, noting that while invariance improves, exact momentum conservation is not guaranteed due to intrinsic force-structure asymmetries. The results establish a foundation for applying averaging dynamically in time-stepping to achieve better energy and angular momentum conservation, with dynamical tests reserved for the follow-up work.

Abstract

I describe an `oct-tree' N-body code which randomly shifts, reorients, and resizes the root cell at each time step. Averaging over a plurality of root cell positions and orientations statistically restores translational and rotational invariance. The potentials and forces which result can be much more accurate than those obtained from a single force calculation. In this paper, the principle of averaging is tested on static configurations. The next paper will show how this technique can substantially improve global energy, momentum, and angular momentum conservation at a negligible computational cost.
Paper Structure (20 sections, 17 equations, 25 figures, 1 algorithm)

This paper contains 20 sections, 17 equations, 25 figures, 1 algorithm.

Figures (25)

  • Figure 1: Bulk forces on spherical (left) and disc (right) configurations as functions of position. The sphere is a $3$-dimensional Gaussian with unit dispersion, while the disc is generated from the sphere by scaling $z$ coordinates by $0.1$; both are realized with $N=2^{18}$ particles. Tree-code forces are computed with accuracy parameter $\theta=1$ as each configuration is stepped along the $z$-axis. Blue, green, and red curves show the bulk forces in the $x$, $y$, and $z$ directions, respectively. Note that the vertical range of left-hand plot is $\pm 1.0 \times 10^{-5}$, as indicated by the scaling factor at top, while the range of the right-hand plot is $60$ times greater.
  • Figure 2: Acceleration errors for single particles, plotted as quasi-random walks. Five particles were sampled from radius $r \simeq 1$ in a Hernquist model; each is plotted in a different color. The model has $N = 2^{18}$ particles, and forces were computed with $\theta = 1.0$. Top left, top right, and bottom left panels show projections of acceleration errors on the $(x,y)$, $(z,y)$, and $(x,z)$ planes, respectively. Steps are ordered from smallest to largest in length; an open circle marks the end of each walk. Bottom right panel shows error distributions; vertical marks indicate RMS values of $\Delta a_{p,c}$.
  • Figure 3: Acceleration errors for single particles from a disc model. Five particles were sampled from $\sqrt{x^2 + y^2} < 0.2$ and $z \simeq 0.15$. Other details as for Fig. \ref{['fig:plot_gravwalk_3D_hernq']}
  • Figure 4: Particle-by-particle errors versus distance from centre or potential. The top row plots relative potential error, while the lower one plots log relative acceleration error. Forces were calculated using opening angle $\theta = 0.8$; quadrapole terms were corrected for softening, with $\epsilon = 0.01$. Each realization has $N = 2^{18}$ bodies.
  • Figure 5: Distributions of relative potential errors (left) and log relative acceleration errors (right) for all five models. Forces were calculated as in Fig. \ref{['fig:scat_err_rad']}. A different color is used for each realization.
  • ...and 20 more figures