Download data/tutorials/incompressibleFluid/ballValve/createGraphs from introvoyz042/OpenFOAM-dev: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/datasets/introvoyz042/OpenFOAM-dev/resolve/main/data/tutorials/incompressibleFluid/ballValve/createGraphs
- Command line
-
hf download hf://datasets/introvoyz042/OpenFOAM-dev/data/tutorials/incompressibleFluid/ballValve/createGraphs
-
curl -L -o createGraphs https://huggingface.co/datasets/introvoyz042/OpenFOAM-dev/resolve/main/data/tutorials/incompressibleFluid/ballValve/createGraphs
1.13 kB
| #!/bin/sh | |
| if ! which gnuplot > /dev/null 2>&1 | |
| then | |
| echo "gnuplot not found - skipping graph creation" >&2 | |
| exit 1 | |
| fi | |
| inletFlowRate=postProcessing/inletFlowRate/0/surfaceFieldValue.dat | |
| lowerOutletFlowRate=postProcessing/lowerOutletFlowRate/0/surfaceFieldValue.dat | |
| upperOutletFlowRate=postProcessing/upperOutletFlowRate/0/surfaceFieldValue.dat | |
| gnuplot << EOF | |
| set terminal postscript eps color enhanced | |
| set output "flowRate.eps" | |
| set xlabel "Time (s)" | |
| set ylabel "Flow Rate (m^3/s)" | |
| plot \ | |
| "$inletFlowRate" us 1:(-\$2) every 10 w p t "Inlet", \ | |
| "$lowerOutletFlowRate" us 1:2 w l t "Lower Outlet", \ | |
| "$upperOutletFlowRate" us 1:2 w l t "Upper Outlet", \ | |
| "< paste $lowerOutletFlowRate $upperOutletFlowRate" \ | |
| us 1:(\$2+\$4) w l t "Total Outlet" | |
| EOF | |
| gnuplot << EOF | |
| set terminal postscript eps color enhanced | |
| set output "error.eps" | |
| set xlabel "Time (s)" | |
| set ylabel "Inlet-Outlet Conservation Error (%)" | |
| plot \ | |
| "< paste $inletFlowRate $lowerOutletFlowRate $upperOutletFlowRate" \ | |
| us 1:(100*(\$2+\$4+\$6)/\$2) w l t '' | |
| EOF | |
| #------------------------------------------------------------------------------ | |