Generating structures with random parameters can be tricky. In this specific case, I’m not too sure how to include the information you have (RMS and standard deviation). We have a set of functions to generate random numbers, the closest I could find are randn
and randnmatrix that generate pseudo-random numbers with a certain mean and standard deviation.
You can use these functions to generate a set of positions for n cones. These cones can be created using the “cone” object from the library:
For each cone (defined by its height and full angle at the tip), you can add m nano-particles. Their positions can be defined in cylindrical coordinates, by their height from the bottom of the cone and
the theta angle (r is then imposed by the cone angle at the tip). Eventually, you can set another random parameter defining how embedded the particle is in the cone. The script could be something like:
theta = rand(0, 2*pi);
z = rand(0, z_max);
r = (z_max - z)/tan(alpha/2); # alpha is the full angle at the tip of the cone
Note this script would put the particle center at the surface of a cone located at x=y=0.
As you will probably end with a lot of elements in the simulation, I would set the “detail” setting (in “Graphical rendering” tab) to 0 (in the above script, add set(“detail”, 0);).
In any case, the resulting structure will be quite complex, and it will probably need a fairly fine mesh to resolve the particles, etc.
I hope this will help!