← Back to team overview

yade-users team mailing list archive

[Question #668274]: erase particles(segmentation fault)

 

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

Dear all,
I am building a simple model. I tried to delete some particles in a way suggested in [1]:

[1] https://answers.launchpad.net/yade/+question/211937

particles are deleted without any problem. but after running even 1 iteration,O.run(1,1), yade shows this:
Segmentation fault (core dumped)
my script is as below:

 # -*- coding: utf-8 -*-
from yade import pack, plot
young=1e8
compFricDegree = 5
finalFricDegree = 35
mn,mx=Vector3(0,0,0),Vector3(.005,.005,.005)

O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls'))
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)
psdSizes=[.00001,.00006,.00008,.0002,.0004,.0005,.0008,.001]
psdCumm=[0,.0175,.025,.4,.5,.7,.85,1]
sp=pack.SpherePack()
sp.makeCloud(mn,mx,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=500)
sp.toSimulation(material='spheres')
triax=TriaxialStressController(
	maxMultiplier=1.001,
	finalMaxMultiplier=1.00001,
	thickness = 0,
	stressMask = 7,
	internalCompaction=True,
)

newton=NewtonIntegrator(damping=0.2)
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()],label="iloop"
	),
	triax,
	newton,
]
O.dt=PWaveTimeStep()
triax.goal1=triax.goal2=triax.goal3=-10000

while 1:
  O.run(1000,True)
  unb=unbalancedForce()
  print 'porosity', triax.porosity
  if unb<0.01 and abs(-10000-triax.meanStress)/10000<.01:
    break

bodiesToBeDeleted=[]
for b in O.bodies:
	if b.id in range(6):
		continue
	else:
		if b.state.pos[0]<.0023:
			bodiesToBeDeleted.append(b)

for b in bodiesToBeDeleted:
	O.bodies.erase(b.id)

can any one tell me about what is happening??
any help is appreciated id advance
i am using ubuntu 14.04 and yade version is: 2018.02b-85-f861843~trusty


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.