cngf-pf

continuum model for granular flows with pore-pressure dynamics (renamed from 1d_fd_simple_shear)
git clone git://src.adamsgaard.dk/cngf-pf # fast
git clone https://src.adamsgaard.dk/cngf-pf.git # slow
Log | Files | Refs | README | LICENSE Back to index

Makefile (6031B)


      1 BIN = ../cngf-pf
      2 BIN2 = ../max_depth_simple_shear
      3 BIN3 = ../shear_flux
      4 
      5 TESTS = cngf_pf_dry \
      6 	cngf_pf_dry_norm \
      7 	cngf_pf_dry_cohesive \
      8 	cngf_pf_dry_vconst \
      9 	cngf_pf_wet \
     10 	cngf_pf_wet_norm \
     11 	cngf_pf_wet_vari \
     12 	cngf_pf_wet_vari_diff \
     13 	cngf_pf_wet_vari_pulse \
     14 	cngf_pf_wet_vari_pulse_vlim \
     15 	cngf_pf_dry_transient \
     16 	shear_flux_dry \
     17 	shear_flux_wet
     18 
     19 # Skipped tests:
     20 # - cngf_pf_dry_trans_undercons, cngf_pf_dry_trans_overcons:
     21 #   Transient mode with fixed velocity and non-critical porosity has
     22 #   coupled solver instability (see walkthrough for details)
     23 # - max_depth_misc: test config uses removed -O option
     24 
     25 
     26 STANDARDS := $(TESTS:=.std)
     27 
     28 CNGF_PF_DRY_OPTS =          -o 0.03 -L 0.64 -n 40e3
     29 CNGF_PF_DRY_NORM_OPTS =     -o 0.03 -L 0.64 -n 40e3 -N
     30 CNGF_PF_DRY_COHESIVE_OPTS = -o 0.03 -L 0.64 -n 40e3 -c 1e3
     31 CNGF_PF_DRY_VCONST_OPTS =   -s 1e-3
     32 CNGF_PF_WET_OPTS =          -o 0.03 -L 0.64 -n 40e3 -F
     33 CNGF_PF_WET_NORM_OPTS =     -o 0.03 -L 0.64 -n 40e3 -F -N
     34 CNGF_PF_WET_VARI_OPTS =     -L 8.0 \
     35                             -n 150e3 \
     36                             -F -k 2e-17 \
     37                             -O 50e3 \
     38                             -a 50e3 \
     39                             -q $$( echo "1.0/(3600*24)" | bc -l ) \
     40                             -I $$( echo "60*1000" | bc -l ) \
     41                             -e $$( echo "60*20" | bc -l )
     42 CNGF_PF_WET_VARI_DIFF_OPTS =-L 8.0 \
     43                             -n 150e3 \
     44                             -F -D $$(awk 'BEGIN{print 2e-17/(1.787e-3*(1e-8 + 0.25*3.9e-10))}') \
     45                             -O 50e3 \
     46                             -a 50e3 \
     47                             -q $$( echo "1.0/(3600*24)" | bc -l ) \
     48                             -I $$( echo "60*1000" | bc -l ) \
     49                             -e $$( echo "60*20" | bc -l )
     50 CNGF_PF_WET_VARI_PULSE_OPTS = $(CNGF_PF_WET_VARI_OPTS) \
     51                               -u 500
     52 CNGF_PF_WET_VARI_PULSE_VLIM_OPTS = $(CNGF_PF_WET_VARI_OPTS) \
     53                                    -u 500 -l 1e-3
     54 CNGF_PF_DRY_TRANS_OPTS = -T -e 5.0
     55 CNGF_PF_DRY_TRANS_UNDERCONS_OPTS = -T -e 100.0 -I 1.0 -s 0.01 -p 0.25 trans_undercons >/dev/null && \
     56                                    for f in trans_undercons.output*.txt; do tail -n 1 "$$f"; done
     57 CNGF_PF_DRY_TRANS_OVERCONS_OPTS = -T -e 100.0 -I 1.0 -s 0.01 -p 0.15 trans_overcons >/dev/null && \
     58                                   for f in trans_overcons.output*.txt; do tail -n 1 "$$f"; done
     59 
     60 MAX_DEPTH_MISC = sh -c 'for A_f in 1e3 5e3 10e3 50e3 100e3; \
     61                         	do ./$(BIN2) -O 101e3 -a $$A_f -q 0.01;\
     62                         	./$(BIN2) -O 101e3 -a $$A_f -q 0.001;\
     63                         	./$(BIN2) -O 101e3 -a $$A_f -q 0.0001; done'
     64 
     65 test: $(TESTS)
     66 
     67 standards: $(STANDARDS)
     68 
     69 cngf_pf_dry: $(BIN)
     70 	./$(BIN) $(CNGF_PF_DRY_OPTS) | diff $@.std -
     71 
     72 cngf_pf_dry_norm: $(BIN)
     73 	./$(BIN) $(CNGF_PF_DRY_NORM_OPTS) | diff $@.std -
     74 
     75 cngf_pf_dry_cohesive: $(BIN)
     76 	./$(BIN) $(CNGF_PF_DRY_COHESIVE_OPTS) | diff $@.std -
     77 
     78 cngf_pf_dry_vconst: $(BIN)
     79 	./$(BIN) $(CNGF_PF_DRY_VCONST_OPTS) | diff $@.std -
     80 
     81 cngf_pf_wet: $(BIN)
     82 	./$(BIN) $(CNGF_PF_WET_OPTS) | diff $@.std -
     83 
     84 cngf_pf_wet_norm: $(BIN)
     85 	./$(BIN) $(CNGF_PF_WET_NORM_OPTS) | diff $@.std -
     86 
     87 cngf_pf_wet_vari: $(BIN)
     88 	./$(BIN) $(CNGF_PF_WET_VARI_OPTS) | diff $@.std -
     89 
     90 cngf_pf_wet_vari_diff: $(BIN)
     91 	./$(BIN) $(CNGF_PF_WET_VARI_DIFF_OPTS) | diff $@.std -
     92 
     93 cngf_pf_wet_vari_pulse: $(BIN)
     94 	./$(BIN) $(CNGF_PF_WET_VARI_PULSE_OPTS) | diff $@.std -
     95 
     96 cngf_pf_wet_vari_pulse_vlim: $(BIN)
     97 	./$(BIN) $(CNGF_PF_WET_VARI_PULSE_VLIM_OPTS) | diff $@.std -
     98 
     99 cngf_pf_dry_transient: $(BIN)
    100 	./$(BIN) $(CNGF_PF_DRY_TRANS_OPTS) | diff $@.std -
    101 
    102 cngf_pf_dry_trans_undercons: $(BIN)
    103 	./$(BIN) $(CNGF_PF_DRY_TRANS_UNDERCONS_OPTS) | diff $@.std -
    104 
    105 cngf_pf_dry_trans_overcons: $(BIN)
    106 	./$(BIN) $(CNGF_PF_DRY_TRANS_OVERCONS_OPTS) | diff $@.std -
    107 
    108 max_depth_misc: $(BIN2)
    109 	$(MAX_DEPTH_MISC) | diff $@.std -
    110 
    111 shear_flux_dry: $(BIN) $(BIN3)
    112 	./$(BIN) $(CNGF_PF_DRY_OPTS) | ./$(BIN3) | diff $@.std -
    113 
    114 shear_flux_wet: $(BIN)
    115 	./$(BIN) $(CNGF_PF_WET_OPTS) | ./$(BIN3) | diff $@.std -
    116 
    117 cngf_pf_dry.std: $(BIN)
    118 	./$(BIN) $(CNGF_PF_DRY_OPTS) > $@
    119 
    120 cngf_pf_dry_norm.std: $(BIN)
    121 	./$(BIN) $(CNGF_PF_DRY_NORM_OPTS) > $@
    122 
    123 cngf_pf_dry_cohesive.std: $(BIN)
    124 	./$(BIN) $(CNGF_PF_DRY_COHESIVE_OPTS) > $@
    125 
    126 cngf_pf_dry_vconst.std: $(BIN)
    127 	./$(BIN) $(CNGF_PF_DRY_VCONST_OPTS) > $@
    128 
    129 cngf_pf_wet.std: $(BIN)
    130 	./$(BIN) $(CNGF_PF_WET_OPTS) > $@
    131 
    132 cngf_pf_wet_norm.std: $(BIN)
    133 	./$(BIN) $(CNGF_PF_WET_NORM_OPTS) > $@
    134 
    135 cngf_pf_wet_vari.std: $(BIN)
    136 	./$(BIN) $(CNGF_PF_WET_VARI_OPTS) > $@
    137 
    138 cngf_pf_wet_vari_diff.std: $(BIN)
    139 	./$(BIN) $(CNGF_PF_WET_VARI_DIFF_OPTS) > $@
    140 
    141 cngf_pf_wet_vari_pulse.std: $(BIN)
    142 	./$(BIN) $(CNGF_PF_WET_VARI_PULSE_OPTS) > $@
    143 
    144 cngf_pf_wet_vari_pulse_vlim.std: $(BIN)
    145 	./$(BIN) $(CNGF_PF_WET_VARI_PULSE_VLIM_OPTS) > $@
    146 
    147 cngf_pf_dry_transient.std: $(BIN)
    148 	./$(BIN) $(CNGF_PF_DRY_TRANS_OPTS) > $@
    149 
    150 cngf_pf_dry_trans_undercons.std: $(BIN)
    151 	./$(BIN) $(CNGF_PF_DRY_TRANS_UNDERCONS_OPTS) > $@
    152 
    153 cngf_pf_dry_trans_overcons.std: $(BIN)
    154 	./$(BIN) $(CNGF_PF_DRY_TRANS_OVERCONS_OPTS) > $@
    155 
    156 max_depth_misc.std: $(BIN2)
    157 	$(MAX_DEPTH_MISC) > $@
    158 
    159 shear_flux_dry.std: $(BIN) $(BIN3)
    160 	./$(BIN) $(CNGF_PF_DRY_OPTS) | ./$(BIN3) > $@
    161 
    162 shear_flux_wet.std: $(BIN) $(BIN3)
    163 	./$(BIN) $(CNGF_PF_WET_OPTS) | ./$(BIN3) > $@
    164 
    165 $(BIN):
    166 	make -C ..
    167 
    168 clean:
    169 	rm -f *.txt
    170 
    171 # Benchmark configurations for performance/stability testing
    172 # These are more intensive than the regression tests
    173 BENCH_DRY_SMALL = -o 0.03 -L 0.64 -n 40e3
    174 BENCH_DRY_LARGE = -L 10.0 -n 200e3 -e 10.0
    175 BENCH_WET_SMALL = -o 0.03 -L 0.64 -n 40e3 -F
    176 BENCH_WET_LARGE = -L 8.0 -n 150e3 -F -k 2e-17 -O 50e3 -a 50e3 -q 0.0000115741 -e 3600
    177 
    178 bench_dry_small:
    179 	./$(BIN) -B $(BENCH_DRY_SMALL) 2>&1
    180 
    181 bench_dry_large:
    182 	./$(BIN) -B $(BENCH_DRY_LARGE) 2>&1
    183 
    184 bench_wet_small:
    185 	./$(BIN) -B $(BENCH_WET_SMALL) 2>&1
    186 
    187 bench_wet_large:
    188 	./$(BIN) -B $(BENCH_WET_LARGE) 2>&1
    189 
    190 bench: bench_dry_small bench_dry_large bench_wet_small bench_wet_large
    191 
    192 .PHONY: $(TESTS) test standards clean bench bench_dry_small bench_dry_large bench_wet_small bench_wet_large