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.

Saturday, June 28, 2025

沙盒/虚拟机中运行基于OpenGL的应用软件

Windows沙盒(Sandbox)是Windows操作系统中自带的虚拟机。对于不确定的应用程序,可以先在沙盒里测试运行。沙盒与当前的操作系统隔离,可以安全地在隔离状态下运行应用程序。沙盒是临时的,关闭后,系统将删除所有软件和文件以及状态。 每次打开应用程序时,都会获得沙盒的全新实例。打开沙盒系统无需安装或购买一份新的操作系统,这是相对于VirtualBox等虚拟机来说一个优势,但是只有在Windows专业版或企业版才有沙盒功能。 在沙盒环境下运行含有OpenGL的软件时,可能会遇到一些显示问题。由于沙盒环境下没有对OpenGL的原生支持,因此,当应用软件基于OpenGL但不包含OpenGL依赖库的时候,会出现显示的问题,如没有主界面等现象。WelSim系列的MatEditor是一款免费的工程仿真材料编辑软件,当在沙河中首次打开时,可能会无法显示主窗口,是由于沙盒的操作系统中没有OpenGL的相关库文件。 Image 解决方法很容易,只需要为当前的MatEditor程序添加OpenGL的库即可。 1. 从GitHub上下载Mesa的OpenGL库,项目名称为mesa-dist-win。 Image 2. 选择对应的操作系统和编译方式版本。这里选择的是release-msvc版本。 Image 3. 解压后,在解压目录中输入cmd,进入命令行模式。并运行perappdeploy.bat文件。 Image 4. 会进入命令行模式,并显示相关信息。按下任意键后。 Image 5. 根据提示,分别输入可执行文件的文件夹C:\Program Files\WELSIM\MatEditor。可执行文件的名称runMatEditor.exe。选择处理器构架为x64。 Image 6. 为MatEditor添加OpenGL库文件的工作已经完成。可以再次运行MatEditor应用。主窗口与界面完美显示。 Image 总结 本文通过以MatEditor软件为例,介绍了在Windows沙盒中解决和OpenGL依赖库有关的问题。此方法同样适用没有OpenGL支持的操作系统环境,如Virtual Box中的Windows系统。除了MatEditor,WelSim系列下的通用仿真软件WELSIM,和免费的曲线拟合软件CurveFitter也都基于OpenGL,因此在沙盒环境下,也需要做类似配置。 WelSim与作者和OpenGL, Windows, Linux, VirtualBox, SandBox等开发机构没有直接关系。这里引用OpenGL, Windows, Linux, VirtualBox, SandBox仅用作技术博客文章与软件使用的参考。

Friday, June 27, 2025

Finite Element Analysis of Plastic Roll Forming

