tMove wall friction variable associated with limited shear velocity - cngf-pf - continuum model for granular flows with pore-pressure dynamics (renamed from 1d_fd_simple_shear)
HTML git clone git://src.adamsgaard.dk/cngf-pf
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 8bbc6c21842e6820f09d642d03ae1c0cb814a3f5
DIR parent f74ed98b4c7ea4bde059ced6673690a20f85e016
HTML Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 6 Apr 2020 13:56:37 +0200
Move wall friction variable associated with limited shear velocity
Diffstat:
M 1d_fd_simple_shear.c | 2 --
M simulation.c | 7 ++++++-
2 files changed, 6 insertions(+), 3 deletions(-)
---
DIR diff --git a/1d_fd_simple_shear.c b/1d_fd_simple_shear.c
t@@ -262,8 +262,6 @@ main(int argc, char* argv[])
printf("time spent per time step = %g s\n", t_elapsed);
#endif
- if (!isnan(sim.v_x_limit))
- sim.mu_wall = mu_wall_orig;
sim.t += sim.dt;
filetimeclock += sim.dt;
iter++;
DIR diff --git a/simulation.c b/simulation.c
t@@ -640,9 +640,10 @@ coupled_shear_solver(const int max_iter,
const double rel_tol)
{
int coupled_iter, stress_iter;
+ double res_norm, mu_wall_orig;
- double res_norm;
res_norm = NAN;
+ mu_wall_orig = sim.mu_wall;
stress_iter = 0;
do { /* stress iterations */
t@@ -727,6 +728,10 @@ coupled_shear_solver(const int max_iter,
} while ((!isnan(sim.v_x_fix) || !isnan(sim.v_x_limit))
&& fabs(res_norm) > RTOL_STRESS);
+
+ if (!isnan(sim.v_x_limit))
+ sim.mu_wall = mu_wall_orig;
+
return 0;
}