Makefile (3737B)
1 BIN = ../1d_fd_simple_shear 2 3 plots: 1d_fd_simple_shear.png \ 4 1d_fd_simple_shear_rheology.png \ 5 1d_fd_simple_shear_rheology_kamb.png \ 6 1d_fd_simple_shear_rheology_iverson.png \ 7 1d_fd_simple_shear_rheology_tulaczyk.png \ 8 diurnal.timeseries.pdf 9 10 diurnal.mp4: diurnal.output00000.txt.png 11 ffmpeg -i diurnal.output%05d.txt.png -y diurnal.mp4 12 13 diurnal.output00000.txt.png: 1d_fd_simple_shear_fluid.gp diurnal.output00000.txt 14 /bin/sh -c '\ 15 for f in diurnal.output*.txt; do \ 16 gnuplot -e "filename=\"$$f\"; p_min=\"0\"; p_max=\"100e3\"" \ 17 1d_fd_simple_shear_fluid.gp > $$f.png; \ 18 done' 19 20 diurnal.output00000.txt: $(BIN) 21 /bin/sh -c '\ 22 ./$(BIN) --length 8.0 --normal-stress 150e3 \ 23 --fluid --fluid-permeability 2e-17 \ 24 --fluid-pressure-top 50e3 --fluid-pressure-ampl 100e3 \ 25 --fluid-pressure-freq $$( echo "1.0/(3600*24)" | bc -l ) \ 26 --file-interval $$( echo "60*10" | bc -l ) \ 27 --time-end $$( echo "3600*24*7" | bc -l ) diurnal' 28 29 diurnal.timeseries.txt: diurnal.output00000.txt 30 /bin/sh -c '\ 31 for f in diurnal.output*.txt; do \ 32 tail -n 1 "$$f" | cut -f2- >> $@; \ 33 done' 34 35 diurnal.timeseries.pdf: diurnal.timeseries.gp diurnal.timeseries.txt 36 gnuplot diurnal.timeseries.gp > $@ 37 38 diurnal.gif: diurnal.mp4 39 convert diurnal.output*.txt.png \ 40 -delay 1 -loop 0 -fuzz 10% -layers Optimize $@ 41 42 1d_fd_simple_shear.png: $(BIN) 1d_fd_simple_shear.gp 43 /bin/sh -c '\ 44 for P in 10 20 40 60 80 120; do \ 45 ./$(BIN) --stress-ratio 0.44 -o 0.03 -L 0.64 -P $${P}e3 -N \ 46 > 1d_fd_simple_shear_P$${P}kPa.txt; \ 47 done' 48 gnuplot 1d_fd_simple_shear.gp > $@ 49 50 1d_fd_simple_shear_rheology.png: $(BIN) 1d_fd_simple_shear_rheology.gp 51 /bin/sh -c '\ 52 for b in $$(printf "0.01\n0.10\n"; jot 5 0.20 1.00); do \ 53 out="1d_fd_simple_shear_rheology_b$${b}.txt"; \ 54 rm -f "$$out"; \ 55 for t in $$(jot 80 0.01 0.80); do \ 56 printf "$$t\t" >> "$$out"; \ 57 ./$(BIN) -P 20e3 --stress-ratio $$t -b $$b | \ 58 tail -n 1 | cut -f2 >> "$$out"; \ 59 done; done' 60 gnuplot 1d_fd_simple_shear_rheology.gp > $@ 61 62 # 1 bar is equal to 100 kPa 63 1d_fd_simple_shear_rheology_kamb.png: $(BIN) 1d_fd_simple_shear_rheology_kamb.gp Makefile 64 /bin/sh -c '\ 65 for b in 0.01 0.10 0.20 0.40 0.94; do \ 66 out="1d_fd_simple_shear_rheology_b$${b}_kamb.txt"; \ 67 rm -f "$$out"; \ 68 for t in $$(jot 200 0.01 2.0); do \ 69 printf "$$t\t" >> "$$out"; \ 70 ./$(BIN) -f 0.443 -C 1.0e3 -P 1.7e3 --stress-ratio $$t -b $$b | \ 71 tail -n 1 | cut -f2 >> "$$out"; \ 72 done; done' 73 gnuplot 1d_fd_simple_shear_rheology_kamb.gp > $@ 74 75 # shear-strain rate from 10^1 to 10^6 m/a 76 # friction around 0.55 77 1d_fd_simple_shear_rheology_iverson.png: $(BIN) 1d_fd_simple_shear_rheology_iverson.gp 78 /bin/sh -c '\ 79 for b in $$(printf "0.01\n0.10\n"; jot 8 0.20 0.90) 0.94; do \ 80 out="1d_fd_simple_shear_rheology_b$${b}_iverson.txt"; \ 81 rm -f "$$out"; \ 82 for t in $$(jot 50 0.0001 1.0); do \ 83 printf "$$t\t" >> "$$out"; \ 84 ./$(BIN) -f 0.55 -P 100e3 -L 1.0 --stress-ratio $$t -b $$b | \ 85 tail -n 1 | cut -f2 >> "$$out"; \ 86 done; done' 87 gnuplot 1d_fd_simple_shear_rheology_iverson.gp > $@ 88 89 # shear velocity rate from 0.1 m/h to 100 m/h 90 1d_fd_simple_shear_rheology_tulaczyk.png: $(BIN) 1d_fd_simple_shear_rheology_tulaczyk.gp 91 /bin/sh -c '\ 92 for b in $$(printf "0.01\n0.10\n"; jot 8 0.20 1.0) 0.94; do \ 93 out="1d_fd_simple_shear_rheology_b$${b}_tulaczyk.txt"; \ 94 rm -f "$$out"; \ 95 for t in $$(jot 50 0.1000 0.9); do \ 96 printf "$$t\t" >> "$$out"; \ 97 ./$(BIN) -f 0.5 -P 10e3 --stress-ratio $$t -b $$b | \ 98 tail -n 1 | cut -f2 >> "$$out"; \ 99 done; done' 100 gnuplot 1d_fd_simple_shear_rheology_tulaczyk.gp > $@ 101 102 $(BIN): 103 make -C .. 104 105 clean: 106 rm -f *.txt 107 rm -f *.png 108 rm -f *.gif 109 rm -f *.mp4 110 rm -f *.pdf 111 rm -f *.o 112 rm -f 1d_fd_simple_shear.png 113 rm -f 1d_fd_simple_shear_rheology*.png 114 115 .PHONY: plots clean