Table Of Contents

Previous topic

JE29: Electrostatic shocks: kinetic and fluid

This Page

JE30: Computing moments of a distribution function


In this note I test the updater that computes moments of a distribution function. The updater DistFuncMomentCalcCDIMFromVDIM computes number density, momentum density, total particle energy and pressure tensor. For coupling to field equations, the number density and momentum density are needed, but the other moments are useful for diagnostics. In the near future we will also extend the updater to compute all independent components of the heat-flux tensor.

Computing moments is tricky in DG schemes as the various convolutions in each cell need to be done with care. Further, these then need to be summed across over all velocity space cells (at a given configuration space cell). In parallel, an “all-reduce” operation is required. Gkeyll allows decomposition in phase-space (and not just configuration space), making the parallel code rather complicated. Hence, careful tests are needed to ensure that the moment calculator works correctly.

The updater computes the following moments

\[\begin{split}n &= \int_{-\infty}^{\infty} f(\mathbf{v}) d\mathbf{v} \\ nu_i &= \int_{-\infty}^{\infty} v_j f(\mathbf{v}) d\mathbf{v} \\ \mathcal{P}_{ij} &= \int_{-\infty}^{\infty} v_i v_j f(\mathbf{v}) d\mathbf{v} \\ \mathcal{E} &= \frac{1}{2} \int_{-\infty}^{\infty} v^2 f(\mathbf{v}) d\mathbf{v}\end{split}\]

Note that the moment calculator computes the pressure tensor in the lab frame and hence contains the contribution from the Reynolds stresses:

\[\mathcal{P}_{ij} = P_{ij} + mn u_i u_j\]


\[\begin{split}{P}_{ij} &= \int_{-\infty}^{\infty} (v_i-u_i) (v_j-u_j) f(\mathbf{v}) d\mathbf{v}\end{split}\]

is the pressure tensor in the fluid frame.

A Multi-modal Gaussian

To test the moment calculator, I initialize the distribution function with a multi-modal Gaussian. This allows the pressure tensor to be anisotropic, with each of the six components specified arbitrarily. The multi-modal Gaussian in \(N\) velocity space dimensions is given by

\[\mathcal{G}_N = \frac{n}{(2\pi)^{N/2}\triangle^{1/2}}\exp(-\frac{1}{2}\Theta^{-1}_{ij}c_ic_j)\]

where \(\triangle = \mathrm{det}(\Theta_{ij})\), \(\Theta_{ij} = P_{ij}/mn\) and \(c_i = v_i-u_i\).