tLonger test, changed parameter setting - 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 381e60f151984d0e0db38b6c0cc52f2c9ef4b5b8
(DIR) parent 92d726c70620bb1b7c33338f6f451374e7a6d0dc
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Tue, 25 Mar 2014 15:34:32 +0100
Longer test, changed parameter setting
Diffstat:
M python/sphere.py | 10 +++++-----
M tests/dem_cfd_tests.py | 6 ++++--
2 files changed, 9 insertions(+), 7 deletions(-)
---
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -3736,7 +3736,7 @@ class sim:
:param theta: The smoothing parameter value
:type theta: float
'''
- self.gamma[0] = gamma
+ self.gamma = numpy.asarray(gamma)
def setTheta(self, theta):
'''
t@@ -3752,7 +3752,7 @@ class sim:
:param theta: The under-relaxation parameter value
:type theta: float
'''
- self.theta[0] = theta
+ self.theta = numpy.asarray(theta)
def setBeta(self, beta):
t@@ -3767,7 +3767,7 @@ class sim:
The default and recommended value is 0.0.
'''
- self.beta[0] = beta
+ self.beta = numpy.asarray(beta)
def setTolerance(self, tolerance):
'''
t@@ -3781,7 +3781,7 @@ class sim:
residual
:type tolerance: float
'''
- self.tolerance[0] = tolerance
+ self.tolerance = numpy.asarray(tolerance)
def setMaxIterations(self, maxiter):
'''
t@@ -3797,7 +3797,7 @@ class sim:
solver
:type maxiter: int
'''
- self.maxiter[0] = maxiter
+ self.maxiter = numpy.asarray(maxiter)
def convert(graphics_format = 'png', folder = '../img_out'):
(DIR) diff --git a/tests/dem_cfd_tests.py b/tests/dem_cfd_tests.py
t@@ -25,7 +25,7 @@ py.readlast(verbose = False)
ones = numpy.ones((orig.num))
zeros = numpy.zeros((orig.num[0], orig.num[1], orig.num[2], 3))
compareNumpyArraysClose(ones, py.p_f, 'Conservation of pressure:',
- tolerance = 1.0e-5)
+ tolerance = 1.0e-1)
compareNumpyArraysClose([0,0,0], py.vel[0], 'Particle velocity:\t',
tolerance = 1.0e-5)
compareNumpyArraysClose(zeros, py.v_f, 'Fluid velocities:\t',
t@@ -38,10 +38,12 @@ orig.defaultParams(mu_s = 0.4, mu_d = 0.4)
orig.addParticle([0.2, 0.2, 0.6], 0.02)
orig.defineWorldBoundaries([0.4, 0.4, 1], dx = 0.04)
orig.initFluid(mu = 8.9e-4)
-orig.initTemporal(total = 0.2, file_dt = 0.01)
+orig.initTemporal(total = 0.5, file_dt = 0.01)
py = sphere.sim(sid = orig.sid, fluid = True)
orig.g[2] = -10.0
orig.bc_bot[0] = 1 # No-flow BC at bottom (Neumann)
+orig.setTolerance(1.0e-3)
+orig.setMaxIterations(2e4)
orig.run(dry=True)
orig.run(verbose=True)
orig.writeVTKall()