← Back to team overview

yade-users team mailing list archive

[Question #226786]: Problem in Boxexperiment with Clump

 

New question #226786 on Yade:
https://answers.launchpad.net/yade/+question/226786

Hello Dear Sir,
I have tried the Simulation of Boxexperiment with Clump. In the begennin it works good. But than in 470000 steps comes the Warn-->
wuxin@37l4247e29-32:~$ cd /home/wuxin/Desktop/Clump/wuxin@37l4247e29-32:~/Desktop/Clump$ /home/wuxin/Build-0.95.0/bin/yade-0.95.0 --thread 4 Rahmenscher78Rw235_Clump636.py 
Welcome to Yade 0.95.0 
TCP python prompt on localhost:9000, auth cookie `easskd' 
XMLRPC info provider on http://localhost:21000 
Running script Rahmenscher78Rw235_Clump636.py 
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]] 

Yade [1]: len(O.bodies) 
 ->  [1]: 2036 

Yade [2]: len(O.bodies) 
 ->  [2]: 2036 

Yade [3]: ERROR /home/wuxin/trunk-0.95.0/core/InteractionContainer.cpp:83 erase: InteractionContainer::erase: attempt to delete interaction with a deleted body (the definition of linPos in the call to erase() should fix the problem) for  ##1425+1642 

but the Simulation continues to work.

I show you here the Code 
 
# gravity deposition, continuing with oedometric test after stabilization
# shows also how to run parametric studies with yade-batch
############################################################################################
from yade import utils
from numpy import linspace
from numpy import arange
import gts
import itertools
from yade import pack
###########################################################################################
# The components of the batch are:
# 1. table with parameters, one set of parameters per line (ccc.table)
# 2. utils.readParamsFromTable which reads respective line from the parameter file
# 3. the simulation muse be run using yade-batch, not yade
#
# $ yade-batch --job-threads=1 03-oedometric-test.table 03-oedometric-test.py
#
rMean=.0096
rRelFuzz=.0016
maxLoad=4500
#minLoad=500
frictionAngleSt=radians(35)
frictionAngleBo=radians(23.5)
#tc = 0.001
#en = 0.3
#es = 0.3
a=0.05
spheremat=O.materials.append(FrictMat(density=2650,young=175e6,poisson=0.3,frictionAngle=frictionAngleBo))
steel=O.materials.append(FrictMat(young=210e9, poisson=.25,frictionAngle=frictionAngleSt,density=8000))

from yade import pack, plot,qt
fIDSI=O.bodies.append(utils.geom.facetBox((.15,.15,.135),(.15,.15,.045),wallMask=15,material=steel))
fIDSII=O.bodies.append(utils.geom.facetBox((.15,.15,.045),(.15,.15,.045),wallMask=31,material=steel))
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(0.3,0.3,0.3250),rMean=rMean,rRelFuzz=rRelFuzz)
sp.toSimulation(material=spheremat)

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   NewtonIntegrator(damping=0.7,gravity=[0,0,-9.810]),
   qt.SnapshotEngine(iterPeriod=60000,fileBase='/home/wuxin/Desktop/Ra-RW-235/78Fr07-',label='snapshooter'),
   PyRunner(command='checkUnbalanced()',iterPeriod=1,label='checker'),
   TranslationEngine(translationAxis=[1,0,0],velocity=0,ids=fIDSI,label='Transl'),
]
O.dt=.25*utils.PWaveTimeStep()

def AngVel():
    for b in O.bodies:
        if isinstance(b.shape,Sphere):
           b.state.angVel[1]=0

def checkUnbalanced():
    if O.iter==250000:
     xx=0
     if xx==0: 
      relRadList1 = [.007,.0036]
      relPosList1 = [[0,0,0],[0.009,0,0]]
      relRadList2 = [.0036,0.007,.0036]
      relPosList2 = [[0.0060,0,0],[0,0,0],[-0.0060,0,0]]
      templates= []
      templates.append(clumpTemplate(relRadii=relRadList1,relPositions=relPosList1))
      templates.append(clumpTemplate(relRadii=relRadList2,relPositions=relPosList2))
      O.bodies.replaceByClumps(templates,[.2,.3])
    if O.iter==250000:
     fIDSIII=O.bodies.append(utils.wall(max([b.state.pos[2]+b.shape.radius for b in O.bodies if isinstance(b.shape,Sphere)]),axis=2,sense=-1,material=spheremat))
     global plate
     plate=O.bodies[fIDSIII]
     plate.state.vel=(0,0,-.025)
    if O.iter<=250000: return
    O.engines=O.engines+[PyRunner(command='addPlotData()',realPeriod=1)]
    checker.command='unloadPlate()'

def unloadPlate():
   if abs(O.forces.f(plate.id)[2])>=maxLoad:
      O.engines=O.engines+[PyRunner(command='ServoContorl()',iterPeriod=1)]
      O.engines=O.engines+[PyRunner(command='AngVel()',iterPeriod=1)]
      checker.command='stopUnloading()'

def stopUnloading():
    if abs(O.forces.f(plate.id)[2])>(maxLoad-1):
       if abs(O.forces.f(plate.id)[2])<(maxLoad+1):
          Transl.velocity=0.0010

def ServoContorl():
    Fzs=O.forces.f(plate.id)[2]
    if Fzs==0 :
       Fzs=0.000000000000001
    global G
    global KN
    KN=0.000000000000000001
    for i in plate.intrs() :
        KN=KN+i.phys.kn
    G=a/(KN*(O.dt))
    plate.state.vel[2]=(G*(Fzs-maxLoad))

def addPlotData():
    Fz=O.forces.f(plate.id)[2]
    F = 0
    global i
    for i in fIDSI:
        F += O.forces.f(i)[0]
        PX1=(O.bodies[i].state.pos[0]-O.bodies[i].state.refPos[0])
        SF=((0.30-PX1)*0.30)
    plot.addData(t=O.time,Fx=(-F/SF),PX=PX1,Fz=Fz,w=plate.state.pos[2]-plate.state.refPos[2],i=O.iter)
    if (O.bodies[i].state.pos[0]-O.bodies[i].state.refPos[0])>0.050:
       plot.saveDataTxt('175e6p03RW235.txt',vars=('i','PX','Fx','w','Fz'))
       O.pause()

plot.plots={'i':('w','Fz',),'PX':('Fx',)}
plot.plot()

############################################################################################################################

qt.Controller()
qt.View()
r=qt.Renderer()

##############################################################################################################################

O.run()
# when running with yade-batch, the script must not finish until the simulation is done fully
# this command will wait for that (has no influence in the non-batch mode)
#utils.waitIfBatch()

I want to know , what is happened. And how can I solve the Problem

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.