#fillBucket.txt:
#==============
#
#An ESyS-Particle script to gravitationally settle
#frictional elastic particles inside a conical bucket
#
#D. Weatherley, UQ, 2018.
#
#Import the ESyS-Particle modules:
from esys.lsm import * 
from esys.lsm.util import *

#define the range of particle sizes:
Rmin = 0.2
Rmax = 0.5

#spatial domain boundaries:
minPoint = Vec3 (-20,-20,-20)
maxPoint = Vec3 (20,20,20)

#Construct a simulation container:
sim = LsmMpi (1, [1,1,1])

#Initialise the neighbour search algorithm:
sim.initNeighbourSearch (
   particleType = "NRotSphere", 
   gridSpacing = 2.5*Rmax, 
   verletDist = 0.2*Rmin
)

#Specify the number of timesteps to compute and the timestep size:
sim.setNumTimeSteps (10000)
sim.setTimeStepSize (0.001)

#Read the initial particle geometry from a GenGeo geometry file:
sim.readGeometry("myparticles.geo")

#Set the density of all particles:
sim.setParticleDensity (tag = 1, mask = -1, Density = 2600.0)

#Import a trimesh wall:
sim.readMesh ("bucket.lsm","mybucket")

#Specify linear elastic repulsion from the trimesh:
sim.createInteractionGroup (
    NRotElasticTriMeshPrms (
        name = "pmesh_repel",
        meshName = "mybucket",
        normalK = 1.0e7
        )
)

#Specify linear elastic repulsion between particles:
sim.createInteractionGroup (
   NRotFrictionPrms (
      name = "friction", 
      normalK = 1.0e7, 
      dynamicMu = 0.6,
      shearK = 1.0e7,
      scaling = True
   )
)

#Add gravity:
sim.createInteractionGroup (
   GravityPrms (name = "gravity", acceleration = Vec3(0,-9.81,0))
)

#Attach a CheckPointer to record simulation data for visualisation:
sim.createCheckPointer (
   CheckPointPrms (
      fileNamePrefix = "snapshot", 
      beginTimeStep = 0, 
      endTimeStep = 10000, 
      timeStepIncr = 100
   )
)

#Execute the simulation:
sim.run()

GlossyBlue theme adapted by David Gilbert
Powered by PmWiki
www.000webhost.com