Roll forming, also known as cold roll forming, is an industry-wide process used to manufacture and form metal. Through successive deformation, it shapes the metal workpiece into specific profiles using a series of forming rollers arranged in sequence. This forming method offers high production efficiency, reduced waste, and enhanced product strength. Roll forming is widely applied in industrial sectors such as automotive manufacturing. Simulation of roll forming is a common type of finite element analysis (FEA). With this analysis, one can predict the degree of deformation of the workpiece, the stresses and strains it undergoes, as well as determine the roller dimensions and operating speeds required for success. Since this type of analysis involves nearly all aspects of structural calculations, such as multi-load steps, nonlinear plasticity, various types of contact algorithms, rigid body dynamics, and both solid and shell elements, it is considered one of the most copmlex and difficult-to-converge models in structural analysis. An analysis of roll forming not only places high pressure on the solver, but also on the skill of its pre- and post-processors. The general-purpose engineering simulation software WelSim, when combined with the powerful open-source FEA solver OpenRadioss, can effectively simulate various plastic forming and forging processes. This article demonstrates how to perform a roll forming simulation from a practical perspective. Analysis Steps 1. Open WelSim and set units. In this case, we use the kg-mm-s system. 2. Create a new aluminum alloy material named myPlastic, with the following properties: Density: 2.7e-6 kg/mm³ Young’s Modulus: 70 GPa Poisson’s Ratio: 0.33 Johnson-Cook Plasticity Properties: Initial Yield Stress: 300 MPa Hardening Constant: 360 MPa Hardening Exponent: 0.08 After editing the material parameters, close the material window to proceed with the analysis. 3. Create a new FEM project and set the analysis type to Explicit Transient Structural Analysis in the Properties window. 4. Import the geometry model as shown below: In this assembly, the bottom two rotating rollers transport the workpiece, while the top roller presses down on the workpiece. The workpiece is a square tube with chamfered corners. The cross-section of the tube is shown below: For the three cylindrical rollers, set them as Shell structures. The Material is Structural Steel; Thickness is 1 mm. Set the Integration Points property to 3, and set the Rigid Body property to true. For the deformable square tube workpiece, define it as a Solid structure, and assign the aluminum alloy created in Step 2 to the Material. 5. In the Mesh Settings window, set the Maximum Element Size to 10 mm. WelSim automatically meshes based on geometry type. The square tube is meshed with solid elements. The thin-walled rollers are meshed with shell elements. 6. In the Contact property windows, this model defines three contact pairs: two frictionless, and one frictional. 6.1 The first contact pair is frictional; it is between the bottom front roller and square tube. The friction coefficient is 0.9 to provide driving force as the roller rotates. 6.2 The second contact pair is frictionless and is between the rear bottom roller and tube. 6.3 The third contact pair is frictionless and is between the top pressing roller and tube. 7. Now, define this analysis to be multi-step. In the properties of Study Settings object, set up 3 load steps. The end times for each step are: 0.04s, 0.045s, and 0.1s. Set the solver to OpenRadioss, or leave it as the default (Program Controlled). When performing explicit structural dynamics, WelSim defaults to OpenRadioss as the solver. 8. Next, define four boundary conditions for this analysis. 8.1. The Displacement boundary is set for the top roller. The roller moves downward 20 mm at a constant speed during first load step, then holds position. 8.2. A Constraint condition is set for top roller to prevent some rotation during simulation, only Z direction translation and X axis rotation are allowed. 8.3. Now, define the constraints for the bottom rollers to only allow rotation around the X-axis by setting X to False. 8.4. The last boundary condition is the angular velocity of the front bottom roller, which is set to a speed of 200 rad/s, and it starts in the second load step. 9. Now it’s time to solve the Model. You can simply click the Solve button to begin the computation. If it’s your first time using WelSim with OpenRadioss locally, you’ll need to download the OpenRadioss solver and configure its path in WelSim’s Preferences. 10. After computation, you can view results by clicking the Answer object. The Table and Chart display energy and kinetic quantities over time. These quantities include: Contact energy, External work, Internal energy, Kinetic energy, Mass, Momentum, etc. 11. You also can add result objects like stress, strain, displacement to evaluate the specific results of the domain. To see the deformation, you need to enable the Show Deformation property in the 3D View tab. The figure below displays the von-Mises stress contour; the Table and Chart display how stress evolves over time. WelSim also supports the generation of animation, just click the record button in the Chart window to create an animation of the 3D view. The example animation is shown here: https://www.youtube.com/watch?v=-38eodbujns Conclusion This article demonstrates how to build and analyze a plastic roll forming simulation using a real-world example. OpenRadioss proves to be a powerful tool for transient structural analysis. Paired with WelSim's convenient pre- and post-processing capabilities, OpenRadioss becomes easier to use and integrate. WelSim acts as both the pre- and post-processors in this case, efficiently generating complex input scripts and directly reading the result files for display. WelSim seamlessly integrates with the OpenRadioss solver. The geometry and test files used in this article are open-sourced and available in WelSim's official test case repository: 🔗 https://github.com/WelSimLLC/WelSimAutoTests WelSim has no direct affiliation with the developers of OpenRadioss. References to OpenRadioss are for technical blog and software usage purposes only.

Wednesday, June 25, 2025

塑性辊压成型的有限元仿真

