commit fe167344c27c00be2ce6721516c10a70288250ac
parent 29b7ff4659160a703b881ea8d382033059cc3470
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 10 Oct 2019 17:36:24 +0200
Generate time series of pulse perturbations with increasing amplitude
Diffstat:
2 files changed, 64 insertions(+), 53 deletions(-)
diff --git a/pulse-square-fig4b/Makefile b/pulse-square-fig4b/Makefile
@@ -3,48 +3,53 @@ FIG = $(shell basename $(CURDIR))
default: ../$(FIG).pdf
+PF_SEQ=1 2 3 4 5 6 7 8 9
+
# --stress-ratio 0.40 \
-sim.output00000.txt: $(BIN) Makefile
- /bin/sh -c '\
+sim-4.output00000.txt: $(BIN) Makefile
+ /bin/sh -c 'for i in $(PF_SEQ); do \
./$< --length 8.0 \
- --normal-stress 200e3 \
- --set-shear-velocity $$( echo "1000/(365*24*60*60)" | bc -l ) \
+ --normal-stress 100e3 \
+ --set-shear-velocity $$( echo "10000/(365*24*60*60)" | bc -l ) \
--fluid \
--fluid-permeability 2e-17 \
- --fluid-pressure-top 100e3 \
- --fluid-pressure-ampl 80e3 \
+ --fluid-pressure-top 0.0 \
+ --fluid-pressure-ampl $$( printf "%s0e3" "$$i" ) \
--fluid-pressure-freq $$( echo "1.0/(3600*24)" | bc -l ) \
- --fluid-pressure-pulse-time $$( echo "3600*24*2" | bc -l ) \
+ --fluid-pressure-pulse-time $$( echo "$$i*3600*24" | bc -l ) \
--fluid-pressure-pulse-shape square \
--file-interval $$( echo "60*10" | bc -l ) \
- --time-end $$( echo "3600*24*7" | bc -l ) sim'
+ --time $$( echo "($$i-1)*3600*24" | bc -l ) \
+ --time-end $$( echo "($$i+1)*3600*24*1.5" | bc -l ) sim-$$i; done'
-timeseries.txt: sim.output00000.txt
+timeseries.txt: sim-4.output00000.txt
/bin/sh -c '\
rm -f $@; \
- for f in sim.output*.txt; do \
- tail -n 1 "$$f" | cut -f2- >> $@; \
- done'
+ for i in $(PF_SEQ); do \
+ for f in sim-$$i.output*.txt; do \
+ tail -n 1 "$$f" | cut -f2- >> $@; \
+ done; done'
-max_strainrate_depth.txt: sim.output00000.txt
+max_strainrate_depth.txt: sim-4.output00000.txt
/bin/sh -c '\
rm -f $@; \
- for f in sim.output*.txt; do \
- awk " \
- BEGIN{getline; depth=8.0; max=0.0} \
- NF{ \
- if (\$$6 >= max && \$$6+0 > 1e-300) \
- { \
- max=\$$6; \
- depth=\$$1; \
+ for i in $(PF_SEQ); do \
+ for f in sim-$$i.output*.txt; do \
+ awk " \
+ BEGIN{getline; depth=8.0; max=0.0} \
+ NF{ \
+ if (\$$6 >= max && \$$6+0 > 1e-300) \
+ { \
+ max=\$$6; \
+ depth=\$$1; \
+ } \
} \
- } \
- END{ \
- print depth,\"\t\",max \
- }" \
- "$$f" >> $@; \
- done'
+ END{ \
+ print depth,\"\t\",max \
+ }" \
+ "$$f" >> $@; \
+ done; done'
../$(FIG).pdf: fig.gp timeseries.txt max_strainrate_depth.txt
gnuplot $< > $@
diff --git a/pulse-triangle-fig4b/Makefile b/pulse-triangle-fig4b/Makefile
@@ -3,47 +3,53 @@ FIG = $(shell basename $(CURDIR))
default: ../$(FIG).pdf
+PF_SEQ=1 2 3 4 5 6 7 8 9
+
# --stress-ratio 0.40 \
-sim.output00000.txt: $(BIN) Makefile
- /bin/sh -c '\
+sim-4.output00000.txt: $(BIN) Makefile
+ /bin/sh -c 'for i in $(PF_SEQ); do \
./$< --length 8.0 \
- --normal-stress 200e3 \
- --set-shear-velocity $$( echo "1000/(365*24*60*60)" | bc -l ) \
+ --normal-stress 100e3 \
+ --set-shear-velocity $$( echo "10000/(365*24*60*60)" | bc -l ) \
--fluid \
--fluid-permeability 2e-17 \
--fluid-pressure-top 0.0 \
- --fluid-pressure-ampl 130e3 \
+ --fluid-pressure-ampl $$( printf "%s0e3" "$$i" ) \
--fluid-pressure-freq $$( echo "1.0/(3600*24)" | bc -l ) \
- --fluid-pressure-pulse-time $$( echo "3600*24*2" | bc -l ) \
+ --fluid-pressure-pulse-time $$( echo "$$i*3600*24" | bc -l ) \
+ --fluid-pressure-pulse-shape triangle \
--file-interval $$( echo "60*10" | bc -l ) \
- --time-end $$( echo "3600*24*7" | bc -l ) sim'
+ --time $$( echo "($$i-1)*3600*24" | bc -l ) \
+ --time-end $$( echo "($$i+1)*3600*24*1.5" | bc -l ) sim-$$i; done'
-timeseries.txt: sim.output00000.txt
+timeseries.txt: sim-4.output00000.txt
/bin/sh -c '\
rm -f $@; \
- for f in sim.output*.txt; do \
- tail -n 1 "$$f" | cut -f2- >> $@; \
- done'
+ for i in $(PF_SEQ); do \
+ for f in sim-$$i.output*.txt; do \
+ tail -n 1 "$$f" | cut -f2- >> $@; \
+ done; done'
-max_strainrate_depth.txt: sim.output00000.txt
+max_strainrate_depth.txt: sim-4.output00000.txt
/bin/sh -c '\
rm -f $@; \
- for f in sim.output*.txt; do \
- awk " \
- BEGIN{getline; depth=8.0; max=0.0} \
- NF{ \
- if (\$$6 >= max && \$$6+0 > 1e-300) \
- { \
- max=\$$6; \
- depth=\$$1; \
+ for i in $(PF_SEQ); do \
+ for f in sim-$$i.output*.txt; do \
+ awk " \
+ BEGIN{getline; depth=8.0; max=0.0} \
+ NF{ \
+ if (\$$6 >= max && \$$6+0 > 1e-300) \
+ { \
+ max=\$$6; \
+ depth=\$$1; \
+ } \
} \
- } \
- END{ \
- print depth,\"\t\",max \
- }" \
- "$$f" >> $@; \
- done'
+ END{ \
+ print depth,\"\t\",max \
+ }" \
+ "$$f" >> $@; \
+ done; done'
../$(FIG).pdf: fig.gp timeseries.txt max_strainrate_depth.txt
gnuplot $< > $@