tAdd analysis with constant k/f ratio - cngf-pf-exp1 - experiments for first paper with continuum granular model
 (HTM) git clone git://src.adamsgaard.dk/manus_continuum_granular1_exp
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 11661b38104fea8bb2cc6e548a0740eb2a43159e
 (DIR) parent 58f4fe5925472e5f0b881ffeb871365478540a45
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Thu, 19 Sep 2019 16:49:48 +0200
       
       Add analysis with constant k/f ratio
       
       Diffstat:
         A kf-ratio-fig4b/Makefile             |      55 +++++++++++++++++++++++++++++++
         A kf-ratio-fig4b/fig.gp               |      44 +++++++++++++++++++++++++++++++
       
       2 files changed, 99 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/kf-ratio-fig4b/Makefile b/kf-ratio-fig4b/Makefile
       t@@ -0,0 +1,55 @@
       +BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
       +FIG = $(shell basename $(CURDIR))
       +
       +FACTOR=0.1
       +
       +default: ../$(FIG)-$(FACTOR).pdf
       +
       +#        --stress-ratio 0.40 \
       +
       +sim-$(FACTOR).output00000.txt: $(BIN)
       +        ./$< --length 8.0 \
       +        --normal-stress 200e3 \
       +        --set-shear-velocity $$( awk 'BEGIN { print 1000/(365*24*60*60) }') \
       +        --fluid \
       +        --fluid-permeability $$( awk 'BEGIN { print 2e-17*$(FACTOR) }') \
       +        --fluid-pressure-top 100e3 \
       +        --fluid-pressure-ampl 80e3 \
       +        --fluid-pressure-freq $$( awk 'BEGIN { print $(FACTOR)*1.0/(3600*24) }') \
       +        --file-interval $$( awk 'BEGIN { print 60*10/$(FACTOR) }') \
       +        --time-end $$( awk 'BEGIN { print 3600*24*7/$(FACTOR) }') sim-$(FACTOR)
       +
       +timeseries-$(FACTOR).txt: sim-$(FACTOR).output00000.txt
       +        /bin/sh -c '\
       +        rm -f $@; \
       +        for f in sim-$(FACTOR).output*.txt; do \
       +                tail -n 1 "$$f" | cut -f2- >> $@; \
       +        done'
       +
       +max_strainrate_depth-$(FACTOR).txt: sim-$(FACTOR).output00000.txt
       +        /bin/sh -c '\
       +        rm -f $@; \
       +        for f in sim-$(FACTOR).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)-$(FACTOR).pdf: fig.gp timeseries-$(FACTOR).txt max_strainrate_depth-$(FACTOR).txt
       +        gnuplot -e "factor='$(FACTOR)'" $< > $@
       +
       +clean:
       +        $(RM) *.txt
       +        $(RM) ../$(FIG)-$(FACTOR).pdf
       +
       +.PHONY: default clean
 (DIR) diff --git a/kf-ratio-fig4b/fig.gp b/kf-ratio-fig4b/fig.gp
       t@@ -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-".factor.".txt" u ($0/1008*7*factor):($2/1000) w l lw 2 lc "black" t "effective normal stress", \
       +"" u ($0/1008*7*factor):($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*factor):($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-".factor.".txt" u ($0/1008*7*factor):(8.0 - $1) w l lw 2 lt 4 t ""
       +
       +unset multiplot