yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #15829
Re: [Question #658699]: Deleting the desired interactions
Question #658699 on Yade changed:
https://answers.launchpad.net/yade/+question/658699
Status: Answered => Open
Xavier Thurman is still having a problem:
Here is my codes:
from yade import pack
porosity = 0.3042744476
Young = 1.0e11 # 100Gpa
FrictAng = radians(18)
Density = 2640/(1-porosity)
Poisson = 1/3.0
Cohesion = 4.5e7 # pa
TensileStr = 4.5e6 # pa
rock = JCFpmMat(young=Young,frictionAngle=FrictAng,density=Density,poisson=Poisson,tensileStrength=TensileStr,cohesion=Cohesion)
steel = JCFpmMat(young=2.06e11,frictionAngle=radians(30),density=7800,poisson=0.3,tensileStrength=0,cohesion=0)
pred1 = pack.inAlignedBox((0,0,0),(0.01,0.01,0.01))
pred2 = pack.inAlignedBox((0,0,0.01),(0.01,0.01,0.02))
assembly1 = pack.randomDensePack(pred1,radius=0.0005,spheresInCell=1000,color=(1,1,1),material=rock)
O.bodies.append(assembly1)
assembly2 = pack.randomDensePack(pred2,radius=0.0005,spheresInCell=1000,color=(1,1,0),material=rock)
O.bodies.append(assembly2)
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.5),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.5),Ig2_Facet_Sphere_ScGeom()],
[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys()],
[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,label='lawFunctor')]
),
VTKRecorder(fileName='post/scp-',recorders=['all'],iterPeriod=50),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=5,timestepSafetyCoefficient=0.8,defaultDt=PWaveTimeStep()),
NewtonIntegrator(damping=0.3,gravity=(0,0,-9.81)),
]
O.trackEnergy=True
O.step()
print len(O.interactions)
for i in O.interactions:
if O.bodies[i.id1].shape.color != O.bodies[i.id2].shape.color:
O.interactions.erase(i.id1,i.id2)
O.step()
print len(O.interactions)
from yade import qt
qt.View()
qt.Controller()
Thanks for your patience,
Xavier
--
You received this question notification because your team yade-users is
an answer contact for Yade.