commit 9f9d3a7953f5b5ac0375469064327a533f327e68
parent c9fdb036b39437f6ee1c43cb1c9f8738daad7ed8
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 5 Sep 2019 15:09:27 +0200
Add companion figure 5b
Diffstat:
A | fig5b/Makefile | | | 55 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | fig5b/fig.gp | | | 45 | +++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/fig5b/Makefile b/fig5b/Makefile
@@ -0,0 +1,55 @@
+BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
+FIG = $(shell basename $(CURDIR))
+
+default: ../$(FIG).pdf
+
+sim.output00000.txt: $(BIN)
+ /bin/sh -c '\
+ ./$< --length 8.0 \
+ --normal-stress 200e3 \
+ --set-shear-velocity $$( echo "1000/(365*24*60*60)" | bc -l ) \
+ --fluid \
+ --fluid-permeability 2e-17 \
+ --fluid-pressure-top 100e3 \
+ --fluid-pressure-ampl 80e3 \
+ --fluid-pressure-freq $$( echo "1.0/(3600*24)" | bc -l ) \
+ --file-interval $$( echo "60*10" | bc -l ) \
+ --time-end $$( echo "3600*24*7" | bc -l ) sim'
+
+timeseries.txt: sim.output00000.txt
+ /bin/sh -c '\
+ rm -f $@; \
+ for f in sim.output*.txt; do \
+ tail -n 1 "$$f" | cut -f2- >> $@; \
+ done'
+
+max_strainrate_depth.txt: sim.output00000.txt
+ /bin/sh -c '\
+ rm -f $@; \
+ for f in sim.output*.txt; do \
+ awk " \
+ BEGIN{getline; depth=8.0; max=0.0} \
+ NF{ \
+ if (\$$6 >= max && \$$6+0 > 1e-300) \
+ { \
+ max=\$$6; \
+ depth=\$$1; \
+ } \
+ } \
+ END{ \
+ print depth,\"\t\",max \
+ }" \
+ "$$f" >> $@; \
+ done'
+
+timeseries_combined.txt: timeseries.txt max_strainrate_depth.txt
+ paste $^ > $@
+
+../$(FIG).pdf: fig.gp timeseries_combined.txt
+ gnuplot $< > $@
+
+clean:
+ $(RM) *.txt
+ $(RM) ../$(FIG).pdf
+
+.PHONY: default clean
diff --git a/fig5b/fig.gp b/fig5b/fig.gp
@@ -0,0 +1,45 @@
+#!/usr/bin/env gnuplot
+reset
+
+set terminal pdfcairo color size 7.5 cm, 7.5 cm
+
+set multiplot layout 2,1 \
+ margins 0.19,0.75,0.23,0.85 \
+ spacing 0.03,0.03
+
+# set xrange [0.0:0.7]
+# set key top left #samplen 0.9
+
+set xrange [0:210]
+set x2range [200:-10]
+#set x2tics 50 nomirror tc lt 3
+set x2tics 50 nomirror
+unset xtics
+set yrange [0:80]
+#set x2label "Water pressure [kPa]" tc lt 3
+set x2label "Water pressure [kPa]"
+set ylabel "Shear stress [kPa]"
+set ytics 20
+set arrow from 60,1.0 to 50,2.0 head
+set arrow from 70,3.0 to 83,2.0 head
+plot \
+"timeseries_combined.txt" u ($2/1000):($4*$2/1000) w l lt 1 t ""
+
+unset arrow
+
+set xtics
+set xlabel "Effective normal stress [kPa]"
+unset x2tics
+unset ytics
+unset x2label
+unset ylabel
+set y2label "Depth of max. strain rate [m]"
+#set y2range [1.5:-0.1]
+set yrange [2.5:-0.1]
+set y2range [2.5:-0.1]
+#set y2tics 0.25
+set y2tics 0.5
+set arrow from 95,0.10 to 85,0.13 head
+set arrow from 100,0.6 to 110,0.8 head
+set arrow from 150,0.8 to 150.3,0.55 head
+plot "" u ($2/1000):(8.0 - $6) w l lt 4 t ""