tAdded a negative value check for the effective normal stress. - 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 579f9c5f031889c775b764df78a0a1d86eca9217
(DIR) parent 150398e2da07a321896e44c5ea7bf1238d683150
(HTM) 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:
M simulation.c | 4 ++++
1 file changed, 4 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/simulation.c b/simulation.c
t@@ -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];