Particles crossing the wall

Asked by VG

I intend to create a cloud of spheres in a box which has:

- periodic boundary conditions for all vertical walls
- and rigid floor & ceiling

I am applying compression from the ceiling. Now, what I observe is that some particles cross the floor and ceiling (which are intended to be rigid) and seem to be in a perpetual motion without any interaction with the system

The material properties I am using are as follows:

For the floor and ceiling: FrictMat( young=200e9, poisson=0.3, density=8000. ,frictionAngle=radians(30) ,label='wall_mat')

And for the particles:
 FrictMat( young=4e9,poisson=0.25,density=1346,frictionAngle=radians(30),label='sample_mat')

Can I solve this problem by increasing the Young's modulus for both the materials and what values should I use here ?
 Also, wouldn't increasing the Young's Modulus for particles arbitrarily lead to unphysical response ?

 In addition, I am using O.dt=0.5*PWaveTimeStep() in my simulation. Now, increasing the Young's modulus would also reduce the required time step.

Question information

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

Hello,

please read [1], especially the MWE part (there might be other problems
than stiffness)

> Can I solve this problem by increasing the Young's modulus for both the
> materials and what values should I use here ?
> Also, wouldn't increasing the Young's Modulus for particles arbitrarily
> lead to unphysical response ?
>
>
Probably you can solve the problem by increasing the modulus of spheres.
Depending on your problem and expected result, it might be different
material, which would not be desired.

Increasing modulus of wall has limited effect. The interaction stiffness is
computed as a weighted harmonic mean of the two stiffnesses [2]. In the
case of soft sphere (E1) and inifinitely stiff wall it would result in
interaction stiffness 2*E1*r1, so anyway given by the lower value.

> In addition, I am using O.dt=0.5*PWaveTimeStep() in my simulation. Now,
> increasing the Young's modulus would also reduce the required time step.
>
>
correct

cheers
Jan

[1] https://yade-dem.org/wiki/Howtoask
[2] https://yade-dem.org/doc/formulation.html#normal-stiffness

Revision history for this message
VG (varun-gupta) said :
#2

Thanks for your response, Jan!
I will get the MWE and post it here.

Revision history for this message
Bettina Suhr (bettina-suhr) said :
#3

Hi Varun,

maybe I have the same problem as you have. Yesterday, I posted a question (290933). There is a minimal working example (with a typo, please change the definition of the facet box with the line given in my answer to Anton). Is the problem similar to yours?

Jerome posted a link to another question, where also a bug is linked. It is not clear, but maybe there is a problem in InsertionSortCollider regarding contact detection in periodic cases with facets/walls …

Regards,
Bettina

Revision history for this message
VG (varun-gupta) said :
#4

Hello Bettina,

Thanks for your note. Yes, the problem seems similar.

Also, on taking a closer look, I notice that after some simulation time some particles seem to be overlapping. Does increasing the distance between facet walls make the problem go away ?

Thanks
Varun

Revision history for this message
VG (varun-gupta) said :
#5

Below is one minimal working example which shows such problem. I am trying to compress an assembly of particles between the two plates. The top plate is subjected to a constant force and a velocity in lateral direction to induce shear. The top plate doesn't seem to be interacting with the system and it is just crossing all the particles and bottom plate. Can someone please suggest what am I doing wrong here or if there is a workaround ?
I am using Yade 1.07.0 on Ubuntu 14.04.

# Generate a periodic cell with few super-particles.
# Each superparticle consists of smaller sub-particles of 75 microns
# bonded with cohesive bonds.

from yade import pack,qt,plot,utils,export,ymport
from math import *
from pylab import rand
import datetime
import os,shutil

#############################################################################
# Set up run
#############################################################################
run_name="PeriodicCohesive"
data_root_dir="."
if not os.path.exists(data_root_dir):
  print "The data root directory you specified:"
  print data_root_dir
  print "does not exist. Exiting..."
  exit()
timestamp=datetime.datetime.now().strftime("%Y.%m.%d-%H%M%S")
run_dir_name=timestamp+'-'+run_name
data_dir_path=os.path.join(data_root_dir,run_dir_name)
if not os.path.exists(data_dir_path):
  os.makedirs(data_dir_path)
