bbm_simulate: Simulate bounded brownian motion.

Description Usage Arguments Value See Also Examples

Description

Given the details of a rectangular boundary in 1, 2 or 3 dimensions, and a diffusion constant, simulate the brownian trajectories of particles.

Usage

1
2
bbm_simulate(n_particles, D, dim, time_interval = 1, end_time,
  init_pos = NULL)

Arguments

n_particles

A natural number. The number of particles to use in the simulation.

D

The diffusivity constant.

dim

A vector giving the dimensions of the simulation space.

time_interval

The time interval between observations.

end_time

The time at which the simulation should end. The last timpoint in the simulation will be before or at this time.

init_pos

An n x d matrix giving the initial positions of the n particles. If this is not set, then a random configuration is generated.

Value

An object of class bbm_sim: a tibble with d + 2 columns, where d is the number of dimensions in the space of the simulation. One column for time, one for the particle ID number and the other d for the positions of the particles in d-dimensional space.

See Also

bbm_simulate_img()

Examples

1
bbm_simulate(n_particles = 2, D = 1.5, dim = c(3, 5), end_time = 2)

rorynolan/brownded documentation built on May 5, 2019, 9:20 a.m.