← Back to team overview

yade-users team mailing list archive

Re: [Question #689771]: ptonparticle2 search exceeded 50000 iterations! step:0 0 0

 

Question #689771 on Yade changed:
https://answers.launchpad.net/yade/+question/689771

    Status: Answered => Open

Liu Zhiruo is still having a problem:
Hi Vasileios,
Thanks for your advise. It really work when I edit my code according to the pointer one given by you above.
However, when I want to perfect my code following your pointers two and five,the same error occured again! Even though I have tried many times, it still fails.

Part of my critical code is below:

# Boundary Plates
thickness = 40/10.0
wire=False
highlight=False
kPP = 0.0
rPP = 0.2
#
Igeom = array([0.08406805308160123, 0.1994387425401491, 0.2037312986056906]) #----------------------------------------------------------------------------------------------------------------------------------------------- #
# Bottom plate
bb= Body()
bb.mask=3
color=[0,0,1]
aPP = [1,-1,0,0,0,0]
bPP = [0,0,1,-1,0,0]
cPP = [0,0,0,0,1,-1]
dPP = [100.0-rPP , 100.0-rPP, 100-rPP, 100-rPP, thickness-rPP, thickness-rPP]
minmaxAabb = 1.05*Vector3( dPP[0], dPP[2], dPP[4] )
bb.shape=PotentialBlock(k=kPP, r=rPP, R=0.0, a=aPP, b=bPP, c=cPP, d=dPP, id=len(O.bodies), isBoundary=True, color=color, wire=wire, highlight=highlight, AabbMinMax=True, minAabb=minmaxAabb, maxAabb=minmaxAabb, fixedNormal=True, boundaryNormal=Vector3(0,0,-1))
utils._commonBodySetup(bb,bb.shape.volume,Igeom,
material='rockfall_material',pos= [0,0,0], fixed=True) 
#bbb.state.ori = bbb.shape.orientation
O.bodies.append(bb)

# Lateral plate A
bA = Body()
bA.mask=3
color=[0,0.5,1]
aPP = [1,-1,0,0,0,0]
bPP = [0,0,1,-1,0,0]
cPP = [0,0,0,0,1,-1]
dPP = [100-rPP , 100-rPP, thickness-rPP, thickness-rPP, 0.5*50-rPP, 0.5*50-rPP]
minmaxAabb = 1.05*Vector3( dPP[0], dPP[2], dPP[4] )
bA.shape=PotentialBlock(k=kPP, r=rPP, R=0.0, a=aPP, b=bPP, c=cPP, d=dPP, id=len(O.bodies), isBoundary=True, color=color, wire=wire, highlight=highlight, AabbMinMax=True, minAabb=minmaxAabb, maxAabb=minmaxAabb, fixedNormal=True, boundaryNormal=Vector3(0,-1,0))
utils._commonBodySetup(bA,bA.shape.volume,Igeom,
material='rockfall_material',pos= [0,100+thickness,25-thickness], fixed=True) 
#bA.state.ori = bA.shape.orientation
O.bodies.append(bA)


# ----------------------------------------------------------------------------------------------------------------------------------------------- #
# Lateral plate B
bB = Body()
bB.mask=3
color=[0,0.5,1]
aPP = [1,-1,0,0,0,0]
bPP = [0,0,1,-1,0,0]
cPP = [0,0,0,0,1,-1]
dPP = [100-rPP, 100-rPP, thickness-rPP, thickness-rPP, 0.5*50-rPP, 0.5*50-rPP]
minmaxAabb = 1.05*Vector3( dPP[0], dPP[2], dPP[4] )
bB.shape=PotentialBlock(k=kPP, r=rPP, R=0.0, a=aPP, b=bPP, c=cPP, d=dPP, id=len(O.bodies), isBoundary=True, color=color, wire=wire, highlight=highlight, AabbMinMax=True, minAabb=minmaxAabb, maxAabb=minmaxAabb, fixedNormal=True, boundaryNormal=Vector3(0,1,0))
utils._commonBodySetup(bB,bB.shape.volume,Igeom,
material='rockfall_material',pos= [0,-100-thickness,25-thickness], fixed=True) 
#bB.state.ori = bB.shape.orientation
O.bodies.append(bB)


# ----------------------------------------------------------------------------------------------------------------------------------------------- #
# Lateral plate C
bC = Body()
bC.mask=3
color=[0,0.5,1]
aPP = [1,-1,0,0,0,0]
bPP = [0,0,1,-1,0,0]
cPP = [0,0,0,0,1,-1]
dPP = [thickness-rPP, thickness-rPP, 100-rPP, 100-rPP, 0.5*50-rPP, 0.5*50-rPP]
minmaxAabb = 1.05*Vector3( dPP[0], dPP[2], dPP[4] )
bC.shape=PotentialBlock(k=kPP, r=rPP, R=0.0, a=aPP, b=bPP, c=cPP, d=dPP, id=len(O.bodies), isBoundary=True, color=color, wire=wire, highlight=highlight, AabbMinMax=True, minAabb=minmaxAabb, maxAabb=minmaxAabb, fixedNormal=True, boundaryNormal=Vector3(1,0,0))
utils._commonBodySetup(bC,bC.shape.volume,Igeom,
material='rockfall_material',pos= [-100-thickness,0,25-thickness], fixed=True) 
#bC.state.ori = bC.shape.orientation
O.bodies.append(bC)


# ----------------------------------------------------------------------------------------------------------------------------------------------- #
# Lateral plate D
bD = Body()
bD.mask=3
color=[0,0.5,1]
aPP = [1,-1,0,0,0,0]
bPP = [0,0,1,-1,0,0]
cPP = [0,0,0,0,1,-1]
dPP = [thickness-rPP, thickness-rPP, 100-rPP, 100-rPP, 0.5*50-rPP, 0.5*50-rPP]
minmaxAabb = 1.05*Vector3( dPP[0], dPP[2], dPP[4] )
bD.shape=PotentialBlock(k=kPP, r=rPP, R=0.0, a=aPP, b=bPP, c=cPP, d=dPP, id=len(O.bodies), isBoundary=True, color=color, wire=wire, highlight=highlight, AabbMinMax=True, minAabb=minmaxAabb, maxAabb=minmaxAabb, fixedNormal=True, boundaryNormal=Vector3(-1,0,0))
utils._commonBodySetup(bD,bD.shape.volume,Igeom,
material='rockfall_material',pos= [100+thickness,0,25-thickness], fixed=True) 
#bD.state.ori = bD.shape.orientation
O.bodies.append(bD)

#granular

sp=pack.SpherePack()
distanceToCentre = 0.5
mn,mx=Vector3(90,90,50),Vector3(-90,-90,80)
sp.makeCloud(mn,mx,0.5,0.5,1000,False)

r=0.01
for s in sp:
	bb=Body()
	bb.mask=1
	bb.aspherical=True
	wire=False
	color=Vector3(random.random(),random.random(),random.random())
	highlight=False
	bb.shape=PotentialBlock(k=0.0, r=r, R=0.0, a=[1,-1,0,0,0,0], b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r], isBoundary=False, color=color,
wire=wire, highlight=highlight, minAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), maxAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), AabbMinMax=True, fixedNormal=False, id=len(O.bodies))
	utils._commonBodySetup(bb, bb.shape.volume, Igeom, material='rockfall_material',pos=s[0], fixed=False)
	b.state.pos = s[0] #s[0] stores center
	b.state.ori = Quaternion((random.random(),random.random(),random.random()),random.random()) #s[2]
	O.bodies.append(bb)

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