else:
  print("Something is really wrong if you get this message. Exiting...\n")
  exit()

run_name_base_path=os.path.join(data_dir_path,run_name+'-')
# opts.script is defined in yade, which inserts the script file (e.g.
# this file) into itself.
this_script=os.path.abspath(opts.script)
shutil.copy(this_script,data_dir_path)

#############################################################################
# Materials
#############################################################################
plate_material=CohFrictMat(
    young=200e9
   ,poisson=0.3
   ,density=8000
   ,frictionAngle=radians(30)
   ,normalCohesion=1e10
   ,shearCohesion=1e10
   ,momentRotationLaw=True
   ,label='plate_mat')
O.materials.append(plate_material)

sample_material=CohFrictMat(
    young=4e9
   ,poisson=0.25
   ,density=1400
   ,frictionAngle=radians(30)
   ,normalCohesion=1e8*1.2
   ,shearCohesion=.4e8*1.2
   ,momentRotationLaw=True
   ,label='sample_mat')
O.materials.append(sample_material)

#############################################################################
# Component dimensions and operating condition
#############################################################################
# Granular material dimension
sample_diameter=2e-4
sample_radius=sample_diameter/2.0
# Sub-particle dimension
particle_diameter=74.e-6
particle_radius=particle_diameter/2.

#############################################################################
# grinding plate dimension
#############################################################################

rotvel=2./3.*pi*(1.5+0.5)*.254

#############################################################################
# Periodic Geometry
#############################################################################

# Set up periodic boundary conditions
O.periodic=True
xExt=4*sample_diameter
yExt=3.*sample_diameter*2 #to block the periodicity in y direction
zExt=xExt
xLim=xExt
yLim=yExt/4
zLim=zExt
O.cell.hSize=Matrix3(
  xExt, 0, 0,
  0, yExt, 0,
  0, 0, zExt)

length=xExt
height=yExt
width=zExt

# Top and bottom plate thickness
thickness=0.1*height

#########
# Bottom
#########
bottom=box(
    center=(length/2.0,yLim - thickness/2.0,width/2.0)
   ,extents=(4*length,thickness/2.0,width)
   ,wire=False
   ,material='plate_mat'
   )

O.bodies.append(bottom)

O.bodies[0].state.blockedDOFs='xyzXYZ'

#############################################################################
# Particle Packing
#############################################################################

min_corner= (0,yLim,0)
max_corner= (xLim, yExt-yLim, zLim)

sp=pack.SpherePack()
sp.makeCloud( min_corner,max_corner, rMean=sample_radius, periodic=False)

print "Generated ",len(sp)," aggregates"

###########################################
# Sample
###########################################
for s in sp:
  sphere=pack.inSphere((s[0][0],s[0][1],s[0][2]),s[1])
  sp1=pack.randomDensePack(
      sphere
     ,spheresInCell=2000
     ,radius=particle_radius
     ,memoizeDb='/tmp/triaxPackCache.sqlite'
     ,returnSpherePack=True
     )

  sp1.toSimulation(material='sample_mat',color=(0.9,0.8,0.6))
  print 'Generated ',len(sp1),' particles'

Gl1_Sphere(stripes=True)

#########
# Top
#########
top=box(
    center=(length/2.0,yExt - yLim + thickness/2.0,width/2.0)
   ,extents=(4*length,thickness/2.0,width)
   ,wire=False
   ,material='plate_mat'
   )

top_id=O.bodies.append(top)
O.bodies[top_id].state.blockedDOFs='xzXYZ'

plate_downforce=-0.0036

O.forces.addF(top_id,(0,plate_downforce,0),permanent=True)

O.bodies[top_id].state.vel[0]= rotvel

#############################################################################
# Run the simulation
#############################################################################

O.dt=0.5*PWaveTimeStep()

O.engines=[
  ForceResetter(),
  InsertionSortCollider([
    Bo1_Sphere_Aabb()
   ,Bo1_Box_Aabb()
   ], allowBiggerThanPeriod=True
   ),
  InteractionLoop(
    [Ig2_Sphere_Sphere_ScGeom6D()
    ,Ig2_Box_Sphere_ScGeom6D()
    ],
    [
     Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,label="cohesiveIp")
    ],
    [
     Law2_ScGeom6D_CohFrictPhys_CohesionMoment()
    ]
  ), # End InteractionLoop
  NewtonIntegrator(damping=0.8,gravity=(0.,0.,0.)),

]

