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仅用作技术博客文章与软件使用的参考。
Sunday, August 24, 2025
Methods for Automatic Particle Generators
Modern engineering simulation software is not only capable of analyzing continuous domains, for instance, using the finite element method (FEM) to compute structures, fluids, or electromagnetic fields, but it also has enough computational process for discontinuous particle systems. Examples include pure particle molecular dynamics, discrete element methods (DEM), smoothed particle hydrodynamics (SPH), and coupled simulations with FEM. The primary prerequisite to compute particle systems is having the ability to generate particles within a model, including data of the particle positions, shapes, and volumes. This is similar to how in finite element analysis, a mesh containing nodes and element information must first be created.
When simulating particle systems, the first step is to generate the position, size, and shape of the particles. Thus, the particle generator becomes a critical component of the entire analysis system. A good particle generator should be able to quickly produce initial-state particles and generate particles according to various shapes and boundary conditions. Common automated particle generation methods are lattice structures, finite element mesh conversion, and network growth. This article discusses these well-known particle generation methods for SPH systems and their implementation mechanisms.
Lattice Structures
Lattice-based generation is particularly suitable for microscale materials. Typical structures include FCC (face-centered cubic) and BCC (body-centered cubic) lattices, which are often found in crystalline materials. Once the initial lattice structure is defined, the particle generator replicates this structure to fill the entire region.
Press enter or click to view image in full size
For this method of particle generation, the user needs to provide the boundary of the simulation domain (usually a bounding box), the particle type within each lattice, and the spacing between particles. Algorithmically, this is a straightforward approach, so it is widely applied in molecular dynamics and similar particle-based simulations.
Finite Element Mesh Conversion
A finite element mesh consists of nodes and elements; the element types vary depending on the model. Instances include tetrahedral and hexahedral solid meshes, as well as triangular and quadrilateral surface meshes. Since meshes can represent irregular geometries, the irregular shape stays captured once converting them into particles. In particle systems coupled with FEM, this particle generation approach allows for convenient coupling with finite element computations, as commonly seen in particle-FEM and SPH analyses.
Press enter or click to view image in full size
The general procedure for converting a mesh into particles involves calculating the centroid of each element and its characteristic size. These values determine the position and size of each particle. In principle, each finite element corresponds to one particle. However, because FEM meshes may be non-uniform, it may cause the resulting particle distribution to be uneven. Additional integration may be required to refine the generated particles, and boundary particles may also require special marking to enable the addition of boundary conditions in later simulations. In computational fluid dynamics (CFD), particles can also enter the simulation domain continuously through specified inflow boundaries. Currently, WELSIM supports particle generation from finite element meshes.
Network-Based Generation
Another common particle generation method is based on network growth, often implemented with tree and branching algorithms. Starting from an initial trunk structure, branches are allowed to grow within a fixed region according to specific rules, generating new branches (particles). By providing parameters such as a starting point, second point, segment length, gradient, and initial shape, particles can be generated iteratively. This is how new branches are created. Typically, if a new branch is too close to an existing one or belongs to the same parent particle, it is discarded. This approach incorporates randomness through stochastic processes, resulting in particle distributions with a degree of variability.
Conclusion
This article introduced conventionally used automated particle generation methods in simulation software. For FEM-related software, mesh-to-particle conversion is particularly practical, as the generated particles can be directly applied to FEM-coupled simulations. The general-purpose FEM software WELSIM already supports mesh-to-particle conversion, and users are able to export the generated particles to utilize in other analyses.
Wednesday, August 20, 2025
自动化生成仿真粒子的方法
现代工程仿真软件不仅具有分析连续介质的功能,如有限元方法计算结构、流体、或电磁场。也有增强了对非连续粒子系统的计算能力,如纯粒子的分子动力学计算,离散元,光滑粒子流体动力学(SPH),以及与有限元耦合的计算。计算粒子系统的首要条件就是能够在模型中产生粒子,包含了粒子的位置,形状,和体积大小等数据。这与有限元分析需要生成含有节点和单元信息的网格类似。
Image
在计算粒子体系时,第一步是生成粒子的位置,大小,和形状。因此,粒子生成器也就成为整个分析系统的关键部分。好的粒子生成器可以快速生成初始状态粒子,还可以根据不同的形状和边界来生成粒子。常见的自动化粒子生成方式有,晶体点阵,网络生长,和有限元网格转换。本文就讨论常见的可用于SPH系统的粒子生成方法,及其实现机理。
晶体点阵(Lattice)
使用点阵方式生成粒子是一种常见的方式,尤其适用于材料的微小尺度的计算。如材料晶体结构中常见的FCC、BCC等结构。当初始的点阵结构给定以后,粒子生成器会复制这个结构并铺满整个区域。
Image
对于此类型的粒子生成,需要用户提供整个模拟区域的边界,通常是一个矩形盒子,每个点阵中粒子类型,和粒子之间的位置。算法上,这也是一种简单直接的粒子生成方式,大量应用于分子动力学等粒子生成之中。
有限元网格转换
有限元网格是一种包含了节点与单元的数据,根据模型的不同,单元的类型也会不同。这种网格是有限元分析计算中的基础数据之一。代表性的有四面体和六面体实体单元网格,和三角形与四边形平面网格。网格可以表达不规则的形状,因此,转换成为粒子后,也可以表征不规则的形状。在与有限元结合的粒子系统中,这种粒子生成方式,能够方便与有限元计算进行耦合,如常见的粒子有限元和SPH分析。
Image
转换网格到粒子的常用方法是,获取网格每个单元的重心,和单元的直径大小。以此确定每个粒子的位置和大小。原则上每个单元会对应生成一个粒子。由于有限元网格的密度可能不均匀,以此方法生成的粒子分布也不均匀。有时需要再将生成的粒子进行均匀化处理。对于位于边界的粒子,可能还需要标记额外的内容,以方便在后续的分析中施加边界条件。如流体动力学计算(CFD)中,会在某个流入边界中不断生成粒子进入仿真区域。WELSIM已经能够根据有限元网格生成粒子的功能。
基于网络增长生成
另一种常见的粒子生成方式是通过网络增长,具体的算法上常使用树与分支的方式。初始一个树状结构的主干,允许分支在固定区域内按照一定方式生长,生成新的节点,即粒子。在输入起始点和第二个点,片段长度,梯度,初始形状等参数后。这种生成方式的核心是如何创立新的分支,通常的做法是,如果新节点与当前某个节点位置很近,或者都属于同一个父节点,则不会生成这个新节点(分支)。基于网格生成粒子的方法使用了随机数,因此生成的粒子会有一定的随机性。
Image
总结
本文介绍了仿真软件中,自动化生成粒子的常用方法。对于有限元相关的软件,网格转化为粒子的方式更为实用,可以直接将生成的粒子应用于有限元耦合计算中。通用有限元软件WELSIM已经支持了从网格到粒子的转化,用户还可以将生成的粒子导出,用于其他类型的分析。
Wednesday, July 23, 2025
Orthotropic Hill Plasticity Model
In the field of structural mechanics, the plastic deformation processes of many materials are anisotropic in nature. Examples include composite materials, titanium alloys, additively manufactured structures, and multiscale materials. In these cases, traditional isotropic yield criteria are no longer sufficient to accurately describe the behavior, and appropriate models are required to characterize anisotropic plastic yielding. Commonly used anisotropic yield functions include the Hill, Barlat, Banabic, and Cazacu models. Among them, the Hill model was proposed relatively early and has a wide range of applications. It performs particularly well in describing orthotropic materials and is extensively used in structural finite element analysis.
hill_augmented_manufacturing
The Hill model is named after Professor R. Hill, who was appointed Professor of Applied Mathematics at the University of Nottingham in 1953. His 1950 work “The Mathematical Theory of Plasticity” laid the foundation for modern plasticity theory. He is widely regarded as one of the most significant contributors to solid mechanics in the second half of the 20th century.
It’s important to note that the Hill model is not the only yield criterion for orthotropic anisotropic materials. Alternatives include Barlat models with 3 or 6 parameters, or modified versions of the Hill yield criterion. This article focuses only on the classical Hill model, but similar approaches can be used to determine parameters for other yield models. The Hill model is applicable for analyzing plastic deformation in anisotropic materials and can be viewed as a generalized form of the von Mises yield criterion tailored for anisotropic behavior. It is particularly useful for orthotropic plastic materials in structural engineering applications.
The Hill yield criterion is given by:
hill_yield_equation
For shell elements, the yield function is given by:
hill_yield_equation2
Where σ represents the stress components. For 3D models, F to H are six anisotropy calibration coefficients, also known as Hill parameters, which can be determined through material experiments. For shell elements, only four parameters F to N are required.
In computational mechanics, solid elements typically use yield stress ratios (or yield stresses) R11, R22, R33, R12, R13, R23 to calculate Hill parameters. To determine the yield stress ratios, the material’s yield stresses under different loading conditions must be measured:
σ11, σ22, σ33 are obtained from tensile tests.
σ12, σ13, σ23 are obtained from shear tests.
For shell elements, Lankford parameters are used to determine the Hill parameters. A Lankford parameter rₐ is defined as the ratio of plastic strain in the plane to that in the thickness direction. For orthotropic anisotropy, rₐ can be obtained from simple tensile tests:
r₀₀: tensile direction aligned with the orthotropic axis 1.
r₉₀: tensile direction perpendicular to the orthotropic axis 1. Once r₀₀, r₄₅, r₉₀ are measured, the Hill parameters can be calculated. Higher Lankford values indicate better formability.
Most finite element analysis software requires the user to input either R values or Lankford parameters for the Hill model. Once these are specified, the Hill yield criterion equation can be fully determined.
Support for the orthotropic Hill model in WelSim
The complexity of the Hill model lies in parameter input and solving the orthotropic nonlinear behavior. The general-purpose simulation software WESLIM supports transient analysis involving the Hill model. The free material editing software MatEditor supports Hill material model input. Currently, MatEditor supports three types of orthotropic Hill plastic material models and can generate OpenRadioss material input scripts: Law32, Law73/74, and Law93.
mateditor_hill_orthotropic
Conclusion
The Hill model effectively describes orthotropic yield behavior, especially in tension-compression directions and in scenarios with minimal shear deformation. It can also be used to model the mechanical behavior of metallic lattice structures in additive manufacturing.
Hill parameters can be determined via R or Lankford parameters. When these parameters are unavailable from experiments, they can be approximated using curve fitting methods.
WelSim already provides support for the Hill model and can be integrated with OpenRadioss for transient simulations involving orthotorpic plastic deformation.
WelSim and authors have no direct affiliation with developers of OpenRadioss. References to OpenRadioss here are solely for technical blogging and software usage discussion.
正交各项异性Hill 塑性模型
在结构力学领域,很多材料的塑性变形过程是各项异性的,如复合材料,钛合金,增材制造结构,多尺度材料等。这时传统的各项同性屈服准则就无法准确描述此过程,需要有合适的模型来描述各项异性塑性屈服,常用的各项异性屈服函数有:Hill 系列、Barlat 系列、Banabic和 Cazacu等。其中,Hill模型是提出较早,且应用范围广。尤其是在描述正交各向异性材料,Hill模型有着很好的表现,被广泛应用于结构有限元计算中。
Image
Hill塑性模型是以R. Hill教授命名的,他在1953年被任命为诺丁汉大学应用数学教授。于1950年发表的《塑性数学理论》奠定了塑性理论的基础。被广泛认为是20世纪下半叶固体力学基础最重要的贡献者之一。
Hill模型并不是描述正交各项异性屈服的唯一准则,例如3参数或者6参数的Barlat本构模型,或者修改版的Hill屈服准则。本文仅对经典的Hill模型进行讨论,其他屈服模型也可以采用类似的方法进行确定。 Hill适用于各项异性的塑性变形分析。可以看作是用于各项异性屈服行为的von Mises屈服准则的通用形式。在实际的结构工程中,常用于正交各项异性的塑性材料。
Hill 的屈服准则如下:
Image
对于壳单元,屈服函数如下
Image
sigma是应力分量,对于三维模型,F-H为六个各向异性校准系数,又称作Hill参数,可以通过材料实验得到。对于壳单元,只需要F-N 4个参数。
在计算上,固体单元使用 屈服应力率 (或屈服应力)R11, R22, R33, R12, R13, R23来计算Hill参数。为了得到屈服应力率,材料在两种载荷工况下的屈服应力需要被测量。其中,屈服应力sigma11, sigma22, sigma33从拉伸测试中获得。屈服剪应力 sigma12, sigma13, sigma23从剪切测试中获得。
对于壳单元,会使用Lankford参数组来决定Hill参数。Lankford参数r_a是 平面上与厚度方向上塑性应变的比值。对于正交各项异性,r_a可以从简单的拉伸测试中获得。比如r00 从拉伸测试中,载荷方向与正交第一方向一致。r90的载荷方向与正交第一方向垂直。一旦Landford参数r00, r45, r90获得,便可以计算得到Hill参数。Landford数值越大,表示材料有更好的延展性。
在大多数有限元分析软件中,Hill模型要求用户输入R或者Landford参数。通过确定R或者Landford参数,即可确定Hill屈服准则方程。
WelSim对正交各项异性Hill模型的支持
Hill模型的复杂性在于模型参数的输入,和正交各项异性的非线性的求解。通用仿真软件WELSIM支持含有Hill的瞬态动力学计算,免费的材料编辑软件MatEditor支持Hill材料模型的输入。目前MatEditor已经支持了三种正交各项异性Hill塑性材料模型,并支持生成OpenRadioss的材料卡片Law32, Law73/74和Law93。
Image
总结
Hill模型可以描述材料的正交各项异性屈服行为。尤其是在拉压方向,以及剪切变形较小的场合,Hill模型也可以描述金属增材点阵结构的力学行为。
Hill参数可以通过R或者Landford参数确定,当这些参数无法从实验中获得时,也可以通过曲线拟合的方法近似得到。
WelSim已经对Hill模型有了一定支持,能够联合OpenRadioss进行含有各向异性塑性变形的瞬态动力学计算。
WelSim与作者和OpenRadioss开发者没有直接关系。这里引用OpenRadioss仅用作技术博客文章与软件使用的参考。
Sunday, June 29, 2025
Running OpenGL-based applications in a sandbox/virtual machine
Windows Sandbox is a built-in virtual machine in the Windows operating system that allows users to test and run uncertain applications. The sandbox is seperate from the host OS, so applications can run safely in isolation. It is temporary; once closed, all software, files, and states within the sandbox are deleted. Each time the sandbox is launched, a brand-new instance is created. Unlike other virtual machines like VirtualBox, launching Windows Sandbox doesn’t require installing or purchasing a separate OS, which is a significant advantage. However, the sandbox is only available on Windows Professional or Enterprise editions.
When running OpenGL-based software in the sandbox, display issues may arise. This is because Windows Sandbox does not natively support OpenGL. If an application depends on OpenGL but does not include the necessary OpenGL libraries, issues can occur such as a missing main interface. For example, MatEditor, a free engineering simulation material editor from the WelSim suite, may not display its main window the first time it is opened in the sandbox. This is because the required OpenGL libraries in the sandboxed OS are absent.
The fix is straightforward — simply add the OpenGL libraries to MatEditor.
Download the Mesa OpenGL library from GitHub. The project name is mesa-dist-win.
2. Choose the appropriate version for your operating system and build type. In this case, the release-msvc version is selected.
3. Extract the files, open the extracted directory, and type cmd in the address bar to open a command prompt. Then, run the perappdeploy.bat file.
4. The command line will launch and display relevant information. Press any key to continue.
5. Follow the prompts by inputting the executable file folder: C:\Program Files\WELSIM\MatEditor, the executable file name: runMatEditor.exe, and selecting the processor architecture: x64.
6. The OpenGL library is now added to MatEditor. You can re-run the application, and the main window should now display correctly.
Conclusion
This article uses MatEditor as an example to demonstrate how to resolve OpenGL library dependency issues in Windows Sandbox. The same method applies to other environments lacking OpenGL support, such as Windows systems running in VirtualBox. Besides MatEditor, other WelSim products such as the general simulation software WELSIM and the free curve fitting tool CurveFitter are also based on OpenGL and will require similar configuration when used in the sandbox.
WelSim and its developers are not directly affiliated with OpenGL, Windows, Linux, VirtualBox, or Sandbox. References to these technologies are solely for technical blog purposes and software usage guidance.
Subscribe to:
Posts (Atom)