1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2024-09-19 19:01:17 +00:00

Updated n_Verlet for v_0 = 0

This commit is contained in:
Mo8it 2022-01-27 03:17:51 +01:00
parent 00d2017f71
commit bb0e68d48d
3 changed files with 9 additions and 5 deletions

View file

@ -29,6 +29,8 @@ function gen_rdf_graphics()
particle_cs = Vector{SVector{2,Float64}}(undef, N) particle_cs = Vector{SVector{2,Float64}}(undef, N)
distance_limit = 0.99 * 2 * particle_radius
x = y = distance = 0.0 x = y = distance = 0.0
for p1_ind in 1:N for p1_ind in 1:N
@ -42,9 +44,9 @@ function gen_rdf_graphics()
no_collision = true no_collision = true
if distance >= 0.99 * 2 * particle_radius if distance >= distance_limit
for p2_ind in 1:(p1_ind - 1) for p2_ind in 1:(p1_ind - 1)
if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < 2 * particle_radius if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < distance_limit
no_collision = false no_collision = false
break break

View file

@ -30,6 +30,8 @@ function gen_verlet_and_cell_lists_graphics()
particle_cs = Vector{SVector{2,Float64}}(undef, N) particle_cs = Vector{SVector{2,Float64}}(undef, N)
distance_limit = 0.99 * 2 * particle_radius
x = y = distance = 0.0 x = y = distance = 0.0
for p1_ind in 1:N for p1_ind in 1:N
@ -43,9 +45,9 @@ function gen_verlet_and_cell_lists_graphics()
no_collision = true no_collision = true
if distance >= 0.99 * 2 * R_particle if distance >= distance_limit
for p2_ind in 1:(p1_ind - 1) for p2_ind in 1:(p1_ind - 1)
if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < 2 * R_particle if ReCo.norm2d(p1_c - particle_cs[p2_ind]) < distance_limit
no_collision = false no_collision = false
break break

View file

@ -78,7 +78,7 @@ function gen_sim_consts(
Int64, (skin_r - interaction_r) / max_approach_after_one_integration_step Int64, (skin_r - interaction_r) / max_approach_after_one_integration_step
) )
else else
n_steps_before_verlet_list_update = 100 n_steps_before_verlet_list_update = 1200
end end
grid_n = round(Int64, ceil(sqrt(n_particles))) grid_n = round(Int64, ceil(sqrt(n_particles)))