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
#############################################################
15
#An example python script to generate a cylinder of unbonded particles
17
# Define region extremities:
18
origin = Vector3(0.0,0.0,0.0)
19
axis = Vector3(0.0,1.0,0.0)
21
minPoint = Vector3(-1.0*size,0.0,-1.0*size)
22
maxPoint = Vector3(size,3.0*size,size)
24
# Define the volume to be filled with spheres:
26
cylinder = CylinderVol ( origin = origin, axis = axis, length = 3.0*size, radius = size)
28
# Create a multi-group neighbour table to contain the particles:
35
# Fill the volume with particles:
36
packer = InsertGenerator3D (
44
# Generate the packing
45
packer.generatePacking(
50
# write a geometry file in VTK format
52
fileName = "temp/geo_example3.vtu",
56
# write a geometry file in ESyS-Particle geo format
58
fileName = "temp/geo_example3.geo",