yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #13744
[Question #404328]: contact position at the end of the simulation
New question #404328 on Yade:
https://answers.launchpad.net/yade/+question/404328
Hello !
I want to export a text file in which i put the coordinates of the contact in the end of the simulation.
I put below the loop with which i want to export the text file :
## Recording contact position at the end of the simulation
if O.iter==iterMax:
for i in O.interactions:
if not i.isReal : continue
if isinstance(O.bodies[i.id1].shape,Sphere) and isinstance(O.bodies[i.id2].shape,Sphere):
x1=i.geom.contactPoint[0]
x2=i.geom.contactPoint[1]
x3=i.geom.contactPoint[2]
yade.plot.addData(x1=x1,x2=x2,x3=x3)
plot.saveDataTxt(OUT1)
This loop don't export the text file. In other hand when i remove the condition of the end of the simulation, the loop below work well:
for i in O.interactions:
if not i.isReal : continue
if isinstance(O.bodies[i.id1].shape,Sphere) and isinstance(O.bodies[i.id2].shape,Sphere):
x1=i.geom.contactPoint[0]
x2=i.geom.contactPoint[1]
x3=i.geom.contactPoint[2]
yade.plot.addData(x1=x1,x2=x2,x3=x3)
plot.saveDataTxt(OUT1)
I don't understand why the condition prohibit the exportation of the text file.
The discretization of the sample is below:
https://filex.univ-lorraine.fr/get?k=x7QUaFYoeOEXVGxuzmd
The script is below:
https://filex.univ-lorraine.fr/get?k=7PleCkGsG03r3IJ8ZpX
Best regards.
Jabrane.
--
You received this question notification because your team yade-users is
an answer contact for Yade.