tRename beta_s to alpha in line with tradition - cngf-pf - continuum model for granular flows with pore-pressure dynamics (renamed from 1d_fd_simple_shear)
 (HTM) git clone git://src.adamsgaard.dk/cngf-pf
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 5aed54812f3073682a4abdf992ff8f8613ceb3e6
 (DIR) parent 79908def3c1514d2eeb7b14aaba02eb380e8c571
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Tue, 30 Jun 2020 10:25:33 +0200
       
       Rename beta_s to alpha in line with tradition
       
       Diffstat:
         M 1d_fd_simple_shear.c                |       2 +-
         M fluid.c                             |      12 ++++++------
         M max_depth_simple_shear.c            |       4 ++--
         M simulation.c                        |      10 +++++-----
         M simulation.h                        |       2 +-
       
       5 files changed, 15 insertions(+), 15 deletions(-)
       ---
 (DIR) diff --git a/1d_fd_simple_shear.c b/1d_fd_simple_shear.c
       t@@ -160,7 +160,7 @@ main(int argc, char *argv[])
                        sim.origo_z = atof(EARGF(usage()));
                        break;
                case 'P':
       -                sim.beta_s = atof(EARGF(usage()));
       +                sim.alpha = atof(EARGF(usage()));
                        break;
                case 'p':
                        new_phi = atof(EARGF(usage()));
 (DIR) diff --git a/fluid.c b/fluid.c
       t@@ -43,7 +43,7 @@ set_largest_fluid_timestep(struct simulation *sim, const double safety)
        
                diff_max = -INFINITY;
                for (i = 0; i < sim->nz; ++i) {
       -                diff = sim->k[i] / ((sim->beta_s + sim->phi[i] * sim->beta_f) * sim->mu_f);
       +                diff = sim->k[i] / ((sim->alpha + sim->phi[i] * sim->beta_f) * sim->mu_f);
                        if (diff > diff_max)
                                diff_max = diff;
                }
       t@@ -112,7 +112,7 @@ darcy_pressure_change_1d(const int i,
                                 const double *k,
                                 const double dz,
                                 const double beta_f,
       -                         const double beta_s,
       +                         const double alpha,
                                 const double mu_f)
        {
                double k_ = k[i], div_k_grad_p, k_zn, k_zp;
       t@@ -146,8 +146,8 @@ darcy_pressure_change_1d(const int i,
        #endif
        
                /* TODO: add advective term */
       -        return 1.0 / ((beta_s + beta_f * phi[i]) * mu_f) * div_k_grad_p
       -                - 1.0 / ((beta_s + beta_f * phi[i]) * (1.0 - phi[i])) * phi_dot[i];
       +        return 1.0 / ((alpha + beta_f * phi[i]) * mu_f) * div_k_grad_p
       +                - 1.0 / ((alpha + beta_f * phi[i]) * (1.0 - phi[i])) * phi_dot[i];
        }
        
        int
       t@@ -206,7 +206,7 @@ darcy_solver_1d(struct simulation *sim,
                                                                           sim->k,
                                                                           sim->dz,
                                                                           sim->beta_f,
       -                                                                   sim->beta_s,
       +                                                                   sim->alpha,
                                                                           sim->mu_f);
                }
                if (epsilon > 0.0) {
       t@@ -235,7 +235,7 @@ darcy_solver_1d(struct simulation *sim,
                                                                                   sim->k,
                                                                                   sim->dz,
                                                                                   sim->beta_f,
       -                                                                           sim->beta_s,
       +                                                                           sim->alpha,
                                                                                   sim->mu_f);
        
                                for (i = 0; i < sim->nz - 1; ++i) {
 (DIR) diff --git a/max_depth_simple_shear.c b/max_depth_simple_shear.c
       t@@ -48,7 +48,7 @@ static double
        skin_depth(const struct simulation *sim)
        {
                return sqrt(sim->k[0] /
       -        (sim->mu_f * (sim->beta_s + sim->phi[0] * sim->beta_f) * M_PI * sim->p_f_mod_freq));
       +        (sim->mu_f * (sim->alpha + sim->phi[0] * sim->beta_f) * M_PI * sim->p_f_mod_freq));
        }
        
        /* using alternate form: sin(x) + cos(x) = sqrt(2)*sin(x + pi/4) */
       t@@ -202,7 +202,7 @@ main(int argc, char *argv[])
                        sim.p_f_top = atof(EARGF(usage()));
                        break;
                case 'P':
       -                sim.beta_s = atof(EARGF(usage()));
       +                sim.alpha = atof(EARGF(usage()));
                        break;
                case 'p':
                        new_phi = atof(EARGF(usage()));
 (DIR) diff --git a/simulation.c b/simulation.c
       t@@ -105,7 +105,7 @@ init_sim(struct simulation *sim)
                sim->beta_f = 3.9e-10;        /* doi:10.1063/1.1679903 */
                sim->mu_f = 1.787e-3;        /* Cuffey and Paterson 2010 */
        
       -        sim->beta_s = 1e-7;
       +        sim->alpha = 1e-7;
        
                /* Damsgaard et al 2015 */
                sim->k = initval(1.9e-15, 1);
       t@@ -350,10 +350,10 @@ check_simulation_parameters(struct simulation *sim)
                                warn_parameter_value("sim->beta_f is not positive",
                                                     sim->beta_f, &return_status);
        
       -                check_float("sim->beta_s", sim->beta_s, &return_status);
       -                if (sim->beta_s <= 0.0)
       -                        warn_parameter_value("sim->beta_s is not positive",
       -                                             sim->beta_s, &return_status);
       +                check_float("sim->alpha", sim->alpha, &return_status);
       +                if (sim->alpha <= 0.0)
       +                        warn_parameter_value("sim->alpha is not positive",
       +                                             sim->alpha, &return_status);
        
                        check_float("sim->mu_f", sim->mu_f, &return_status);
                        if (sim->mu_f <= 0.0)
 (DIR) diff --git a/simulation.h b/simulation.h
       t@@ -95,7 +95,7 @@ struct simulation {
                double p_f_mod_pulse_time; /* single pressure pulse at this time [s] */
                int p_f_mod_pulse_shape; /* waveform for fluid-pressure pulse */
                double beta_f;        /* adiabatic fluid compressibility [Pa^-1] */
       -        double beta_s;        /* adiabatic grain compressibility [Pa^-1] */
       +        double alpha;        /* adiabatic grain compressibility [Pa^-1] */
                double mu_f;          /* fluid dynamic viscosity [Pa*s] */
                double rho_f;         /* fluid density [kg/m^3] */