Box Free Oscillation

Asked by Luis Barbosa

Hello everyone,

Consider a box (made using facetbox, facet, .stl...).
The box is created between 2 fixed spheres (one in each side) outside the box.
The box is free to move horizontally (limited by the spheres).
A step of force is given to the box, which starts to oscillate between the 2 spheres.

That is the system I'm trying to analyse, but when I use facet (fixed=False) the box simply disappears.
Does anybody have some idea?

Follows the code:

#!/usr/bin/python
# -*- coding: utf-8 -*-

# Spheres
O.materials.append(CohFrictMat(young=15e8,poisson=0.3,density=1000,frictionAngle=radians(30),label='spheres'))
O.bodies.append([
utils.sphere(center=(0.5,0.5,0.5),radius=0.1,material='spheres',fixed=False),
utils.sphere(center=(0.5,0.2,0.2),radius=0.1,material='spheres',fixed=False),
utils.sphere(center=(0.5,-0.5,0.5),radius=0.3,material='spheres',fixed=True),
utils.sphere(center=(0.5,1.5,0.5),radius=0.3,material='spheres',fixed=True)
])

########################################################################################
O.bodies.append([
 facet([[0,0,0],[1,0,0],[0,1,0]],fixed=False,color=[1,0,0]),
 facet([[1,0,0],[1,1,0],[0,1,0]],fixed=False),
 facet([[0,0,0],[0,0,1],[0,1,0]],fixed=False),
 facet([[0,0,1],[0,1,0],[0,1,1]],fixed=False),
 facet([[0,0,1],[1,0,1],[0,1,1]],fixed=False),
 facet([[1,1,1],[1,0,1],[0,1,1]],fixed=False),
 facet([[1,1,1],[1,0,1],[1,0,0]],fixed=False),
 facet([[1,1,1],[1,1,0],[1,0,0]],fixed=False),
 facet([[0,0,0],[1,0,0],[0,0,1]],fixed=False),
 facet([[0,0,1],[1,0,0],[1,0,1]],fixed=False),
 facet([[0,1,0],[1,1,0],[0,1,1]],fixed=False),
 facet([[0,1,1],[1,1,0],[1,1,1]],fixed=False)
])

O.engines=[
  ForceResetter(),
  InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
  InteractionLoop(
    [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
    [Ip2_FrictMat_FrictMat_FrictPhys()],
    [Law2_ScGeom_FrictPhys_CundallStrack()]
  ),

  NewtonIntegrator(damping=0.1,gravity=[0,0,-9.81]),

]
O.dt=1e-3*utils.PWaveTimeStep()

from yade import qt
qt.View()
qt.Controller()

Thanks,
Luis

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
Klaus Thoeni (klaus.thoeni) said :
#1

Hi,

Facets are non-dynamic in Yade, i.e., they will not move if forces are applied but act as a rigid boundary. Nevertheless, you can program their movement if you'd like a specific behaviour like vibration or rotation (an example can be find in examples/packs/packs.py [1]). If you need fully dynamic facets you should look into pFacets [2]. Note that these are also deformable.

HTH
Klaus

[1] https://github.com/yade/trunk/blob/master/examples/packs/packs.py
[2] https://yade-dem.org/doc/yade.gridpfacet.html

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

Hi Luis,
even if you set fixed=False, the facets have by default zero mass and
inertia, which causes NaNs in NewtonIntegrator (a=F/m) and particle's
positions and they disappear.

There are several options:
1) set manually mass and inertia (but then each facet would behave like
independent particle, which is probably not what you want)
2) use facet box as a clump (assign mass and inertia to facets before
O.bodies.appendClumped)
3) use one Box instead of several facets

personally I vote for 3
cheers
Jan

2016-06-23 3:57 GMT+02:00 Luis Barbosa <<email address hidden>
>:

