commit 9e2fd9d11595857961d7ce1456f68cc32f67f2af
parent a70425a8dab4349e81422c6fd755470c668042be
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Wed, 4 Sep 2019 13:06:12 +0200
Merge branch 'master' of gitlab.com:admesg/continuum_granular_exp_manus1
Diffstat:
16 files changed, 576 insertions(+), 48 deletions(-)
diff --git a/fig3-tills/Makefile b/fig3-tills/Makefile
@@ -0,0 +1,44 @@
+BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
+FIG := $(shell basename $(CURDIR))
+
+LENGTH = 1.0
+NORMAL_STRESS = 85e3
+SHEAR_VEL := $(shell echo '320/(365*24*60*60)' | bc -l)
+
+default: ../$(FIG).pdf
+
+two_rivers.txt: $(BIN) Makefile
+ /bin/sh -c '\
+ ./$< \
+ --length $(LENGTH) \
+ --normal-stress $(NORMAL_STRESS) \
+ --friction-coefficient 0.321 --cohesion 14.0e3 \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --grain-size 0.1e-3' > $@
+
+storglaciaren.txt: $(BIN) Makefile
+ /bin/sh -c '\
+ ./$< \
+ --length $(LENGTH) \
+ --normal-stress $(NORMAL_STRESS) \
+ --friction-coefficient 0.494 --cohesion 5.0e3 \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --grain-size 0.1e-3' > $@
+
+upb.txt: $(BIN) Makefile
+ /bin/sh -c '\
+ ./$< \
+ --length $(LENGTH) \
+ --normal-stress $(NORMAL_STRESS) \
+ --friction-coefficient 0.443 --cohesion 3.0e3 \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --grain-size 0.1e-3' > $@
+
+../$(FIG).pdf: fig.gp two_rivers.txt storglaciaren.txt upb.txt
+ gnuplot $< > $@
+
+clean:
+ $(RM) *.txt
+ $(RM) ../$(FIG).pdf
+
+.PHONY: default clean
diff --git a/fig3/fig.gp b/fig3-tills/fig.gp
diff --git a/fig3/BlueSeq.plt b/fig3/BlueSeq.plt
@@ -0,0 +1,26 @@
+# line styles for ColorBrewer Blues
+# for use with sequential data
+# provides 8 blue colors of increasing saturation
+# compatible with gnuplot >=4.2
+# derived from Anna Schneider
+
+# line styles
+
+set style line 1 lc rgb '#084594' # dark blue
+set style line 2 lc rgb '#2171B5' #
+set style line 3 lc rgb '#4292C6' # medium blue
+set style line 4 lc rgb '#6BAED6' #
+set style line 5 lc rgb '#9ECAE1' # light blue
+set style line 6 lc rgb '#C6DBEF' #
+set style line 7 lc rgb '#DEEBF7' #
+set style line 8 lc rgb '#F7FBFF' # very light blue
+
+# palette
+set palette defined ( 0 '#084594',\
+ 1 '#2171B5',\
+ 2 '#4292C6',\
+ 3 '#6BAED6',\
+ 4 '#9ECAE1',\
+ 5 '#C6DBEF',\
+ 6 '#DEEBF7',\
+ 7 '#F7FBFF')
diff --git a/fig3/Makefile b/fig3/Makefile
@@ -1,40 +1,128 @@
BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
-FIG = $(shell basename $(CURDIR))
+FIG := $(shell basename $(CURDIR))
-RESOLUTION := 1000
-LENGTH := 1.0
-NORMAL_STRESS := 85e3
+# default parameter values
+LENGTH = 1.0
+NORMAL_STRESS = 100e3
+SHEAR_VEL := $(shell echo '300/(365*24*60*60)' | bc -l)
+DIAMETER = 1e-4
+COHESION = 0.0
+AMPL = 0.4
+BRATE = 0.9
+MU_S = 0.4
default: ../$(FIG).pdf
-two_rivers.txt: $(BIN) Makefile
+d.txt: $(BIN)
/bin/sh -c '\
- ./$< --resolution $(RESOLUTION) \
- --length $(LENGTH) \
- --normal-stress $(NORMAL_STRESS) \
- --friction-coefficient 0.321 --cohesion 14.0e3 \
- --stress-ratio 0.536 \
- --grain-size 0.1e-3' > $@
-
-storglaciaren.txt: $(BIN) Makefile
+ rm -rf $@; \
+ for d in 1e-4 2e-4 4e-4 1e-3 2e-3 4e-3 1e-2 2e-2; do \
+ printf "$$d\t" >> $@; \
+ ./$< \
+ --length $(LENGTH) \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --normal-stress $(NORMAL_STRESS) \
+ --cohesion $(COHESION) \
+ --nonlocal-amplitude $(AMPL) \
+ --rate-dependence $(BRATE) \
+ --friction-coefficient $(MU_S) \
+ --grain-size $$d \
+ d.$$d \
+ | tail -n 1 | cut -f4 >> $@; \
+ done'
+
+mu_s.txt: $(BIN)
+ /bin/sh -c '\
+ rm -rf $@; \
+ for mu_s in $$(seq 0.20 0.05 0.70); do \
+ printf "$$mu_s\t" >> $@; \
+ ./$< \
+ --length $(LENGTH) \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --normal-stress $(NORMAL_STRESS) \
+ --cohesion $(COHESION) \
+ --nonlocal-amplitude $(AMPL) \
+ --rate-dependence $(BRATE) \
+ --friction-coefficient $$mu_s \
+ --grain-size $(DIAMETER) \
+ mu_s.$$mu_s \
+ | tail -n 1 | cut -f4 >> $@; \
+ done'
+
+C.txt: $(BIN)
+ /bin/sh -c '\
+ rm -rf $@; \
+ for C in 0.0 5e3 10e3 15e3 20e3 25e3 30e3; do \
+ printf "$$C\t" >> $@; \
+ ./$< \
+ --length $(LENGTH) \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --normal-stress $(NORMAL_STRESS) \
+ --cohesion $$C \
+ --nonlocal-amplitude $(AMPL) \
+ --rate-dependence $(BRATE) \
+ --friction-coefficient $(MU_S) \
+ --grain-size $(DIAMETER) \
+ C.$$C \
+ | tail -n 1 | cut -f4 >> $@; \
+ done'
+
+A.txt: $(BIN)
/bin/sh -c '\
- ./$< --resolution $(RESOLUTION) \
- --length $(LENGTH) \
- --normal-stress $(NORMAL_STRESS) \
- --friction-coefficient 0.494 --cohesion 5.0e3 \
- --stress-ratio 0.615 \
- --grain-size 0.1e-3' > $@
-
-upb.txt: $(BIN) Makefile
+ rm -rf $@; \
+ for A in $$(seq 0.10 0.10 0.90); do \
+ printf "$$A\t" >> $@; \
+ ./$< \
+ --length $(LENGTH) \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --normal-stress $(NORMAL_STRESS) \
+ --cohesion $(COHESION) \
+ --nonlocal-amplitude $$A \
+ --rate-dependence $(BRATE) \
+ --friction-coefficient $(MU_S) \
+ --grain-size $(DIAMETER) \
+ A.$$A \
+ | tail -n 1 | cut -f4 >> $@; \
+ done'
+
+b.txt: $(BIN)
+ /bin/sh -c '\
+ rm -rf $@; \
+ for b in $$(seq 0.1 0.1 0.9); do \
+ printf "$$b\t" >> $@; \
+ ./$< \
+ --length $(LENGTH) \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --normal-stress $(NORMAL_STRESS) \
+ --cohesion $(COHESION) \
+ --nonlocal-amplitude $(AMPL) \
+ --rate-dependence $$b \
+ --friction-coefficient $(MU_S) \
+ --grain-size $(DIAMETER) \
+ b.$$b \
+ | tail -n 1 | cut -f4 >> $@; \
+ done'
+
+L_z.txt: $(BIN)
/bin/sh -c '\
- ./$< --resolution $(RESOLUTION) \
- --length $(LENGTH) \
- --normal-stress $(NORMAL_STRESS) \
- --friction-coefficient 0.443 --cohesion 3.0e3 \
- --stress-ratio 0.537 \
- --grain-size 0.1e-3' > $@
-
-../$(FIG).pdf: fig.gp two_rivers.txt storglaciaren.txt upb.txt
+ rm -rf $@; \
+ for L_z in 0.002 0.004 0.008 0.01 0.015 0.02 0.04 0.06 0.08 0.10 0.15 0.20 0.25 0.30 0.40 0.50 0.60 0.70 0.75 0.80 0.90 1.0; do \
+ printf "$$L_z\t" >> $@; \
+ ./$< \
+ --length $$L_z \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --normal-stress $(NORMAL_STRESS) \
+ --cohesion $(COHESION) \
+ --nonlocal-amplitude $(AMPL) \
+ --rate-dependence $(BRATE) \
+ --friction-coefficient $(MU_S) \
+ --grain-size $(DIAMETER) \
+ L_z.$$L_z \
+ | tail -n 1 | cut -f4 >> $@; \
+ done'
+
+
+../$(FIG).pdf: fig.gp d.txt mu_s.txt C.txt A.txt b.txt L_z.txt
gnuplot $< > $@
clean:
diff --git a/fig3/fig.gp b/fig3/fig.gp
@@ -2,22 +2,110 @@
reset
-set terminal pdfcairo color size 7.5 cm, 5.0 cm
-#set terminal pdfcairo color size 15.0 cm, 5.0 cm
-#set multiplot layout 1,4 \
-# margins 0.09,0.97,0.23,0.95 \
-# spacing 0.03,0.03
+#set terminal pdfcairo color size 7.5 cm, 5.0 cm
+set terminal pdfcairo enhanced color size 15.0 cm, 15.0 cm
+set multiplot layout 4,3 \
+ margins 0.09,0.97,0.09,0.97 \
+ spacing 0.05,0.08
-#set yrange [4.0:8.0]
+load 'BlueSeq.plt'
-set key bottom right #samplen 0.9
+set xrange [0:300]
+set yrange [0:1]
+
+set key bottom right font ",10" samplen 2.0
set xlabel "Shear velocity [m/a]"
-set ylabel "Vertical position [m]"
-#set xrange [0.0:1.0]
-#set xtics (0,0.01,0.02)
-#unset ytics
+set ylabel "Vertical position, z [m]"
+
+plot \
+ "d.1e-2.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 5 lw 1 t "d = 1e-2", \
+ "d.2e-3.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 4 lw 1 t "d = 2e-3", \
+ "d.1e-3.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 3 lw 1 t "d = 1e-3", \
+ "d.2e-4.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 2 lw 1 t "d = 2e-4", \
+ "d.1e-4.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 1 lw 1 t "d* = 1e-4"
+
+unset ylabel
+
+plot \
+ "mu_s.0.50.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 5 lw 1 t "{/Symbol m}_s = 0.50", \
+ "mu_s.0.45.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 4 lw 1 t "{/Symbol m}_s = 0.45", \
+ "mu_s.0.40.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 3 lw 1 t "{/Symbol m}_s* = 0.40", \
+ "mu_s.0.35.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 2 lw 1 t "{/Symbol m}_s = 0.35", \
+ "mu_s.0.30.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 1 lw 1 t "{/Symbol m}_s = 0.30"
+
plot \
- "storglaciaren.txt" u ($2*365.25*24*60*60):1 w l lt 1 lw 1 t "simulated Storglaciären till", \
- "upb.txt" u ($2*365.25*24*60*60):1 w l lt 2 lw 1 t "simulated WIS till", \
- "two_rivers.txt" u ($2*365.25*24*60*60):1 w l lt 4 lw 1 t "simulated Two Rivers till"
+ "C.0.0.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 5 lw 1 t "C* = 0 kPa", \
+ "C.5e3.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 4 lw 1 t "C = 5 kPa", \
+ "C.10e3.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 3 lw 1 t "C = 10 kPa", \
+ "C.20e3.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 2 lw 1 t "C = 20 kPa", \
+ "C.30e3.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 1 lw 1 t "C = 30 kPa"
+
+set ylabel "Vertical position, z [m]"
+set ytics
+
+plot \
+ "A.0.30.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 5 lw 1 t "A = 0.30", \
+ "A.0.35.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 4 lw 1 t "A = 0.35", \
+ "A.0.40.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 3 lw 1 t "A* = 0.40", \
+ "A.0.45.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 2 lw 1 t "A = 0.45", \
+ "A.0.50.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 1 lw 1 t "A = 0.50"
+
+unset ylabel
+
+plot \
+ "b.0.10.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 5 lw 1 t "b = 0.1", \
+ "b.0.30.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 4 lw 1 t "b = 0.3", \
+ "b.0.50.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 3 lw 1 t "b = 0.5", \
+ "b.0.70.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 2 lw 1 t "b = 0.7", \
+ "b.0.90.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 1 lw 1 t "b* = 0.9"
+
+plot \
+ "L_z.0.10.output00000.txt" u ($2*365.25*24*60*60):($1+0.9) w l ls 6 lw 1 t "L_z = 0.1 m", \
+ "L_z.0.20.output00000.txt" u ($2*365.25*24*60*60):($1+0.8) w l ls 5 lw 1 t "L_z = 0.2 m", \
+ "L_z.0.40.output00000.txt" u ($2*365.25*24*60*60):($1+0.6) w l ls 4 lw 1 t "L_z = 0.4 m", \
+ "L_z.0.60.output00000.txt" u ($2*365.25*24*60*60):($1+0.4) w l ls 3 lw 1 t "L_z = 0.6 m", \
+ "L_z.0.80.output00000.txt" u ($2*365.25*24*60*60):($1+0.2) w l ls 2 lw 1 t "L_z = 0.8 m", \
+ "L_z.1.0.output00000.txt" u ($2*365.25*24*60*60):($1) w l ls 1 lw 1 t "L_z* = 1.0 m"
+
+unset xrange
+unset yrange
+
+set yrange [0:1]
+
+set ylabel "Bulk friction, {/Symbol m} [-]"
+
+set xrange [8e-5:3e-2]
+set format x "10^{%T}"
+set xlabel "Grain size, d [m]"
+set logscale x
+plot "d.txt" w lp t ""
+unset logscale x
+unset format x
+
+unset ylabel
+
+set xrange [0.18:0.72]
+set xlabel "Grain friction, {/Symbol m}_s [-]"
+plot "mu_s.txt" w lp t ""
+
+set xrange [-2:32]
+set xlabel "Cohesion, C [kPa]"
+plot "C.txt" u ($1/1000):2 w lp t ""
+
+set ylabel "Bulk friction, {/Symbol m} [-]"
+
+#set xrange [0.28:0.52]
+set xrange [0.18:0.72]
+set xlabel "Nonlocal amplitude, A [-]"
+plot "A.txt" w lp t ""
+
+unset ylabel
+
+set xrange [0:1]
+set xlabel "Rate dependence, b [-]"
+plot "b.txt" w lp t ""
+
+set xrange [-0.05:1.05]
+set xlabel "Bed thickness, L_z [m]"
+plot "L_z.txt" w lp t ""
diff --git a/fig4/Makefile b/fig4/Makefile
@@ -5,7 +5,7 @@ default: ../$(FIG).pdf
sim.output00000.txt: $(BIN)
/bin/sh -c '\
- ./$< --resolution 200 --length 8.0 --normal-stress 150e3 \
+ ./$< --length 8.0 --normal-stress 150e3 \
--stress-ratio 0.40 \
--fluid --fluid-permeability 2e-17 --fluid-pressure-top 50e3 \
--fluid-pressure-ampl 50e3 \
diff --git a/fig5/Makefile b/fig5/Makefile
@@ -5,7 +5,7 @@ default: ../$(FIG).pdf
sim.output00000.txt: $(BIN)
/bin/sh -c '\
- ./$< --resolution 200 --length 8.0 --normal-stress 150e3 \
+ ./$< --length 8.0 --normal-stress 150e3 \
--stress-ratio 0.4 \
--fluid --fluid-permeability 2e-17 --fluid-pressure-top 50e3 \
--fluid-pressure-ampl 50e3 \
diff --git a/fig6/Makefile b/fig6/Makefile
@@ -3,8 +3,6 @@ FIG = $(shell basename $(CURDIR))
default: ../$(FIG).pdf
-# --stress-ratio 0.4 \
-
sim.output00000.txt: $(BIN) Makefile ../skindepth.gp
./$< \
--length 8.0 \
diff --git a/fig7/Makefile b/fig7/Makefile
@@ -5,7 +5,7 @@ default: ../$(FIG).pdf
sim.output00000.txt: $(BIN) Makefile ../skindepth.gp
/bin/sh -c '\
- ./$< --resolution 200 --length 8.0 --normal-stress 150e3 \
+ ./$< --length 8.0 --normal-stress 150e3 \
--stress-ratio 0.4 \
--fluid --fluid-permeability 2e-17 --fluid-pressure-top 50e3 \
--fluid-pressure-ampl 50e3 \
diff --git a/rate-controlled-fig4/Makefile b/rate-controlled-fig4/Makefile
@@ -0,0 +1,51 @@
+BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
+FIG = $(shell basename $(CURDIR))
+
+default: ../$(FIG).pdf
+
+# --stress-ratio 0.40 \
+
+sim.output00000.txt: $(BIN)
+ /bin/sh -c '\
+ ./$< --length 8.0 --normal-stress 150e3 \
+ --set-shear-velocity $$( echo "3000/(365*24*60*60)" | bc -l ) \
+ --fluid --fluid-permeability 2e-17 --fluid-pressure-top 50e3 \
+ --fluid-pressure-ampl 50e3 \
+ --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'
+
+../$(FIG).pdf: fig.gp timeseries.txt max_strainrate_depth.txt
+ gnuplot $< > $@
+
+clean:
+ $(RM) *.txt
+ $(RM) ../$(FIG).pdf
+
+.PHONY: default clean
diff --git a/rate-controlled-fig4/fig.gp b/rate-controlled-fig4/fig.gp
@@ -0,0 +1,36 @@
+#!/usr/bin/env gnuplot
+reset
+
+set terminal pdfcairo color size 7.5 cm, 8.5 cm
+
+set multiplot layout 3,1 \
+ margins 0.19,0.85,0.23,0.95 \
+ spacing 0.03,0.03
+
+unset xlabel
+unset xtics
+set yrange [0:270]
+set ylabel "[kPa]"
+plot \
+"timeseries.txt" u ($0/1008*7):($2/1000) w l lw 2 lc "black" t "effective normal stress", \
+"" u ($0/1008*7):($3/1000) w l lw 2 lt 3 dt "-" t "water pressure"
+
+unset xtics
+unset ylabel
+#unset ytics
+set yrange [0:0.01]
+set y2range [0:0.01]
+#set y2tics 0.002
+set y2label "Shear velocity [km/d]"
+plot "" u ($0/1008*7):($1*60*60*24/1000) w l lw 2 lt 7 t ""
+
+set xtics
+unset y2label
+unset y2tics
+set ytics 0.25
+set yrange [1.5:0.0]
+set xlabel "Time [d]"
+set ylabel "Depth of max. strain rate [m]"
+plot "max_strainrate_depth.txt" u ($0/1008*7):(8.0 - $1) w l lw 2 lt 4 t ""
+
+unset multiplot
diff --git a/rate-limited-fig4/Makefile b/rate-limited-fig4/Makefile
@@ -0,0 +1,51 @@
+BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
+FIG = $(shell basename $(CURDIR))
+
+default: ../$(FIG).pdf
+
+# --stress-ratio 0.40 \
+
+sim.output00000.txt: $(BIN)
+ /bin/sh -c '\
+ ./$< --length 8.0 --normal-stress 150e3 \
+ --limit-shear-velocity $$( echo "3000/(365*24*60*60)" | bc -l ) \
+ --fluid --fluid-permeability 2e-17 --fluid-pressure-top 50e3 \
+ --fluid-pressure-ampl 50e3 \
+ --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'
+
+../$(FIG).pdf: fig.gp timeseries.txt max_strainrate_depth.txt
+ gnuplot $< > $@
+
+clean:
+ $(RM) *.txt
+ $(RM) ../$(FIG).pdf
+
+.PHONY: default clean
diff --git a/rate-limited-fig4/fig.gp b/rate-limited-fig4/fig.gp
@@ -0,0 +1,36 @@
+#!/usr/bin/env gnuplot
+reset
+
+set terminal pdfcairo color size 7.5 cm, 8.5 cm
+
+set multiplot layout 3,1 \
+ margins 0.19,0.85,0.23,0.95 \
+ spacing 0.03,0.03
+
+unset xlabel
+unset xtics
+set yrange [0:270]
+set ylabel "[kPa]"
+plot \
+"timeseries.txt" u ($0/1008*7):($2/1000) w l lw 2 lc "black" t "effective normal stress", \
+"" u ($0/1008*7):($3/1000) w l lw 2 lt 3 dt "-" t "water pressure"
+
+unset xtics
+unset ylabel
+#unset ytics
+set yrange [0:0.01]
+set y2range [0:0.01]
+#set y2tics 0.002
+set y2label "Shear velocity [km/d]"
+plot "" u ($0/1008*7):($1*60*60*24/1000) w l lw 2 lt 7 t ""
+
+set xtics
+unset y2label
+unset y2tics
+set ytics 0.25
+set yrange [1.5:0.0]
+set xlabel "Time [d]"
+set ylabel "Depth of max. strain rate [m]"
+plot "max_strainrate_depth.txt" u ($0/1008*7):(8.0 - $1) w l lw 2 lt 4 t ""
+
+unset multiplot
diff --git a/resolution-comparison/BlueSeq.plt b/resolution-comparison/BlueSeq.plt
@@ -0,0 +1,26 @@
+# line styles for ColorBrewer Blues
+# for use with sequential data
+# provides 8 blue colors of increasing saturation
+# compatible with gnuplot >=4.2
+# derived from Anna Schneider
+
+# line styles
+
+set style line 1 lc rgb '#084594' # dark blue
+set style line 2 lc rgb '#2171B5' #
+set style line 3 lc rgb '#4292C6' # medium blue
+set style line 4 lc rgb '#6BAED6' #
+set style line 5 lc rgb '#9ECAE1' # light blue
+set style line 6 lc rgb '#C6DBEF' #
+set style line 7 lc rgb '#DEEBF7' #
+set style line 8 lc rgb '#F7FBFF' # very light blue
+
+# palette
+set palette defined ( 0 '#084594',\
+ 1 '#2171B5',\
+ 2 '#4292C6',\
+ 3 '#6BAED6',\
+ 4 '#9ECAE1',\
+ 5 '#C6DBEF',\
+ 6 '#DEEBF7',\
+ 7 '#F7FBFF')
diff --git a/resolution-comparison/Makefile b/resolution-comparison/Makefile
@@ -0,0 +1,42 @@
+BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
+FIG := $(shell basename $(CURDIR))
+
+# default parameter values
+LENGTH = 1.0
+NORMAL_STRESS = 100e3
+SHEAR_VEL := $(shell echo '300/(365*24*60*60)' | bc -l)
+DIAMETER = 1e-3
+COHESION = 0.0
+AMPL = 0.4
+BRATE = 0.9
+MU_S = 0.4
+
+default: ../$(FIG).pdf
+
+d_dz.txt: $(BIN)
+ /bin/sh -c '\
+ rm -rf $@; \
+ for nz in 2 3 4 6 8 12 16 24 32 48 64 96 128 192 256 384 512 768 1024 1536 2048 3072 5096 6144 10192 12288 20384; do \
+ printf "$$nz\t" >> $@; \
+ ./$< \
+ --resolution $$nz \
+ --length $(LENGTH) \
+ --set-shear-velocity $(SHEAR_VEL) \
+ --normal-stress $(NORMAL_STRESS) \
+ --cohesion $(COHESION) \
+ --nonlocal-amplitude $(AMPL) \
+ --rate-dependence $(BRATE) \
+ --friction-coefficient $(MU_S) \
+ --grain-size $(DIAMETER) \
+ d_dz.$$nz \
+ | tail -n 1 | cut -f4 >> $@; \
+ done'
+
+../$(FIG).pdf: fig.gp d_dz.txt
+ gnuplot $< > $@
+
+clean:
+ $(RM) *.txt
+ $(RM) ../$(FIG).pdf
+
+.PHONY: default clean
diff --git a/resolution-comparison/fig.gp b/resolution-comparison/fig.gp
@@ -0,0 +1,42 @@
+#!/usr/bin/env gnuplot
+
+reset
+
+#set terminal pdfcairo color size 7.5 cm, 5.0 cm
+set terminal pdfcairo enhanced color size 7.5 cm, 7.5 cm
+set multiplot layout 2,1 \
+ #margins 0.09,0.97,0.09,0.97 \
+ #spacing 0.05,0.08
+
+load 'BlueSeq.plt'
+
+set xrange [0:300]
+set yrange [0:1]
+
+set key bottom right font ",10" samplen 2.0
+
+set xlabel "Shear velocity [m/a]"
+set ylabel "Vertical position [m]"
+
+plot \
+ "d_dz.4.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 1 lw 1 t "nz = 4", \
+ "d_dz.8.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 2 lw 1 t "nz = 8", \
+ "d_dz.32.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 3 lw 1 t "nz = 32", \
+ "d_dz.128.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 4 lw 1 t "nz = 128", \
+ "d_dz.512.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 5 lw 1 t "nz = 512", \
+ "d_dz.1024.output00000.txt" u ($2*365.25*24*60*60):1 w l ls 6 lw 1 t "nz = 1024"
+
+unset xrange
+unset yrange
+
+#set yrange [0.3:0.5]
+
+set ylabel "Bulk friction, {/Symbol m} [-]"
+
+#set xrange [1.5:6000]
+set format x "10^{%T}"
+set xlabel "Grain size to cell size, d/dz [-]"
+set logscale x
+plot "d_dz.txt" u (1e-3/(1.0/$1)):2 w lp t ""
+unset logscale x
+unset format x