Simple shear with oedometric loading

Asked by Amrisha Khandelwal

Hi, I am new to yade. plz help me removing the following error.

My problem description- It is basically a simple shear problem. Firstly isometric compression is done to prepare the sample by compacting. Periodic boundary conditions were used. Then a plate in the form of wall is applied at the top and normal loading is applied by velocity gradient tensor. After it reaches the defined value then shear is applied by distorting the cell. I know i am doing some mistake but unable to catch it up. please help me in finding the same. Script is attacted.

Error- python3.10: ./pkg/common/InsertionSortCollider.cpp:779: bool yade::InsertionSortCollider::spatialOverlapPeri(yade::Body::id_t, yade::Body::id_t, yade::Scene*, yade::Vector3i&) const: Assertion `maxima[3 * id2 + axis] - minima[3 * id2 + axis] < .99 * dim' failed.
Aborted (core dumped)

Script-

# setup the periodic boundary
from __future__ import print_function
O.periodic = True
O.cell.hSize = Matrix3(2, 0, 0, 0, 2, 0, 0, 0, 2)

# CREATION OF PARTICLES
from yade import pack, qt

#Define Material- E=7*e8, poisson=0.25, friction angle=31 degree(0.541 radians), density=2650kg/m^3
O.materials.append(FrictMat(young=7e8,poisson=.25,frictionAngle=.541, density=2650, label="soil"))

# create cloud of spheres and insert them into the simulation
# we give corners, mean radius, radius variation, material
sp = pack.SpherePack()
sp.makeCloud((0, 0, 0), (2, 2, 2), periodic=True, rMean=0.05, rRelFuzz=0.2, seed=10)
# insert the packing into the simulation
sp.toSimulation(material="soil")

# create "dense" packing by setting friction to zero initially
O.materials[0].frictionAngle = 0

# simulation loop (will be run at every step)
O.engines = [
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb()]),
        InteractionLoop(
                # interaction loop
                [Ig2_Sphere_Sphere_ScGeom(), Ig2_Wall_Sphere_ScGeom()],
                [Ip2_FrictMat_FrictMat_MindlinPhys()],
                [Law2_ScGeom_MindlinPhys_Mindlin()]
        ),
        NewtonIntegrator(damping=.4),
        PyRunner(command='checkStress()', iterPeriod=100, label='checker')
]
O.dt = .7 * PWaveTimeStep()

# prescribe isotropic normal deformation (constant strain rate)
O.cell.velGrad = Matrix3(-.1, 0, 0, 0, -.1, 0, 0, 0, -.1)
qt.View()

# when to stop the isotropic compression
limitMeanStress = -1000

#Regenerating the friction
O.materials[0].frictionAngle = .54

def checkStress():
 # stress tensor as the sum of normal and shear contributions
 # Matrix3.Zero is the intial value for sum(...)
 stress = getStress().trace()/3.
 print('Stress at', O.iter, '=', stress)
 # if mean stress is below (bigger in absolute value) limitMeanStress, start shearing
 if stress < limitMeanStress:
  O.bodies.append(wall(max([b.state.pos[2] + b.shape.radius for b in O.bodies if isinstance(b.shape, Sphere)]), axis=2, sense=-1))
  global plate
         plate = O.bodies[-1] # the last particles is the plate
  # plate moves downwards by giving velocity gradient
  plate.state.vel = (0, 0, -.1)
  checker.command='stopplate()'

#Apply oedometric compression by applying velocity over a plate/wall

def stopplate():
 force= O.forces.f(plate.id)[2]
 print('Force on plate=', force)
 # if the force on plate exceeds maximum load, start unloading
 if O.forces.f(plate.id)[2]> 1e5:
  plate.state.vel = (0, 0, 0)
  print('Plate stops and Distortion is applied at 0.1 strain rate')
  #Apply Distorsion
  O.cell.velGrad = Matrix3(0, 0, .1, 0, 0, 0, 0, 0, 0)
  checker.command = 'checkDistorsion()'

def checkDistorsion():
 # if the distorsion value is >.5, exit; otherwise do nothing
 if abs(O.cell.trsf[0, 2]) > .5:
  O.pause()
  print('Distortion of cell exceeds 0.5')

Gl1_Sphere.stripes = True
O.saveTmp()

NOTE: Error mainly comes after isometric compression

Thank you in advance.

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:

This question was reopened

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

Hi,

This happens when a body is too big with respect to the periodic cell.

To check this you can test your script with InsertionSortCollider.allowBiggerThanPeriod = True and see if the error disappears. But after that, it is better to get back to InsertionSortCollider.allowBiggerThanPeriod = False unless you really know what you're doing with Periodic Boundaries.

In the end, you probably should redesign your simulation to avoid such a case (which corresponds to extreme deformations ?)

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

Hi,
In fact, allowBiggerThanPeriod=True is perfectly fine, and it is designed exactly for this case where large plates are used as boundary conditions.

You need to make sure that the height of the period is larger than the gap between the plates since what you want basically is to suppress periodic interactions in the corresponding direction.

Revision history for this message
Amrisha Khandelwal (amrishakhandelwal) said (last edit ):
#3

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

Revision history for this message
Amrisha Khandelwal (amrishakhandelwal) said :
#4

But i am still not able to move the wall. The wall is positioned at the place but it is not moving as per velocity gradient given. Can you help me out where am i doing mistake??

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

Could you show a script where walls do not follow the prescribed velocity gradient?

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

Please provide a MWE [1], a complete script.
Cheers
Jan

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

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

> Following the is part of script showing the same.

Instant replay:
Please provide a MWE [1], a complete script.
Cheers
Jan

Revision history for this message
Amrisha Khandelwal (amrishakhandelwal) said (last edit ):
#10

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