1d_fd_simple_shear

continuum model for granular flows with pore-pressure dynamics
git clone git://src.adamsgaard.dk/1d_fd_simple_shear
Log | Files | Refs | README | LICENSE Back to index

commit dc46674d016883f15b65d5d0150429d1b142eebe
parent f0c5149085e991fa6b9404c0e783b2560abde557
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri,  7 Feb 2020 11:36:39 +0100

Clean up and remove examples

Diffstat:
D.gitlab-ci.yml | 12------------
Dexamples/1d_fd_simple_shear.gp | 18------------------
Dexamples/1d_fd_simple_shear.png | 0
Dexamples/1d_fd_simple_shear_fluid.gp | 31-------------------------------
Dexamples/1d_fd_simple_shear_rheology.gp | 18------------------
Dexamples/1d_fd_simple_shear_rheology.png | 0
Dexamples/1d_fd_simple_shear_rheology_iverson.gp | 26--------------------------
Dexamples/1d_fd_simple_shear_rheology_iverson.png | 0
Dexamples/1d_fd_simple_shear_rheology_kamb.gp | 21---------------------
Dexamples/1d_fd_simple_shear_rheology_kamb.png | 0
Dexamples/1d_fd_simple_shear_rheology_tulaczyk.gp | 25-------------------------
Dexamples/1d_fd_simple_shear_rheology_tulaczyk.png | 0
Dexamples/BlueSeq.plt | 26--------------------------
Dexamples/Makefile | 115-------------------------------------------------------------------------------
Dexamples/diurnal.timeseries.gp | 27---------------------------
15 files changed, 0 insertions(+), 319 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml @@ -1,12 +0,0 @@ -build-alpine: - stage: build - image: alpine:edge - before_script: - - apk --no-cache add build-base gnuplot valgrind - script: - - make -C examples - - make memtest - - make test - artifacts: - paths: - - examples/1d_fd_simple_shear.png diff --git a/examples/1d_fd_simple_shear.gp b/examples/1d_fd_simple_shear.gp @@ -1,18 +0,0 @@ -#!/usr/bin/env gnuplot - -set terminal pngcairo color size 18.6 cm, 17.6 cm -set output "1d_fd_simple_shear.png" -set xlabel "Normalized horizontal velocity, v_x [-]" -set ylabel "Vertical position, z [m]" offset 2 - -set yrange [0.0:0.73] -set xrange [-0.1:1.05] - -set key bottom right #samplen 0.9 - -plot "1d_fd_simple_shear_P10kPa.txt" u 2:1 w l lw 2 lc "#ee2430" title "P_{wall} = 10 kPa", \ - "1d_fd_simple_shear_P20kPa.txt" u 2:1 w l lw 2 lc "#53bf3a" title "P_{wall} = 20 kPa", \ - "1d_fd_simple_shear_P40kPa.txt" u 2:1 w l lw 2 lc "#2f54ad" title "P_{wall} = 40 kPa", \ - "1d_fd_simple_shear_P60kPa.txt" u 2:1 w l lw 2 lc "#b047aa" title "P_{wall} = 60 kPa", \ - "1d_fd_simple_shear_P80kPa.txt" u 2:1 w l lw 2 lc "#6ccfd9" title "P_{wall} = 80 kPa", \ - "1d_fd_simple_shear_P120kPa.txt" u 2:1 w l lw 2 lc "#231f20" title "P_{wall} = 120 kPa" diff --git a/examples/1d_fd_simple_shear.png b/examples/1d_fd_simple_shear.png Binary files differ. diff --git a/examples/1d_fd_simple_shear_fluid.gp b/examples/1d_fd_simple_shear_fluid.gp @@ -1,31 +0,0 @@ -#!/usr/bin/env gnuplot - -# specify input file with: -# gnuplot -e "filename='file.txt'" 1d_fd_simple_shear_fluid.gp - -set terminal pngcairo color size 40 cm, 12 cm -set multiplot layout 1,3 -# set multiplot layout 1,4 - -set key bottom right #samplen 0.9 - -set xlabel "Water pressure, p_f [Pa]" -set ylabel "Vertical position, z [m]" offset 2 -set xrange [p_min:p_max] -plot filename u 4:1 w l lw 2 lc "blue" t "" - -set xlabel "Effective normal stress [Pa]" -set ylabel "" -set xrange [0:300e3] -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 diff --git a/examples/1d_fd_simple_shear_rheology.gp b/examples/1d_fd_simple_shear_rheology.gp @@ -1,18 +0,0 @@ -#!/usr/bin/env gnuplot - -set terminal pngcairo color size 18.6 cm, 17.6 cm -set output "1d_fd_simple_shear_rheology.png" -set xlabel "Applied friction, mu = tau/N [-]" -set ylabel "Shear velocity, v [m/s]" offset 2 - -set xrange [0.0:0.7] -set yrange [0.0:0.01] -set key top left #samplen 0.9 - -plot "1d_fd_simple_shear_rheology_b0.01.txt" u 1:2 w l lw 2 t "b = 0.01", \ - "1d_fd_simple_shear_rheology_b0.10.txt" u 1:2 w l lw 2 t "b = 0.1", \ - "1d_fd_simple_shear_rheology_b0.20.txt" u 1:2 w l lw 2 t "b = 0.2", \ - "1d_fd_simple_shear_rheology_b0.40.txt" u 1:2 w l lw 2 t "b = 0.4", \ - "1d_fd_simple_shear_rheology_b0.60.txt" u 1:2 w l lw 2 t "b = 0.6", \ - "1d_fd_simple_shear_rheology_b0.80.txt" u 1:2 w l lw 2 t "b = 0.8", \ - "1d_fd_simple_shear_rheology_b1.00.txt" u 1:2 w l lw 2 t "b = 1.0" diff --git a/examples/1d_fd_simple_shear_rheology.png b/examples/1d_fd_simple_shear_rheology.png Binary files differ. diff --git a/examples/1d_fd_simple_shear_rheology_iverson.gp b/examples/1d_fd_simple_shear_rheology_iverson.gp @@ -1,26 +0,0 @@ -#!/usr/bin/env gnuplot - -reset - -## resemble Iverson 2010 plot: - -#set terminal pngcairo color size 18.6 cm, 11.0 cm -set terminal pngcairo size 18.6 cm, 11.0 cm -set output "1d_fd_simple_shear_rheology_iverson.png" - -set xlabel "Shear strain rate [a^{-1}]" -set ylabel "Shear friction [-]" offset 2 - -set xrange [1e1:1e6] # m/a -set yrange [0.0:0.8] -set key bottom right #samplen 0.9 - -set logscale x - -load 'BlueSeq.plt' - -plot "1d_fd_simple_shear_rheology_b0.94_iverson.txt" u ($2*3600*24*365):1 w l lc '#666666' lw 2 dashtype '-' t "glass beads, b = 0.94", \ - "1d_fd_simple_shear_rheology_b0.40_iverson.txt" u ($2*3600*24*365):1 w l ls 6 lw 2 t "b = 0.40", \ - "1d_fd_simple_shear_rheology_b0.20_iverson.txt" u ($2*3600*24*365):1 w l ls 5 lw 2 t "b = 0.20", \ - "1d_fd_simple_shear_rheology_b0.10_iverson.txt" u ($2*3600*24*365):1 w l ls 3 lw 2 t "b = 0.10", \ - "1d_fd_simple_shear_rheology_b0.01_iverson.txt" u ($2*3600*24*365):1 w l ls 1 lw 2 t "b = 0.01" diff --git a/examples/1d_fd_simple_shear_rheology_iverson.png b/examples/1d_fd_simple_shear_rheology_iverson.png Binary files differ. diff --git a/examples/1d_fd_simple_shear_rheology_kamb.gp b/examples/1d_fd_simple_shear_rheology_kamb.gp @@ -1,21 +0,0 @@ -#!/usr/bin/env gnuplot -reset - -## resemble Kamb 1991 plot: - -set terminal pngcairo color size 18.6 cm, 17.6 cm -set output "1d_fd_simple_shear_rheology_kamb.png" -set xlabel "Shear stress [bar]" -set ylabel "Shear displacment rate [m/day]" offset 2 - -set xrange [0.0:0.028] -set yrange [0.0:2.5] -set key top left #samplen 0.9 - -load 'BlueSeq.plt' - -plot "1d_fd_simple_shear_rheology_b0.94_kamb.txt" u ($1*1700/100000):($2*3600*24) w l lc '#666666' lw 2 dashtype '-' t "b = 0.94", \ - "1d_fd_simple_shear_rheology_b0.40_kamb.txt" u ($1*1700/100000):($2*3600*24) w l ls 6 lw 2 t "b = 0.40", \ - "1d_fd_simple_shear_rheology_b0.20_kamb.txt" u ($1*1700/100000):($2*3600*24) w l ls 5 lw 2 t "b = 0.20", \ - "1d_fd_simple_shear_rheology_b0.10_kamb.txt" u ($1*1700/100000):($2*3600*24) w l ls 3 lw 2 t "b = 0.10", \ - "1d_fd_simple_shear_rheology_b0.01_kamb.txt" u ($1*1700/100000):($2*3600*24) w l ls 1 lw 2 t "b = 0.01" diff --git a/examples/1d_fd_simple_shear_rheology_kamb.png b/examples/1d_fd_simple_shear_rheology_kamb.png Binary files differ. diff --git a/examples/1d_fd_simple_shear_rheology_tulaczyk.gp b/examples/1d_fd_simple_shear_rheology_tulaczyk.gp @@ -1,25 +0,0 @@ -#!/usr/bin/env gnuplot - -## resemble Tulaczyk 2006 plot: - -set terminal pngcairo color size 18.6 cm, 17.6 cm -set output "1d_fd_simple_shear_rheology_tulaczyk.png" -set xlabel "Normalized shear stress [-]" -set ylabel "Normalized shear strain rate [-]" offset 2 - -set xrange [0.1:10.0] -set yrange [1.0:1000.0] -set key top left #samplen 0.9 - -set logscale xy - -load 'BlueSeq.plt' - -# divide friction by threshold friction value (mu_s) -# divide shear velocity by 1 m/h - -plot "1d_fd_simple_shear_rheology_b0.94_tulaczyk.txt" u ($1/0.502):($2/3.4e-9) w l lc '#666666' lw 2 dashtype '-' t "b = 0.94", \ - "1d_fd_simple_shear_rheology_b0.40_tulaczyk.txt" u ($1/0.502):($2/8.6e-9) w l ls 6 lw 2 t "b = 0.40", \ - "1d_fd_simple_shear_rheology_b0.20_tulaczyk.txt" u ($1/0.502):($2/1.7e-8) w l ls 5 lw 2 t "b = 0.20", \ - "1d_fd_simple_shear_rheology_b0.10_tulaczyk.txt" u ($1/0.502):($2/3.5e-8) w l ls 3 lw 2 t "b = 0.10", \ - "1d_fd_simple_shear_rheology_b0.01_tulaczyk.txt" u ($1/0.502):($2/3.5e-7) w l ls 1 lw 2 t "b = 0.01" diff --git a/examples/1d_fd_simple_shear_rheology_tulaczyk.png b/examples/1d_fd_simple_shear_rheology_tulaczyk.png Binary files differ. diff --git a/examples/BlueSeq.plt b/examples/BlueSeq.plt @@ -1,26 +0,0 @@ -# line styles for ColorBrewer Blues -# for use with sequential data -# provides 8 blue colors of increasing saturation -# compatible with gnuplot >=4.2 -# derived from Anna Schneider - -# line styles - -set style line 1 lc rgb '#084594' # dark blue -set style line 2 lc rgb '#2171B5' # -set style line 3 lc rgb '#4292C6' # medium blue -set style line 4 lc rgb '#6BAED6' # -set style line 5 lc rgb '#9ECAE1' # light blue -set style line 6 lc rgb '#C6DBEF' # -set style line 7 lc rgb '#DEEBF7' # -set style line 8 lc rgb '#F7FBFF' # very light blue - -# palette -set palette defined ( 0 '#084594',\ - 1 '#2171B5',\ - 2 '#4292C6',\ - 3 '#6BAED6',\ - 4 '#9ECAE1',\ - 5 '#C6DBEF',\ - 6 '#DEEBF7',\ - 7 '#F7FBFF') diff --git a/examples/Makefile b/examples/Makefile @@ -1,115 +0,0 @@ -BIN = ../1d_fd_simple_shear - -plots: 1d_fd_simple_shear.png \ - 1d_fd_simple_shear_rheology.png \ - 1d_fd_simple_shear_rheology_kamb.png \ - 1d_fd_simple_shear_rheology_iverson.png \ - 1d_fd_simple_shear_rheology_tulaczyk.png \ - diurnal.timeseries.pdf - -diurnal.mp4: diurnal.output00000.txt.png - ffmpeg -i diurnal.output%05d.txt.png -y diurnal.mp4 - -diurnal.output00000.txt.png: 1d_fd_simple_shear_fluid.gp diurnal.output00000.txt - /bin/sh -c '\ - for f in diurnal.output*.txt; do \ - gnuplot -e "filename=\"$$f\"; p_min=\"0\"; p_max=\"100e3\"" \ - 1d_fd_simple_shear_fluid.gp > $$f.png; \ - done' - -diurnal.output00000.txt: $(BIN) - /bin/sh -c '\ - ./$(BIN) --length 8.0 --normal-stress 150e3 \ - --fluid --fluid-permeability 2e-17 \ - --fluid-pressure-top 50e3 --fluid-pressure-ampl 100e3 \ - --fluid-pressure-freq $$( echo "1.0/(3600*24)" | bc -l ) \ - --file-interval $$( echo "60*10" | bc -l ) \ - --time-end $$( echo "3600*24*7" | bc -l ) diurnal' - -diurnal.timeseries.txt: diurnal.output00000.txt - /bin/sh -c '\ - for f in diurnal.output*.txt; do \ - tail -n 1 "$$f" | cut -f2- >> $@; \ - done' - -diurnal.timeseries.pdf: diurnal.timeseries.gp diurnal.timeseries.txt - gnuplot diurnal.timeseries.gp > $@ - -diurnal.gif: diurnal.mp4 - convert diurnal.output*.txt.png \ - -delay 1 -loop 0 -fuzz 10% -layers Optimize $@ - -1d_fd_simple_shear.png: $(BIN) 1d_fd_simple_shear.gp - /bin/sh -c '\ - for P in 10 20 40 60 80 120; do \ - ./$(BIN) --stress-ratio 0.44 -o 0.03 -L 0.64 -P $${P}e3 -N \ - > 1d_fd_simple_shear_P$${P}kPa.txt; \ - done' - gnuplot 1d_fd_simple_shear.gp > $@ - -1d_fd_simple_shear_rheology.png: $(BIN) 1d_fd_simple_shear_rheology.gp - /bin/sh -c '\ - for b in $$(printf "0.01\n0.10\n"; jot 5 0.20 1.00); do \ - out="1d_fd_simple_shear_rheology_b$${b}.txt"; \ - rm -f "$$out"; \ - for t in $$(jot 80 0.01 0.80); do \ - printf "$$t\t" >> "$$out"; \ - ./$(BIN) -P 20e3 --stress-ratio $$t -b $$b | \ - tail -n 1 | cut -f2 >> "$$out"; \ - done; done' - gnuplot 1d_fd_simple_shear_rheology.gp > $@ - -# 1 bar is equal to 100 kPa -1d_fd_simple_shear_rheology_kamb.png: $(BIN) 1d_fd_simple_shear_rheology_kamb.gp Makefile - /bin/sh -c '\ - for b in 0.01 0.10 0.20 0.40 0.94; do \ - out="1d_fd_simple_shear_rheology_b$${b}_kamb.txt"; \ - rm -f "$$out"; \ - for t in $$(jot 200 0.01 2.0); do \ - printf "$$t\t" >> "$$out"; \ - ./$(BIN) -f 0.443 -C 1.0e3 -P 1.7e3 --stress-ratio $$t -b $$b | \ - tail -n 1 | cut -f2 >> "$$out"; \ - done; done' - gnuplot 1d_fd_simple_shear_rheology_kamb.gp > $@ - -# shear-strain rate from 10^1 to 10^6 m/a -# friction around 0.55 -1d_fd_simple_shear_rheology_iverson.png: $(BIN) 1d_fd_simple_shear_rheology_iverson.gp - /bin/sh -c '\ - for b in $$(printf "0.01\n0.10\n"; jot 8 0.20 0.90) 0.94; do \ - out="1d_fd_simple_shear_rheology_b$${b}_iverson.txt"; \ - rm -f "$$out"; \ - for t in $$(jot 50 0.0001 1.0); do \ - printf "$$t\t" >> "$$out"; \ - ./$(BIN) -f 0.55 -P 100e3 -L 1.0 --stress-ratio $$t -b $$b | \ - tail -n 1 | cut -f2 >> "$$out"; \ - done; done' - gnuplot 1d_fd_simple_shear_rheology_iverson.gp > $@ - -# shear velocity rate from 0.1 m/h to 100 m/h -1d_fd_simple_shear_rheology_tulaczyk.png: $(BIN) 1d_fd_simple_shear_rheology_tulaczyk.gp - /bin/sh -c '\ - for b in $$(printf "0.01\n0.10\n"; jot 8 0.20 1.0) 0.94; do \ - out="1d_fd_simple_shear_rheology_b$${b}_tulaczyk.txt"; \ - rm -f "$$out"; \ - for t in $$(jot 50 0.1000 0.9); do \ - printf "$$t\t" >> "$$out"; \ - ./$(BIN) -f 0.5 -P 10e3 --stress-ratio $$t -b $$b | \ - tail -n 1 | cut -f2 >> "$$out"; \ - done; done' - gnuplot 1d_fd_simple_shear_rheology_tulaczyk.gp > $@ - -$(BIN): - make -C .. - -clean: - rm -f *.txt - rm -f *.png - rm -f *.gif - rm -f *.mp4 - rm -f *.pdf - rm -f *.o - rm -f 1d_fd_simple_shear.png - rm -f 1d_fd_simple_shear_rheology*.png - -.PHONY: plots clean diff --git a/examples/diurnal.timeseries.gp b/examples/diurnal.timeseries.gp @@ -1,27 +0,0 @@ -#!/usr/bin/env gnuplot -reset - -#set terminal pdfcairo color size 10.0 cm, 5.0 cm -set terminal pdfcairo color size 10.0 cm, 8.0 cm - -# set xrange [0.0:0.7] -# set yrange [0.0:0.01] -# set key top left #samplen 0.9 - -set multiplot layout 2,1 - -unset xlabel -unset xtics -set yrange [0:210] -set ylabel "Stress [kPa]" offset 2 -plot \ -"diurnal.timeseries.txt" u ($0/1008*7):($2/1000) w l lw 2 lc "black" t "effective normal stress", \ -"" u ($0/1008*7):($3/1000) w l lw 2 lc "blue" dt "-" t "water pressure" - -set xtics -unset yrange -set xlabel "Time, t [d]" -set ylabel "Shear velocity, v [km/d]" offset 2 -plot "" u ($0/1008*7):($1*60*60*24/1000) w l lw 2 lc "red" t "" - -unset multiplot