I want to develop model of a a cube with sand particles (Spheres) inside. I want to analyze it in ANSYS. Spheres are randomly generated in Matlab as shown in the Figure. I want to export the geometry to ANSYS and mesh it.
you can use the following Syntax in Ansys Mechanical APDL with File->read Input from->:
/BATCH
/COM,ANSYS RELEASE Release 19.2 BUILD 19.2
/input,menust,tmp,
/CLEAR
/PREP7
WPLANE, , 0, 0, 0, 1, 0, 0, 0, 1, 0
SPH4,0,0,0.01
WPLANE, , 0, 0, 0.1, 1, 0, 0, 0, 1, 0.1
SPH4,0,0,0.02
WPLANE, , 0, 0, 0.2, 1, 0, 0, 0, 1, 0.2
SPH4,0,0,0.03
FINISH
This principaly will generate 3 SPHERES in Ansys and could possibly be extended to a arbitrary number of spheres. I don't really know if the number of volumes is limited in Ansys, since the simulation of so many bodies is a very unusual case, but if there is a limit you may find better help in the student community forum (https://studentcommunity.ansys.com/) or if you have a full licensed version at the customer support of Ansys.