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:
parent
cef9d37728
commit
00d2017f71
4 changed files with 28 additions and 26 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue