COVID-19 spreading simulation, Julia translation of https://github.com/MuAuan/collective_particles with several changes and new functionalities.
num_particles
particles are simulated overmax_iteration
temporal iteration.- Computational domain is
[0, x_range]
×[0, y_range]
. - Initial particle velocity
(vel_x, vel_y)
obeys Gaussian distribution, with averagevel_mean
and standard deviationvel_σ
. ratio_infection_init
percentage of particles are initially infected by the virus.- Particles in the nearby (below relative distance
radius_infection
) of the infected particle can be infected by the chance rateinfection_chance
per time step. - Infected particles (deterministically) recover after
recovery_time
steps and never infected again. - During temporal development, particle velocity alters by up to
vel_flc
.
flag_multiple_infection
allows recovered particles to re-infect the virus.- In the case of multiple infection,
infection_chance
is modified by number of past infection.
- In the case of multiple infection,
flag_infected_isolation
forces infected particles to stop their movement during infection.
- The code is tested on Julia version 1.3.1.
./fig/
subdirectory is needed for gif video.- Module dependencies are ProgressMeter, Distributions, Printf and Plots with GR backend.