tprint critical damping value - 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 2f797ca42a01f9ba8b1a0b796f1a2d401fd93cb8
(DIR) parent 2244613a995b06519bf113d6b2da83275e3e33e6
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Tue, 30 Sep 2014 10:04:23 +0200
print critical damping value
Diffstat:
M python/halfshear-starter.py | 2 ++
M python/sphere.py | 15 ++++++++++-----
2 files changed, 12 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/python/halfshear-starter.py b/python/halfshear-starter.py
t@@ -50,6 +50,8 @@ sim.w_devs[0] = sigma0
#sim.w_m[0] = numpy.abs(sigma0*sim.L[0]*sim.L[1]/sim.g[2])
sim.mu_s[0] = 0.5
sim.mu_d[0] = 0.5
+sim.setDampingNormal(0.0)
+sim.setDampingTangential(0.0)
# Fix lowermost particles
dz = sim.L[2]/sim.num[2]
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -2885,23 +2885,28 @@ class sim:
See also: :func:`setDampingTangential(gamma)`
'''
self.gamma_n[0] = gamma
- damping_ratio = gamma/(2.0*numpy.sqrt(self.smallestMass()*self.k_n[0]))
+ critical_gamma = 2.0*numpy.sqrt(self.smallestMass()*self.k_n[0])
+ damping_ratio = gamma/critical_gamma
if (damping_ratio < 1.0):
print('Info: The system is under-dampened (ratio = '
+ str(damping_ratio)
- + ') in the normal component. This is ok.')
+ + ') in the normal component. Critical damping = '
+ + str(critical_gamma) + '. This is ok.')
elif (damping_ratio > 1.0):
if over_damping:
print('Warning: The system is over-dampened (ratio = '
- + str(damping_ratio) + ') in the normal component.')
+ + str(damping_ratio) + ') in the normal component. '
+ + 'Critical damping = ' + str(critical_gamma) + '.')
else:
raise Exception('Warning: The system is over-dampened (ratio = '
+ str(damping_ratio) + ') in the normal component.\n'
+ 'Call this function once more with `over_damping=True` '
- + 'if this is what you want.')
+ + 'if this is what you want. Critical damping = '
+ + str(critical_gamma) + '.')
else:
print('Warning: The system is critically dampened (ratio = '
- + str(damping_ratio) + ') in the normal component.')
+ + str(damping_ratio) + ') in the normal component. '
+ + 'Critical damping = ' + str(critical_gamma) + '.')
def setDampingTangential(self, gamma, over_damping=False):
'''