> New question #295587 on Yade:
> https://answers.launchpad.net/yade/+question/295587
>
> Hello everyone,
>
> Consider a box (made using facetbox, facet, .stl...).
> The box is created between 2 fixed spheres (one in each side) outside the
> box.
> The box is free to move horizontally (limited by the spheres).
> A step of force is given to the box, which starts to oscillate between the
> 2 spheres.
>
> That is the system I'm trying to analyse, but when I use facet
> (fixed=False) the box simply disappears.
> Does anybody have some idea?
>
> Follows the code:
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
>
> # Spheres
>
> O.materials.append(CohFrictMat(young=15e8,poisson=0.3,density=1000,frictionAngle=radians(30),label='spheres'))
> O.bodies.append([
>
> utils.sphere(center=(0.5,0.5,0.5),radius=0.1,material='spheres',fixed=False),
>
> utils.sphere(center=(0.5,0.2,0.2),radius=0.1,material='spheres',fixed=False),
>
> utils.sphere(center=(0.5,-0.5,0.5),radius=0.3,material='spheres',fixed=True),
> utils.sphere(center=(0.5,1.5,0.5),radius=0.3,material='spheres',fixed=True)
> ])
>
>
> ########################################################################################
> O.bodies.append([
> facet([[0,0,0],[1,0,0],[0,1,0]],fixed=False,color=[1,0,0]),
> facet([[1,0,0],[1,1,0],[0,1,0]],fixed=False),
> facet([[0,0,0],[0,0,1],[0,1,0]],fixed=False),
> facet([[0,0,1],[0,1,0],[0,1,1]],fixed=False),
> facet([[0,0,1],[1,0,1],[0,1,1]],fixed=False),
> facet([[1,1,1],[1,0,1],[0,1,1]],fixed=False),
> facet([[1,1,1],[1,0,1],[1,0,0]],fixed=False),
> facet([[1,1,1],[1,1,0],[1,0,0]],fixed=False),
> facet([[0,0,0],[1,0,0],[0,0,1]],fixed=False),
> facet([[0,0,1],[1,0,0],[1,0,1]],fixed=False),
> facet([[0,1,0],[1,1,0],[0,1,1]],fixed=False),
> facet([[0,1,1],[1,1,0],[1,1,1]],fixed=False)
> ])
>
> O.engines=[
> ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
> InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
> [Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_ScGeom_FrictPhys_CundallStrack()]
> ),
>
> NewtonIntegrator(damping=0.1,gravity=[0,0,-9.81]),
>
> ]
> O.dt=1e-3*utils.PWaveTimeStep()
>
> from yade import qt
> qt.View()
> qt.Controller()
>
> Thanks,
> Luis
>
>
>
> --
> 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
Luis Barbosa (luis-pires-b) said :
#3

Thank you for the answers.

Jan, is it possible create spheres inside the box?
When I do that, no contact spheres - box is detected.

Thanks again,
Luis

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

Hi Luis,
it is possible to create spheres inside the box :-) but I am not sure how
is it with interactions.. Otherwise the box interact ok with the fixed
spheres?
If you need a hollow box, than my approach with one box is not a good
option.. In that case, I would suggest to use clump with the box faces made
either with Facets or 6 thin Boxes
cheers
Jan

2016-06-24 2:47 GMT+02:00 Luis Barbosa <<email address hidden>
>:

> Question #295587 on Yade changed:
> https://answers.launchpad.net/yade/+question/295587
>
> Status: Answered => Open
>
> Luis Barbosa is still having a problem:
> Thank you for the answers.
>
> Jan, is it possible create spheres inside the box?
> When I do that, no contact spheres - box is detected.
>
> Thanks again,
> Luis
>
> --
> 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
Bruno Chareyre (bruno-chareyre) said :
#5

Yes, in fact the "Box" class is practically handling thick planes, not boxes, in the sense that they can't contain anything.
Sphere inside box is an algorithmic nightmare in Yade since it would need multiple contact interactions between the two same bodies.
As suggested by Jan a practical approach is simply the one used in Triaxial tutorials! 6 Box's to bound one box.

Bruno

Revision history for this message
Luis Barbosa (luis-pires-b) said :
#6

Thanks everyone for the help.

When I use facets or 6 thin boxes (aabbWalls) I cannot use fixed=False, to analyse the free movement of the box.

That is the issue I've faced before.

Thanks,
Luis

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

Hi Luis,

what about this script (slightly modified your original version)?

###################################
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Spheres
O.materials.append(CohFrictMat(young=15e8,poisson=0.3,density=1000,frictionAngle=radians(30),label='spheres'))
O.bodies.append([
utils.sphere(center=(0.5,0.5,0.5),radius=0.1,material='spheres',fixed=False),
utils.sphere(center=(0.5,0.2,0.2),radius=0.1,material='spheres',fixed=False),
utils.sphere(center=(0.5,-0.5,0.5),radius=0.3,material='spheres',fixed=True),
utils.sphere(center=(0.5,1.5,0.5),radius=0.3,material='spheres',fixed=True)
])

########################################################################################
cid,ids = O.bodies.appendClumped(aabbWalls(((0,0,0),(1,1,1)),.02,1))
box = O.bodies[cid]
box.state.vel = (0,10,0)

O.engines=[
  ForceResetter(),
  InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
  InteractionLoop(
    [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
    [Ip2_FrictMat_FrictMat_FrictPhys()],
    [Law2_ScGeom_FrictPhys_CundallStrack()]
  ),

  NewtonIntegrator(damping=0.1,gravity=[0,0,-9.81]),

]
O.dt=1e-3*utils.PWaveTimeStep()

from yade import qt
qt.View()
qt.Controller()
###################################

cheers
Jan

2016-06-25 0:42 GMT+02:00 Luis Barbosa <<email address hidden>
>:

> Question #295587 on Yade changed:
> https://answers.launchpad.net/yade/+question/295587
>
> Status: Answered => Open
>
> Luis Barbosa is still having a problem:
> Thanks everyone for the help.
>
> When I use facets or 6 thin boxes (aabbWalls) I cannot use fixed=False,
> to analyse the free movement of the box.
>
> That is the issue I've faced before.
>
> Thanks,
> Luis
>
> --
> 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
Luis Barbosa (luis-pires-b) said :
#8

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