O.saveTmp()

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#6

You found a known bug for large objects in periodic simulations.
The bug seems to show up especially when some interactions exist at iteration 0, those ones are not detected correctly (this is your case, where you have large overlaps in the initial geometry).
I find that the problem disappear in your case if line 149 is changed as follows:

top=box(
    center=(length/2.0,yExt - yLim + thickness*2,width/2.0)
   ,extents=(4*length,thickness/2.0,width)
   ,wire=False
   ,material='plate_mat'
   )

Besides, there is absolutely no need to define a thickness for your plates. Thickness zero is ok (mind that the default will be zero though).

Bruno

Revision history for this message
VG (varun-gupta) said :
#7

Hi Bruno,

Thanks for your response.

I tried to incorporate the changes you suggested, but the problem still doesn't seem to go away. Also, another perplexing thing I notice from the simulation that as soon as it starts, some individual particles seem to be just flying in the domain even though they should be part of aggregates connected by cohesive bonds.

Is there a work around or something I could change in the problem set up that would help me resolve this issue ?

I just simply need to compress the granular material with a constant force or leading to a constant compressive stress and then apply shear force.

Regards
Varun

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

Just reformulating Bruno's and Jerome's answers. Instead of one big box,
try to use e.g. clump of 3x3 boxes, each with dimensions 1/3 of cell size.
The simulation is periodic, so you don't need to have this "top" larger
than one periodic cell.

I just tried with one small box (using your script, just making "top"
approx. 1/3 of periodic cell) and it works ok, all interactions seems to be
detected.

cheers
Jan

2016-04-25 20:22 GMT+02:00 VG <email address hidden>:

> Question #290950 on Yade changed:
> https://answers.launchpad.net/yade/+question/290950
>
> VG posted a new comment:
> Hi Bruno,
>
> Thanks for your response.
>
> I tried to incorporate the changes you suggested, but the problem still
> doesn't seem to go away. Also, another perplexing thing I notice from
> the simulation that as soon as it starts, some individual particles seem
> to be just flying in the domain even though they should be part of
> aggregates connected by cohesive bonds.
>
> Is there a work around or something I could change in the problem set up
> that would help me resolve this issue ?
>
> I just simply need to compress the granular material with a constant
> force or leading to a constant compressive stress and then apply shear
> force.
>
> Regards
> Varun
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
VG (varun-gupta) said :
#9

Hello Jan,

Thanks for your response. I tried what you suggested, i.e. one small box (1/3 of the periodic cell), but it still seems to have the same problem and the top box is just flying through the particles. I don't know if there is a way to attach images here, so I have sent you screenshot of the simulation through email. Is there something in my set up that I am missing ?

Thanks
Varun

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

Hi Varun,
change the creation of your top box in the following way. To be sure it
works, I would modify also the bottom in the same way.

to get a force reaction, O.forces.f(top_id) will return only the prescribed
force. Use the following command instead (maybe +- plate_downforce, you can
play a bit)
sum( ( O.forces.f(i) for i in top_ids ), Vector3.Zero )

cheers
Jan

#########
# Top
#########
topBoxes = []
for ix in (0,1,2):
for iz in (1,2,3):
topBoxes.append(box( # create 3x3 boxes with 1/3 cell size
center=(xExt/6.*(1+2*ix),yExt - yLim + thickness/2.0,zExt/6.*(1+2*iz))
,extents=(xExt/6.,thickness/2.0,zExt/6.)
,wire=False
,material='plate_mat'
))
top_id,top_ids = O.bodies.appendClumped(topBoxes) # top_id is the clump id,
top_ids is its members id
O.bodies[top_id].state.blockedDOFs='xzXYZ'
######################

2016-04-25 22:47 GMT+02:00 VG <email address hidden>:

> Question #290950 on Yade changed:
> https://answers.launchpad.net/yade/+question/290950
>
> VG posted a new comment:
> Hello Jan,
>
> Thanks for your response. I tried what you suggested, i.e. one small box
> (1/3 of the periodic cell), but it still seems to have the same problem
> and the top box is just flying through the particles. I don't know if
> there is a way to attach images here, so I have sent you screenshot of
> the simulation through email. Is there something in my set up that I am
> missing ?
>
> Thanks
> Varun
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
VG (varun-gupta) said :
#11

Thanks Jan!
I modified the generation of top and bottom boxes as you suggested. The boxes seem to be generated the way they should be. However, as soon as the simulation starts, those boxes just disappear. I am not sure what is causing this behavior. Here is the updated MWE script:

# Generate a periodic cell with few super-particles.
# Each superparticle consists of smaller sub-particles of 75 microns
# bonded with cohesive bonds.

from yade import pack,qt,plot,utils,export,ymport
from math import *
from pylab import rand
import datetime
import os,shutil

#############################################################################
# Set up run
#############################################################################
run_name="PeriodicCohesive_MWE"
data_root_dir="."
if not os.path.exists(data_root_dir):
  print "The data root directory you specified:"
  print data_root_dir
  print "does not exist. Exiting..."
  exit()
timestamp=datetime.datetime.now().strftime("%Y.%m.%d-%H%M%S")
run_dir_name=timestamp+'-'+run_name
data_dir_path=os.path.join(data_root_dir,run_dir_name)
if not os.path.exists(data_dir_path):
  os.makedirs(data_dir_path)
else:
  print("Something is really wrong if you get this message. Exiting...\n")
  exit()

run_name_base_path=os.path.join(data_dir_path,run_name+'-')
# opts.script is defined in yade, which inserts the script file (e.g.
# this file) into itself.
this_script=os.path.abspath(opts.script)
shutil.copy(this_script,data_dir_path)

#############################################################################
# Materials
#############################################################################
plate_material=CohFrictMat(
    young=200e9
   ,poisson=0.3
   ,density=8000
   ,frictionAngle=radians(30)
   ,normalCohesion=1e10
   ,shearCohesion=1e10
   ,momentRotationLaw=True
   ,label='plate_mat')
O.materials.append(plate_material)

sample_material=CohFrictMat(
    young=4e9
   ,poisson=0.25
   ,density=1400
   ,frictionAngle=radians(30)
   ,normalCohesion=1e8*1.2
   ,shearCohesion=.4e8*1.2
   ,momentRotationLaw=True
   ,label='sample_mat')
O.materials.append(sample_material)

#############################################################################
# Component dimensions and operating condition
#############################################################################
# Granular material dimension
sample_diameter=2e-4
sample_radius=sample_diameter/2.0
# Sub-particle dimension
particle_diameter=74.e-6
particle_radius=particle_diameter/2.

#############################################################################
# grinding plate dimension
#############################################################################

rotvel=2./3.*pi*(1.5+0.5)*.254

#############################################################################
# Periodic Geometry
#############################################################################

# Set up periodic boundary conditions
O.periodic=True
xExt=4*sample_diameter
yExt=3.*sample_diameter*2 #to block the periodicity in y direction
zExt=xExt
xLim=xExt
yLim=yExt/4
zLim=zExt
O.cell.hSize=Matrix3(
  xExt, 0, 0,
  0, yExt, 0,
  0, 0, zExt)

length=xExt
height=yExt
width=zExt

# Top and bottom plate thickness
thickness=0.1*height

#########
# Bottom
#########
#bottom=box(
# center=(length/2.0,yLim - thickness/2.0,width/2.0)
# ,extents=(4*length,thickness/2.0,width)
# ,wire=False
# ,material='plate_mat'
# )

bottomBoxes = []
for ix in (0,1,2):
 for iz in (0,1,2):
   bottomBoxes.append(box( # create 3x3 boxes with 1/3 cell size
   center=(xExt/6.*(1+2*ix),yLim - thickness/2.0,zExt/6.*(1+2*iz))
   ,extents=(xExt/6.,thickness/2.0,zExt/6.)
   ,wire=False
   ,material='plate_mat'
   ))

bottom_id,bottom_ids = O.bodies.appendClumped(bottomBoxes) # bottom_id is the clump id,

O.bodies[bottom_id].state.blockedDOFs='xyzXYZ'

#############################################################################
# Particle Packing
#############################################################################

min_corner= (0,yLim,0)
max_corner= (xLim, yExt-yLim, zLim)

sp=pack.SpherePack()
sp.makeCloud( min_corner,max_corner, rMean=sample_radius, periodic=False)

print "Generated ",len(sp)," aggregates"

###########################################
# Sample
###########################################
for s in sp:
  sphere=pack.inSphere((s[0][0],s[0][1],s[0][2]),s[1])
  sp1=pack.randomDensePack(
      sphere
     ,spheresInCell=2000
     ,radius=particle_radius
     ,memoizeDb='/tmp/triaxPackCache.sqlite'
     ,returnSpherePack=True
     )

  sp1.toSimulation(material='sample_mat',color=(0.9,0.8,0.6))
  print 'Generated ',len(sp1),' particles'

Gl1_Sphere(stripes=True)

#########
# Top
#########
#top=box(
# center=(length/2.0,yExt - yLim + thickness*2,width/2.0)
# ,extents=(0.16*length,thickness/2.0,0.16*width)
# ,wire=False
# ,material='plate_mat'
# )

#top_id=O.bodies.append(top)

#########
 # Top
#########
topBoxes = []
for ix in (0,1,2):
 for iz in (0,1,2):
   topBoxes.append(box( # create 3x3 boxes with 1/3 cell size
   center=(xExt/6.*(1+2*ix),yExt - yLim + thickness/2.0,zExt/6.*(1+2*iz))
   ,extents=(xExt/6.,thickness/2.0,zExt/6.)
   ,wire=False
   ,material='plate_mat'
   ))

top_id,top_ids = O.bodies.appendClumped(topBoxes) # top_id is the clump id,

O.bodies[top_id].state.blockedDOFs='xzXYZ'

plate_downforce=-0.0036

O.forces.addF(top_id,(0,plate_downforce,0),permanent=True)

O.bodies[top_id].state.vel[0]= rotvel

#############################################################################
# Run the simulation
#############################################################################

O.dt=0.5*PWaveTimeStep()

O.engines=[
  ForceResetter(),
  InsertionSortCollider([
    Bo1_Sphere_Aabb()
   ,Bo1_Box_Aabb()
   ], allowBiggerThanPeriod=True
   ),
  InteractionLoop(
    [Ig2_Sphere_Sphere_ScGeom6D()
    ,Ig2_Box_Sphere_ScGeom6D()
    ],
    [
     Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,label="cohesiveIp")
    ],
    [
     Law2_ScGeom6D_CohFrictPhys_CohesionMoment()
    ]
  ), # End InteractionLoop
  NewtonIntegrator(damping=0.8,gravity=(0.,0.,0.)),

]

O.saveTmp()

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

The script works fine for me (at least nothing disappears).
What version of Yade do you use?
What is the output of "O.bodies[top_id].state.mass" and
"O.bodies[top_id].state.inertia"?
thanks
Jan

2016-04-26 2:21 GMT+02:00 VG <email address hidden>:

> Question #290950 on Yade changed:
> https://answers.launchpad.net/yade/+question/290950
>
> VG posted a new comment:
> Thanks Jan!
> I modified the generation of top and bottom boxes as you suggested. The
> boxes seem to be generated the way they should be. However, as soon as the
> simulation starts, those boxes just disappear. I am not sure what is
> causing this behavior. Here is the updated MWE script:
>
>
> # Generate a periodic cell with few super-particles.
> # Each superparticle consists of smaller sub-particles of 75 microns
> # bonded with cohesive bonds.
>
> from yade import pack,qt,plot,utils,export,ymport
> from math import *
> from pylab import rand
> import datetime
> import os,shutil
>
>
> #############################################################################
> # Set up run
>
> #############################################################################
> run_name="PeriodicCohesive_MWE"
> data_root_dir="."
> if not os.path.exists(data_root_dir):
> print "The data root directory you specified:"
> print data_root_dir
> print "does not exist. Exiting..."
> exit()
> timestamp=datetime.datetime.now().strftime("%Y.%m.%d-%H%M%S")
> run_dir_name=timestamp+'-'+run_name
> data_dir_path=os.path.join(data_root_dir,run_dir_name)
> if not os.path.exists(data_dir_path):
> os.makedirs(data_dir_path)
> else:
> print("Something is really wrong if you get this message. Exiting...\n")
> exit()
>
> run_name_base_path=os.path.join(data_dir_path,run_name+'-')
> # opts.script is defined in yade, which inserts the script file (e.g.
> # this file) into itself.
> this_script=os.path.abspath(opts.script)
> shutil.copy(this_script,data_dir_path)
>
>
>
> #############################################################################
> # Materials
>
> #############################################################################
> plate_material=CohFrictMat(
> young=200e9
> ,poisson=0.3
> ,density=8000
> ,frictionAngle=radians(30)
> ,normalCohesion=1e10
> ,shearCohesion=1e10
> ,momentRotationLaw=True
> ,label='plate_mat')
> O.materials.append(plate_material)
>
>
> sample_material=CohFrictMat(
> young=4e9
> ,poisson=0.25
> ,density=1400
> ,frictionAngle=radians(30)
> ,normalCohesion=1e8*1.2
> ,shearCohesion=.4e8*1.2
> ,momentRotationLaw=True
> ,label='sample_mat')
> O.materials.append(sample_material)
>
>
>
> #############################################################################
> # Component dimensions and operating condition
>
> #############################################################################
> # Granular material dimension
> sample_diameter=2e-4
> sample_radius=sample_diameter/2.0
> # Sub-particle dimension
> particle_diameter=74.e-6
> particle_radius=particle_diameter/2.
>
>
> #############################################################################
> # grinding plate dimension
>
> #############################################################################
>
> rotvel=2./3.*pi*(1.5+0.5)*.254
>
>
> #############################################################################
> # Periodic Geometry
>
> #############################################################################
>
>
> # Set up periodic boundary conditions
> O.periodic=True
> xExt=4*sample_diameter
> yExt=3.*sample_diameter*2 #to block the periodicity in y direction
> zExt=xExt
> xLim=xExt
> yLim=yExt/4
> zLim=zExt
> O.cell.hSize=Matrix3(
> xExt, 0, 0,
> 0, yExt, 0,
> 0, 0, zExt)
>
>
> length=xExt
> height=yExt
> width=zExt
>
> # Top and bottom plate thickness
> thickness=0.1*height
>
>
> #########
> # Bottom
> #########
> #bottom=box(
> # center=(length/2.0,yLim - thickness/2.0,width/2.0)
> # ,extents=(4*length,thickness/2.0,width)
> # ,wire=False
> # ,material='plate_mat'
> # )
>
> bottomBoxes = []
> for ix in (0,1,2):
> for iz in (0,1,2):
> bottomBoxes.append(box( # create 3x3 boxes with 1/3 cell size
> center=(xExt/6.*(1+2*ix),yLim - thickness/2.0,zExt/6.*(1+2*iz))
> ,extents=(xExt/6.,thickness/2.0,zExt/6.)
> ,wire=False
> ,material='plate_mat'
> ))
>
> bottom_id,bottom_ids = O.bodies.appendClumped(bottomBoxes) # bottom_id
> is the clump id,
>
>
> O.bodies[bottom_id].state.blockedDOFs='xyzXYZ'
>
>
>
> #############################################################################
> # Particle Packing
>
> #############################################################################
>
> min_corner= (0,yLim,0)
> max_corner= (xLim, yExt-yLim, zLim)
>
> sp=pack.SpherePack()
> sp.makeCloud( min_corner,max_corner, rMean=sample_radius, periodic=False)
>
> print "Generated ",len(sp)," aggregates"
>
> ###########################################
> # Sample
> ###########################################
> for s in sp:
> sphere=pack.inSphere((s[0][0],s[0][1],s[0][2]),s[1])
> sp1=pack.randomDensePack(
> sphere
> ,spheresInCell=2000
> ,radius=particle_radius
> ,memoizeDb='/tmp/triaxPackCache.sqlite'
> ,returnSpherePack=True
> )
>
> sp1.toSimulation(material='sample_mat',color=(0.9,0.8,0.6))
> print 'Generated ',len(sp1),' particles'
>
> Gl1_Sphere(stripes=True)
>
> #########
> # Top
> #########
> #top=box(
> # center=(length/2.0,yExt - yLim + thickness*2,width/2.0)
> # ,extents=(0.16*length,thickness/2.0,0.16*width)
> # ,wire=False
> # ,material='plate_mat'
> # )
>
> #top_id=O.bodies.append(top)
>
> #########
> # Top
> #########
> topBoxes = []
> for ix in (0,1,2):
> for iz in (0,1,2):
> topBoxes.append(box( # create 3x3 boxes with 1/3 cell size
> center=(xExt/6.*(1+2*ix),yExt - yLim + thickness/2.0,zExt/6.*(1+2*iz))
> ,extents=(xExt/6.,thickness/2.0,zExt/6.)
> ,wire=False
> ,material='plate_mat'
> ))
>
> top_id,top_ids = O.bodies.appendClumped(topBoxes) # top_id is the clump
> id,
>
>
> O.bodies[top_id].state.blockedDOFs='xzXYZ'
>
>
> plate_downforce=-0.0036
>
> O.forces.addF(top_id,(0,plate_downforce,0),permanent=True)
>
> O.bodies[top_id].state.vel[0]= rotvel
>
>
>
> #############################################################################
> # Run the simulation
>
> #############################################################################
>
>
> O.dt=0.5*PWaveTimeStep()
>
> O.engines=[
> ForceResetter(),
> InsertionSortCollider([
> Bo1_Sphere_Aabb()
> ,Bo1_Box_Aabb()
> ], allowBiggerThanPeriod=True
> ),
> InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom6D()
> ,Ig2_Box_Sphere_ScGeom6D()
> ],
> [
>
> Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,label="cohesiveIp")
> ],
> [
> Law2_ScGeom6D_CohFrictPhys_CohesionMoment()
> ]
> ), # End InteractionLoop
> NewtonIntegrator(damping=0.8,gravity=(0.,0.,0.)),
>
> ]
>
> O.saveTmp()
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
VG (varun-gupta) said :
#13

I am using version 1.07.0

The output of the two commands are as follows:

O.bodies[top_id].state.mass
0.0

O.bodies[top_id].state.inertia
Vector3(nan,nan,nan)

Thanks
Varun

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

Hello,
by default this would work on newer versions of Yade. In your case, you
have to set mass and inertia manually

O.bodies[top_id].state.mass =
someReasonableValueComputedFromVolumeAndDensity
O.bodies[top_id].state.inertia = (1,1,1) # does not matter since you have
all rotations fixed

cheers
Jan

2016-04-26 6:46 GMT+02:00 VG <email address hidden>:

> Question #290950 on Yade changed:
> https://answers.launchpad.net/yade/+question/290950
>
> VG posted a new comment:
> I am using version 1.07.0
>
> The output of the two commands are as follows:
>
> O.bodies[top_id].state.mass
> 0.0
>
> O.bodies[top_id].state.inertia
> Vector3(nan,nan,nan)
>
> Thanks
> Varun
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Bettina Suhr (bettina-suhr) said :
#15

Hi Varun,

your last MWE script worked for me, using yade-1.20.0. No spheres crossed the boxes and nothing dissapeared. If you continue to face problems, you could try to change to a newer version of yade.

Reagrds,
Bettina

Revision history for this message
VG (varun-gupta) said :
#16

Thanks a lot Jan and Bettina!
I installed Yade version 1.20.0-126-e3271e8~trusty and it seems to be working fine on this newer version.

Setting the mass and inertia manually still did not work with previous yade version - Yade 1.07.0

Revision history for this message
VG (varun-gupta) said :
#17

Thanks Jan Stránský, that solved my question.

Revision history for this message
Jérôme Duriez (jduriez) said :
#18

Does this mean, we have a solution (or at least a good work around) for the related long-lasting bug ? If yes, it would be great to include it in the bug report.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#19

@Jérôme: the workaround is to not have interactions with the large body at step 0