Hostname: page-component-76d6cb85b7-lrvh5 Total loading time: 0 Render date: 2026-07-25T08:00:07.264Z Has data issue: false hasContentIssue false

A ‘metric’ semi-Lagrangian Vlasov–Poisson solver

Published online by Cambridge University Press:  05 June 2017

Stéphane Colombi*
Affiliation:
Institut d’Astrophysique de Paris, CNRS UMR 7095 and UPMC, 98bis, bd Arago, F-75014 Paris, France Center for Gravitational Physics, Yukawa Institute for Theoretical Physics, Kyoto University, Kyoto 606-8502, Japan
Christophe Alard
Affiliation:
Institut d’Astrophysique de Paris, CNRS UMR 7095 and UPMC, 98bis, bd Arago, F-75014 Paris, France
*
Email address for correspondence: colombi@iap.fr
Rights & Permissions [Opens in a new window]

Abstract

We propose a new semi-Lagrangian Vlasov–Poisson solver. It employs metric elements to follow locally the flow and its deformation, allowing one to find quickly and accurately the initial phase-space position $\boldsymbol{Q}(\boldsymbol{P})$ of any test particle $\boldsymbol{P}$ , by expanding at second order the geometry of the motion in the vicinity of the closest element. It is thus possible to reconstruct accurately the phase-space distribution function at any time $t$ and position $\boldsymbol{P}$ by proper interpolation of initial conditions, following Liouville theorem. When distortion of the elements of metric becomes too large, it is necessary to create new initial conditions along with isotropic elements and repeat the procedure again until next resampling. To speed up the process, interpolation of the phase-space distribution is performed at second order during the transport phase, while third-order splines are used at the moments of remapping. We also show how to compute accurately the region of influence of each element of metric with the proper percolation scheme. The algorithm is tested here in the framework of one-dimensional gravitational dynamics but is implemented in such a way that it can be extended easily to four- or six-dimensional phase space. It can also be trivially generalised to plasmas.

Information

Type
Research Article
Copyright
© Cambridge University Press 2017 
Figure 0

Figure 1. Schematic representation of the algorithm. At all times we would like to follow the phase-space distribution function $f(\boldsymbol{P},t)$ sampled on a fine Eulerian grid, represented here in grey. To achieve this, we define local elements of metric initially sampling a sparser grid, as represented in black in (a). These elements of metric follow the motion and its distortions, as illustrated by the deformation of the black grid in (b). To reconstruct $f$ at all times on the Eulerian grid, e.g. the green point in (b), one traces back in time the trajectory of a test particle associated with the green point. To compute the position of this particle during the transport phase, we just use the closest element of metric in Lagrangian space, here the blue point on (a). Once $\boldsymbol{Q}$ is calculated, we apply Liouville’s theorem i.e. $f(\boldsymbol{P},t)=f_{ini}\equiv f(\boldsymbol{Q},t_{ini})$ where $t_{ini}$ is the initial time, computing $f(\boldsymbol{Q},t_{ini})$ with a second-order interpolation over the Lagrangian grid. Of course, at some point, $t=t_{resample}$, distortion of phase-space structures is too large to be only locally represented at second order, so one has to start again the process by considering $f(\boldsymbol{P},t_{resample})$ as new initial conditions. At time $t_{resample}$, we proceed slightly differently to compute $f(\boldsymbol{P},t)$ more accurately. Indeed, because our local representation of phase space is only valid up to second order, the reconstructed initial position proposed by each element of metric is slightly different, as illustrated by (a). To avoid an unsmooth representation of the reconstruction of the initial position $\boldsymbol{Q}$, we perform at $t=t_{resample}$ a more accurate interpolation of the initial position, here between the purple, the orange, the red and the blue points and a more accurate interpolation using third-order splines on the Lagrangian grid to compute $f(\boldsymbol{Q},t_{ini})$.

Figure 1

Figure 2. Procedure employed to select the points of the grid used to perform second-order interpolation of the phase-space distribution function at position $\boldsymbol{Q}$ in $2D$-dimensional phase space. One first finds the nearest grid point $\boldsymbol{G}_{n}$ to $\boldsymbol{Q}$, $\boldsymbol{G}_{n}=(i_{n},j_{n})$ for $D=1$, and select all the segments of the grid composed of 3 grid points and centred on $\boldsymbol{G}_{n}$: one obtains the red cross for one dimension. Then one selects, for each plane passing through a pair of such segments the four elements of the grid so that the square composed of these grid elements contains the projection of $\boldsymbol{Q}$: one of them, $(i_{c}+1,j_{c}+1)$ on the figure, provides one additional point for the interpolation.

