← Back to team overview

yade-dev team mailing list archive

Re: sphere pack from Lattice (steel fibrous concrete with rock aggregates)

 

If I understand right: it places spheres randomly in space while
following the given distribution for radii?

If so, then SpherePack::makeCloud does what you need except that it uses
uniform distribution rather than gaussian one.

OTOH, if you plan to extend it later to avoid steel bars etc, you'd
better create a separate function that will return a SpherePack object.
Within the loop, you do just
SpherePack::pack.push_back(SpherePack::Sph(c,r)) and that's it.
SpherePack objects can be used in python straightforwardly. Put that
function in py/pack/_packSpheres.cpp for instance (or create a separate
file named py/pack/_pack*.cpp if you feel it is appropriate).

> It is using radius according to some sieve curve which is controlled
> by two paramters: mean value and std deviation, assuming Gaussian
> distribution around the mean radius.  In fact it spits out a graph of
> sieve curve for generated sample. But I don't know how to do it in a
> "modern" python way, hope you can tell me ;)
Sieve curve? perhaps like this:

 import pylab
 pylab.hist([b.shape.radius for b in O.bodies if hasattr('radius',b.shape)])

OK, that is a histogram, but you get the idea... see http://matplotlib.sourceforge.net/users/screenshots.html#histograms for the curve.
	
> The second parameter is the volume percentage of those spheres, in
> fact the opposite of porosity. There are two culprits: with low
> density of aggregates (high porosity), they will not touch each
> other, because they were intended to be inside a concrete. If you
> just use such spheres as is, it will be a cloud. On the contrary,
> high density of spheres (low porosity) allows few of those spheres to
> overlap which will result in some explosions (if you do not put them
> inside a concrete speciemen, but use them as spheres). But I think
> that those explosions will be manageable.

OK, I think definitely it is better to have a separate function for
this. 

> For start, I suppose that It will just generate spheres, since there
> is no meaningful way currently in which it could output linesegments
> that are the steel fibres, right?
Yes, but the function could be given e.g. list of id's which would be
steel fibres to avoid geometrically and such.

>   def regularOrtho
>   def regularHexa
>   def filterSpherePack
>   def randomDensePack
>   def triaxialPack
Those are all returning Body objects, arranged in a specific way. You
can also read documentation on those:
http://beta.arcig.cz/~eudoxos/yade/sphinx/yade.pack.html#yade.pack.filterSpherePack etc

> and something in pkg/dem/DataClass/SpherePack.cpp
That's the one you will return. 
> 
> Also I know that Vincent and JF has done something. But I have no
> idea where it is.
http://beta.arcig.cz/~eudoxos/yade/sphinx/yade.pack.html#yade._packSpherePadder.SpherePadder

> Now, the stupid question: where should I put that C++ code? My first
> candidate would be to add another method into SpherePack.cpp which
> generates spheres using my algorithm?
> 
> Another question: how are the clumps behaving now? Do I have to use
> wm3, or eigen? Does scons check if eigen library is installed?

Yes it does check (libeigen2-dev package, headers-only). Use Eigen, but
the interface is the same: Vector3r, Vector3i, Vector2r, Vector2i,
Matrix3r, Quaternionr. Currently you can compile with 'wm3' feature to
use wm3 instead, but that will be removed soon. Finally.

Cheers, v.




References