tMove sample simulations to examples/ folder. Hide timestep value from stderr. … | |
git clone git://src.adamsgaard.dk/cngf-pf | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 0ae6ae74ac72fb58875bcf706839e10d0b1f1049 | |
parent ee6d39f13719a5caa467250340c53c2d9e25991c | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 28 Jun 2019 11:29:49 +0200 | |
Move sample simulations to examples/ folder. Hide timestep value from stderr. | |
Diffstat: | |
M README.md | 10 +++++----- | |
R test/1d_fd_simple_shear.gp -> exam… | 0 | |
A examples/1d_fd_simple_shear.png | 0 | |
R test/1d_fd_simple_shear_fluid.gp -… | 0 | |
R test/1d_fd_simple_shear_rheology.g… | 0 | |
A examples/1d_fd_simple_shear_rheolo… | 0 | |
R test/1d_fd_simple_shear_rheology_i… | 0 | |
A examples/1d_fd_simple_shear_rheolo… | 0 | |
R test/1d_fd_simple_shear_rheology_k… | 0 | |
A examples/1d_fd_simple_shear_rheolo… | 0 | |
R test/1d_fd_simple_shear_rheology_t… | 0 | |
A examples/1d_fd_simple_shear_rheolo… | 0 | |
R test/BlueSeq.plt -> examples/BlueS… | 0 | |
A examples/Makefile | 105 +++++++++++++++++++++++++++++… | |
A examples/diurnal.gif | 0 | |
R test/diurnal.timeseries.gp -> exam… | 0 | |
M main.c | 1 - | |
17 files changed, 110 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/README.md b/README.md | |
t@@ -59,7 +59,7 @@ probably be improved further. | |
| Discrete-element model | Continuum Model | | |
| ----------------------- | --------------- | | |
| Damsgaard et al. 2013 | | | |
-| ![damsgaard2013-fig8.png](https://gitlab.com/admesg/1d_fd_simple_shear/raw/m… | |
+| ![damsgaard2013-fig8.png](https://gitlab.com/admesg/1d_fd_simple_shear/raw/m… | |
### Stress and strain rate | |
The rheology is of Bingham type, where no deformation occurs beneath the | |
t@@ -71,15 +71,15 @@ have *b* = 0.94 ([Forterre and Pouliquen | |
| Real material (laboratory or field study) | Continuum Model | | |
| -------------------------------------------- | --------------- | | |
| Upstream-B ([Kamb 1991](https://doi.org/10.1029/91jb00946)): | … | |
-| ![kamb1991-fig1.png](https://gitlab.com/admesg/1d_fd_simple_shear/raw/master… | |
+| ![kamb1991-fig1.png](https://gitlab.com/admesg/1d_fd_simple_shear/raw/master… | |
| Various subglacial tills ([Iverson 2010](https://doi.org/10.3189/00221431179… | |
-| ![iverson2010-fig2a.png](https://gitlab.com/admesg/1d_fd_simple_shear/raw/ma… | |
+| ![iverson2010-fig2a.png](https://gitlab.com/admesg/1d_fd_simple_shear/raw/ma… | |
| Whillans Ice Plain ([Tulaczyk 2006](https://doi.org/10.3189/1727565067818286… | |
-| ![tulaczyk2006-fig1.png](https://gitlab.com/admesg/1d_fd_simple_shear/raw/ma… | |
+| ![tulaczyk2006-fig1.png](https://gitlab.com/admesg/1d_fd_simple_shear/raw/ma… | |
### Variable water pressure | |
The model is expanded from the Henann and Kamrin 2013 model by including a | |
diffusive porewater pressure parameterization. Below is an example of diurnal | |
water-pressure variations that gradually propagate into the bed. | |
-![diurnal.gif](https://gitlab.com/admesg/1d_fd_simple_shear/raw/master/test/di… | |
+![diurnal.gif](https://gitlab.com/admesg/1d_fd_simple_shear/raw/master/example… | |
diff --git a/test/1d_fd_simple_shear.gp b/examples/1d_fd_simple_shear.gp | |
diff --git a/examples/1d_fd_simple_shear.png b/examples/1d_fd_simple_shear.png | |
Binary files differ. | |
diff --git a/test/1d_fd_simple_shear_fluid.gp b/examples/1d_fd_simple_shear_flu… | |
diff --git a/test/1d_fd_simple_shear_rheology.gp b/examples/1d_fd_simple_shear_… | |
diff --git a/examples/1d_fd_simple_shear_rheology.png b/examples/1d_fd_simple_s… | |
Binary files differ. | |
diff --git a/test/1d_fd_simple_shear_rheology_iverson.gp b/examples/1d_fd_simpl… | |
diff --git a/examples/1d_fd_simple_shear_rheology_iverson.png b/examples/1d_fd_… | |
Binary files differ. | |
diff --git a/test/1d_fd_simple_shear_rheology_kamb.gp b/examples/1d_fd_simple_s… | |
diff --git a/examples/1d_fd_simple_shear_rheology_kamb.png b/examples/1d_fd_sim… | |
Binary files differ. | |
diff --git a/test/1d_fd_simple_shear_rheology_tulaczyk.gp b/examples/1d_fd_simp… | |
diff --git a/examples/1d_fd_simple_shear_rheology_tulaczyk.png b/examples/1d_fd… | |
Binary files differ. | |
diff --git a/test/BlueSeq.plt b/examples/BlueSeq.plt | |
diff --git a/examples/Makefile b/examples/Makefile | |
t@@ -0,0 +1,105 @@ | |
+BIN = ../1d_fd_simple_shear | |
+ | |
+.PHONY: plots | |
+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.t… | |
+ /bin/sh -c '\ | |
+ for f in diurnal.output*.txt; do \ | |
+ gnuplot -e "filename=\"$$f\"; p_min=\"0\"; p_max=\"100e3\"" $<… | |
+ done' | |
+ | |
+diurnal.output00000.txt: $(BIN) | |
+ /bin/sh -c '\ | |
+ ./$< --resolution 50 --length 2.0 --normal-stress 150e3 --fluid --flui… | |
+ | |
+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.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 \ | |
+ ./$< -o 0.03 -L 0.64 -P $${P}e3 -N > 1d_fd_simple_shear_P$${P}… | |
+ 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"; seq 0.20 0.20 1.00); do \ | |
+ out="1d_fd_simple_shear_rheology_b$${b}.txt"; \ | |
+ rm -f "$$out"; \ | |
+ for t in $$(seq 0.01 0.01 0.8); do \ | |
+ printf "$$t\t" >> "$$out"; \ | |
+ ./$< -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.… | |
+ /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 $$(seq 0.01 0.01 2.0); do \ | |
+ printf "$$t\t" >> "$$out"; \ | |
+ ./$< -f 1.1 -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_iv… | |
+ /bin/sh -c '\ | |
+ for b in $$(printf "0.01\n0.10\n"; seq 0.20 0.20 0.90) 0.94; do \ | |
+ out="1d_fd_simple_shear_rheology_b$${b}_iverson.txt"; \ | |
+ rm -f "$$out"; \ | |
+ for t in $$(seq 0.0001 0.002 1.0); do \ | |
+ printf "$$t\t" >> "$$out"; \ | |
+ ./$< -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_t… | |
+ /bin/sh -c '\ | |
+ for b in $$(printf "0.01\n0.10\n"; seq 0.20 0.20 1.00) 0.94; do \ | |
+ out="1d_fd_simple_shear_rheology_b$${b}_tulaczyk.txt"; \ | |
+ rm -f "$$out"; \ | |
+ for t in $$(seq 0.1 0.002 0.9); do \ | |
+ printf "$$t\t" >> "$$out"; \ | |
+ ./$< -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) *.txt | |
+ $(RM) *.png | |
+ $(RM) *.pdf | |
+ $(RM) *.o | |
+ $(RM) 1d_fd_simple_shear.png | |
+ $(RM) 1d_fd_simple_shear_rheology*.png | |
diff --git a/examples/diurnal.gif b/examples/diurnal.gif | |
Binary files differ. | |
diff --git a/test/diurnal.timeseries.gp b/examples/diurnal.timeseries.gp | |
diff --git a/main.c b/main.c | |
t@@ -261,7 +261,6 @@ main(int argc, char* argv[]) | |
if (sim.fluid) { | |
hydrostatic_fluid_pressure_distribution(&sim); | |
set_largest_fluid_timestep(&sim, 0.5); | |
- fprintf(stderr, "TIME STEP: %g s\n", sim.dt); | |
} | |
check_simulation_parameters(&sim); |