Figure 2

Figure 3. Scheme determining the range of investigation of neighbouring elements of metric during the percolation process in Lagrangian space. We consider a pixel $\boldsymbol{P}$ in Eulerian space that we know to be already close to an element of metric $(i_{m},j_{m})$ because it is a direct neighbour of a pixel known to be in the region of influence of $(i_{m},j_{m})$. We remap it to its Lagrangian counterpart $\boldsymbol{Q}$ using the element of metric $(i_{m},j_{m})$. Then we aim to find the closest element of metric to it. To do so and speed up the process, four cases are considered, to take into account the small errors on $\boldsymbol{Q}$ (in particular the fact that the reconstructed $\boldsymbol{Q}$ depends on the element of metric under consideration, see figure 1), that we write $\boldsymbol{E}_{map}=(E_{x},E_{v})$. In case 4, $\boldsymbol{Q}$ is close enough to the element of metric: we do not need to investigate any neighbour and decide it to belong to the region of influence of $(i_{m},j_{m})$. In cases 2 and 3, we need only to investigate another element of metric, e.g. $(i_{m},j_{m}+1)$ in the upper part of the figure to decide if it closer to its own estimate of $\boldsymbol{Q}$ using the distance defined in equation (2.32). Finally case 1 is the most costly since we have to investigate three neighbouring element of metric, but it is seldom considered.

Figure 3

Figure 4. Gaussian run and percolation. (a) The phase-space distribution function is shown at $t=25$ for a simulation with Gaussian initial conditions and parameters corresponding to item II of table 1 in § 3. (b) The corresponding Lagrangian zone of influence of each element of metric obtained from the percolation process is drawn at the end of a cycle (just before full resampling with new metric elements). To visualise the results more clearly, a random colour has been associated with each element of metric.

Figure 4

Figure 5. Scheme determining the number of neighbouring elements of metric to consider for the interpolation (2.36) used to reconstruct the Lagrangian coordinate $\boldsymbol{Q}$ of a test particle $\boldsymbol{P}$ in the region of influence of metric element $(i_{m},j_{m})$. This figure also justifies equation (2.43). Each element of metric has an ellipsoid region of influence (ocher ellipse) for computing the weights in equation (2.36). Outside this area, the element of metric does not contribute. Therefore, in the absence of uncertainty on the reconstruction of the Lagrangian coordinate, one can safely define 4 kinds of regions, as shown on the figure, with $h_{x}=(1-\sqrt{3}/2)\unicode[STIX]{x0394}x_{m}$ and $h_{v}=(1-\sqrt{3}/2)\unicode[STIX]{x0394}v_{m}$, steaming from the ellipse equations $(1-h_{x}/\unicode[STIX]{x0394}x_{m})^{2}+1/4=1$ and $1/4+(1-h_{v}/\unicode[STIX]{x0394}v_{m})^{2}=1$. In region 4, only the cross composed of $(i_{m}-1,j_{m})$, $(i_{m}+1,j_{m})$, $(i_{m},j_{m}-1)$, $(i_{m},j_{m}+1)$ and $(i_{m},j_{m})$ contributes to the interpolation (2.36). In regions 2 and 3, only 4 elements of metric contribute, namely $(i_{m}-1,j_{m})$, $(i_{m}+1,j_{m})$, $(i_{m},j_{m}+1)$ and $(i_{m},j_{m})$ for the upper area 2. In regions labelled by 1, four elements of metric contribute, e.g. $(i_{m},j_{m})$, $(i_{m}+1,j_{m})$, $(i_{m},j_{m}+1)$, $(i_{m}+1,j_{m}+1)$ in the upper right quadrant. In the presence of uncertainty, we need to change the extensions of these regions to take it into account, as discussed further in the main text.

Figure 5

Table 1. Parameters of the simulations performed in this work, namely the grid cell size, $\unicode[STIX]{x1D6E5}=\unicode[STIX]{x0394}x=\unicode[STIX]{x0394}y$, the initial separation between each metric element, $\unicode[STIX]{x1D6E5}_{m}=\unicode[STIX]{x0394}x_{m}=\unicode[STIX]{x0394}y_{m}$, the number of subcycles, $n_{s}$, between resamplings and the approximate total Central Processing Unit (CPU) time expressed in units of the time spent for simulation I. The calculation of $t_{CPU}$ was performed for the simulations with initial conditions corresponding to the random set of stationary clouds as described in § 3.2, but the results do not change drastically for other initial conditions. A space separates the runs performed with Vlamet (I–XI) from those performed with the standard splitting algorithm (XII–XVI). Additionally, the time step $\unicode[STIX]{x0394}t$ was chosen constant, given by $\unicode[STIX]{x0394}t=0.01$, $0.01$ and $0.0025$ for the stationary, Gaussian and random set of halos, respectively. The two last choices come from the constraints on the time step obtained in the waterbag runs by Colombi & Touma (2014).

