tadd script to analyze peak and ultimate shear friction values - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 00f5e0875755ad2b080b0bb70d4090450f336c49
(DIR) parent f6e31138270bf4cb5bd9c7a1682cfcf9d027bcd1
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Wed, 8 Oct 2014 12:18:41 +0200
add script to analyze peak and ultimate shear friction values
Diffstat:
A python/shear-results-strength.py | 41 +++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/python/shear-results-strength.py b/python/shear-results-strength.py
t@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+import sphere
+import numpy
+
+'''
+Print a table of peak and ultimate shear strengths of the material
+'''
+
+baseid = 'halfshear-sigma0=20000.0'
+
+
+
+
+def print_strengths(sid, fluid=False, c=0.0):
+ sim = sphere.sim(sid, fluid=fluid)
+
+ sim.readfirst(verbose=False)
+ sim.visualize('shear')
+
+ friction = sim.tau[1:]/sim.sigma_eff[1:]
+ tau_peak = numpy.max(friction)
+ tau_ultimate = numpy.average(friction[-500:-1])
+
+ if fluid:
+ print('%.2f \t %.3f \t %.3f' % (c, tau_peak, tau_ultimate))
+ else:
+ print('dry \t %.3f \t %.3f' % (tau_peak, tau_ultimate))
+
+ return friction
+
+
+
+
+# print header
+print('$c$ [-] \t Peak \\tau/\\sigma\' [-] \t Ultimate \\tau/\\sigma\' [-]')
+f = print_strengths(baseid + '-shear', fluid=False)
+f = print_strengths(baseid + '-c=1.0-shear', fluid=True, c=1.0)
+f = print_strengths(baseid + '-c=0.1-shear', fluid=True, c=0.1)
+
+
+