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

Makefile (1384B)


      1 BIN = ../1d_fd_simple_shear/1d_fd_simple_shear
      2 FIG != basename $(PWD)
      3 
      4 default: ../$(FIG).pdf
      5 
      6 PERM_SEQ=3.16e-16 1e-16 3.16e-17 1e-17 3.16e-18 1e-18 3.16e-19 1e-19
      7 
      8 sim-1e-18.output00000.txt: $(BIN)
      9 	/bin/sh -c 'for perm in $(PERM_SEQ); do \
     10 	./$(BIN) -L 8.0 \
     11 	-n 200e3 \
     12 	-s $$( echo "10000/(365*24*60*60)" | bc -l ) \
     13 	-F \
     14 	-k $$perm \
     15 	-O 0.0 \
     16 	-a 180e3 \
     17 	-q $$( echo "1.0/(3600*24)" | bc -l ) \
     18 	-u $$( echo "2*3600*24" | bc -l ) \
     19 	-S triangle \
     20 	-I $$( echo "60*10" | bc -l ) \
     21 	-t 0.0 \
     22 	-e $$( echo "20*3600*24 + 60*10" | bc -l ) sim-$$perm; done'
     23 
     24 timeseries.txt: sim-1e-18.output00000.txt
     25 	/bin/sh -c '\
     26 	rm -f $@; \
     27 	for perm in $(PERM_SEQ); do \
     28 		for f in sim-$$perm.output*.txt; do \
     29 			tail -n 1 "$$f" | cut -f2- >> $@; \
     30 	done; done'
     31 
     32 max_strainrate_depth.txt: sim-1e-18.output00000.txt
     33 	/bin/sh -c '\
     34 	rm -f $@; \
     35 	for perm in $(PERM_SEQ); do \
     36 		for f in sim-$$perm.output*.txt; do \
     37 			awk " \
     38 				BEGIN{getline; depth=8.0; max=0.0} \
     39 				NF{ \
     40 					if (\$$6 >= max && \$$6+0 > 1e-300) \
     41 					{ \
     42 						max=\$$6; \
     43 						depth=\$$1; \
     44 					} \
     45 				} \
     46 				END{ \
     47 					print depth,\"\t\",max,\"\t\",$$perm \
     48 				}" \
     49 				"$$f" >> $@; \
     50 	done; done'
     51 
     52 ../$(FIG).pdf: fig.gp timeseries.txt max_strainrate_depth.txt
     53 	gnuplot fig.gp > $@
     54 
     55 clean:
     56 	for perm in $(PERM_SEQ); do rm -f sim-$$perm.output*.txt; done
     57 	rm -f *.txt
     58 	rm -f ../$(FIG).pdf
     59 
     60 .PHONY: default clean