commit 94f5a39b7fbcbbcf3dd9d9bc538ab44bf845902b
parent 536cfd192928594caed1ad60aa730144ff605a45
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 22 Apr 2022 11:45:48 +0200
compute sediment flux in stress experiment
Diffstat:
2 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/fig-effective_stress/Makefile b/fig-effective_stress/Makefile
@@ -1,11 +1,16 @@
BIN = ../cngf-pf/cngf-pf
FIG = $(shell basename $(CURDIR))
-default: ../$(FIG)-strain_distribution.pdf ../$(FIG)-mohr_coulomb.pdf
+stressvals = 8 16 22 32 41 50
+
+default: \
+ ../$(FIG)-strain_distribution.pdf \
+ ../$(FIG)-mohr_coulomb.pdf \
+ ../$(FIG)-sediment_flux.pdf
strain_distribution_N50kPa.txt: $(BIN) Makefile
sh -c '\
- for P in 8 22 50; do \
+ for P in ${stressvals}; do \
./$(BIN) \
-d 530.7e-6 \
-m 0.625 \
@@ -21,14 +26,14 @@ strain_distribution_N50kPa.txt: $(BIN) Makefile
mohr_coulomb.txt: strain_distribution_N50kPa.txt
sh -c '\
rm -f $@; \
- for P in 8 22 50; do \
+ for P in ${stressvals}; do \
tail -n 1 strain_distribution_N$${P}kPa.txt >> $@; \
done'
sediment_flux.txt: strain_distribution_N50kPa.txt
sh -c '\
rm -f $@; \
- for P in 8 22 50; do \
+ for P in ${stressvals}; do \
(printf "%ge3\t" $$P; shear_flux < strain_distribution_N$${P}kPa.txt) >> $@; \
done'
@@ -38,9 +43,13 @@ sediment_flux.txt: strain_distribution_N50kPa.txt
../$(FIG)-mohr_coulomb.pdf: fig-mohr_coulomb.gp mohr_coulomb.txt
gnuplot fig-mohr_coulomb.gp > $@
+../$(FIG)-sediment_flux.pdf: fig-sediment_flux.gp sediment_flux.txt
+ gnuplot fig-sediment_flux.gp > $@
+
clean:
rm -f *.txt
rm -f ../$(FIG)-strain_distribution.pdf
rm -f ../$(FIG)-mohr_coulomb.pdf
+ rm -f ../$(FIG)-sediment_flux.pdf
.PHONY: default clean
diff --git a/fig-effective_stress/fig-sediment_flux.gp b/fig-effective_stress/fig-sediment_flux.gp
@@ -0,0 +1,25 @@
+#!/usr/bin/env gnuplot
+
+reset
+
+set terminal pdfcairo enhanced color size 7.5 cm, 5 cm
+set multiplot layout 1,1
+
+rswidth = 0.1
+
+#set lmargin 7.0
+#set bmargin 3.5
+#set rmargin 2.0
+#set tmargin 2.0
+
+#set xrange [-5 : 105]
+#set yrange [0 : 0.11]
+
+set yrange [0:*]
+
+#set xlabel "Normalized horizontal velocity, v_x [-]"
+set xlabel "Effective stress, [kPa]"
+#set ylabel "Spec. sediment flux [m²/a]"
+set ylabel "Sediment flux [m³/a]"
+set key bottom right font ",10" #samplen 0.9
+plot "sediment_flux.txt" u ($1/1000):($2*3600*24*365.25*rswidth) w p lw 2 notitle+
\ No newline at end of file