Hostname: page-component-6766d58669-mzsfj Total loading time: 0 Render date: 2026-05-16T04:24:11.359Z Has data issue: false hasContentIssue false

Coupling multi-fluid dynamics equipped with Landau closures to the particle-in-cell method

Published online by Cambridge University Press:  17 January 2024

Rouven Lemmerz*
Affiliation:
Leibniz-Institut für Astrophysik Potsdam (AIP), An der Sternwarte 16, 14482 Potsdam, Germany University of Potsdam, Institute of Physics and Astronomy, Karl-Liebknecht-Str. 24-25, 14476 Potsdam, Germany
Mohamad Shalaby*
Affiliation:
Leibniz-Institut für Astrophysik Potsdam (AIP), An der Sternwarte 16, 14482 Potsdam, Germany
Timon Thomas
Affiliation:
Leibniz-Institut für Astrophysik Potsdam (AIP), An der Sternwarte 16, 14482 Potsdam, Germany
Christoph Pfrommer
Affiliation:
Leibniz-Institut für Astrophysik Potsdam (AIP), An der Sternwarte 16, 14482 Potsdam, Germany
*
Email addresses for correspondence: rlemmerz@aip.de, mshalaby@live.ca
Email addresses for correspondence: rlemmerz@aip.de, mshalaby@live.ca
Rights & Permissions [Opens in a new window]

Abstract

The particle-in-cell (PIC) method is successfully used to study magnetized plasmas. However, this requires large computational costs and limits simulations to short physical run times and often to set-ups of less than three spatial dimensions. Traditionally, this is circumvented either via hybrid-PIC methods (adopting massless electrons) or via magneto-hydrodynamic-PIC methods (modelling the background plasma as a single charge-neutral magneto-hydrodynamical fluid). Because both methods preclude modelling important plasma-kinetic effects, we introduce a new fluid-PIC code that couples a fully explicit and charge-conserving multi-fluid solver to the PIC code SHARP through a current-coupling scheme and solve the full set of Maxwell's equations. This avoids simplifications typically adopted for Ohm's law and enables us to fully resolve the electron temporal and spatial scales while retaining the versatility of initializing any number of ion, electron or neutral species with arbitrary velocity distributions. The fluid solver includes closures emulating Landau damping so that we can account for this important kinetic process in our fluid species. Our fluid-PIC code is second-order accurate in space and time. The code is successfully validated against several test problems, including the stability and accuracy of shocks and the dispersion relation and damping rates of waves in unmagnetized and magnetized plasmas. It also matches growth rates and saturation levels of the gyro-scale and intermediate-scale instabilities driven by drifting charged particles in magnetized thermal background plasmas in comparison with linear theory and PIC simulations. This new fluid-SHARP code is specially designed for studying high-energy cosmic rays interacting with thermal plasmas over macroscopic time scales.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
Copyright © The Author(s), 2024. Published by Cambridge University Press
Figure 0

Figure 1. The magnitude of the frequency response, which is a quantification of how much the amplitude at a specific frequency is amplified or suppressed, of different approximations of the derivative of the Hilbert transform. Here, $\hat {k}$ is given in normalized frequencies (with regards to the Nyquist frequency), while the negative frequencies in the interval $[-{\rm \pi}, 0]$ are not shown here due to the symmetric dependence of all plotted values on $|k|$. The FFT-based approach reproduces the correct, linear response. The scalar- and gradient-driven closures are given by (2.52) and (2.53), respectively, with the parameter $k_0$ marked as a grey vertical line. The FIR filter is described by (2.55).

Figure 1

Table 1. The grid assignment and time staggering of the fluid-SHARP 1D3V code. Here, $\boldsymbol {U}_{f}$ refers to the fluid state vector. Note that it is sufficient to compute either $\rho$ or $J_x$, but not both.

Figure 2

Figure 2. Schematic representation of the interaction of the different modules in the fluid-SHARP code. Red boxes belong to the particle class, violet boxes to the electromagnetic class and blue boxes to the fluid class. Dashed lines show branches which are task parallelizable, i.e. where non-blocking MPI communication can be used for overlapping communication and computation. The particle and fluid modules might be instantiated arbitrarily often, where each instance represents a species.

Figure 3

Table 2. Parameters adopted for the shock-tube tests described in § 3.1; $x_0$ divides the domain into two halves, where values to the left of $x_0$ ($x< x_0$) are initialized by the parameters with subscript ${l}$. Similarly, subscript ${r}$ indicates parameters to the right of $x_0$.

Figure 4

Figure 3. The 1D1V hydrodynamical shock-tube tests with initial conditions given in table 2. The simulations carried out with the HLLC and Roe Riemann solvers are compared with the exact solutions. Density, bulk velocity in the $x$-direction and pressure are plotted for each test.

Figure 5

