Download data/tutorials/shockFluid/diffuserIntake/createGraphs from introvoyz042/OpenFOAM-dev: direct link, hf CLI and curl.
- Browser
- Download file 802 Bytes
-
https://huggingface.co/datasets/introvoyz042/OpenFOAM-dev/resolve/main/data/tutorials/shockFluid/diffuserIntake/createGraphs
- Command line
-
hf download hf://datasets/introvoyz042/OpenFOAM-dev/data/tutorials/shockFluid/diffuserIntake/createGraphs
-
curl -L -o createGraphs https://huggingface.co/datasets/introvoyz042/OpenFOAM-dev/resolve/main/data/tutorials/shockFluid/diffuserIntake/createGraphs
802 Bytes
| #!/bin/sh | |
| ! command -v gnuplot >/dev/null 2>&1 && \ | |
| echo 'gnuplot not found - skipping graph creation' && \ | |
| exit 1 | |
| # Formatting | |
| format () { | |
| cat<<EOF | |
| set term pngcairo size 750,500 | |
| set xlabel 'x (m)' | |
| set key left top | |
| set xtics 0.05 | |
| EOF | |
| } | |
| graphFile=postProcessing/graph/0.002/line.xy | |
| cfdFmt="title 'CFD' w lp ls 1 lw 1" | |
| dataFmt="title 'Schulein (1996)' w p ls 2 lw 1" | |
| # Plotting | |
| gnuplot<<EOF | |
| $(format) | |
| set output 'Cf.png' | |
| set ylabel 'C_{f} (-)' | |
| plot "$graphFile" u 1:2 $cfdFmt, \ | |
| "schulein1996Cf.txt" u 1:2 $dataFmt | |
| EOF | |
| gnuplot<<EOF | |
| $(format) | |
| set output 'p.png' | |
| set ylabel 'p (Pa)' | |
| plot "$graphFile" u 1:3 $cfdFmt, \ | |
| "schulein1996P.txt" u 1:2 $dataFmt | |
| EOF | |
| #------------------------------------------------------------------------------ | |