塑性辊压成型又称冷弯成型,是工业中常用的金属制造与成型方式。是通过顺序配置的多道次成形轧辊,把金属工件不断进行变形,以制成特定形状。这种成型方式生产效率高,节约材料,增加产品强度,广泛应用于如汽车生产等工业部门。 Image 辊压成型的仿真也是常见的有限元分析类型。通过这种分析,可以预测工件的变形程度,承受的应力应变情况,以及所需要辊子的尺寸和运转速度。由于此类分析几乎涉及了结构计算的所有因素,如多载荷步,塑性非线性变形,各种类型的接触算法,刚体动力学,和各种实体与板壳单元。可以说是结构分析中最复杂,最难以收敛的模型之一。这不仅对求解器提出很高的要求,也对前后处理器也需要比较完善的功能。 通用工程仿真软件 WelSim,在结合强大的开源瞬态求解器OpenRadioss后,可以很好的模拟各种塑性成型等锻造过程。本文就从实际操作角度,演示如何进行滚动压铸成型的仿真分析。 分析步骤 1. 打开WelSim主界面,并设置单位。这里,我们设置kg-mm-s。 Image 2. 建立一个新的铝合金材料,并命名为myPlastic,设置的属性分别如下。 密度:2.7e-6 kg/mm3。杨氏模量:70 GPa。泊松比:0.33。 Johnson-Hook塑性属性,初始屈服应力:300 MPa。硬化常数: 360 MPa。硬化指数: 0.08。 Image 编辑完成材料参数后,关闭材料窗口。进行后续分析操作。 3.新建一个FEM项目工程,并在属性窗口中,设置为显式瞬态结构分析。 Image 4. 导入几何模型,如下图所示。 Image 底部有两个可转动辊轴,用于传送工件。上转辊用于下压工件。工件为方管结构,四角有倒角。方管的横截面如下图所示。 Image 对于3个圆柱形辊子,在属性窗口中设置为壳体结构,材料为结构钢,厚度保持1mm不变,积分点保持3个不变,同时将刚体选项设置为真。如下图所示, Image 对于受挤压成型的方管工件,定义为实体结构,并赋予在第2步创建的铝合金塑性材料。 Image 5. 网格划分。将最大单元尺寸设置为10mm。WelSim会自动根据几何类型进行划分单元。方管会使用实体单元网格划分。薄壁滚轴是使用壳单元划分。 Image 6. 添加接触。本算例中,需要添加3对接触对,其中两个无摩擦接触对,一个有摩擦接触对。第一个接触对是底部第一滚轴与方管的接触,设置为有摩擦,同时摩擦系数为0.9。之所以设置成有摩擦,是为了在滚轴转动时,摩擦力能将方管向一个方向传递。 Image 第二个接触对是底部第二滚轴与方管的接触,定义为无摩擦接触。如下图所示, Image 第三个接触对是顶部的压辊与方管的接触,同样定义为无摩擦接触。 Image 7. 在Study Settings节点中设置多载荷步分析。由于分析工况的需要,我们将载荷步设置为3步,每一个载荷步的结束时间分别是0.04s, 0.045s, 0.1s。将求解器设置OpenRadioss或者保持默认的自动选择求解器。WelSim在进行显式结构动力学计算时,会默认使用OpenRadioss求解器。 Image 8. 设置边界条件。这里要设置四个边界条件,用于完成整个分析中所需的约束与载荷。 8.1 对顶部的辊子设置位移边界条件。上辊在第一个时间步内匀速下压20mm, 并在之后的过程中保持在这个位置。 Image 8.2 对上辊设置约束边界条件。目的是防止上辊在接下来的计算中产生转动。因此,只允许Z方向和X轴方向运动。 Image 8.3 对底部两个辊子都施加约束边界条件。只允许以X轴方向的转动。 Image 8.4 对底部前端的辊子施加以X为轴的旋转角速度,用于传动方管。角速度的大小为200 rad/s,从第二个载荷步开始旋转辊子。 Image 9. 设置完成后,即可以点击求解按钮,进行计算。如果是在本地第一次使用WelSim和OpenRadioss的联合求解,还需要下载OpenRadioss求解器至本地,同时在WelSim的首选项中进行简单配置,输入OpenRadioss的目录地址。即可联立求解。 Image 10. 计算完成后,点击答案节点,会在表格与曲线窗口,显示整个时间历程下,各种能量和动能的分布。这些量包括,接触能量,外部做功,内能,动能,质量,和动量等。如下图所示。 Image 11. 还可以添加如应力、应变、位移等结果节点,评价后即可得到三维云图显示。当需要打开变型显示时,可以在三维显示属性窗口中,将显示变形属性设置为真。即可看到方管变形和位移后的状态。同时,表格和曲线窗口显示整个应变随时间变化的状况。 Image WelSim还支持快速生成动画,用户可以点击曲线窗口上的录像按钮,即可生成3D视图窗口中的动画文件。本算例的应力结果动画如下所示。 总结 本文通过一个实例,演示了如何建立塑性辊压模型,并得到计算结果。OpenRadioss被证明是一款功能强大的瞬态结构动力分析软件,通过WelSim便捷的前后处理能力,使得OpenRadioss的更加易于使用。WelSim在本例中,作为前后处理工具,快速生成包含复杂内容的求解文件,同时可以直接读取结果文件并显示,体现了和OpenRadioss求解器无缝整合的功能。 本文所用的几何文件和测试文件已经开源,并共享在 WelSim的官方测试库中,https://github.com/WelSimLLC/WelSimAutoTests。 WelSim与作者和OpenRadioss开发机构没有直接关系。这里引用OpenRadioss仅用作技术博客文章与软件使用的参考。

