Cylinder particles segmented question

Asked by enki

Info: Yade2018 02b on Ubuntu 18.04 version

I try one example case by my script: four cylinder particles with 6 moving walls

However, I found that when I sun the script, the 6 aabbWalls() were disappeared, the top and bottom of the four cylindrical particles are segemented, and they are enlarged over time. But the terminal did not report any errors.

Do these disappeared walls succeed in adding velocity? Should aabbWalls disappear in the running gprocess?

Why do cylindrical particles segment and expand over time?

### Partial Script ###

idSteel=O.materials.append(FrictMat(young=210e9,poisson=.25,frictionAngle=.8,density=7.85e3,label='steel'))
# wallMask=31 >> +/-x, +/-y, -z
#O.bodies.append(geom.facetBox((0,0,0),(2.5,2.5,1),wallMask=63,material="steel" ))

## create walls
walls=aabbWalls([(0,0,0),(2.5,2.5,1)],thickness=0.0,material='steel')
wallIds=O.bodies.append(walls)

### create materials ###

# gridConnections material

gridConMat= O.materials.append(CohFrictMat(young=E, poisson=0.5, density=1500, frictionAngle=radians(phi), normalCohesion=1e10, shearCohesion=1e10, momentRotationLaw=True, label='gcMat'))

# general interactions

cylMat= O.materials.append(FrictMat(young=E, poisson=0.5, density=1500, frictionAngle=radians(phi), label='cMat'))

### create particles/packing: cylinders ###

nodesIds=[]
cylIds=[]

dx=0.5
dy=0.5
nx=2
ny=2
nz=1
dz=0

for i in range(0,nx):
 x=0+i*dx
 for j in range(0,ny):
  y=0+j*dy
  for k in range(0,nz):
   z=0+k*dz
   cylinder((x,y+cyl_L,z),(x,y,z),radius=cyl_R,nodesIds=nodesIds,cylIds=cylIds,
color=[1,0,0],fixed=False,intMaterial='gcMat',extMaterial='cMat')

#O.bodies.appendClumped()

move = TranslationEngine(translationAxis=[0,0,1],velocity=1,ids=[0,1,2,3,4,5])

### Engines ###

O.engines = [
 ForceResetter(),
        InsertionSortCollider([Bo1_GridConnection_Aabb(),Bo1_PFacet_Aabb(), Bo1_Wall_Aabb()]),
        InteractionLoop([
   Ig2_GridNode_GridNode_GridNodeGeom6D(),
                  Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
   Ig2_Wall_Sphere_ScGeom(),
   Ig2_Sphere_Sphere_ScGeom(),
   Ig2_Sphere_GridConnection_ScGridCoGeom(),
   Ig2_GridConnection_PFacet_ScGeom(),
                ],
                [
# internal cylinder physics
           Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False),
# physics for external interactions, i.e., cylinder-cylinder
                        Ip2_FrictMat_FrictMat_FrictPhys()
                ],
                [
                        Law2_ScGeom6D_CohFrictPhys_CohesionMoment(), # contact law for "internal" cylinder forces
                        Law2_GridCoGridCoGeom_FrictPhys_CundallStrack(), # contact law for cylinder-cylinder interaction
   Law2_ScGeom_FrictPhys_CundallStrack(),
   Law2_ScGridCoGeom_FrictPhys_CundallStrack()
   ]
        ),
 GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.5),
        NewtonIntegrator(gravity=(0., 0., -9.81), damping=0.5, label='newton'),
 move
 #TranslationEngine(translationAxis=[1,0,0],velocity=0.5,ids=[0,1,2,3,4,5])
 #PyRunner(iterPeriod=1e-3,command="")
]

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

please make the code MWE [1]:

- M = minimal
i.g. delete the commented code lines, they only create confusion.
Do not delete true comments, but delete commented code like
# wallMask=31 >> +/-x, +/-y, -z
#O.bodies.append(geom.facetBox((0,0,0),(2.5,2.5,1),wallMask=63,material="steel" ))

- W = working
I have tried the code with
NameError: name 'E' is not defined

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
enki (kikiyu) said :
#2

Thanks Jan,

1)

working:

## create walls
walls=aabbWalls([(0,0,0),(2.5,2.5,1)],thickness=0.0,material='steel')
wallIds=O.bodies.append(walls)

move = TranslationEngine(translationAxis=[0,0,1],velocity=1,ids=[0,1,2,3,4,5])

Do these walls succeed in adding velocity?
The parameter translationAxis=[0,0,1] means that all index wallIds will move in the z direction, right?

2)

Working:

I set these cylindrical particles through a loop, without defining any functions, and add velocity to the walls, other code is similar to the normal example. (i.e. create material + O.engiens[] )

Confusion Part:

I want these particles to affect each other and push by the walls, but they all flicker, the top and bottom spheres are split, and the middle part is enlarged over time.

Revision history for this message
Jan Stránský (honzik) said :
#3

Please provide a MWE [1]. W=working, i.e. we can try it ourselves. I.e. when we run it, it contains no errors.

> Do these walls succeed in adding velocity?

they should, but we can only guess without a MWE (W=working)

> The parameter translationAxis=[0,0,1] means that all index wallIds will move in the z direction, right?

yes

> I want these particles to affect each other and push by the walls, but they all flicker, the top and bottom spheres are split, and the middle part is enlarged over time.

please provide a MWE such that we can test and see the behavior ourselves

Cheers
Jan

Revision history for this message
enki (kikiyu) said :
#4

Thanks Jan,

1) The parameter translationAxis=[0,0,1] means that all index wallIds will move in the z direction

>> What if we would like to apply specific direction for each wall?

      i.e. y direction for top and bottom wall, x direction for left and right wall, z direction for front and back

     It seems that the above code, can only control one direction for 6 walls at one time

2) Example MWE script is shown as below:

#### Parameters ####

# radius of cylinder
cyl_R=0.1
# length of cylinder
cyl_L=0.2
# friction angle
phi=30.0
# Young's modulus
E=1e6

idSteel=O.materials.append(FrictMat(young=210e9,poisson=.25,frictionAngle=.8,density=7.85e3,label='steel'))
# wallMask=31 >> +/-x, +/-y, -z
#O.bodies.append(geom.facetBox((0,0,0),(2.5,2.5,1),wallMask=63,material="steel" ))

## create walls
walls=aabbWalls([(-2.5,-2.5,-2.5),(2.5,2.5,2.5)],thickness=0.0,material='steel')
wallIds=O.bodies.append(walls)

### periodic boundary for wall ###

#O.periodic=True
#O.cell.hSize=Matrix3(0.8,0,0,0,1,0,0,0,0.8)

### set the velocity for facet ###

#for id in range(6):
# b = O.bodies[id]
# b.state.vel = (0,0,0.5)

### create materials ###

# gridConnections material

gridConMat= O.materials.append(CohFrictMat(young=E, poisson=0.5, density=1500, frictionAngle=radians(phi), normalCohesion=1e10, shearCohesion=1e10, momentRotationLaw=True, label='gcMat'))

# general interactions

cylMat= O.materials.append(FrictMat(young=E, poisson=0.5, density=1500, frictionAngle=radians(phi), label='cMat'))

### create particles/packing: cylinders ###

nodesIds=[]
cylIds=[]

dx=0.5
dy=0.5
nx=2
ny=2
nz=1
dz=0

for i in range(0,nx):
 x=0+i*dx
 for j in range(0,ny):
  y=0+j*dy
  for k in range(0,nz):
   z=0+k*dz
   cylinder((x,y+cyl_L,z),(x,y,z),radius=cyl_R,nodesIds=nodesIds,cylIds=cylIds,
color=[1,0,0],fixed=False,intMaterial='gcMat',extMaterial='cMat')

#O.bodies.appendClumped()

move = TranslationEngine(translationAxis=[0,0,1],velocity=1,ids=[0,1,2,3,4,5])

### Engines ###

O.engines = [
 ForceResetter(),
        InsertionSortCollider([Bo1_GridConnection_Aabb(),Bo1_PFacet_Aabb(), Bo1_Wall_Aabb()]),
        InteractionLoop([
   Ig2_GridNode_GridNode_GridNodeGeom6D(),
                  Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
   Ig2_Wall_Sphere_ScGeom(),
   Ig2_Sphere_Sphere_ScGeom(),
   Ig2_Sphere_GridConnection_ScGridCoGeom(),
   Ig2_GridConnection_PFacet_ScGeom(),
                ],
                [
# internal cylinder physics
           Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False),
# physics for external interactions, i.e., cylinder-cylinder
                        Ip2_FrictMat_FrictMat_FrictPhys()
                ],
                [
                        Law2_ScGeom6D_CohFrictPhys_CohesionMoment(), # contact law for "internal" cylinder forces
                        Law2_GridCoGridCoGeom_FrictPhys_CundallStrack(), # contact law for cylinder-cylinder interaction
   Law2_ScGeom_FrictPhys_CundallStrack(),
   Law2_ScGridCoGeom_FrictPhys_CundallStrack()
   ]
        ),
 GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.5),
        NewtonIntegrator(gravity=(0., 0., -9.81), damping=0.5, label='newton'),
 move
 #TranslationEngine(translationAxis=[1,0,0],velocity=0.5,ids=[0,1,2,3,4,5])
 #PyRunner(iterPeriod=1e-3,command="")
]

O.dt=0.5*PWaveTimeStep()

#### For viewing ####
qt.View()

#### Allows to reload the simulation ####
O.saveTmp()

Revision history for this message
Jan Stránský (honzik) said :
#5

>> The parameter translationAxis=[0,0,1] means that all index wallIds will move in the z direction
> What if we would like to apply specific direction for each wall?
> i.e. y direction for top and bottom wall, x direction for left and right wall, z direction for front and back
> It seems that the above code, can only control one direction for 6 walls at one time

Yes, TranslationEngine moves all its bodies "at once".
If you want to move each body separately, you can:

- create more TranslationEngine instances, each with its own ids and its own axis and velocity

- assign velocity directly to the body:
###
b = O.bodies[0] # some wall
b.state.vel = (1,2,3) # some velocity vector
###

> Example MWE script is shown as below:

W = working
NameError: name 'cylinder' is not defined
NameError: name 'qt' is not defined

M = minimal
Still there are unused commented codes, e.g. #O.bodies.appendClumped()

> the 6 aabbWalls() were disappeared

They move away with the prescribed velocity, nothing surprising, or?

> Do these disappeared walls succeed in adding velocity? Should aabbWalls disappear in the running gprocess?

If "diseappear" mean moving with prescribed velocity, then yes and yes

Cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask enki for more information if necessary.

To post a message you must log in.