← Back to team overview

yade-users team mailing list archive

Re: [Question #691171]: add uniform fibers to the cylinder-shape specimen

 

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

    Status: Answered => Open

onyourself is still having a problem:
>please be ocnsistant.

the paper i want to simulate writes"The compacted sand and fiber-reinforced specimens for triaxial tests were prepared by hand-mixing dry sand, water and polypropylene fibers. To prevent floating of the fibers, it is important to add the water before adding the fibers during the mixing process. The specimens were statically compacted in three layers into a 39.1 mm diameter by 80 mm high split mold. "
i think what the specimen needs to achieve is "random directions and uniform distribution", but indeed what it can get is just "some randomness".

>no, you set orientation=Quaternion().
If you really set orientation=Quaternion ((r(),r(),r()),r()), then the orientation is random

i changed code according to your suggestion, they all works except the
orientation one. the randomness of cylinders seems like randomness in a
small amount of angles off one direction.

>1) create some spheres, meant to be actual spheres in simulation (30 in the mentioned case)
2) create some spheres ("fibre-spheres"), meant just to reserve space for fibres (not added to the simulation). 40 in the mentioned case. Those 40 spheres are not anywhere, they are "replaced" by the fibres.
3) replace "fibre-spheres" by fibres

i still wonder how same codes turn out to be "create some spheres, meant
to be actual spheres in simulation" and "create some spheres ("fibre-
spheres"), meant just to reserve space for fibres (not added to the
simulation)"……and i need to calculate two mass of spheres and cylinders,
how can i distinguish them with codes.


#########

from random import random as r

def randomOrientation(): # most likely not very well random, but for this example it is ok
   from random import random as r
   return Quaternion((r(),r(),r()),r())

# create loose spherical packing using makeCloud
sp = yade.pack.SpherePack()
mi,ma = (0,0,0),(0.08,0.08,0.08)
nCyls,nSphs = 1000,100000
sp.makeCloud(mi,ma,rMean=0.006,num=nCyls) # makeCloud for cylinders
sp.makeCloud(mi,ma,rMean=0.0011,rRelFuzz=.0005,num=nSphs) # makeCloud for spheres
for i,(pos,radius) in enumerate(sp):
    if i < nCyls: # add cylinder
      O.bodies.append(geom.facetCylinder(center=pos,height=0.012,radius=0.0015,orientation=Quaternion((r(),r(),r()),r()),segmentsNumber=10,wallMask=7))
    else: # add sphere
      #O.bodies.append(sphere())    
      O.bodies.append(sphere(pos,radius))    

##########

cyl = pack.inCylinder((0.04,0.04,0),(0.04,0.04,0.08),0.0391) # predicate for a cylinder
#for c,r in sp:
#	if cyl(c,r): O.bodies.append(sphere(c,r))
#mass = 0.0
#for b in O.bodies:
# if cyl(b.state.pos): # b is inside cyl1
#    mass += b.state.mass


##########

thanks
xxxe

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