Sunday, May 18, 2025

WELSIM 2025R2 releases to enhance structural dynamics

 The general-purpose engineering simulation software WELSIM has released its latest version 2025R2 (internal version number 3.1). Compared with the previous one, version 2025R2 contains many new features and enhancements, which can better support various types of engineering analysis, especially structural dynamics.

Enhance support for OpenRadioss

The new version improves the pre- and post-processing support for the OpenRadioss solver. Through support of thermal stress commands, WelSim now has the ability to solving thermal stress problems. The reading and display of contact force results have also been added. More functions such as remote displacement boundary conditions have been implemented, too.

In the material editing module, new material properties applicable to OpenRadioss have been added, such as damage plasticity (LAW23), brittle plasticity (LAW27), honeycomb structure (LAW28), Swift plasticity, Ramberg-Osgood plasticity, etc. The existing thermal expansion and specific heat material properties can output the solver command in OpenRadioss format. The independent material editing software MatEditor has also added the same function.

Open source WelSim’s documentation

All help documents of WelSim are open source now. This is another open source intelligent asset of WelSim, after the official website and automated testing cases. Not only can users can submit document updates about WelSim, but they can also use this framework to build online help documents for their own products. The documents are currently open source on GitHub at https://github.com/WelSimLLC/welsim-docs.github.io.

Other enhancements and upgrades

The new version has even more features and improvements. For one, WelSim now supports pre-processing of multi-layer shell structures. There have also been advancements to improve user experience: the application window title displays the full path name of the current project file, and users can now drag and drop STEP geometry files. Additionally, the CFD solver SU2 has been upgraded to the latest version 8.2. And other enhancements and upgrades.

WELSIM and the author are not affiliated with OpenRadioss, SU2. The use of OpenRadioss, SU2 is for reference in this technical blog post and software usage only.

WELSIM发布2025R2版本,增强结构动力学计算

通用工程仿真分析软件WELSIM发布了最新的2025R2版本(内部版本号3.1)。相对于上一个版本,2025R2版本含有许多新的功能与增强,能够更好地支持各种类型的工程仿真CAE分析,尤其是瞬态结构动力学分析功能。

增强对OpenRadioss的支持

新版本增强了对OpenRadioss求解器的前后处理支持。通过支持对热应力命令的支持,使得WelSim具备了求解热应力问题的功能。增加了对接触力结果的读取与显示。支持了远端位移边界条件等新功能。

在材料定义与编辑模块,增加了可应用于OpenRadioss的新的材料属性,如损伤塑性(LAW23),脆性塑性(LAW27),蜂窝结构(LAW28),Swift塑性,Ramberg-Osgood塑性等。已有的热膨胀与特热材料属性可以输出OpenRadioss格式的求解器命令。独立材料编辑软件MatEditor,也同步增加了相同功能。

开源WelSim帮助文档

开源了WelSim的全部帮助文档。这是继开源官方网站和自动化测试后,又一次开源WelSim相关的知识资产。用户不仅可以提交关于WelSim的文档更新,也能够以此框架,建立自己产品的在线帮助文档。目前文档开源在GitHub上,地址为github.com/WelSimLLC/we

其他增强与升级

此外,新版本还有其他功能与提升。如支持了多铺层板壳结构的前处理。软件窗口标题显示当前项目文件的全路径名称。支持拖拽导入STEP几何文件。升级SU2求解器到最新的8.2版本。等其他增强与提升。

WelSim与作者不隶属于OpenRadioss和SU2, 和以上开发团队与机构没有关系。这里引用OpenRadioss, SU2 仅用作技术博客文章与软件使用的参考。

Saturday, April 12, 2025

Finite element analysis of plastic deformation using WELSIM

 Plastic deformation refers to the process in which a structure experiences external stress beyond its yield limit, transitioning from elastic deformation to plastic deformation. This process is also referred to as elastoplastic deformation. Plastic deformation is commonly seen in industrial applications, such as the formation of various sheet metal and die casting of automobile bodies. In a professional engineering context, engineers aim to avoid plastic deformation in structures to prevent material failure. As a result, plastic analysis is very common in structural finite element analysis.

The general-purpose engineering simulation software WELSIM already supports plastic analysis. This article gives an overview of the plastic analysis features in the current version from a practical software usage perspective.

