1D & 2D Models
In a 1D model, the Fokker-Planck form of the transport is equivalent to the SDEs
Note
In a 1D or 2D model, the particle drift \(\boldsymbol{V}_d\) is out of the simulation plane and is not considered here.
where \(dW_\sigma\) is the normalized distributed random number with mean zero and variance \(\sqrt{\Delta t}\), and \(\Delta t\) is the time step for stochastic integration. This corresponds to a Wiener process. Numerical approximation is often used for the Wiener process to replace the normal distribution. We use a uniform distribution in \([-\sqrt{3}, \sqrt{3}]\) in the code.
Note
Future tests should be included to test this method thoroughly.
In a 2D model, the corresponding SDEs are
where \(\sum_\sigma\alpha_\sigma^\mu\alpha_\sigma^\nu = 2\kappa^{\mu\nu}\).
The parameters used at particle locations are calculated from \(v_x\), \(v_y\), \(B_x\), \(B_y\), \(\nabla\cdot\boldsymbol{v}\), \(\partial B_x/\partial x\), \(\partial B_x/\partial y\), \(\partial B_y/\partial x\), and \(\partial B_y/\partial y\), which are all obtained from the MHD simulations. We interpolate these parameters to the particle positions and then calculate the other required parameters:
where \(\kappa_\parallel\) and \(\kappa_\perp\) can be functions of \(B_x\), \(B_y\) and \(B\), so \(\partial \kappa_\parallel/\partial x\), \(\partial \kappa_\parallel/\partial y\), \(\partial \kappa_\perp/\partial x\), and \(\partial \kappa_\perp/\partial y\) still depend on the derivatives \(\partial B_x/\partial x\), \(\partial B_x/\partial y\), \(\partial B_y/\partial x\), and \(\partial B_y/\partial y\). The detailed expressions depend on the diffusion model to choose. Considering the expression of \(\kappa_\parallel\), we get
Note
We typically assume \(L_c\) and \(\sigma^2\) are spatially independent. However, they could vary spatially in a large system.
Time step criteria
For a 1D problem, the particle moves a distance satisfying \(l_x^2=\text{max}\left(\left<\Delta x\right>^2, \left<\Delta x^2\right>\right)\) [Strauss17], where
and \(l_x\) should be much smaller than the spatial variation scale of the fields. In this code, we require \(\left<\Delta x\right>^2 < \left<\Delta x^2\right>\) and choose \(\Delta t\) so that \(l_x < \delta_x\), where \(\delta_x\) is the grid size. For the 2D problems, we choose the following criteria to determine the time step:
Higher-order method
To get a higher-order solution, we can use a derivative-free Milstein method [Burrage04] to solve the SDEs. It is different from the usual method due to one more term, which makes it a higher-order method.
Note
This method was used by [Li18] but has since not been supported in default.
where \(X\) corresponds to spatial positions \(x\), \(y\) and particle momentum \(p\) in our simulation. Here \(f(X_t,t)\) is the deterministic term, \(g(X_t,t)\) is the probabilistic term, \(h\) is the time step, and \(N(0,1)\) indicates a normal distribution, which is substituted with a uniform distribution \([-\sqrt{3}, \sqrt{3}]\) in our simulations to speed up the computation.
Burrage, K., Burrage, P.M. and Tian, T., 2004. Numerical methods for strong solutions of stochastic differential equations: an overview. Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences, 460(2041), pp.373-402.
Large-scale Compression Acceleration during Magnetic Reconnection in a Low-β Plasma, Xiaocan Li, Fan Guo, Hui Li, and Shengtai Li, The Astrophysical Journal 866, no. 1 (2018): 4.
Strauss, R. and Effenberger, F., 2017. A hitch-hiker’s guide to stochastic differential equations. Space Science Reviews, 212(1), pp.151-192.