manus_continuum_granular1_exp

experiments for first paper with continuum granular model
git clone git://src.adamsgaard.dk/manus_continuum_granular1_exp
Log | Files | Refs | Submodules | README | LICENSE Back to index

commit d082e478c0215f7acc848278f6d1a518896de824
parent 7219b4dd6475c90df455040835aee5f3d8e73a58
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 16 Jun 2020 14:11:00 +0200

Calculate max. gradient in effective normal stress

Diffstat:
Mfig-stick_slip_rate/Makefile | 29+++++++++++++++++++++++++++++
Mfig-stick_slip_stress/Makefile | 29+++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/fig-stick_slip_rate/Makefile b/fig-stick_slip_rate/Makefile @@ -67,6 +67,35 @@ sediment_flux.txt: sim.output00000.txt ../$(FIG).pdf: fig.gp timeseries.txt max_strainrate_depth.txt sediment_flux.txt gnuplot fig.gp > $@ +max_pressure_gradient.pdf: max_pressure_gradient.txt + gnuplot -e "set t pdfcairo; \ + set xlabel 'output file [-]'; \ + set ylabel 'max. norm. eff. stress gradient [kPa/m]'; \ + plot 'max_pressure_gradient.txt' u 0:(\$$1/1e3) w l t ''" \ + > $@ + +max_pressure_gradient.txt: sim.output00000.txt + > "$@" + for f in sim.output*.txt; do \ + awk ' \ + function abs(x) \ + { \ + return (x >= 0.0) ? x : -x; \ + } \ + { \ + if (NR > 1) { \ + dN_norm = abs(($$3 - N_prev)/($$1 - z_prev)); \ + if (dN_norm > dN_dx_norm_max) { \ + dN_dx_norm_max = dN_norm; \ + } \ + } \ + z_prev = $$1; \ + N_prev = $$3; \ + } \ + END { \ + print dN_dx_norm_max \ + }' "$$f" >> "$@"; done + clean: rm -f *.txt rm -f ../$(FIG).pdf diff --git a/fig-stick_slip_stress/Makefile b/fig-stick_slip_stress/Makefile @@ -66,6 +66,35 @@ sediment_flux.txt: sim.output00000.txt ../$(FIG).pdf: fig.gp timeseries.txt max_strainrate_depth.txt sediment_flux.txt gnuplot fig.gp > $@ +max_pressure_gradient.pdf: max_pressure_gradient.txt + gnuplot -e "set t pdfcairo; \ + set xlabel 'output file [-]'; \ + set ylabel 'max. norm. eff. stress gradient [kPa/m]'; \ + plot 'max_pressure_gradient.txt' u 0:(\$$1/1e3) w l t ''" \ + > $@ + +max_pressure_gradient.txt: sim.output00000.txt + > "$@" + for f in sim.output*.txt; do \ + awk ' \ + function abs(x) \ + { \ + return (x >= 0.0) ? x : -x; \ + } \ + { \ + if (NR > 1) { \ + dN_norm = abs(($$3 - N_prev)/($$1 - z_prev)); \ + if (dN_norm > dN_dx_norm_max) { \ + dN_dx_norm_max = dN_norm; \ + } \ + } \ + z_prev = $$1; \ + N_prev = $$3; \ + } \ + END { \ + print dN_dx_norm_max \ + }' "$$f" >> "$@"; done + clean: rm -f *.txt rm -f ../$(FIG).pdf