mirror of
https://gitlab.rlp.net/mobitar/ReCo.jl.git
synced 2025-09-04 09:12:35 +00:00
Added documentation for running a simulation
This commit is contained in:
parent
341b1e8a85
commit
98b2d673f7
9 changed files with 164 additions and 87 deletions
|
@ -12,7 +12,7 @@ using ReCo: ReCo
|
|||
includet("../../src/Visualization/common_CairoMakie.jl")
|
||||
|
||||
function radial_distribution_simulation(;
|
||||
n_particles::Int64, v₀s::NTuple{N,Float64}, T::Float64, packing_ratio::Float64
|
||||
n_particles::Int64, v₀s::NTuple{N,Float64}, T::Float64, packing_fraction::Float64
|
||||
) where {N}
|
||||
Random.seed!(42)
|
||||
|
||||
|
@ -25,17 +25,17 @@ function radial_distribution_simulation(;
|
|||
Threads.@threads for v₀_ind in 1:n_v₀s
|
||||
v₀ = v₀s[v₀_ind]
|
||||
|
||||
dir = ReCo.init_sim(;
|
||||
sim_dir = ReCo.init_sim(;
|
||||
n_particles=n_particles,
|
||||
v₀=v₀,
|
||||
packing_ratio=packing_ratio,
|
||||
packing_fraction=packing_fraction,
|
||||
parent_dir=parent_dir,
|
||||
comment="$v₀",
|
||||
)
|
||||
|
||||
ReCo.run_sim(dir; duration=T, seed=v₀_ind)
|
||||
ReCo.run_sim(sim_dir; duration=T, seed=v₀_ind)
|
||||
|
||||
sim_dirs[v₀_ind] = dir
|
||||
sim_dirs[v₀_ind] = sim_dir
|
||||
end
|
||||
|
||||
return sim_dirs
|
||||
|
@ -191,7 +191,7 @@ function plot_radial_distributions(;
|
|||
|
||||
if include_comparison
|
||||
comparison_curve = CSV.read(
|
||||
"analysis/radial_distribution_function/g_of_r_d_ratio_with_0_37_packing_ratio.csv",
|
||||
"analysis/radial_distribution_function/g_of_r_d_ratio_with_0_37_packing_fraction.csv",
|
||||
DataFrames.DataFrame;
|
||||
header=3,
|
||||
)
|
||||
|
@ -217,7 +217,7 @@ function run_radial_distribution_analysis()
|
|||
n_particles = 1000
|
||||
|
||||
sim_dirs = radial_distribution_simulation(;
|
||||
n_particles=n_particles, v₀s=v₀s, T=100.0, packing_ratio=0.37
|
||||
n_particles=n_particles, v₀s=v₀s, T=100.0, packing_fraction=0.37
|
||||
)
|
||||
|
||||
lower_radii, gs, particle_radius = radial_distribution(;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue