syntax error in rot_compress.py
Hi there,
Thanks for your tutorials . They have been helpful.
Please I am getting a syntax error in the rot_compress.py tutorial as shown below:
adminuser@
adminuser@
adminuser@
adminuser@
adminuser@
CSubLatticeCont
File "rot_compress.py", line 38
geoRandomBl
^
SyntaxError: invalid syntax
All codes seems correct but i guess that it's the version of my python that might be causing it. Kindly help me with this. below is the tutorial code that i am running :
#import the approprate esysparticle modules
from esys.lsm import*
from esys.lsm.util import*
from esys.lsm.geometary import*
from WallLoader import WallLoaderRunnable
#instantiate a simulation object
sim = LsmMPi (numWorkerProcesses = 1, mpiDimList = [1,1,1])
#initialise the neighbouring search algorithm
sim.initNeighbo
particleType = "RotSphere",
gridSpacing = 5.0000,
verletDist = 0.08000
)
#set the number of timesteps and timestep increament:
sim.setNumTimeSteps (250000)
sim.setTimeStepSize (1.0000e-06)
#specify the spatial domain for the simulation
domain = BoundingBox(
sim.setSpatialD
#create a prism of speherical particles
geoRandomBlock = RandomBoxPacker (
minRadius = 0.400,
MaxRadius = 2.0000,
cubicPackRadius = 2.2000,
maxInsertFails = 5000,
bBox = BoundingBox(
Vec3(-5.0000, 0.0000, -5.0000),
Vec3(5.0000, 20.0000, 5.00000
),
circDimList = [False, False, False],
tolerance = 1.0000e-05
)
geoRandomBlock.
geoRandomBlock_
#add the particles to the simulation object:
sim.createParti
#bond particles together with bondTag =1:
sim.createConne
ConnectionFinder(
maxDist = 0.005,
bondTag = 1,
pList = geoRandomBlock_
)
)
#Create bottom wall of the come.
sim.createWall (
name = "Bottom_wall",
posn = Vec3(0.0000, 0.0000, 0.0000),
normal = Vec3(0.0000, 1.0000, 0.0000)
)
#create a wall at the top of the model:
sim.createWall (
name = "top_wall",
posn = Vec3(0.0000, 20.0000, 0.0000),
normal = Vec3(0.0000, -1.0000, 0.0000)
)
#specify elastic repulsion from the bottom wall:
sim.createInter
NRotElasticWal
name = "bottom_
wallName = "bottom_wall",
normalK = 100000.0
)
)
#Specify elastic repulsion from topwall:
sim.createInter
NRotElasticWal
name = "top_wall_repel",
wallName = "top_wall",
normalK = 100000.0
)
)
#create rotational elastic-brittle bonds between particles:
pp_bonds = sim.createInter
BrittleBeamPrms(
name="pp_bonds",
youngsModulus
cohesion=100.0,
tanAngle=1.0
tag=1
)
)
#initialise frictional interactions for unbonded particles:
sim.createInter
FrictionPrms(
name="friction",
youngsModulus
poissonsRatio
dynamicMu=0.4,
staticMu=0.6
)
)
#create an exlusion between particle pair i.e there undergo bonded or frictional interaction but not both
sim.createExclusion (
interactionName1 ="pp_bonds",
interactionName2 = "friction"
)
#add translational viscous damping:
sim.createInter
LinDampingPrms(
name="damping1",
viscosity=0.002,
maxiteration=50
)
)
#add rotational viscous damping:
sim.createInter
RotDampingPrms(
name="damping2",
viscosity=0.002,
maxIteration=50
)
)
#add a wall loader to move the top wall:
wall_loader1 = WallLoaderRunnable (
LsmMpi =sim,
wallName = 'top_wall',
vPlate = Vec3(0.0, -0.125, 0.0),
startTime = 0,
rampTime = 50000
)
sim.addPreTimeS
#add a wall loader to move the bottom wall:
wall_loader2 = WallLoaderRunnable (
LsmMpi = sim,
wallName = "bottom_wall",
vPlate = Vec3(0.0, 0.125, 0.0),
startTime = 0,
rampTime = 50000
)
sim.addPreTimeS
#execute the simulation:
sim.run()
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply:
This question was reopened
- by Temitope