18,282 research outputs found

    Efficient Reactive Brownian Dynamics

    Full text link
    We develop a Split Reactive Brownian Dynamics (SRBD) algorithm for particle simulations of reaction-diffusion systems based on the Doi or volume reactivity model, in which pairs of particles react with a specified Poisson rate if they are closer than a chosen reactive distance. In our Doi model, we ensure that the microscopic reaction rules for various association and disassociation reactions are consistent with detailed balance (time reversibility) at thermodynamic equilibrium. The SRBD algorithm uses Strang splitting in time to separate reaction and diffusion, and solves both the diffusion-only and reaction-only subproblems exactly, even at high packing densities. To efficiently process reactions without uncontrolled approximations, SRBD employs an event-driven algorithm that processes reactions in a time-ordered sequence over the duration of the time step. A grid of cells with size larger than all of the reactive distances is used to schedule and process the reactions, but unlike traditional grid-based methods such as Reaction-Diffusion Master Equation (RDME) algorithms, the results of SRBD are statistically independent of the size of the grid used to accelerate the processing of reactions. We use the SRBD algorithm to compute the effective macroscopic reaction rate for both reaction- and diffusion-limited irreversible association in three dimensions. We also study long-time tails in the time correlation functions for reversible association at thermodynamic equilibrium. Finally, we compare different particle and continuum methods on a model exhibiting a Turing-like instability and pattern formation. We find that for models in which particles diffuse off lattice, such as the Doi model, reactions lead to a spurious enhancement of the effective diffusion coefficients.Comment: To appear in J. Chem. Phy

    SKIRT: the design of a suite of input models for Monte Carlo radiative transfer simulations

    Full text link
    The Monte Carlo method is the most popular technique to perform radiative transfer simulations in a general 3D geometry. The algorithms behind and acceleration techniques for Monte Carlo radiative transfer are discussed extensively in the literature, and many different Monte Carlo codes are publicly available. On the contrary, the design of a suite of components that can be used for the distribution of sources and sinks in radiative transfer codes has received very little attention. The availability of such models, with different degrees of complexity, has many benefits. For example, they can serve as toy models to test new physical ingredients, or as parameterised models for inverse radiative transfer fitting. For 3D Monte Carlo codes, this requires algorithms to efficiently generate random positions from 3D density distributions. We describe the design of a flexible suite of components for the Monte Carlo radiative transfer code SKIRT. The design is based on a combination of basic building blocks (which can be either analytical toy models or numerical models defined on grids or a set of particles) and the extensive use of decorators that combine and alter these building blocks to more complex structures. For a number of decorators, e.g. those that add spiral structure or clumpiness, we provide a detailed description of the algorithms that can be used to generate random positions. Advantages of this decorator-based design include code transparency, the avoidance of code duplication, and an increase in code maintainability. Moreover, since decorators can be chained without problems, very complex models can easily be constructed out of simple building blocks. Finally, based on a number of test simulations, we demonstrate that our design using customised random position generators is superior to a simpler design based on a generic black-box random position generator.Comment: 15 pages, 4 figures, accepted for publication in Astronomy and Computin

    A Thermodynamically-Consistent Non-Ideal Stochastic Hard-Sphere Fluid

    Full text link
    A grid-free variant of the Direct Simulation Monte Carlo (DSMC) method is proposed, named the Isotropic DSMC (I-DSMC) method, that is suitable for simulating dense fluid flows at molecular scales. The I-DSMC algorithm eliminates all grid artifacts from the traditional DSMC algorithm; it is Galilean invariant and microscopically isotropic. The stochastic collision rules in I-DSMC are modified to yield a non-ideal structure factor that gives consistent compressibility, as first proposed in [Phys. Rev. Lett. 101:075902 (2008)]. The resulting Stochastic Hard Sphere Dynamics (SHSD) fluid is empirically shown to be thermodynamically identical to a deterministic Hamiltonian system of penetrable spheres interacting with a linear core pair potential, well-described by the hypernetted chain (HNC) approximation. We apply a stochastic Enskog kinetic theory for the SHSD fluid to obtain estimates for the transport coefficients that are in excellent agreement with particle simulations over a wide range of densities and collision rates. The fluctuating hydrodynamic behavior of the SHSD fluid is verified by comparing its dynamic structure factor against theory based on the Landau-Lifshitz Navier-Stokes equations. We also study the Brownian motion of a nano-particle suspended in an SHSD fluid and find a long-time power-law tail in its velocity autocorrelation function consistent with hydrodynamic theory and molecular dynamics calculations.Comment: 30 pages, revision adding some clarifications and a new figure. See also arXiv:0803.035

    Fine-sorting One-dimensional Particle-In-Cell Algorithm with Monte-Carlo Collisions on a Graphics Processing Unit

    Full text link
    Particle-in-cell (PIC) simulations with Monte-Carlo collisions are used in plasma science to explore a variety of kinetic effects. One major problem is the long run-time of such simulations. Even on modern computer systems, PIC codes take a considerable amount of time for convergence. Most of the computations can be massively parallelized, since particles behave independently of each other within one time step. Current graphics processing units (GPUs) offer an attractive means for execution of the parallelized code. In this contribution we show a one-dimensional PIC code running on Nvidia GPUs using the CUDA environment. A distinctive feature of the code is that size of the cells that the code uses to sort the particles with respect to their coordinates is comparable to size of the grid cells used for discretization of the electric field. Hence, we call the corresponding algorithm "fine-sorting". Implementation details and optimization of the code are discussed and the speed-up compared to classical CPU approaches is computed
    • …
    corecore