1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2025-09-04 09:12:35 +00:00

Updated sigma

This commit is contained in:
Mo8it 2022-01-27 01:23:21 +01:00
parent cef9d37728
commit 00d2017f71
4 changed files with 28 additions and 26 deletions

View file

@ -42,7 +42,7 @@ function gen_rdf_graphics()
no_collision = true
if distance >= 2 * particle_radius
if distance >= 0.99 * 2 * particle_radius
for p2_ind in 1:(p1_ind - 1)
if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < 2 * particle_radius
no_collision = false

View file

@ -5,7 +5,7 @@ using StaticArrays: SVector
using ReCo: ReCo
function gen_verlet_and_cell_lists_graphics()
Random.seed!(2)
Random.seed!(23)
box_length = 100
@ -16,7 +16,7 @@ function gen_verlet_and_cell_lists_graphics()
origin()
R_particle = 4.2
σ = 2 * R_particle
σ = 2 * R_particle * 2^(-1 / 6)
R_interaction = 2^(1 / 6) * σ
R_skin = 2 * R_interaction
@ -26,7 +26,7 @@ function gen_verlet_and_cell_lists_graphics()
circle(Point(reference_particle_x, reference_particle_y), R_particle, :fill)
reference_particle_c = SVector(reference_particle_x, reference_particle_y)
N = 92
N = 91
particle_cs = Vector{SVector{2,Float64}}(undef, N)
@ -43,7 +43,7 @@ function gen_verlet_and_cell_lists_graphics()
no_collision = true
if distance >= 2 * R_particle
if distance >= 0.99 * 2 * R_particle
for p2_ind in 1:(p1_ind - 1)
if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < 2 * R_particle
no_collision = false
@ -59,7 +59,7 @@ function gen_verlet_and_cell_lists_graphics()
end
end
if 2 * R_particle <= distance < R_interaction
if distance < R_interaction
setcolor("red")
elseif R_interaction <= distance < R_skin
setcolor("green")
@ -91,4 +91,6 @@ function gen_verlet_and_cell_lists_graphics()
finish()
return nothing
end
end
# TODO: Deduplicate with radial_distribution.jl