tadd first fit to flux plot - hansen-zoet-exp - comparison of lab and model res… | |
git clone git://src.adamsgaard.dk/hansen-zoet-exp | |
Log | |
Files | |
Refs | |
Submodules | |
--- | |
commit 2d398582b3eedc34521506c01327b56026b6fd92 | |
parent 466d1475ad8b77a69b386574470ec6e77040a89d | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 12 May 2022 15:34:55 +0200 | |
add first fit to flux plot | |
Diffstat: | |
A fig-fit/Makefile | 64 +++++++++++++++++++++++++++++… | |
A fig-fit/fig-mohr_coulomb.gp | 27 +++++++++++++++++++++++++++ | |
A fig-fit/fig-sediment_flux.gp | 42 +++++++++++++++++++++++++++++… | |
A fig-fit/fig-strain_distribution.gp | 47 +++++++++++++++++++++++++++++… | |
A fig-fit/rs_sediment_flux_100ma.txt | 3 +++ | |
A fig-fit/rs_sediment_flux_300ma.txt | 2 ++ | |
6 files changed, 185 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/fig-fit/Makefile b/fig-fit/Makefile | |
t@@ -0,0 +1,64 @@ | |
+BIN = ../cngf-pf/cngf-pf | |
+FIG = fig-fit | |
+ | |
+#stressvals != range -n 20 1 100 | |
+stressvals != range -l -n 20 0 2 | |
+ | |
+velvals = 3.169e-6 9.506e-6 | |
+ | |
+default: \ | |
+ ../$(FIG)-strain_distribution.pdf \ | |
+ ../$(FIG)-mohr_coulomb.pdf \ | |
+ ../$(FIG)-sediment_flux.pdf | |
+ | |
+strain_distribution_N5kPa_v3.169e-6ms.txt: $(BIN) Makefile | |
+ sh -c '\ | |
+ for v in ${velvals}; do \ | |
+ for P in ${stressvals}; do \ | |
+ ./$(BIN) \ | |
+ -d 530.7e-6 \ | |
+ -m 0.6 \ | |
+ -c 0e3 \ | |
+ -s $${v} \ | |
+ -L 0.11 \ | |
+ -n $${P}e3 \ | |
+ -A 0.33 \ | |
+ -b 0.002 \ | |
+ > strain_distribution_N$${P}kPa_v$${v}ms.txt; \ | |
+ echo strain_distribution_N$${P}kPa_v$${v}ms.txt; \ | |
+ done; done' | |
+ # also close: lower A, higher b | |
+ | |
+mohr_coulomb_v3.169e-6ms.txt: strain_distribution_N5kPa_v3.169e-6ms.txt Makefi… | |
+ sh -c '\ | |
+ rm -f mohr_coulomb_v*ms.txt; \ | |
+ for v in ${velvals}; do \ | |
+ for P in ${stressvals}; do \ | |
+ tail -n 1 strain_distribution_N$${P}kPa_v$${v}ms.txt >… | |
+ done; done' | |
+ | |
+sediment_flux_v3.169e-6ms.txt: strain_distribution_N5kPa_v3.169e-6ms.txt Makef… | |
+ sh -c '\ | |
+ rm -f sediment_flux_v*ms.txt; \ | |
+ for v in ${velvals}; do \ | |
+ for P in ${stressvals}; do \ | |
+ (printf "%ge3\t" $$P; ../cngf-pf/shear_flux < strain_d… | |
+ echo sediment_flux_v$${v}ms.txt; \ | |
+ done; done' | |
+ | |
+../$(FIG)-strain_distribution.pdf: fig-strain_distribution.gp strain_distribut… | |
+ gnuplot fig-strain_distribution.gp > $@ | |
+ | |
+../$(FIG)-mohr_coulomb.pdf: fig-mohr_coulomb.gp mohr_coulomb_v3.169e-6ms.txt | |
+ gnuplot fig-mohr_coulomb.gp > $@ | |
+ | |
+../$(FIG)-sediment_flux.pdf: fig-sediment_flux.gp sediment_flux_v3.169e-6ms.txt | |
+ gnuplot fig-sediment_flux.gp > $@ | |
+ | |
+clean: | |
+ rm -f strain_distribution_*.txt mohr_coulomb_*.txt sediment_flux_*.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-fit/fig-mohr_coulomb.gp b/fig-fit/fig-mohr_coulomb.gp | |
t@@ -0,0 +1,27 @@ | |
+#!/usr/bin/env gnuplot | |
+ | |
+reset | |
+ | |
+set terminal pdfcairo enhanced color size 7.5 cm, 8 cm | |
+set multiplot layout 2,1 | |
+ | |
+#set lmargin 7.0 | |
+#set bmargin 3.5 | |
+#set rmargin 2.0 | |
+#set tmargin 2.0 | |
+ | |
+#set yrange [0.0:0.73] | |
+#set xrange [-0.13:1.13] | |
+#set key bottom right #samplen 0.9 | |
+ | |
+#set xlabel "Effective normal stress, {/Symbol s}_n' [kPa]" | |
+set ylabel "Shear stress, {/Symbol t} [kPa]" | |
+set key bottom right font ",10" | |
+plot "mohr_coulomb_v3.169e-6ms.txt" u ($3/1e3):($3*$5/1e3) w lp title "v = 100… | |
+ "mohr_coulomb_v9.506e-6ms.txt" u ($3/1e3):($3*$5/1e3) w lp title "v = … | |
+ | |
+set xlabel "Effective normal stress, {/Symbol s}_n' [kPa]" | |
+set ylabel "Shear friction, {/Symbol m} [-]" | |
+set key top right font ",10" | |
+plot "mohr_coulomb_v3.169e-6ms.txt" u ($3/1e3):5 w lp title "v = 100 m/a", \ | |
+ "mohr_coulomb_v9.506e-6ms.txt" u ($3/1e3):5 w lp title "v = 300 m/a" | |
diff --git a/fig-fit/fig-sediment_flux.gp b/fig-fit/fig-sediment_flux.gp | |
t@@ -0,0 +1,42 @@ | |
+#!/usr/bin/env gnuplot | |
+ | |
+reset | |
+ | |
+set terminal pdfcairo enhanced color size 7.5 cm, 10 cm | |
+set multiplot layout 2,1 | |
+ | |
+rswidth = 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] | |
+ | |
+# https://sodocumentation.net/gnuplot/topic/8825/fit-data-with-gnuplot | |
+#f(x) = a * exp(b * x) | |
+f(x, v) = a * x**b * v | |
+fit f(x, 100) "sediment_flux_v3.169e-6ms.txt" u ($1/1000):($2*3600*24*365.25*r… | |
+fitparams = sprintf("{/:Italic q}_t = %.2e {/:Italic v N'}^{%.3g}", a, b) | |
+ | |
+set xrange [0:*] | |
+set yrange [0:*] | |
+ | |
+#set xlabel "Normalized horizontal velocity, v_x [-]" | |
+set xlabel "Effective stress, {/:Italic N'} [kPa]" | |
+#set ylabel "Spec. sediment flux [m²/a]" | |
+set ylabel "Sediment flux, {/:Italic q}_t [m³/a]" | |
+set key bottom right font ",10" #samplen 0.9 | |
+set title "{/:Italic v} = 100 m/a" | |
+set yrange [0:1] | |
+plot "rs_sediment_flux_100ma.txt" u ($1/1000):($2) w p ps 2 t "Hansen and Zoet… | |
+ "sediment_flux_v3.169e-6ms.txt" u ($1/1000):($2*3600*24*365.25*rswidth… | |
+ f(x, 100) t fitparams | |
+ | |
+set title "{/:Italic v} = 300 m/a" | |
+set yrange [0:*] | |
+plot "rs_sediment_flux_300ma.txt" u ($1/1000):($2) w p ps 2 t "Hansen and Zoet… | |
+ "sediment_flux_v9.506e-6ms.txt" u ($1/1000):($2*3600*24*365.25*rswidth… | |
+ f(x, 300) t fitparams | |
diff --git a/fig-fit/fig-strain_distribution.gp b/fig-fit/fig-strain_distributi… | |
t@@ -0,0 +1,46 @@ | |
+#!/usr/bin/env gnuplot | |
+ | |
+reset | |
+ | |
+set terminal pdfcairo enhanced color size 7.5 cm, 10 cm | |
+set multiplot layout 2,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 xlabel "Normalized horizontal velocity, v_x [-]" | |
+set xlabel "Horizontal velocity, v_x [m/a]" | |
+set ylabel "Vertical position, z [m]" | |
+set key bottom right font ",10" #samplen 0.9 | |
+set title "v = 100 m/a" | |
+plot "strain_distribution_N8kPa_v3.169e-6ms.txt" u ($2*365*24*3600):1 w l lw 2… | |
+ "strain_distribution_N22kPa_v3.169e-6ms.txt" u ($2*365*24*3600):1 w l lw … | |
+ "strain_distribution_N50kPa_v3.169e-6ms.txt" u ($2*365*24*3600):1 w l lw … | |
+ | |
+#unset xrange | |
+ | |
+##set xlabel "Normalized horizontal velocity, v_x [-]" | |
+#set xlabel "Shear-strain rate, dv_x/dz [1/d]" | |
+#set ylabel "Vertical position, z [m]" | |
+#set key bottom right font ",10" #samplen 0.9 | |
+#plot "strain_distribution_N8kPa_v9.506e-6ms.txt" u ($6*24*3600):1 w l lw 2 ti… | |
+ #"strain_distribution_N22kPa_v9.506e-6ms.txt" u ($6*24*3600):1 w l lw 2 t… | |
+ #"strain_distribution_N50kPa_v9.506e-6ms.txt" u ($6*24*3600):1 w l lw 2 t… | |
+ | |
+ | |
+set xrange [-5 : 305] | |
+set yrange [0 : 0.11] | |
+ | |
+#set xlabel "Normalized horizontal velocity, v_x [-]" | |
+set xlabel "Horizontal velocity, v_x [m/a]" | |
+set ylabel "Vertical position, z [m]" | |
+set key bottom right font ",10" #samplen 0.9 | |
+set title "v = 300 m/a" | |
+plot "strain_distribution_N8kPa_v9.506e-6ms.txt" u ($2*365*24*3600):1 w l lw 2… | |
+ "strain_distribution_N22kPa_v9.506e-6ms.txt" u ($2*365*24*3600):1 w l lw … | |
+ "strain_distribution_N50kPa_v9.506e-6ms.txt" u ($2*365*24*3600):1 w l lw … | |
+\ No newline at end of file | |
diff --git a/fig-fit/rs_sediment_flux_100ma.txt b/fig-fit/rs_sediment_flux_100m… | |
t@@ -0,0 +1,3 @@ | |
+8.53e3 0.351 0.0053 0.0238 | |
+22.2e3 0.510 0.0134 0.0434 | |
+50.4e3 0.661 0.0835 0.0434 | |
diff --git a/fig-fit/rs_sediment_flux_300ma.txt b/fig-fit/rs_sediment_flux_300m… | |
t@@ -0,0 +1,2 @@ | |
+21.2e3 1.51 0.153 | |
+50.2e3 1.99 0.0959 |