tReorder options alphabetically - cngf-pf - continuum model for granular flows … | |
git clone git://src.adamsgaard.dk/cngf-pf | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit fd5acc03c3640c28c5b50724a76abc4b9ae5a81e | |
parent d39ad4042ece03da57c502cdceed7ce1ccd1b61a | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 6 Mar 2020 10:08:50 +0100 | |
Reorder options alphabetically | |
Diffstat: | |
M 1d_fd_simple_shear.1 | 3 +++ | |
M 1d_fd_simple_shear.c | 157 ++++++++++++++++++-----------… | |
M max_depth_simple_shear.c | 38 +++++++++++++++++++----------… | |
3 files changed, 116 insertions(+), 82 deletions(-) | |
--- | |
diff --git a/1d_fd_simple_shear.1 b/1d_fd_simple_shear.1 | |
t@@ -42,6 +42,7 @@ | |
.Op Fl t Ar curr-time | |
.Op Fl U Ar resolution | |
.Op Fl u Ar fluid-pulse-time | |
+.Op Fl V Ar bot-vel | |
.Op Fl v | |
.Op Fl Y Ar max-porosity | |
.Op Fl y Ar min-porosity | |
t@@ -162,6 +163,8 @@ not set, the cell size equals the grain size. | |
Time of fluid-pressure pulse peak [s] (default nan). | |
Only relevant with fluid dynamics enabled | |
.Fl ( F ) . | |
+.It Fl V Ar bot-vel | |
+shear velocity at base [m/s] (default 0). | |
.It Fl v | |
Show version information. | |
.It Fl Y Ar max-porosity | |
diff --git a/1d_fd_simple_shear.c b/1d_fd_simple_shear.c | |
t@@ -32,21 +32,44 @@ struct simulation sim; | |
static void | |
usage(void) | |
{ | |
- dprintf(2, "usage: %s [-FNThv] " | |
- "[-g gravity-accel] [-d grain-size] [-r grain-density] " | |
- "[-m grain-friction] [-c grain-cohesion] " | |
- "[-A grain-nonlocal-ampl] [-b grain-rate-dependence] " | |
- "[-p grain-porosity] [-y min-porosity] [-Y max-porosity] " | |
+ dprintf(2, "usage: %s " | |
+ "[-A grain-nonlocal-ampl] " | |
+ "[-a fluid-pressure-ampl] " | |
+ "[-b grain-rate-dependence] " | |
+ "[-C fluid-compressibility] " | |
+ "[-c grain-cohesion] " | |
+ "[-d grain-size] " | |
+ "[-e end-time] " | |
+ "[-F] " | |
+ "[-f applied-shear-friction] " | |
+ "[-g gravity-accel] " | |
+ "[-H fluid-pressure-phase] " | |
+ "[-h] " | |
+ "[-I file-interval] " | |
+ "[-i fluid-viscosity] " | |
"[-K dilatancy-constant] " | |
- "[-n normal-stress] [-f applied-shear-friction] " | |
- "[-s applied-shear-vel] [-l applied-shear-vel-limit] " | |
- "[-o origo] [-L length] [-U resolution] " | |
- "[-t curr-time] [-e end-time] [-I file-interval] " | |
- "[-O fluid-pressure-top] [-a fluid-pressure-ampl] " | |
- "[-q fluid-pressure-freq] [-H fluid-pressure-phase] " | |
- "[-S fluid-pressure-pulse-shape] [-u fluid-pulse-time] " | |
- "[-k fluid-permeability] [-R fluid-density] [-i fluid-viscosit… | |
- "[-C fluid-compressibility] [name]\n", argv0); | |
+ "[-k fluid-permeability] " | |
+ "[-L length] " | |
+ "[-l applied-shear-vel-limit] " | |
+ "[-m grain-friction] " | |
+ "[-N] " | |
+ "[-n normal-stress] " | |
+ "[-O fluid-pressure-top] " | |
+ "[-o origo] " | |
+ "[-p grain-porosity] " | |
+ "[-q fluid-pressure-freq] " | |
+ "[-R fluid-density] " | |
+ "[-r grain-density] " | |
+ "[-S fluid-pressure-pulse-shape] " | |
+ "[-s applied-shear-vel] " | |
+ "[-T] " | |
+ "[-t curr-time] " | |
+ "[-U resolution] " | |
+ "[-u fluid-pulse-time] " | |
+ "[-v] " | |
+ "[-Y max-porosity] " | |
+ "[-y min-porosity] " | |
+ "[name]\n", argv0); | |
exit(1); | |
} | |
t@@ -79,65 +102,15 @@ main(int argc, char* argv[]) | |
case 'A': | |
sim.A = atof(EARGF(usage())); | |
break; | |
- case 'C': | |
- sim.beta_f = atof(EARGF(usage())); | |
- break; | |
- case 'F': | |
- sim.fluid = 1; | |
- break; | |
- case 'H': | |
- sim.p_f_mod_phase = atof(EARGF(usage())); | |
- break; | |
- case 'I': | |
- sim.file_dt = atof(EARGF(usage())); | |
- break; | |
- case 'K': | |
- sim.dilatancy_angle = atof(EARGF(usage())); | |
- break; | |
- case 'L': | |
- sim.L_z = atof(EARGF(usage())); | |
- break; | |
- case 'N': | |
- normalize = 1; | |
- break; | |
- case 'O': | |
- sim.p_f_top = atof(EARGF(usage())); | |
- break; | |
- case 'R': | |
- sim.rho_f = atof(EARGF(usage())); | |
- break; | |
- case 'S': | |
- if (argv[1] == NULL) | |
- usage(); | |
- else if (!strncmp(argv[1], "triangle", 8)) | |
- sim.p_f_mod_pulse_shape = 0; | |
- else if (!strncmp(argv[1], "square", 6)) | |
- sim.p_f_mod_pulse_shape = 1; | |
- else { | |
- dprintf(2, "error: invalid pulse shape '%s'\n", | |
- argv[1]); | |
- return 1; | |
- } | |
- argc--; argv++; | |
- break; | |
- case 'T': | |
- sim.transient = 1; | |
- break; | |
- case 'U': | |
- sim.nz = atoi(EARGF(usage())); | |
- break; | |
- case 'V': | |
- sim.v_x_bot = atof(EARGF(usage())); | |
- break; | |
- case 'Y': | |
- sim.phi_max = atof(EARGF(usage())); | |
- break; | |
case 'a': | |
sim.p_f_mod_ampl = atof(EARGF(usage())); | |
break; | |
case 'b': | |
sim.b = atof(EARGF(usage())); | |
break; | |
+ case 'C': | |
+ sim.beta_f = atof(EARGF(usage())); | |
+ break; | |
case 'c': | |
sim.C = atof(EARGF(usage())); | |
break; | |
t@@ -147,30 +120,51 @@ main(int argc, char* argv[]) | |
case 'e': | |
sim.t_end = atof(EARGF(usage())); | |
break; | |
+ case 'F': | |
+ sim.fluid = 1; | |
+ break; | |
case 'f': | |
sim.mu_wall = atof(EARGF(usage())); | |
break; | |
case 'g': | |
sim.G = atof(EARGF(usage())); | |
break; | |
+ case 'H': | |
+ sim.p_f_mod_phase = atof(EARGF(usage())); | |
+ break; | |
case 'h': | |
usage(); | |
break; | |
+ case 'I': | |
+ sim.file_dt = atof(EARGF(usage())); | |
+ break; | |
case 'i': | |
sim.mu_f = atof(EARGF(usage())); | |
break; | |
+ case 'K': | |
+ sim.dilatancy_angle = atof(EARGF(usage())); | |
+ break; | |
case 'k': | |
new_k = atof(EARGF(usage())); | |
break; | |
+ case 'L': | |
+ sim.L_z = atof(EARGF(usage())); | |
+ break; | |
case 'l': | |
sim.v_x_limit = atof(EARGF(usage())); | |
break; | |
case 'm': | |
sim.mu_s = atof(EARGF(usage())); | |
break; | |
+ case 'N': | |
+ normalize = 1; | |
+ break; | |
case 'n': | |
sim.P_wall = atof(EARGF(usage())); | |
break; | |
+ case 'O': | |
+ sim.p_f_top = atof(EARGF(usage())); | |
+ break; | |
case 'o': | |
sim.origo_z = atof(EARGF(usage())); | |
break; | |
t@@ -180,21 +174,50 @@ main(int argc, char* argv[]) | |
case 'q': | |
sim.p_f_mod_freq = atof(EARGF(usage())); | |
break; | |
+ case 'R': | |
+ sim.rho_f = atof(EARGF(usage())); | |
+ break; | |
case 'r': | |
sim.rho_s = atof(EARGF(usage())); | |
break; | |
+ case 'S': | |
+ if (argv[1] == NULL) | |
+ usage(); | |
+ else if (!strncmp(argv[1], "triangle", 8)) | |
+ sim.p_f_mod_pulse_shape = 0; | |
+ else if (!strncmp(argv[1], "square", 6)) | |
+ sim.p_f_mod_pulse_shape = 1; | |
+ else { | |
+ dprintf(2, "error: invalid pulse shape '%s'\n", | |
+ argv[1]); | |
+ return 1; | |
+ } | |
+ argc--; argv++; | |
+ break; | |
case 's': | |
sim.v_x_fix = atof(EARGF(usage())); | |
break; | |
+ case 'T': | |
+ sim.transient = 1; | |
+ break; | |
case 't': | |
sim.t = atof(EARGF(usage())); | |
break; | |
+ case 'U': | |
+ sim.nz = atoi(EARGF(usage())); | |
+ break; | |
case 'u': | |
sim.p_f_mod_pulse_time = atof(EARGF(usage())); | |
break; | |
+ case 'V': | |
+ sim.v_x_bot = atof(EARGF(usage())); | |
+ break; | |
case 'v': | |
printf("%s-"VERSION"\n", argv0); | |
return 0; | |
+ case 'Y': | |
+ sim.phi_max = atof(EARGF(usage())); | |
+ break; | |
case 'y': | |
sim.phi_min = atof(EARGF(usage())); | |
break; | |
diff --git a/max_depth_simple_shear.c b/max_depth_simple_shear.c | |
t@@ -28,12 +28,20 @@ struct simulation sim; | |
static void | |
usage(void) | |
{ | |
- dprintf(2, "usage: %s [-hv] " | |
- "[-g gravity-accel] [-r grain-density] [-p grain-porosity] " | |
- "[-O fluid-pressure-top] [-a fluid-pressure-ampl] " | |
- "[-q fluid-pressure-freq] [-k fluid-permeability] " | |
- "[-R fluid-density] [-i fluid-viscosity] " | |
- "[-C fluid-compressibility]\n", argv0); | |
+ dprintf(2, "usage: %s " | |
+ "[-a fluid-pressure-ampl] " | |
+ "[-C fluid-compressibility] " | |
+ "[-g gravity-accel] " | |
+ "[-h] " | |
+ "[-i fluid-viscosity] " | |
+ "[-k fluid-permeability] " | |
+ "[-O fluid-pressure-top] " | |
+ "[-p grain-porosity] " | |
+ "[-q fluid-pressure-freq] " | |
+ "[-R fluid-density] " | |
+ "[-r grain-density] " | |
+ "[-v] " | |
+ "\n", argv0); | |
exit(1); | |
} | |
t@@ -164,18 +172,12 @@ main(int argc, char* argv[]) | |
new_k = sim.k[0]; | |
ARGBEGIN { | |
- case 'C': | |
- sim.beta_f = atof(EARGF(usage())); | |
- break; | |
- case 'O': | |
- sim.p_f_top = atof(EARGF(usage())); | |
- break; | |
- case 'R': | |
- sim.rho_f = atof(EARGF(usage())); | |
- break; | |
case 'a': | |
sim.p_f_mod_ampl = atof(EARGF(usage())); | |
break; | |
+ case 'C': | |
+ sim.beta_f = atof(EARGF(usage())); | |
+ break; | |
case 'g': | |
sim.G = atof(EARGF(usage())); | |
break; | |
t@@ -188,12 +190,18 @@ main(int argc, char* argv[]) | |
case 'k': | |
new_k = atof(EARGF(usage())); | |
break; | |
+ case 'O': | |
+ sim.p_f_top = atof(EARGF(usage())); | |
+ break; | |
case 'p': | |
new_phi = atof(EARGF(usage())); | |
break; | |
case 'q': | |
sim.p_f_mod_freq = atof(EARGF(usage())); | |
break; | |
+ case 'R': | |
+ sim.rho_f = atof(EARGF(usage())); | |
+ break; | |
case 'r': | |
sim.rho_s = atof(EARGF(usage())); | |
break; |