how to block the rotations of loading plates?

Asked by behzad

Hi guys,

Imagine we're running a simple compression test. We would like only a compressive strain by the loading plates (any format, like what we have with uniaxialStrainer).

But, how can we block the rotations of the plates?

box_lower = O.bodies.append(box((0,0,0),(0.05,0.05,0.001),fixed=True,material='wall'))
box_upper = O.bodies.append(box((0,0,0.1),(0.05,0.05,0.001),fixed=True,material='wall'))

Even;

O.bodies[box_upper].state.blockedDOFs='xyzXYZ'
O.bodies[box_upper].state.angVel=(0,0,0)

O.bodies[box_lower].state.angVel=(0,0,0)
O.bodies[box_lower].state.blockedDOFs='xyzXYZ'

doesn't work, and if the load increases, they plates start to rotate around x axis for example.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi Behzad,

Your description sounds very strange to me. You described two consistent ways to define box bodies with constant, zero, angular velocites:
- the use of box() function with fixed = True
- or defining directly the blockedDOFs attribute of the bodies.

Usually (always, normally) YADE bodies with zero angular velocities do not rotate. Except if there is by chance some other funny Engine that will force them to do so (this depends on your complete simulation definition)...

So, I wonder what made you think these plates do rotate ??

Revision history for this message
behzad (behzad-majidi) said :
#2

Jerome,

well, that's my problem. They must stay fixed with zero rotation. but they don't. Check it out:

O.reset()
from yade import utils, plot
from yade import pack, qt

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True, setCohesionOnNewContacts=True)],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),Law2_ScGeom_FrictPhys_CundallStrack()]),
NewtonIntegrator(damping=0.4,gravity=[0,0,0])
]

O.dt=1e-6
#============================MATERIALS===============================================================

cokeMat=O.materials.append(CohFrictMat(young=1e6,normalCohesion=1e3 ,shearCohesion=2e4 ,isCohesive=True, poisson=0.3,density=1377,frictionAngle=1,fragile=True,label='coke'))

cokeMat=O.materials.append(CohFrictMat(young=1e7,normalCohesion=1e6 ,shearCohesion=5e5 ,isCohesive=False, poisson=0.3,density=1377,frictionAngle=500,fragile=True,label='wall'))

#================================================================================================

sp=pack.SpherePack()
pred=pack.inCylinder((0,0,0.002),(0,0,0.21),0.05)

O.bodies.append(pack.regularOrtho(pred,radius=0.005,gap=-1e-6, material='coke'))

#============================WALLS===============================================================

box_lower = O.bodies.append(box((0,0,0.0),(0.05,0.05,0.0001),fixed=True,material='wall'))
box_upper = O.bodies.append(box((0,0,0.21),(0.05,0.05,0.0001),fixed=True,material='wall'))

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

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

#================================================================================================

for x in range(len(O.bodies)):
 if (O.bodies[x]):
                if isinstance(O.bodies[x].shape,Sphere):
   O.bodies[x].shape.color=(0,0.3,0.7)
  else:
   O.bodies[x].shape.color=(0.51,0.51,0.51)

O.engines=O.engines+[UniaxialStrainer(strainRate=-20,axis=2,asymmetry=0,posIds=[box_upper],negIds=[box_lower],
crossSectionArea=0.0025,label='strainer')]

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

I tried your script and could not see anything regarding plates rotation (for me they just move according to translation). So, I still wonder what made you think these plates do rotate ? ;-)

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

Sorry, depending on the yade version I use, I may observe some plate rotation O.iter ~ 30000. Keep in touch..

(I guess it's related with UniaxialStrainer which by the way is probably responsible for changing the blockedDOFs of your plates. Ask for this attribute after running your simulations, and you have now blockedDOF = 'z' instead of 'xyzXYZ')

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

Ok, as a conclusion, UniaxialStrainer does update the blockedDOF of the designated bodies [1]. Then, as I just said, your plates are no more completely blocked (once the simulation actually starts), and may rotate if they have to.

The solution to your problem is to use the "blockRotations" (!) attribute of UniaxialStrainer [2]. Just define it as True in your script, and plates won't rotate any more.

As a side note, you may consider to use the "blockDisplacement" attribute as well

And as another side note, I would personally recommand not to use such engine as UniaxialStrainer if your only goal is to define a constant velocity to your loading plates. Blocking the DOFs as you did (twice !) and assigning state.vel does perfectly the trick, and prevents any hidden unwanted operation you are not aware of.

[1]https://github.com/yade/trunk/blob/db8b1b3eb2677828264471d28996d3f2f65569c4/pkg/dem/UniaxialStrainer.cpp#L18 and following lines
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.UniaxialStrainer.blockRotations

Revision history for this message
behzad (behzad-majidi) said :
#6

Jerome,
As for #4 yes that's exactly what I have got.

And #5 is solving the problem. Actually, I was not aware that an engine like uniaxialStrainer can modify the DOFs.

Thanks for the complete answer.
Cheers,
Behzad

Revision history for this message
behzad (behzad-majidi) said :
#7

Thanks Jérôme Duriez, that solved my question.