tadd functions to set frictional coefficients - sphere - GPU-based 3D discrete … | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 76aef1aad86deca7d2cb55dd3967abdc91ac30ba | |
parent 800daf5d4a0409bae1d91db072ebca5483051083 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 6 Nov 2014 10:02:54 +0100 | |
add functions to set frictional coefficients | |
Diffstat: | |
M python/sphere.py | 32 +++++++++++++++++++++++++++++… | |
M tests/cfd_tests_darcy_particles.py | 10 +++++++--- | |
2 files changed, 39 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -3333,6 +3333,38 @@ class sim: | |
else: | |
print('Warning: The system is critically dampened (ratio = ' | |
+ str(damping_ratio) + ') in the tangential component.') | |
+ | |
+ def setStaticFriction(self, mu_s): | |
+ ''' | |
+ Set the static friction coefficient for particle-particle interactions | |
+ (`self.mu_s`). This value describes the resistance to a shearing motion | |
+ while it is not happenind (contact tangential velocity zero). | |
+ | |
+ :param mu_s: Value of the static friction coefficient, in [0;inf[. | |
+ Usually between 0 and 1. | |
+ :type mu_s: float | |
+ | |
+ See also: :func:`setDynamicFriction(mu_d)` | |
+ ''' | |
+ self.mu_s[0] = mu_s | |
+ | |
+ def setDynamicFriction(self, mu_d): | |
+ ''' | |
+ Set the dynamic friction coefficient for particle-particle interactions | |
+ (`self.mu_d`). This value describes the resistance to a shearing motion | |
+ while it is happening (contact tangential velocity larger than 0). | |
+ Strain softening can be introduced by having a smaller dynamic | |
+ frictional coefficient than the static fricion coefficient. Usually th… | |
+ value is identical to the static friction coefficient. | |
+ | |
+ :param mu_d: Value of the dynamic friction coefficient, in [0;inf[. | |
+ Usually between 0 and 1. | |
+ :type mu_d: float | |
+ | |
+ See also: :func:`setStaticFriction(mu_s)` | |
+ ''' | |
+ self.mu_d[0] = mu_d | |
+ | |
def bond(self, i, j): | |
''' | |
diff --git a/tests/cfd_tests_darcy_particles.py b/tests/cfd_tests_darcy_particl… | |
t@@ -123,7 +123,9 @@ orig.num[2] /= 2 | |
orig.L[2] /= 2.0 | |
orig.id('darcy_fluidization') | |
orig.cleanup() | |
-orig.initTemporal(total=0.005, file_dt=0.001) | |
+orig.setStiffnessNormal(36.4e9) | |
+orig.setStiffnessTangential(36.4e9/3.0) | |
+orig.initTemporal(total=0.0005, file_dt=0.0001) | |
orig.initFluid(cfd_solver=1) | |
orig.setFluidBottomNoFlow() | |
orig.g[2] = -10.0 | |
t@@ -134,7 +136,7 @@ orig.run(verbose=False) | |
#orig.writeVTKall() | |
py = sphere.sim(sid = orig.sid, fluid = True) | |
py.readlast(verbose=False) | |
-test(orig.w_x[0] > py.w_x[0], 'Wall movement:\t') | |
+test(orig.w_x[0] > py.w_x[0], 'Wall movement:\t\t') | |
print("### Fluidization test: Transient, gravity, Dirichlet+Dirichlet BCs") | |
t@@ -145,7 +147,9 @@ orig.num[2] /= 2 | |
orig.L[2] /= 2.0 | |
orig.id('darcy_fluidization') | |
orig.cleanup() | |
-orig.initTemporal(total=0.005, file_dt=0.001) | |
+orig.setStiffnessNormal(36.4e9) | |
+orig.setStiffnessTangential(36.4e9/3.0) | |
+orig.initTemporal(total=0.0005, file_dt=0.0001) | |
orig.initFluid(cfd_solver=1) | |
orig.g[2] = -10.0 | |
#orig.k_c[0] = numpy.mean(orig.radius)**2/540.0 |