commit 132ce14d998edf2805b102cbb3cc527a080ac436
parent 74cf3d782edc4b27b02eeea37d4070b3abbff20d
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 25 Jun 2019 13:51:47 +0200
Add preliminary fig 3
Diffstat:
2 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/fig3/Makefile b/fig3/Makefile
@@ -0,0 +1,23 @@
+BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
+FIG = fig3
+
+default: ../$(FIG).pdf
+
+unnamed.output00000.txt: $(BIN)
+ /bin/sh -c '\
+ ./$< --resolution 50 --length 2.0 --normal-stress 150e3 \
+ --fluid --fluid-permeability 2e-17 --fluid-pressure-top 50e3 \
+ --fluid-pressure-ampl 50e3 \
+ --fluid-pressure-freq $$( echo "1.0/(3600*24)" | bc -l ) \
+ --time-step 1e-1 \
+ --file-interval $$( echo "60*10" | bc -l ) \
+ --time-end $$( echo "3600*24*7" | bc -l )'
+
+../$(FIG).pdf: fig.gp unnamed.output00000.txt
+ gnuplot $< > $@
+
+clean:
+ $(RM) *.txt
+ $(RM) ../$(FIG).pdf
+
+.PHONY: default clean
diff --git a/fig3/fig.gp b/fig3/fig.gp
@@ -0,0 +1,33 @@
+#!/usr/bin/env gnuplot
+
+set terminal pdfcairo color size 7.5 cm, 7.5 cm
+set multiplot layout 1,3
+
+set yrange [0.0:2.0]
+
+set key bottom right #samplen 0.9
+
+
+do for [t=1:10] {
+ filename = sprintf('unnamed.output%05d.txt', t)
+ set xlabel "Water pressure, p_f [Pa]"
+ set ylabel "Vertical position, z [m]" offset 2
+ #set xrange [0:150]
+ plot filename u 4:1 w l lw 2 lc "blue" t ""
+
+ set xlabel "Effective normal stress [Pa]"
+ set ylabel ""
+ #set xrange [0:200e3]
+ plot filename u 3:1 w l lw 2 lc "black" t ""
+
+ # set xlabel "Friction, mu [-]"
+ # set xrange [-0.05:1.5]
+ # plot filename u 5:1 w l lw 2 lc "gray" t ""
+
+ set xlabel "Horizontal velocity, v_x [m/s]"
+ set ylabel ""
+ #set xrange [0.0:0.025]
+ plot filename u 2:1 w l lw 2 lc "red" t ""
+}
+
+unset multiplot