manus_continuum_granular1_exp

Experiments for first paper with continuum granular model
git clone git://src.adamsgaard.dk/.manus_continuum_granular1_exp
Log | Files | Refs | Submodules | README | LICENSE

commit ddc356cbfb5d4d49f127f9de046bf59646b70cf6
parent fe9e85f1fe519dbfdb4fde4ab3a36ed1aa6acea4
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 25 Jun 2019 09:56:33 +0200

Add preliminary code for first figure

Diffstat:
D1d_fd_simple_shear | 1-
MMakefile | 8+++++++-
Afig1/BlueSeq.plt | 26++++++++++++++++++++++++++
Afig1/Makefile | 25+++++++++++++++++++++++++
Afig1/fig.gp | 24++++++++++++++++++++++++
5 files changed, 82 insertions(+), 2 deletions(-)

diff --git a/1d_fd_simple_shear b/1d_fd_simple_shear @@ -1 +0,0 @@ -Subproject commit e9f983205ea05513c2cda4ea4e899b58e22ba258 diff --git a/Makefile b/Makefile @@ -1,4 +1,10 @@ REPO = 1d_fd_simple_shear +FIGURES := $(wildcard fig*/) + +default: $(FIGURES) + +fig%/fig%.pdf: + make -C $(REPO)/$(REPO): $(REPO)/Makefile make -C $(REPO) @@ -9,4 +15,4 @@ $(REPO)/Makefile: clean: $(RM) -r $(REPO)/ -.PHONY: clean default +.PHONY: default figures clean diff --git a/fig1/BlueSeq.plt b/fig1/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/fig1/Makefile b/fig1/Makefile @@ -0,0 +1,25 @@ +BIN = ../1d_fd_simple_shear/1d_fd_simple_shear +FIG = fig1 + +default: $(FIG).pdf + +# mimic Iverson 2010 fig 2a +# shear-strain rate from 10^1 to 10^6 m/a +# friction around 0.55 +$(FIG).pdf: fig.gp + /bin/bash -c '\ + for b in $$(printf "0.01\n0.10\n"; seq 0.20 0.20 0.90) 0.94; do \ + out="out_b$${b}.txt"; \ + rm -f "$$out"; \ + for t in $$(seq 0.0001 0.002 1.0); do \ + printf "$$t\t" >> "$$out"; \ + ./$(BIN) -f 0.55 -P 100e3 -L 1.0 --stress-ratio $$t -b $$b | \ + tail -n 1 | cut -f2 >> "$$out"; \ + done; done' + gnuplot $< > $@ + +clean: + $(RM) *.txt + $(RM) $(FIG).pdf + +.PHONY: default clean diff --git a/fig1/fig.gp b/fig1/fig.gp @@ -0,0 +1,24 @@ +#!/usr/bin/env gnuplot + +reset + +## resemble Iverson 2010 fig2a + +set terminal pdfcairo size 18.6 cm, 11.0 cm + +set xlabel "Shear strain rate [a^{-1}]" +set ylabel "Shear friction [-]" offset 2 + +set xrange [1e1:1e6] # m/a +set yrange [0.0:0.8] +set key bottom right #samplen 0.9 + +set logscale x + +load 'BlueSeq.plt' + +plot "out_b0.94.txt" u ($2*3600*24*365):1 w l lc '#666666' lw 2 dashtype '-' t "glass beads, b = 0.94", \ + "out_b0.40.txt" u ($2*3600*24*365):1 w l ls 6 lw 2 t "b = 0.40", \ + "out_b0.20.txt" u ($2*3600*24*365):1 w l ls 5 lw 2 t "b = 0.20", \ + "out_b0.10.txt" u ($2*3600*24*365):1 w l ls 3 lw 2 t "b = 0.10", \ + "out_b0.01.txt" u ($2*3600*24*365):1 w l ls 1 lw 2 t "b = 0.01"