Hi Guys
Please refer to the attached image and the associated code.
The cube is approximately 15x13x10mm. How can I make the mesh coarser?
I intend on using the mesh as a basis for packing spheres to create custom particles for DEM simulations. The current mesh creates far to many spheres to make an efficient simulation.
def create_msh():
# Initialize Gmsh
gmsh.initialize()
# Import the STEP file
gmsh.model.occ.importShapes(File_Location_STP)
gmsh.model.occ.synchronize()
gmsh.option.setNumber('Mesh.MeshSizeMin', 1000)
gmsh.option.setNumber('Mesh.MeshSizeMax', 2000)
gmsh.model.mesh.recombine()
gmsh.option.setNumber("Mesh.Algorithm3D", 1)
gmsh.option.setNumber("Mesh.RecombineAll", 1)
gmsh.option.setNumber("Mesh.SubdivisionAlgorithm", 2)
gmsh.option.setNumber("Mesh.ElementOrder",1)
gmsh.option.setNumber('Mesh.Recombine3DLevel', 2)
gmsh.option.setNumber("Mesh.RecombinationAlgorithm", 1)
# gmsh.option.setNumber("Mesh.Hexahedra", 1)
gmsh.option.setNumber("Mesh.SubdivisionAlgorithm", 2)
# gmsh.model.mesh.refine()
gmsh.model.mesh.generate(3)
gmsh.option.setNumber("Mesh.MshFileVersion",2.2)
gmsh.write(File_Location)
if '-nopopup' not in sys.argv:
gmsh.fltk.run()
gmsh.finalize()