Skip to content

Instantly share code, notes, and snippets.

@Arpit-Babbar
Last active May 13, 2024 10:10
Show Gist options
  • Save Arpit-Babbar/924823c08f4be962856a99c107b18fb5 to your computer and use it in GitHub Desktop.
Save Arpit-Babbar/924823c08f4be962856a99c107b18fb5 to your computer and use it in GitHub Desktop.
using Trixi
using Plots
using DelimitedFiles
using HDF5
cp_dict = read(h5open("out/CP_x_026165.h5"))
cf_dict = read(h5open("out/CF_x_026165.h5"))
cp_ref_data = Trixi.download("https://raw.githubusercontent.com/cpraveen/taxis/master/examples/naca0012_laminar/cp_Re500_M0.8_10deg",
joinpath(@__DIR__, "cp_ref.txt"))
cp_ref = readdlm(cp_ref_data)
x_coords = cp_dict["point_coordinates"][:,1]
cp = cp_dict["point_data"]
scatter(x_coords, cp, yflip = :true, label = "Trixi")
scatter!(cp_ref[:,1], -cp_ref[:,2], yflip = :true, label = "Reference")
cf_ref_data = Trixi.download("https://raw.githubusercontent.com/cpraveen/taxis/master/examples/naca0012_laminar/cf_Re500_M0.8_10deg",
joinpath(@__DIR__, "cf_ref.txt"))
cf = cf_dict["point_data"][:,1]
cf_ref = readdlm(cf_ref_data)
scatter(x_coords, cf, yflip = :true, label = "Trixi")
scatter!(cf_ref[:,1], cf_ref[:,2], yflip = :true, label = "Reference")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment