tadd script to plot temporal evolution of field - cngf-pf - continuum model for granular flows with pore-pressure dynamics (renamed from 1d_fd_simple_shear)
(HTM) git clone git://src.adamsgaard.dk/cngf-pf
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 4e5828e062c676396ca0c67660c83cc6755f7002
(DIR) parent 63448eb2803256024a9e887c9f29aae7bfc35946
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 9 Sep 2021 14:54:41 +0200
add script to plot temporal evolution of field
Diffstat:
A plot_cngf_pf_evolution | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/plot_cngf_pf_evolution b/plot_cngf_pf_evolution
t@@ -0,0 +1,27 @@
+#!/bin/sh
+
+usage() {
+ printf 'usage: %s [-f field] [-h] [-l label] [-t term]\n' "${0##*/}" 1>&2
+}
+
+field="2"
+label="shear velocity [m/s]"
+term="pdf"
+while getopts 'f:hl:t:' arg; do
+ case "${arg}" in
+ f) field="${OPTARG}" ;;
+ h) usage; exit 0 ;;
+ l) label="${OPTARG}" ;;
+ t) term="${OPTARG}" ;;
+ *) usage; exit 1 ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+for f in "$@"; do
+ tail -n 1 "$f"
+done | \
+gnuplot -e "set term ${term};\
+ set xlabel 'Timestep [-]';\
+ set ylabel '${label}';\
+ plot '-' u 0:${field} with lines title ''"