Parametric object generator

Hello

I am an academic researcher working on geotecnical engineering.
In order to perform some Finite Element Modeling I need to create some virtual specimens which i will import and use in my FEM software.
In a short, what I'd need is to create a population of objects (I'll call them "particles") inside a mother object (the "specimen").
The particles must have a size-distribution according to a user-defined matematical function and the total volume of the particles must be a user-defined percentage of the "specimen" volume. Also, the particles do not have to compenetrate and they have to be positioned withtin the specimen internal volume.

An example: given a cylindrical specimen (the specimen geometry might be previously created in max) I want to generate a population of spheres distributed inside the specimen, the sphere total volume must be 20% of the specimen volume and the sphere radii must be distributed according to a user-defined size-distribution function (i.e. power-law.
This is the simplest example, but we could think about other geometries (ellipses) and other parameters like orientation of max axis etc..

Please let me know if you can help me

thanks a lot

N