simulate_particle: Simulate particle trajectories

View source: R/particle_functions.R

simulate_particleR Documentation

Simulate particle trajectories

Description

Simulates particle trajectories using either the standard Vicsek model or a two-interaction variation of the Vicsek model.

Usage

  simulate_particle(v_abs, n_t = 100, T_sim = 5, h = 0.1,
    cut_r = 0.5, sigma_0 = 0.1,
    noise_type = "Gaussian", model = "Vicsek")

Arguments

v_abs

Absolute velocity magnitude for all particles.

n_t

Number of particles (default: 100).

T_sim

Total simulation time steps (default: 5).

h

Time step size for numerical integration (default: 0.1).

cut_r

Radius of interaction between particles (default: 0.5).

sigma_0

Standard deviation of noise (default: 0.1).

noise_type

Distribution of noise: "Gaussian" or "Uniform" (default: "Gaussian").

model

Type of interaction model: "Vicsek" or "two_interactions_Vicsek" (default: "Vicsek").

Value

Returns an S4 object of class particle.data. See particle.data-class for details of the returned object structure.

References

Vicsek, T., Czirok, A., Ben-Jacob, E., Cohen, I., & Shochet, O. (1995). Novel type of phase transition in a system of self-driven particles, Physical Review Letters, 75(6), 1226.

Chat'e, H., Ginelli, F., Gr'egoire, G., Peruani, F., & Raynaud, F. (2008). Modeling collective motion: variations on the Vicsek model, The European Physical Journal B, 64(3), 451-456.

Fang, X., & Gu, M. (2024). The inverse Kalman filter. arXiv:2407.10089.

See Also

particle.data-class for details on the particle.data class structure

Examples

#--------------------------------------------------
# Example: Simulate using standard Vicsek model
#--------------------------------------------------
vx_abs=0.5
vy_abs=0.5
v_abs=sqrt(vx_abs^2+vy_abs^2)
sim1 <- simulate_particle(v_abs=v_abs)

#--------------------------------------------------
# Example: Simulate using two-interaction variation
#--------------------------------------------------
sim2 <- simulate_particle(v_abs=v_abs, model = 'two_interactions_Vicsek')

FastGaSP documentation built on April 4, 2025, 5:16 a.m.