# "FATAL" error with periodic triaxial test tutorial example

Asked by Nicholas Ng on 2019-01-16

I'm a beginner in Yade who just tried this DEM code about 1 month ago. The version of Yade I installed is 2018.02b version. I am currently trying to learn the python codes from tutorial example of "periodic triaxial test" obtained from Yade website. However, when I try to run the script for periodic triaxial test tutorial example, the following error message pop up:

==================================================================================================
FATAL /build/yade-fDuCoe/yade-2018.02b/pkg/common/InsertionSortCollider.cpp:495 spatialOverlapPeri: Body #930 spans over half of the cell size 0.167286 (axis=2, see flag allowBiggerThanPeriod)

=====================================================================================================

I hope someone can advise me how to solve this problem.

Nicholas

***** the script for periodic triaxial test in tutorial example is as follow:
=============================================================================================

# encoding: utf-8

# periodic triaxial test simulation
#
# The initial packing is either
#
# 1. random cloud with uniform distribution, or
# 2. cloud with specified granulometry (radii and percentages), or
# 3. cloud of clumps, i.e. rigid aggregates of several particles
#
# The triaxial consists of 2 stages:
#
# 1. isotropic compaction, until sigmaIso is reached in all directions;
# this stage is ended by calling compactionFinished()
# 2. constant-strain deformation along the z-axis, while maintaining
# constant stress (sigmaIso) laterally; this stage is ended by calling
# triaxFinished()
#
# Controlling of strain and stresses is performed via PeriTriaxController,
# of which parameters determine type of control and also stability
# condition (maxUnbalanced) so that the packing is considered stabilized
# and the stage is done.
#

sigmaIso=-1e5

#import matplotlib
#matplotlib.use('Agg')

# generate loose packing
from yade import pack, qt, plot

O.periodic=True
sp=pack.SpherePack()
if 0:
## uniform distribution
sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.3,periodic=True)
else:
## create packing from clumps
# configuration of one clump
c1=pack.SpherePack([((0,0,0),.03333),((.03,0,0),.017),((0,.03,0),.017)])
# make cloud using the configuration c1 (there could c2, c3, ...; selection between them would be random)
sp.makeClumpCloud((0,0,0),(2,2,2),[c1],periodic=True,num=500)

# setup periodic boundary, insert the packing
sp.toSimulation()

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
PeriTriaxController(label='triax',
# specify target values and whether they are strains or stresses
# type of servo-control
dynCell=True,maxStrainRate=(10,10,10),
# wait until the unbalanced force goes below this value
maxUnbalanced=.1,relStressTol=1e-3,
# call this function when goal is reached and the packing is stable
doneHook='compactionFinished()'
),
NewtonIntegrator(damping=.2),
]
O.dt=.5*PWaveTimeStep()

sxx=triax.stress[0],syy=triax.stress[1],szz=triax.stress[2],
exx=triax.strain[0],eyy=triax.strain[1],ezz=triax.strain[2],
# save all available energy data
Etot=O.energy.total(),**O.energy
)

# enable energy tracking in the code
O.trackEnergy=True

# define what to plot
plot.plots={'i':('unbalanced',),'i ':('sxx','syy','szz'),' i':('exx','eyy','ezz'),
# energy plot
' i ':(O.energy.keys,None,'Etot'),
}
# show the plot
plot.plot()

def compactionFinished():
# set the current cell configuration to be the reference one
O.cell.trsf=Matrix3.Identity
# change control type: keep constant confinement in x,y, 20% compression in z
triax.goal=(sigmaIso,sigmaIso,-.2)
# allow faster deformation along x,y to better maintain stresses
triax.maxStrainRate=(1.,1.,.1)
# next time, call triaxFinished instead of compactionFinished
triax.doneHook='triaxFinished()'
# do not wait for stabilization before calling triaxFinished
triax.maxUnbalanced=10

def triaxFinished():
print 'Finished'
O.pause()

========================================================================================

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
2019-01-24
Last query:
2019-01-24
2019-01-22
 Jérôme Duriez (jduriez) said on 2019-01-22: #1

Hello,

Are you referring to https://yade-dem.org/doc/tutorial-examples.html#periodic-triaxial-test ?
Without any modification ? (swearing on your favorite human / divine being)

I tried with yade-daily 2018.02b-1727253714~xenial and could not reproduce.

Jérôme

 Nicholas Ng (nngyongjie) said on 2019-01-24: #2

Hi Jerome,

===================================================
Are you referring to https://yade-dem.org/doc/tutorial-examples.html#periodic-triaxial-test ?
Without any modification ? (swearing on your favorite human / divine being)
========================================================

Yes, I'm referring to the script for periodic triaxial test available in Yade website, which is as attached by the link above.

Yes, I did not do any modification to the script and just run as it is in Yade, and that gives me the error as mentioned above.

Regards,
Nicholas

 Nicholas Ng (nngyongjie) said on 2019-01-24: #3

Hi Jerome,

Sorry I think I misunderstood your comment previously.

I tried with yade-daily 2018.02b-1727253714~xenial and could not reproduce.

I'm not installing the yade daily, but I install the stable release of Yade 2018.02b version. I guess that's the reason I got the error while you do not have the error.

Thanks for the information.

Thank you and regards,
Nicholas

 Nicholas Ng (nngyongjie) said on 2019-01-24: #4

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