yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #05699
Re: [Question #190529]: deleting some liquid bridges in Law2_ScGeom_CapillaryPhys_Capillarity
Question #190529 on Yade changed:
https://answers.launchpad.net/yade/+question/190529
Christian Jakob posted a new comment:
Thanks Chiara, so I have to do this for getting right positions of the
spheres, right?
x_cl = 0 #lower x coordinate in front
y_cl = 0 #lower y coordinate in front
z_cl = 0 #lower z coordinate in front
x_cu = 0.002 #upper x coordinate in back
y_cu = 0.002 #upper y coordinate in back
z_cu = 0.003 #upper z coordinate in back
x_pos=[]
y_pos=[]
z_pos=[]
for ii in sphID:
i = O.bodies[ii]
if ((i) and (isinstance(i.shape,Sphere))):
pos = O.bodies[ii].state.pos
if pos[0] < x_cl:
pos[0] = pos[0] + (x_cu - x_cl)
if pos[0] > x_cu:
pos[0] = pos[0] - (x_cu - x_cl)
if pos[1] < y_cl:
pos[1] = pos[1] + (y_cu - y_cl)
if pos[1] > y_cu:
pos[1] = pos[1] - (y_cu - y_cl)
if pos[2] < z_cl:
pos[2] = pos[2] + (z_cu - z_cl)
if pos[2] > z_cu:
pos[2] = pos[2] - (z_cu - z_cl)
Is there no easy way to get right positions?
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.