Introduction
Introduction Statistics Contact Development Disclaimer Help
tnormal boundaries by default. use periodicBoundariesX or periodicBoundariesXY …
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit ad617bec05a87782ca2fc5a55b50c8765bb216ff
parent e21cfdcd81fcb08ebbad7d66e51bcb8df840524e
Author: Anders Damsgaard <[email protected]>
Date: Fri, 20 Jun 2014 21:34:15 +0200
normal boundaries by default. use periodicBoundariesX or periodicBoundariesXY i…
Diffstat:
M python/shortening.py | 12 +++++++++---
M python/sphere.py | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/python/shortening.py b/python/shortening.py
t@@ -58,6 +58,10 @@ for z in range(nz):
cube.x[i,1] + y*dy ]
sim.addParticle(pos, radius=cube.radius[i], color=grid[z,y])
+# move to x=0
+min_x = numpy.min(sim.x[:,0] - sim.radius[:])
+sim.x[:,0] = sim.x[:,0] - min_x
+
# move to y=0
min_y = numpy.min(sim.x[:,1] - sim.radius[:])
sim.x[:,1] = sim.x[:,1] - min_y
t@@ -66,7 +70,8 @@ sim.x[:,1] = sim.x[:,1] - min_y
min_z = numpy.min(sim.x[:,2] - sim.radius[:])
sim.x[:,2] = sim.x[:,2] - min_z
-sim.defineWorldBoundaries(L=[Lx, Lz*3, Ly])
+#sim.defineWorldBoundaries(L=[Lx, Lz*3, Ly])
+sim.defineWorldBoundaries(L=[numpy.max(sim.x[:,0] + sim.radius[:]), Lz*3, Ly])
sim.k_t[0] = 2.0/3.0*sim.k_n[0]
sim.cleanup()
t@@ -82,10 +87,11 @@ sim.g[0] = 0
sim.g[1] = -9.81
sim.g[2] = 0
-sim.setDampingNormal(1.0e1)
+sim.setDampingNormal(5.0e1)
sim.setDampingTangential(1.0e1)
-sim.periodicBoundariesX()
+#sim.periodicBoundariesX()
+sim.normalBoundariesXY()
sim.uniaxialStrainRate(wvel = 0.0)
# Set duration of simulation, automatically determine timestep, etc.
diff --git a/python/sphere.py b/python/sphere.py
t@@ -76,7 +76,7 @@ class sim:
self.num = numpy.zeros(self.nd, dtype=numpy.uint32)
# Whether to treat the lateral boundaries as periodic (1) or not (0)
- self.periodic = numpy.ones(1, dtype=numpy.uint32)
+ self.periodic = numpy.zeros(1, dtype=numpy.uint32)
## Particle data
# Particle position vectors [m]
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.