Efficient Random Number Generator for Mesoscopic Simulations of Brownian Motion
Qiaowei Wang · 2010
The pseudo-random number generation is a widely used technique in computational physics fields. It is achieved by generating a sequence of numbers with no obvious pattern according to some predefined algorithms. The sequence of numbers generated usually works for a specific problem with the desired statistical properties. The “Fluctuating Hydrodynamics” [1] model simulates the movement of particles in fluid with the help of pseudo random number generators. The particles in the model will get a random velocity and move around in a fixed environment to the simulated effect of thermal noise. The pseudo random number generator is responsible for the random walk of all the particles. For the computational method Lattice Boltzmann [2] used in the simulation, 11 or 15 random numbers per lattice per timestep will be required. Therefore, the generation of the random numbers will affect the efficiency of the whole simulation to a large extent. The implementation of the project is an extension of an existing C code of “Fluctuating Hydrodynamics” simulation developed by Kevin Stratford, Edinburgh Soft Matter and Statistical Physics Group and Edinburgh Parallel Computing Centre [3]. The random number generation section of the simulation will be mainly concentrated on. In the project, a number of alternative methods for uniform random number generation are implemented in terms of both quality and efficiency. And then, a technique named discrete random number generator published by Anthony J.C Ladd [4] is implemented, which get a nearly 10 times speedup than the current used normal random number generator in the simulation. In addition, a parallel version of the discrete random number generator is implemented and analysed.