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 69fac333fcaa23917d573af853d4408e0952f508
parent 0b1afac2755409dde80734a7ae30ea3750c5fd34
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu, 10 Oct 2019 16:23:16 +0200

Add triangular pulse experiment

Diffstat:
Apulse-triangle-fig4b/Makefile | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apulse-triangle-fig4b/fig.gp | 44++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 99 insertions(+), 0 deletions(-)

diff --git a/pulse-triangle-fig4b/Makefile b/pulse-triangle-fig4b/Makefile @@ -0,0 +1,55 @@ +BIN = ../1d_fd_simple_shear/1d_fd_simple_shear +FIG = $(shell basename $(CURDIR)) + +default: ../$(FIG).pdf + +# --stress-ratio 0.40 \ + +sim.output00000.txt: $(BIN) Makefile + /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 0.0 \ + --fluid-pressure-ampl 130e3 \ + --fluid-pressure-freq $$( echo "1.0/(3600*24)" | bc -l ) \ + --fluid-pressure-pulse-time $$( echo "3600*24*2" | 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/pulse-triangle-fig4b/fig.gp b/pulse-triangle-fig4b/fig.gp @@ -0,0 +1,44 @@ +#!/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.80,0.23,0.95 \ + spacing 0.03,0.03 + +set key top right samplen 1.0 +unset xlabel +unset xtics +set yrange [0:320] +set ylabel "[kPa]" +set ytics 100 +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 ytics 0.1 +#set yrange [0:1] +#set y2range [0:1] +#set y2tics 0.2 +#set y2label "Effective friction [-]" +#plot "" u ($0/1008*7):($4) w l lw 2 lt 7 t "" +set yrange [0:80] +set y2range [0:80] +set y2tics 20 +set y2label "Shear stress [kPa]" +plot "" u ($0/1008*7):($4*$2/1000) w l lw 2 lt 1 t "" + +set xtics +unset y2label +unset y2tics +set ytics 0.5 +set yrange [2.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