← 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: Open => Answered

Jan Stránský proposed the following answer:
> ... random directions and uniform distribution
> that ["some randomness"] works for me too

please be consistent

> i didn't figure out way to achieve ‘random directions and uniform
distribution’ so…

see e.g. [3] (UnitRandom function) and following links and source code

> replaces? i don't get it…the code below makes cloud of 40 spheres and
30 spheres first(not adding to simulation),then when i<40, add every box
to bodies,(where are those 40 spheres?),then add 30 spheres to bodies?
Why not adding all 70 spheres to bodies?

mentioned here (#3) as well as in [1]:
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

> 1)i need to simulate fiber so i changed a bit then it's not working, cylinders are out of space requested before.
> O.bodies.append(geom.facetCylinder(center=(r(),r(),r()),...))

here you set random position, no surprise that "cylinders are out of
space". Use center=pos instead

> 2)i set orientation=Quaternion ((r(),r(),r()),r()) but it turns out cylinders' orientation are not random.
> O.bodies.append(geom.facetCylinder(...,orientation=Quaternion(),...))

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

> sp.makeCloud(mi,ma,rMean=0.012,rRelFuzz=.003,num=nCyls) # makeCloud for cylinders
...
>       O.bodies.append(geom.facetCylinder(...,height=0.012,...)

size (height) of the cylinder should be equal to the sphere size
(2*radius). Either do not use rRelFuzz (then the size is fixed) or
better use the radius value for facetCylinder creation.

cheers
Jan

[3] https://eigen.tuxfamily.org/dox-devel/classEigen_1_1Quaternion.html

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