Figure 4. The six branches of the two-fluid dispersion relation are shown as lines, with two electrostatic wave branches (Langmuir and ion acoustic) as well as four electromagnetic wave branches, of which two are left- and two are right-hand circularly polarized (LCP and RCP). The lower RCP is referred to as the whistler or electron cyclotron branch and the lower LCP as ion cyclotron branch; for parallel propagation their phase velocities approach the Alfvén speed at small $k$. The upper RCP and LCP are modified light waves. We mark the six local extrema of the discrete Fourier-transformed fluid simulation outputs at each wavenumber with circles encapsulating the error bars extending over the frequency bin. For comparison, we plot the dispersion relation of the three MHD waves at scales larger than the ion inertial length, $1/k > c/\omega _{\rm i}$.

Figure 6

Figure 5. An oblique fast magnetosonic wave in a highly magnetized plasma. We plot the absolute of the perturbations of the magnetic field strengths in the top panel, as well as the ion bulk velocity and electric field along the domain in the bottom panel. The theoretical predictions are shown as black-dashed lines while the black-dotted lines indicate the amplitude. Electric and magnetic field strengths are expressed in code units, denoted by the subscript ${c}$.

Figure 7

Figure 6. The linear dispersion relations of a Langmuir wave with immobile ions. Shown are, on the left-hand side, the real frequency components and, on the right-hand side, the negative imaginary frequency components (which are responsible for damping). The crosses present data points obtained from simulations with the respective closure while the theoretical result is shown with a solid line. The relative error between simulation and theoretical results $(\omega ^{\mathrm {sim}} - \omega ^{\mathrm {theor}}) / \omega ^{\mathrm {theor}}$ is shown in the lower panels. For reference, the red crosses display the data points as given in table 1 of Shalaby et al. (2017b).

Figure 8

Figure 7. Two different Alfvén waves, with magnetic and velocity vectors $\boldsymbol {B}_1, \boldsymbol {B}_2$ and ${\boldsymbol{w}}_1, {\boldsymbol{w}}_2$, propagate transversally along the $x$-axis, where the electromagnetic vectors rotate (counter-)clockwise around it. Because of their phase difference $\Delta k x$ the overall Lorentz force $({\boldsymbol{w}}_1 + {\boldsymbol{w}}_2) \boldsymbol{\times} (\boldsymbol B_1 + \boldsymbol B_2)$ in the $x$-direction is non-zero, thereby generating the longitudinal wave shown in dark yellow.

Figure 9

Figure 8. Time evolution of the magnetic energy of a linearly polarized Alfvén wave in our fluid simulations with Landau damping. Time is measured in units of the period of the mean wave frequencies $P_\omega = 4{\rm \pi} (\omega _1 + \omega _2)^{-1}$. Analytical predictions for the damping rate are taken from Lee & Völk (1973, labelled L&V) and Hollweg (1971). The fluid simulations are presented with the different heat flux closures $R_{31}$ and $R_{32}$. We compare the time evolution of the total magnetic wave energy (a) and the magnetic wave energy of the different polarization states (b). The RCP wave has a higher phase velocity and loses energy more quickly in comparison with the LCP wave.

Figure 10

Figure 9. Growth of the perpendicular magnetic field as a function of time for a gyrotropic CR streaming set-up. The maximum growth rate expected from the linear dispersion relation at intermediate scales is ${\Gamma } _{\mathrm {inter}} = 2.299 \varOmega _{\rm i}$ and shown in dashed grey. Because of the different initial seed populations for the particle species, the onset of the instabilities is not expected to happen at the same simulation time. Hence, we choose an arbitrary $t=0$ so that the different simulated growth phases roughly coincide.

Figure 11

Figure 10. Growth of the perpendicular magnetic field as a function of time at different scales for a gyrotropic CR streaming set-up. We show mean values of the fields that are averaged over a range of wave vectors $k$, as indicated in the legends. The maximum growth rates at the gyro-scale and the intermediate scale are given by ${\Gamma } _{\mathrm {gyro}} = 0.498 \varOmega _{\rm i}$ and ${\Gamma } _{\mathrm {inter}} = 2.299 \varOmega _{\rm i}$, and indicated by the grey dotted and dashed lines, respectively. At wavenumbers corresponding to cascading scales, there is no instability expected according to the linear dispersion relation, and wave growth solely arises as a result of cascading from other (unstable) scales.

Figure 12

Figure 11. Strong scaling of the fluid-PIC code, with and without Fourier-based Landau closures. Shown is the wall-clock time needed to simulate $1250$ time integration steps with $180\ 000$ cells at $1000$ particles per cell at a varying number of processors. We show the perfect strong scaling that is proportional to the inverse number of processors as the grey dashed line for reference. For the disabled fluid module no background plasma was initialized and only CRs are initialized, showing that the bulk of the computational work is performed by the PIC routines.

Figure 13

Figure 12. Relative error $|(\omega ^{\mathrm {sim}} - \omega ^{\mathrm {theor}})/\omega ^{\mathrm {theor}}|$ of the simulated frequency of a Langmuir wave at $k = 0.05 k_{\rm D}$. The same simulation set-up is used in figure 6, where we use a resolution of $68$ cells per wavelength. The resolution here is varied between $68/4=17$ and $68\times 10$ cells per wavelength. The grey line is a reference line for the second-order scaling of the error.