WELSIM is the #1 engineering simulation software for the open-source community.
Tuesday, September 30, 2025
Generating Particles for Complex Geometries Using WELSIM
With the development of modern engineering simulation, particle-based simulation has been increasingly adopted by the industrial community. Particle-related computations and software have emerged in various fields of engineering and science. In addition to pure particle simulations, such as molecular dynamics, there are also coupled methods with continuum approaches like the finite element method, enabling more sophisticated simulations. An example is the SPH (Smoothed Particle Hydrodynamics) method, which simulates the motion of fluids and granular materials.
As a result, the demands on particle simulations are also rising. Particle generation is the first and most critical step in all such simulations. Therefore, algorithms and processes for generating particles are particularly important. The author has previously discussed numerical methods for generating particles in the article titled “Automatic Generation of Simulation Particles.”
Press enter or click to view image in full size
Generating particles for simple geometric models, such as cubes, is not difficult. However, when the geometry becomes more complex, particle generation becomes challenging. Currently, there are not many software solutions on the market that can generate particles for arbitrary shapes. WELSIM is already capable of handling this well and can export particles as external files for use in other software. This article provides a brief introduction on how to generate particles in WELSIM.
1. Open WELSIM and Import a STEP Geometry Model
In this example, a cylindrical model with a circular hole is imported. Set the geometry’s Create Particles property to True.
Press enter or click to view image in full size
2. Click the Meshing Button to Automatically Generate Particles
In this setup, 441 particles are generated.
Press enter or click to view image in full size
3. To Increase Particle Density
Modify the Maximum Size value in the mesh settings. When set to 0.01, the particle density increases.
4. Adjust Particle Display Size for Clarity
When the number of particles increases, it helps to reduce their display size for better visibility. In the 3D View of the mesh object, set the Particle Size value. Here, it is set to 0.001.
Now, a larger number of particles can be seen — 16,060 in total. WELSIM thus allows for easy and efficient generation of particles at any desired density.
Press enter or click to view image in full size
5. Export the Particles
Once particle generation is complete, export the particle file. Right-click the Mesh objectand select Export Particles from the context menu.
Press enter or click to view image in full size
6. In the Export Dialog
Enter the filename and choose the export format. The current version supports the VTK PolyData format. More formats will be supported in future versions.
Press enter or click to view image in full size
The exported file can be loaded and used by other software. For example, ParaView can be used to visualize the exported particles, as shown in the image.
Press enter or click to view image in full size
Conclusion
This article outlines the steps for generating particles using WELSIM. Users only need to import a geometry in STEP format and, through an automatic mesh-like method, can quickly generate particles at various densities. Although a simple geometry was used here, the same process can be applied to complex models. The software also supports exporting particle data for use in other applications. The particle generation feature is already available in version 2025R3 and will continue to be improved in future releases.
WELSIM has no direct affiliation with the author or the developers of ParaView. ParaView is referenced here purely as a technical example for demonstration purposes.
Monday, September 29, 2025
使用WELSIM生成复杂几何模型的粒子
随着现代工程仿真的发展,粒子仿真也越来越多的被工业届接受。粒子相关的计算和软件在各个工程和科学领域都有出现。除了单纯的粒子计算,如分子动力学计算,还有与有限元等连续介质计算方法耦合,实现更为精巧的计算。如SPH方法计算流体和沙石颗粒的运动。随之,人们对粒子计算的要求也不断提高。而生成粒子是所有计算的第一步,也是整个计算的关键一环。因此,生成粒子的算法和实现过程,就显得尤为重要了。作者曾讨论过生成粒子的数值方法,参见《自动化生成仿真粒子的方法》一文。
Image
生成简单几何模型,如立方体,的粒子并不难,但是当粒子区域轮廓变得复杂时,生成粒子就变得困难了。目前市场可以生成任意轮廓粒子的软件并不多,WELSIM已经可以很好的实现这点,并输出为外部文件,用于其他软件的计算。本文就如何在WELSIM下生成粒子,做一个简要介绍。
1. 打开WELSIM软件,并导入一个STEP几何模型。这里导入一个带有圆孔的圆柱体。并将几何体的创建粒子(Create Particles)属性设为真。
Image
2. 点击网格划分按钮,便可自动生成粒子。此设置下,生成了441个粒子。
Image
3. 如果想得到密度更高的粒子,可以修改网格设置属性中的最大单元尺寸(Maximum Size)值。当把值改为0.01时,粒子的密度会增加。
Image
4. 粒子数量增加后,为了显示更为清楚,可以调整粒子显示大小。点击网格节点的三维视图(3D View),设置粒子尺寸(Particle Size)值即可,这里设为0.001。
Image
此时,可以看到生成了更多的粒子,数量达到16,060。因此,使用WELSIM可以方便快捷地生成任意密度的粒子。
Image
5. 粒子生成工作已经完成。下一步来导出粒子文件。右键点击Mesh节点,从弹出菜单中选择导出粒子(Export Particles)。
Image
6. 在导出对话框中,输入文件名称和类型。目前已经支持了VTK PolyData格式,以后版本中,会增加更多的导出格式。
Image
导出文件可以被其他软件读取并使用。如图所示,使用ParaView读取此文件的显示结果。
Image
总结
本文介绍了如何使用WELSIM生成粒子的方法步骤。用户只需导入STEP格式的几何体,通过类似自动化网格划分的方式,快速得到各种不同密度的粒子。本文中使用的几何模型较为简单,复杂的几何体也可以同样的方式得到粒子。同时,提供了粒子数据导出功能,用户可以将生成的粒子用于其他软件的计算。粒子生成功能已经存在2025R3版中,会在后续的版本中不断增强和改进。
WelSim与作者和ParaView开发者没有直接关系。这里引用ParaView仅用作技术博客文章与软件使用的参考。
Subscribe to:
Comments (Atom)