1
#############################################################
3
## Copyright (c) 2007-2011 by The University of Queensland ##
4
## Earth Systems Science Computational Centre (ESSCC) ##
5
## http://www.uq.edu.au/esscc ##
7
## Primary Business: Brisbane, Queensland, Australia ##
8
## Licensed under the Open Software License version 3.0 ##
9
## http://www.opensource.org/licenses/osl-3.0.php ##
11
#############################################################
14
#An example python script to generate a triangular prism of bonded particles
17
# Define region extremities:
18
minPoint = Vector3(-1.0*size,-1.0*size,-1.0*size)
19
maxPoint = Vector3(size,size,size)
21
# Define the volume to be filled with spheres:
27
tribox.addPlane(Plane(minPoint,Vector3(0.0,1.0,0.0)))
28
tribox.addPlane(Plane(minPoint,Vector3(0.0,0.0,1.0)))
29
tribox.addPlane(Plane(maxPoint,Vector3(0.0,0.0,-1.0)))
31
delta = maxPoint-minPoint
34
tribox.addPlane(Plane(minPoint, Vector3(dy,-0.5*dx,0.0).unit()))
35
tribox.addPlane(Plane(maxPoint-Vector3(dx/2.0,0.0,0.0), Vector3(-1.0*dy,-0.5*dx,0.0).unit()))
37
# Create a multi-group neighbour table to contain the particles:
44
# Fill the volume with particles:
45
packer = InsertGenerator3D (
53
# Generate the packing
54
packer.generatePacking(
59
# generate bonds between neighbouring particles
60
mntable.generateBonds(
65
# write a geometry file in VTK format
67
fileName = "temp/geo_example6.vtu",
71
# write a geometry file in ESyS-Particle geo format
73
fileName = "temp/geo_example6.geo",