From 2ea0bcdf9e8ad3f750024b8774647cc2317c912c Mon Sep 17 00:00:00 2001 From: Humberto Date: Fri, 27 Sep 2024 01:51:48 +0100 Subject: [PATCH] update figure --- joss-paper/BFS_verification.svg | 276 ++++++++++++++++++-------------- joss-paper/plot.jl | 23 +++ 2 files changed, 179 insertions(+), 120 deletions(-) create mode 100644 joss-paper/plot.jl diff --git a/joss-paper/BFS_verification.svg b/joss-paper/BFS_verification.svg index 41e486a4..2bebd266 100644 --- a/joss-paper/BFS_verification.svg +++ b/joss-paper/BFS_verification.svg @@ -1,133 +1,169 @@ - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/joss-paper/plot.jl b/joss-paper/plot.jl new file mode 100644 index 00000000..ffec8db9 --- /dev/null +++ b/joss-paper/plot.jl @@ -0,0 +1,23 @@ +using Plots +using DelimitedFiles + +OF = readdlm("2D_laminar_BFS_OF.csv", ',', skipstart=1) +XL = readdlm("2D_laminar_BFS_XCALibre.csv", ',', skipstart=1) + +vel = plot( + OF[:,1], OF[:,8], label="Ux", color=:skyblue2, + ylabel="Distance [m]", xlabel="Velocity [m/s]") +scatter!(vel, XL[:,1], XL[:,8], color=:tomato, label=false) + +plot!(vel, OF[:,2], OF[:,8], label="Uy", color=:black, linestyle=:dash) +scatter!(vel, XL[:,2], XL[:,8], color=:tomato, label=false) + +p = plot(OF[:,4], OF[:,8], label="OpenFOAM", xlabel="Pressure [Pa]", color=:skyblue2) +scatter!(p, XL[:,4], XL[:,8], color=:tomato, label="XCALibre") + +plot( + vel, p, size=(740,420), layout = (1, 2), + ylim=(-0.1,0.10),foreground_color_legend = nothing, + frame_style=:box, legend=:bottomright) + +savefig("BFS_verification.svg") \ No newline at end of file