commit 57ec0c00034da7759ef7a84e9e9ba33efd98b1ad
parent d808b3f1328fbb79c15780d77112b676320c51d5
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 3 Apr 2020 16:51:53 +0200
Introduce new variables for transient dynamics
Diffstat:
2 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/simulation.c b/simulation.c
@@ -14,17 +14,24 @@ prepare_arrays()
sim.nz);
exit(1);
}
+
+ free(sim.phi);
+ free(sim.phi_c);
+ free(sim.phi_dot);
+ free(sim.k);
+
sim.z = linspace(sim.origo_z, /* spatial coordinates */
- sim.origo_z + sim.L_z,
- sim.nz);
+ sim.origo_z + sim.L_z,
+ sim.nz);
sim.dz = sim.z[1] - sim.z[0]; /* cell spacing */
sim.mu = zeros(sim.nz); /* stress ratio */
+ sim.mu_c = zeros(sim.nz); /* critical-state stress ratio */
sim.sigma_n_eff = zeros(sim.nz); /* effective normal stress */
sim.sigma_n = zeros(sim.nz); /* normal stess */
sim.p_f_ghost = zeros(sim.nz+2); /* fluid pressure with ghost nodes */
- free(sim.phi);
sim.phi = zeros(sim.nz); /* porosity */
- free(sim.k);
+ sim.phi_c = zeros(sim.nz); /* critical-state porosity */
+ sim.phi_dot = zeros(sim.nz); /* rate of porosity change */
sim.k = zeros(sim.nz); /* permeability */
sim.xi = zeros(sim.nz); /* cooperativity length */
sim.gamma_dot_p = zeros(sim.nz); /* shear velocity */
@@ -32,6 +39,7 @@ prepare_arrays()
sim.g_ghost = zeros(sim.nz+2); /* fluidity with ghost nodes */
sim.I = zeros(sim.nz); /* inertia number */
sim.tau = zeros(sim.nz); /* shear stress */
+ sim.tan_psi = zeros(sim.nz); /* tan(dilatancy_angle) */
}
void
@@ -39,17 +47,21 @@ free_arrays()
{
free(sim.z);
free(sim.mu);
+ free(sim.mu_c);
free(sim.sigma_n_eff);
free(sim.sigma_n);
free(sim.p_f_ghost);
free(sim.k);
free(sim.phi);
+ free(sim.phi_c);
+ free(sim.phi_dot);
free(sim.xi);
free(sim.gamma_dot_p);
free(sim.v_x);
free(sim.g_ghost);
free(sim.I);
free(sim.tau);
+ free(sim.tan_psi);
}
static void
@@ -335,7 +347,7 @@ compute_permeability()
/* NEW FUNCTIONS END */
-void
+/*void
compute_friction()
{
int i;
@@ -348,7 +360,7 @@ compute_friction()
sim.mu[i] = sim.mu_wall/
(1.0 + (1.0 - sim.phi[i])*sim.rho_s*sim.G*
(sim.L_z - sim.z[i])/sim.P_wall);
-}
+}*/
double
shear_strain_rate_plastic(const double fluidity, const double friction)
diff --git a/simulation.h b/simulation.h
@@ -98,20 +98,23 @@ struct simulation {
/* arrays */
double* mu; /* static yield friction [-] */
+ double* mu_c; /* critical-state static yield friction [-] */
double* sigma_n_eff; /* effective normal pressure [Pa] */
double* sigma_n; /* normal stress [Pa] */
double* p_f_ghost; /* fluid pressure [Pa] */
double* k; /* hydraulic permeability [m^2] */
double* phi; /* porosity [-] */
+ double* phi_c; /* critical-state porosity [-] */
+ double* phi_dot; /* porosity change [s^-1] */
double* xi; /* cooperativity length */
- double* gamma_dot_p; /* plastic shear strain rate [1/s] */
+ double* gamma_dot_p; /* plastic shear strain rate [s^-1] */
double* v_x; /* shear velocity [m/s] */
double* g_ghost; /* fluidity with ghost nodes */
double* I; /* inertia number [-] */
double* tau; /* shear stress [Pa] */
+ double* tan_psi; /* tan(dilatancy_angle) [-] */
};
-
void prepare_arrays();
void free_arrays();