From a computational standpoint, plastic deformation is a nonlinear process in a material’s constitutive relationship. Therefore, the software must have the capabilities to solve nonlinear problems. WELSIM uses FrontISTR as its implicit solver and OpenRadioss as its explicit solver. Users can also use other solvers such as CalculiX and Elmer, which will be covered in future articles. This article focuses on the FrontISTR and OpenRadioss solvers.

Most of the complexity in plastic deformation lies in the material behavior. Therefore, considerable effort is required for the material data input and editing. With the diversity of plastic models, the front-end interface also needs to be robust. WELSIM provides a user-friendly material editor and a fully consistent, free standalone material software called MatEditor. Currently, 25 plastic-related and 12 creep-related material properties are supported. Each property has its own parameters and editing method.

Using multilinear hardening as an example, the figure below demonstrates how to define an elastoplastic material. Basic parameters are entered:

  • Density: 7.8e-7 kg/mm³
  • Young’s modulus: 206.9 GPa
  • Poisson’s ratio: 0.29

Plastic stress-strain relationship data:

  • Strain: {0, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5}
  • Stress: {450, 608, 679, 732, 752, 766, 780} MPa

Static elastoplastic analysis

For static nonlinear finite element analysis, the computation is essentially implicit. Nonlinear material deformation is solved using the Newton iterative method. In the project settings, you can retain the default “Static Structural Analysis” type.

Because plastic deformation is a nonlinear process, multiple sub-steps can be set in the analysis. In this example, 25 sub-steps are used.

The other analysis settings are almost identical to those in elastic analysis.

After setting boundary conditions and running the simulation, you will obtain common results like stress and displacement. For simple models, the stress results can also reflect the plasticity.

WELSIM uses FrontISTR as the default solver for static structural analysis. Supported default plastic models include:

  • Bilinear
  • Multilinear
  • Swift
  • Ramberg-Osgood
  • Kinematic Hardening

Transient elastoplastic analysis

For WELSIM’s transient structural analysis, it is recommended to use explicit method with OpenRadioss as the solver. OpenRadioss is an excellent open source solver for structural dynamics, known for reliable results, and it supports a wide variety of plastic models.

In the project settings, set the analysis type to “Transient” and enable “Explicit” analysis.

In transient analysis, it’s often necessary to set the physical time for each load step and time step. As shown in the figure:

  • Total time: 0.07s
  • Time step: 0.0001s

After defining boundary conditions and running the computation, results can be obtained.

Supported plastic models for explicit transient analysis are given below:

  1. LAW2 (PLAS_JOHNS) — Density + Isotropic Elasticity + Johnson-Cook
  2. PLAS_ZERIL — Density + Isotropic Elasticity + Zerilli-Armstrong
  3. LAW22 (DAMA) — Density + Isotropic Elasticity + Johnson-Cook + General Damage
  4. LAW27 (PLAS_BRIT) — Density + Isotropic Elasticity + Johnson-Cook + Orthotropic Brittle Failure
  5. LAW28 (HONEYCOMB) — Density + Honeycomb
  6. LAW32 (HILL) — Hill
  7. LAW36 (PLAS_TAB) — Density + Isotropic Elasticity + Rate-Dependent Multilinear Hardening
  8. LAW44 (COWPER) — Cowper-Symonds
  9. LAW93 (ORTH_HILL) — Orthotropic Hill
  10. LAW48 (ZHAO) — Zhao
  11. LAW49 (STEINB) — Steinberg-Guinan
  12. LAW52 (GURSON) — Gurson
  13. LAW57 (BARLET3) — Barlet3
  14. LAW78 — Yoshida-Uemori
  15. LAW79 (JOHN_HOLM) — Johnson-Holmquist
  16. LAW84 — Swift-Voce
  17. LAW103 (HENSEL-SPITTEL) — Hensel-Spittel
  18. LAW110 (VEGTER) — Vegter

Note: WELSIM does not include OpenRadioss in its installation package. Users need to download OpenRadioss separately and configure its directory in WELSIM’s preferences before using it for the first time.

Conclusion

This article introduces how to use WELSIM to perform finite element analysis (FEA) on structures with plastic materials. With its excellent material editing module and powerful solvers like OpenRadioss and FrontISTR, users can carry out plastic structural analysis and obtain results quickly.

WelSim and author are not directly related to the OpenRadioss, FrontISTR, Elmer, or CalculiX development team. The reference to OpenRadioss FrontISTR, Elmer, or CalculiX is only used here for technical blog and software usage references.