tAdd flux to hysteresis figures - cngf-pf-exp1 - experiments for first paper wi… | |
git clone git://src.adamsgaard.dk/manus_continuum_granular1_exp | |
Log | |
Files | |
Refs | |
Submodules | |
README | |
LICENSE | |
--- | |
commit 52e069456f8a82f43e5623f3df9daf831d29a93e | |
parent 3ad7fe779d546a458404c1a149772318d071be22 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 20 Nov 2019 16:24:09 +0100 | |
Add flux to hysteresis figures | |
Diffstat: | |
M fig-hysteresis_rate/Makefile | 34 ++++++++++++++++++++++++-----… | |
M fig-hysteresis_rate/fig.gp | 31 +++++++++++++++++------------… | |
M fig-hysteresis_stress/Makefile | 36 +++++++++++++++++++++++++----… | |
M fig-hysteresis_stress/fig.gp | 33 ++++++++++++++++-------------… | |
4 files changed, 90 insertions(+), 44 deletions(-) | |
--- | |
diff --git a/fig-hysteresis_rate/Makefile b/fig-hysteresis_rate/Makefile | |
t@@ -1,11 +1,11 @@ | |
BIN = ../1d_fd_simple_shear/1d_fd_simple_shear | |
-FIG = $(shell basename $(CURDIR)) | |
+FIG != basename $(PWD) | |
default: ../$(FIG).pdf | |
sim.output00000.txt: $(BIN) | |
/bin/sh -c '\ | |
- ./$< --length 8.0 \ | |
+ ./$(BIN) --length 8.0 \ | |
--normal-stress 200e3 \ | |
--set-shear-velocity $$( echo "1000/(365*24*60*60)" | bc -l ) \ | |
--fluid \ | |
t@@ -42,14 +42,34 @@ max_strainrate_depth.txt: sim.output00000.txt | |
"$$f" >> $@; \ | |
done' | |
-timeseries_combined.txt: timeseries.txt max_strainrate_depth.txt | |
- paste $^ > $@ | |
+sediment_flux.txt: sim.output00000.txt | |
+ /bin/sh -c '\ | |
+ rm -f $@; \ | |
+ for f in sim.output*.txt; do \ | |
+ awk " \ | |
+ BEGIN{getline; integral=0.0} \ | |
+ NF{ \ | |
+ if (NR > 1) \ | |
+ { \ | |
+ integral+=(\$$2+v_prev)/2.0*(\$$1-z_pr… | |
+ } \ | |
+ z_prev=\$$1; \ | |
+ v_prev=\$$2; \ | |
+ } \ | |
+ END{ \ | |
+ print integral \ | |
+ }" \ | |
+ "$$f" >> $@; \ | |
+ done' | |
+ | |
+timeseries_combined.txt: timeseries.txt max_strainrate_depth.txt sediment_flux… | |
+ paste timeseries.txt max_strainrate_depth.txt sediment_flux.txt > $@ | |
../$(FIG).pdf: fig.gp timeseries_combined.txt | |
- gnuplot $< > $@ | |
+ gnuplot fig.gp > $@ | |
clean: | |
- $(RM) *.txt | |
- $(RM) ../$(FIG).pdf | |
+ rm -f *.txt | |
+ rm -f ../$(FIG).pdf | |
.PHONY: default clean | |
diff --git a/fig-hysteresis_rate/fig.gp b/fig-hysteresis_rate/fig.gp | |
t@@ -1,22 +1,17 @@ | |
#!/usr/bin/env gnuplot | |
reset | |
-set terminal pdfcairo color size 7.5 cm, 7.5 cm | |
+set terminal pdfcairo color size 7.5 cm, 10 cm | |
-set multiplot layout 2,1 \ | |
+set multiplot layout 3,1 \ | |
margins 0.19,0.75,0.23,0.85 \ | |
spacing 0.03,0.03 | |
-# set xrange [0.0:0.7] | |
-# set key top left #samplen 0.9 | |
- | |
set xrange [0:210] | |
set x2range [200:-10] | |
-#set x2tics 50 nomirror tc lt 3 | |
set x2tics 50 nomirror | |
-unset xtics | |
+set xtics format "" | |
set yrange [0:80] | |
-#set x2label "Water pressure [kPa]" tc lt 3 | |
set x2label "Water pressure [kPa]" | |
set ylabel "Shear stress [kPa]" | |
set ytics 20 | |
t@@ -25,21 +20,29 @@ set arrow from 160,75 to 125,60 head | |
plot \ | |
"timeseries_combined.txt" u ($2/1000):($4*$2/1000) w l lt 1 t "" | |
-unset arrow | |
- | |
-set xtics | |
-set xlabel "Effective normal stress [kPa]" | |
unset x2tics | |
unset ytics | |
unset x2label | |
unset ylabel | |
set y2label "Depth of max. strain rate [m]" | |
-#set y2range [1.5:-0.1] | |
set yrange [2.5:-0.1] | |
set y2range [2.5:-0.1] | |
-#set y2tics 0.25 | |
set y2tics 0.5 | |
+unset arrow | |
set arrow from 160,0.15 to 130,0.13 head | |
set arrow from 120,0.6 to 140,1.2 head | |
set arrow from 180,1.4 to 180.3,0.6 head | |
plot "" u ($2/1000):(8.0 - $6) w l lt 4 t "" | |
+ | |
+set xtics format "%g" | |
+set xlabel "Effective normal stress [kPa]" | |
+set ytics 3e-5 | |
+set yrange [0:1e-4] | |
+unset arrow | |
+set arrow from 130,1e-5 to 160,1.5e-5 head | |
+set arrow from 140,4.5e-5 to 120,2.5e-5 head | |
+set arrow from 180,2e-5 to 180.3,5e-5 head | |
+unset y2tics | |
+unset y2label | |
+set ylabel "Specific sediment flux [m/s]" | |
+plot "" u ($2/1000):8 w l lt 6 t "" | |
diff --git a/fig-hysteresis_stress/Makefile b/fig-hysteresis_stress/Makefile | |
t@@ -1,11 +1,11 @@ | |
BIN = ../1d_fd_simple_shear/1d_fd_simple_shear | |
-FIG = $(shell basename $(CURDIR)) | |
+FIG != basename $(PWD) | |
default: ../$(FIG).pdf | |
sim.output00000.txt: $(BIN) | |
/bin/sh -c '\ | |
- ./$< --length 8.0 \ | |
+ ./$(BIN) --length 8.0 \ | |
--normal-stress 200e3 \ | |
--stress-ratio 0.4 \ | |
--fluid \ | |
t@@ -42,14 +42,36 @@ max_strainrate_depth.txt: sim.output00000.txt | |
"$$f" >> $@; \ | |
done' | |
-timeseries_combined.txt: timeseries.txt max_strainrate_depth.txt | |
- paste $^ > $@ | |
+### | |
+ | |
+sediment_flux.txt: sim.output00000.txt | |
+ /bin/sh -c '\ | |
+ rm -f $@; \ | |
+ for f in sim.output*.txt; do \ | |
+ awk " \ | |
+ BEGIN{getline; integral=0.0} \ | |
+ NF{ \ | |
+ if (NR > 1) \ | |
+ { \ | |
+ integral+=(\$$2+v_prev)/2.0*(\$$1-z_pr… | |
+ } \ | |
+ z_prev=\$$1; \ | |
+ v_prev=\$$2; \ | |
+ } \ | |
+ END{ \ | |
+ print integral \ | |
+ }" \ | |
+ "$$f" >> $@; \ | |
+ done' | |
+ | |
+timeseries_combined.txt: timeseries.txt max_strainrate_depth.txt sediment_flux… | |
+ paste timeseries.txt max_strainrate_depth.txt sediment_flux.txt > $@ | |
../$(FIG).pdf: fig.gp timeseries_combined.txt | |
- gnuplot $< > $@ | |
+ gnuplot fig.gp > $@ | |
clean: | |
- $(RM) *.txt | |
- $(RM) ../$(FIG).pdf | |
+ rm -f *.txt | |
+ rm -f ../$(FIG).pdf | |
.PHONY: default clean | |
diff --git a/fig-hysteresis_stress/fig.gp b/fig-hysteresis_stress/fig.gp | |
t@@ -1,24 +1,17 @@ | |
#!/usr/bin/env gnuplot | |
reset | |
-set terminal pdfcairo color size 7.5 cm, 7.5 cm | |
+set terminal pdfcairo color size 7.5 cm, 10 cm | |
-set multiplot layout 2,1 \ | |
+set multiplot layout 3,1 \ | |
margins 0.19,0.75,0.23,0.85 \ | |
spacing 0.03,0.03 | |
-# set xrange [0.0:0.7] | |
-# set key top left #samplen 0.9 | |
- | |
set xrange [0:210] | |
set x2range [200:-10] | |
-#set x2tics 50 nomirror tc lt 3 | |
set x2tics 50 nomirror | |
-unset xtics | |
-#set yrange [-0.2:4.2] | |
+set xtics format "" | |
set yrange [-0.5:10] | |
- | |
-#set x2label "Water pressure [kPa]" tc lt 3 | |
set x2label "Water pressure [kPa]" | |
set ylabel "Shear velocity [km/d]" | |
set ytics 2.0 | |
t@@ -27,21 +20,29 @@ set arrow from 65,5.5 to 83,3.5 head | |
plot \ | |
"timeseries_combined.txt" u ($2/1000):($1*60*60*24/1000) w l lt 7 t "" | |
-unset arrow | |
- | |
-set xtics | |
-set xlabel "Effective normal stress [kPa]" | |
unset x2tics | |
unset ytics | |
unset x2label | |
unset ylabel | |
set y2label "Depth of max. strain rate [m]" | |
-#set y2range [1.5:-0.1] | |
set yrange [2.5:-0.1] | |
set y2range [2.5:-0.1] | |
-#set y2tics 0.25 | |
set y2tics 0.5 | |
+unset arrow | |
set arrow from 115,0.10 to 85,0.13 head | |
set arrow from 100,1.0 to 120,1.3 head | |
set arrow from 165,1.2 to 165,0.7 head | |
plot "" u ($2/1000):(8.0 - $6) w l lt 4 t "" | |
+ | |
+set xtics format "%g" | |
+set xlabel "Effective normal stress [kPa]" | |
+set ytics 0.02 | |
+set yrange [0:0.06] | |
+unset arrow | |
+#set arrow from 115,0.10 to 85,0.13 head | |
+#set arrow from 100,1.0 to 120,1.3 head | |
+#set arrow from 165,1.2 to 165,0.7 head | |
+unset y2tics | |
+unset y2label | |
+set ylabel "Specific sediment flux [m/s]" | |
+plot "" u ($2/1000):8 w l lt 6 t "" |