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

commit 579f9c5f031889c775b764df78a0a1d86eca9217
parent 150398e2da07a321896e44c5ea7bf1238d683150
Author: Ian Madden <iamadden@stanford.edu>
Date:   Mon,  8 Mar 2021 20:09:38 -0800

Added a negative value check for the effective normal stress.

Signed-off-by: Anders Damsgaard <anders@adamsgaard.dk>

Diffstat:
Msimulation.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/simulation.c b/simulation.c @@ -533,6 +533,10 @@ compute_effective_stress(struct simulation *sim) if (sim->fluid) for (i = 0; i < sim->nz; ++i) sim->sigma_n_eff[i] = sim->sigma_n[i] - sim->p_f_ghost[i + 1]; + if( sim->sigma_n_eff[i] < 0) { + fprintf(stderr, "sigma_n_eff[%d] is negative with value %g", i, sim->sigma_n_eff[i]); + exit(1); + } else for (i = 0; i < sim->nz; ++i) sim->sigma_n_eff[i] = sim->sigma_n[i];