mirror of
https://gitlab.rlp.net/mobitar/ReCo.jl.git
synced 2025-09-02 09:02:35 +00:00
Seperate reference and all vs
This commit is contained in:
parent
bb0e68d48d
commit
bfcc1fee3f
3 changed files with 43 additions and 22 deletions
|
@ -139,11 +139,13 @@ function radial_distribution(;
|
|||
return (lower_radii, gs, particle_radius)
|
||||
end
|
||||
|
||||
function plot_radial_distributions(
|
||||
function plot_radial_distributions(;
|
||||
v₀s::NTuple{N,Float64},
|
||||
lower_radii::AbstractVector{Float64},
|
||||
gs::Vector{Vector{Float64}},
|
||||
particle_radius::Float64,
|
||||
include_comparison::Bool,
|
||||
filename_addition::String="",
|
||||
) where {N}
|
||||
println("Plotting the radial distributions")
|
||||
|
||||
|
@ -176,33 +178,41 @@ function plot_radial_distributions(
|
|||
)
|
||||
|
||||
for (g_ind, g) in enumerate(gs)
|
||||
v₀ = round(Int64, v₀s[g_ind])
|
||||
scatterlines!(
|
||||
ax, lower_radii, g; markersize=3, linewidth=0.5, label=L"v_0 = %$(v₀s[g_ind])"
|
||||
ax,
|
||||
lower_radii,
|
||||
g;
|
||||
markersize=3,
|
||||
linewidth=1,
|
||||
label=L"Simulation with $v_0 = %$(v₀)$",
|
||||
)
|
||||
end
|
||||
|
||||
comparison_curve = CSV.read(
|
||||
"analysis/radial_distribution_function/g_of_r_d_ratio_with_0_37_packing_ratio.csv",
|
||||
DataFrames.DataFrame;
|
||||
header=3,
|
||||
)
|
||||
lines!(
|
||||
ax,
|
||||
comparison_curve.r_d_ratio,
|
||||
comparison_curve.g_of_r_d_ratio;
|
||||
label="Similar system",
|
||||
color=:green,
|
||||
)
|
||||
if include_comparison
|
||||
comparison_curve = CSV.read(
|
||||
"analysis/radial_distribution_function/g_of_r_d_ratio_with_0_37_packing_ratio.csv",
|
||||
DataFrames.DataFrame;
|
||||
header=3,
|
||||
)
|
||||
lines!(
|
||||
ax,
|
||||
comparison_curve.r_d_ratio,
|
||||
comparison_curve.g_of_r_d_ratio;
|
||||
label=L"Reference with $v_0 = 0$",
|
||||
color=:orange,
|
||||
)
|
||||
end
|
||||
|
||||
axislegend(ax; position=:rt, padding=3, rowgap=-3)
|
||||
|
||||
save_fig("radial_distribution.pdf", fig)
|
||||
save_fig("radial_distribution$filename_addition.pdf", fig)
|
||||
|
||||
return nothing
|
||||
end
|
||||
|
||||
function run_radial_distribution_analysis()
|
||||
v₀s = (0.0, 20.0)
|
||||
v₀s = (0.0, 40.0, 80.0)
|
||||
|
||||
n_particles = 1000
|
||||
|
||||
|
@ -211,10 +221,21 @@ function run_radial_distribution_analysis()
|
|||
)
|
||||
|
||||
lower_radii, gs, particle_radius = radial_distribution(;
|
||||
sim_dirs=sim_dirs, n_radii=56, n_last_snapshots=200, n_particles=n_particles
|
||||
sim_dirs=sim_dirs, n_radii=58, n_last_snapshots=200, n_particles=n_particles
|
||||
)
|
||||
|
||||
plot_radial_distributions(v₀s, lower_radii, gs, particle_radius)
|
||||
plot_radial_distributions(;
|
||||
v₀s=v₀s[1:1], lower_radii, gs=gs[1:1], particle_radius, include_comparison=true
|
||||
)
|
||||
|
||||
plot_radial_distributions(;
|
||||
v₀s=v₀s[1:end],
|
||||
lower_radii,
|
||||
gs=gs[1:end],
|
||||
particle_radius,
|
||||
include_comparison=false,
|
||||
filename_addition="_all_vs",
|
||||
)
|
||||
|
||||
return nothing
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue