commit 57efb65995d743a228348e5bb190381cf1309547
parent f8c5414832ba95450b80e314cb0d518b593891b2
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Wed, 4 Dec 2019 16:05:27 +0100
Add pulse experiment with different permeabilities
Diffstat:
2 files changed, 112 insertions(+), 0 deletions(-)
diff --git a/fig-pulse_lag/Makefile b/fig-pulse_lag/Makefile
@@ -0,0 +1,63 @@
+BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
+FIG != basename $(PWD)
+
+default: ../$(FIG).pdf
+
+PERM_SEQ=3.16e-16 1e-16 3.16e-17 1e-17 3.16e-18 1e-18 3.16e-19
+
+sim-1e-18.output00000.txt: $(BIN)
+ /bin/sh -c 'for perm in $(PERM_SEQ); do \
+ ./$(BIN) --length 8.0 \
+ --normal-stress 200e3 \
+ --set-shear-velocity $$( echo "10000/(365*24*60*60)" | bc -l ) \
+ --fluid \
+ --fluid-permeability $$perm \
+ --fluid-pressure-top 0.0 \
+ --fluid-pressure-ampl 180e3 \
+ --fluid-pressure-freq $$( echo "1.0/(3600*24)" | bc -l ) \
+ --fluid-pressure-pulse-time $$( echo "2*3600*24" | bc -l ) \
+ --fluid-pressure-pulse-shape triangle \
+ --file-interval $$( echo "60*10" | bc -l ) \
+ --time 0.0 \
+ --time-end $$( echo "20*3600*24 + 60*10" | bc -l ) sim-$$perm; done'
+
+ #--time $$( echo "($$i-1)*3600*24" | bc -l ) \
+ #--time-end $$( echo "($$i+1)*3600*24*1.5" | bc -l ) sim-$$perm; done'
+
+timeseries.txt: sim-1e-18.output00000.txt
+ /bin/sh -c '\
+ rm -f $@; \
+ for perm in $(PERM_SEQ); do \
+ for f in sim-$$perm.output*.txt; do \
+ tail -n 1 "$$f" | cut -f2- >> $@; \
+ done; done'
+
+max_strainrate_depth.txt: sim-1e-18.output00000.txt
+ /bin/sh -c '\
+ rm -f $@; \
+ for perm in $(PERM_SEQ); do \
+ for f in sim-$$perm.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,\"\t\",$$perm \
+ }" \
+ "$$f" >> $@; \
+ done; done'
+
+../$(FIG).pdf: fig.gp timeseries.txt max_strainrate_depth.txt
+ gnuplot fig.gp > $@
+
+clean:
+ for perm in $(PERM_SEQ); do rm -f sim-$$perm.output*.txt; done
+ rm -f *.txt
+ rm -f ../$(FIG).pdf
+
+.PHONY: default clean
diff --git a/fig-pulse_lag/fig.gp b/fig-pulse_lag/fig.gp
@@ -0,0 +1,49 @@
+#!/usr/bin/env gnuplot
+reset
+
+set terminal pdfcairo color size 15 cm, 10 cm
+
+set multiplot layout 4,1 \
+ margins 0.15,0.90,0.13,0.95 \
+ spacing 0.0,0.03
+
+file_interval_seconds=600.0
+conv=1.0/(24.0*3600.0/file_interval_seconds)
+
+set key top right samplen 1.0
+unset xlabel
+set xtics format ""
+set yrange [0:380]
+set ylabel "[kPa]"
+set ytics 100
+
+plot \
+"timeseries.txt" u ($0*conv):($2/1000) w l lw 2 lc "black" t "effective normal stress", \
+"" u ($0*conv):($3/1000) w l lw 2 lt 3 dt "-" t "water pressure"
+
+unset yrange
+set yrange [1e-19:1e-15]
+set ytics (1e-18,1e-17,1e-16)
+set ylabel "Permeability [m^2]"
+set logscale y
+plot "max_strainrate_depth.txt" u ($0*conv):3 w l lw 2 lt 5 t ""
+unset logscale y
+
+unset ylabel
+unset ytics
+set yrange [0:100]
+set y2range [0:100]
+set y2tics 20
+set y2label "Shear stress [kPa]"
+plot "timeseries.txt" u ($0*conv):($4*$2/1000) w l lw 2 lt 1 t ""
+
+set xtics format "%g"
+unset y2label
+unset y2tics
+set ytics 0.5
+set yrange [3.0:0.0]
+set xlabel "Time [d]"
+set ylabel "Depth of max. strain rate [m]"
+plot "max_strainrate_depth.txt" u ($0*conv):(8.0 - $1) w l lw 2 lt 4 t ""
+
+unset multiplot