Figure 6

Figure 6. Accelerations of our implementations of Vlamet (in red) and of the splitting algorithm (in black) as functions of the number of cores on a shared memory architecture with OpenMP library. The plot is performed for the parameters corresponding to runs I and XVI in table 1, starting from an ensemble of stationary clouds. Perfect speed up is represented as a dotted line.

Figure 7

Figure 7. Deviation from stationarity for simulations with $\unicode[STIX]{x1D6E5}=0.002$. (a) The difference $\unicode[STIX]{x1D6FF}f$ between the phase-space density measured at $t=100$ and the initial one for simulation I. Darker regions correspond to larger values of $\unicode[STIX]{x1D6FF}f$, which ranges in the interval $\unicode[STIX]{x1D6FF}f\in [-0.0014,0.0014]$. (b) The value of $\unicode[STIX]{x1D6FF}f(x,0)$ is plotted for simulations I, II, III, IV (i.e. varying inter-element of metric distance $\unicode[STIX]{x1D6E5}_{m}$ while keeping spatial resolution $\unicode[STIX]{x1D6E5}=0.002$ fixed) and XVI. Note that the purple and blue curves nearly superpose on each other.

Figure 8

Figure 8. Phase-space density in the simulations with Gaussian initial conditions. The simulation I with the metric method is compared to a waterbag run of Colombi & Touma (2014). In the latter case, the phase-space distribution function is represented with 84 waterbags.

Figure 9

Figure 9. Projected density in the simulations with Gaussian initial conditions: detail. The simulations performed with Vlamet, I, X and XI are compared to the results obtained with the splitting algorithm, XII, XIV and XVI, as well as a waterbag run of Colombi & Touma (2014), which is supposed to represent the ‘exact’ solution. Note that while the waterbag measurements are displayed at the fine grained level, the results from the Vlamet and the splitting algorithm runs are shown at the grid resolution, $\unicode[STIX]{x1D6E5}$.

Figure 10

Figure 10. Phase-space density in the simulations with random initial conditions. The simulation I with the metric method is compared to a waterbag run of Colombi & Touma (2014). In the latter case, the phase-space distribution function is represented with only with three waterbag levels.

Figure 11

Figure 11. Conservation of energy (a,c,e) and entropy (b,d,f) in the stationary runs. Each line of panels corresponds to varying one parameter of the simulations as listed in table 1. In the first line of panels, we vary the elements of metric sampling, $\unicode[STIX]{x1D6E5}_{m}=\unicode[STIX]{x0394}x_{m}=\unicode[STIX]{x0394}v_{m}$, while keeping other parameters, in particular spatial resolution $\unicode[STIX]{x1D6E5}=\unicode[STIX]{x0394}x=\unicode[STIX]{x0394}v$, fixed. In the second line of panels, it is the number of time steps $n_{s}$ between each resampling which changes. Finally, in the last line of panels, overall resolution is changed, i.e. both $\unicode[STIX]{x1D6E5}$ and $\unicode[STIX]{x1D6E5}_{m}$ while keeping the ratio $\unicode[STIX]{x1D6E5}_{m}/\unicode[STIX]{x1D6E5}$ fixed. For comparison, results from the splitting algorithm are also displayed as turquoise curves as indicated on each panel. In the latter case, the only parameter of interest is spatial resolution $\unicode[STIX]{x1D6E5}$.

Figure 12

Figure 12. Conservation of energy (a,c,e) and entropy (b,d,f) in the Gaussian runs, similarly as in figure 11. In (a,c,e), energy conservation of the splitting algorithm is plotted only for run XVI, but other runs (XII, XIII, XIV and XV) would provide nearly indistinguishable results given the interval of values investigated.

Figure 13

Figure 13. Conservation of energy (a,c,e) and entropy (b,d,f) in the random set of halos runs, similarly as in figure 11. Again, energy conservation of the splitting algorithm is plotted only for run XVI, because other runs would provide nearly indistinguishable results.

Figure 14

Figure 14. The maximum reconstructed displacement mismatch between neighbouring elements of metric, $E_{map}$, as defined in § 2.3.3, as a function of time for the Vlamet runs considered in the energy and entropy plots shown in previous figures. $E_{map}$ is expressed in units of spatial resolution, $\unicode[STIX]{x1D6E5}$.