tadd function to return current shear velocity - 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 1ee72ff898cf77c89c58ee5c3805f01247d73cf4
(DIR) parent cf30d3f6d54414708e1265c7a353b490d1b177dc
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Tue, 24 Feb 2015 11:09:18 +0100
add function to return current shear velocity
Diffstat:
M python/sphere.py | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
---
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -4409,7 +4409,7 @@ class sim:
:returns: The total shear displacement [m]
:return type: float
- See also: :func:`shearStrain()`
+ See also: :func:`shearStrain()` and :func:`shearVelocity()`
'''
# Displacement of the upper, fixed particles in the shear direction
t@@ -4417,6 +4417,22 @@ class sim:
fixvel = numpy.nonzero(self.fixvel > 0.0)
return numpy.max(self.xyzsum[fixvel,0])
+ def shearVelocity(self):
+ '''
+ Calculates and returns the current shear velocity. The displacement
+ is found by determining the total x-axis velocity of the upper,
+ fixed particles.
+
+ :returns: The shear velocity [m/s]
+ :return type: float
+
+ See also: :func:`shearStrainRate()` and :func:`shearDisplacement()`
+ '''
+ # Displacement of the upper, fixed particles in the shear direction
+ #xdisp = self.time_current[0] * self.shearVel()
+ fixvel = numpy.nonzero(self.fixvel > 0.0)
+ return numpy.max(self.vel[fixvel,0])
+
def shearStrain(self):
'''
Calculates and returns the current shear strain (gamma) value of the
t@@ -4452,13 +4468,8 @@ class sim:
# Current height
w_x0 = self.w_x[0]
- # Displacement of the upper, fixed particles in the shear direction
- #xdisp = self.time_current[0] * self.shearVel()
- fixvel = numpy.nonzero(self.fixvel > 0.0)
- xvel = numpy.max(self.vel[fixvel,0])
-
# Return shear strain rate
- return xvel/w_x0
+ return self.shearVelocity()/w_x0
def inertiaParameterPlanarShear(self):
'''