Wednesday, August 30, 2023

Quickly Create Regression Test Cases for WELSIM

 WELSIM is currently the only engineering simulation CAE software in the world that offers an automated regression testing system to end users. It has also open-sourced all the test case files, allowing users to download and run all the test cases on their local machines. Additionally, users can rapidly create their own test cases to verify the accuracy and stability of the current software version.

Regarding the necessity and technical approach of CAE software testing system, you can refer to the article “Automated Regression Testing for General-Purpose Engineering Simulation CAE Software”. This article provides practical insights into how to quickly create test cases in WELSIM.

Creating Test Cases

  1. Set up the environment variable WELSIM_DATA_ROOT and assign a path to it. This path typically stores files required for testing, such as CAD geometry model files. If no external files are imported in the test, you can temporarily skip setting up this environment variable.

On Linux, you can define environment variables through the export command or by modifying the .bashrc file.

export WELSIM_DATA_ROOT=/usr/simlet/WelSimLLC-github/WelSimAutoTests

2. Run the WELSIM program and click Tools->Record Test… from the menu or toolbar to create a test file.

A file saving dialog will appear, prompting the user to specify the path and name of the test file. The file is in XML format. After entering the name, the Test Recorder dialog pops up.

You can see that the Record/Pause button is activated, indicating that the recording of test macro commands is in progress. When you want to stop recording, you can click the Stop Recording button in the bottom-right corner to complete the recording. The number in the bottom-left corner is the event recording counter. Every action the user performs on the window is recorded and increases the counter. The details of the macro commands are displayed in the center of the dialog. The macro commands displayed here will all be recorded in the test file.

3. Test cases for CAE often require the verification of computational accuracy. Click the “Check” button to activate the verification function. When hovering the mouse over an area, a green bounding box will highlight it. Click on the desired attribute to be tested. As shown in the figure below, when a user clicks on the maximum value property of a result object, the system will automatically record its value for comparison during testing.

Unlike the “wsevent” identifier for the operation command, we can see that the commands for result comparison are identified as “wscheck” in the XML file.

4. When the recording is complete, you can click the “Stop Recording” button to finish the recording. Save the test file.

Once the test project is created, you can locally save the test cases for future runs. You can also submit the created test cases to the official test repository, allowing WELSIM users worldwide to execute the test cases you’ve created.

Conclusion

WELSIM provides a user-friendly system for recording test cases without the need for coding. Users can generate test files by following their regular operations. This entire testing system ensures the quality of the WELSIM software and provides an effective way for users to participate in the simulation community’s development. Thanks to the open-source license of test cases, the entire simulation community will benefit as these cases increase.

It should be noted that the automated testing system was first introduced in version 2023R3. As the product continues to evolve through iterations, the methods or details for creating test cases outlined above may change in future versions.

WELSIM is the #1 engineering simulation software for the open-source community.

WELSIM发布2023R3版本,量化不确定的计算

 通用工程仿真CAE软件开发商WELSIM发布了最新的2023R3版本(内部版本号2.7)。相对于上一个版本,2023R3版本有许多新的功能与增强,能够更好地支持各种类型的工程仿真CAE分析。同时,开源了自动化回归测试算例,实现品牌景愿:量化不确定的计算(Quantify the Uncertain)。

自动化回归测试系统

新版本将自动化回归测试系统开放给终端用户。WELSIM因此也成为世界上唯一一款将测试系统提供给用户的工程仿真CAE软件。同时,开源了所有测试案例,并终身维护测试案例。一个开放的平台,可以让世界范围内的工程师与学者共建CAE软件的测试算例。整个仿真社区将因此受益。

支持开源CFD求解器SU2

SU2是一款功能丰富,性能优异,同时协议友好的开源CFD求解器。WELSIM可以作为前处理器生成SU2求解计算输入文件,也可以作为后处理器,读取SU2计算所得的结果与历史文件。同时,默认使用SU2作为流体模块的求解器,用户可以直接调用SU2求解器进行计算,达到了无缝链接。

其他增强与升级

此外,新版本还有新的功能。如增强对OpenRadioss求解器多载荷步支持。三维显示窗口增加了右键弹出菜单,云图色彩控制器增加了右键弹出菜单。材料编辑模块增加了JWL和弹塑性测试数据材料属性等。

同时,曲线拟合软件CurveFitter增加了Johnson-Cook,Swft-Voce曲线拟合模型,增加了输出窗口用于显示求解器返回信息等功能。

WELSIM会继续保持快速的研发与稳定的维护,开放的技术博客撰写风格,为工程仿真和CAE社区做贡献。

Monday, August 28, 2023

快速创建WELSIM的回归测试算例

 WELSIM是目前世界上唯一一款将自动化回归测试系统开放给终端用户的工程仿真CAE软件。同时开源了所有的测试算例文件,用户可以下载所有的测试案例,在本机运行。同时可以快速创建自己的测试算例,用于验证当前软件版本的精确性与稳定性。

关于CAE软件测试工具的必要性以及技术路线,可以参见《大型工程仿真CAE软件的自动化回归测试》一文。本文从实际操作角度,详细介绍如何在WELSIM下快速创建测试案例。

创建步骤

1. 建立环境变量 WELSIM_DATA_ROOT,并赋予路径。这个路径通常是保存测试所需的文件,如CAD几何模型文件。如果测试中没有导入任何外部文件,可以暂时不设置此环境变量。

在Linux系统下,可以通过export命令或者修改.bashrc文件实现定义环境变量。

export WELSIM_DATA_ROOT=/usr/simlet/WelSimLLC-github/WelSimAutoTests

2. 打开WELSIM程序,从菜单栏或工具栏中点击Tools->Record Test…,创建测试文件。

此时,会弹出文件保存窗口,提示用户输入测试文件的保存路径与名称。文件类型为XML。输入名称后,会弹出测试记录器对话框。

此时可以看到Record/Pause按钮已经激活,表明正在录制测试宏命令。当想停止录制时,可以点击右下角的Stop Recording按钮,完成录制。左下角的数字是事件录制计数器。用户每次在窗口上的操作都会被记录,同时增加计数。对话框正中显示宏命令的细节,此处显示的宏命令都会被记录在测试文件中。

3. CAE的测试算例常需要检测数值计算的准确性。点击Check按钮,激活检测功能,测试鼠标滑过区域会绿色方框高亮显示。点击所要检测的属性即可。如下图,用户点击结果节点的最大值属性,系统会自动记录其数值,用于测试时进行检查对比。

不同于操作命令的wsevent标识,我们看到结果对比的命令在XML文件中是以wscheck为标识的。

4. 当完成记录时,可以点击Stop Recording按钮,完成记录。保存测试文件。

测试项目创建后,可以本地保存测试算例,用于以后运行,也可以将创建的测试算例提交到官方测试库,让全世界WELSIM使用者都可以运行您创建的测试案例。

总结

WELSIM提供了简单人性化的测试算例录制系统,用户无需编码,只需要按照平时操作即可生成测试文件。整套测试系统为WELSIM软件的质量提供了保障,同时为用户参与仿真社区的建设提供了一个有效方式。得益于测试算例的开源协议,随着算例的增加,整个仿真社区将因此受益。

需要注意的是,自动化测试系统在2023R3版本中首次公开,随着产品的迭代不断演化,以上测试算例的创建方式或细节,在将来的版本中可能会有所变化。

Thursday, August 24, 2023

WELSIM — The World’s Leading Engineering Simulation Pre- and Post-Processor for Open-Source Solvers

 With the rapid development of engineering simulation CAE software over the past few decades, it has become a highly complex and intricate product. Users’ expectations for simulation CAE software have also risen accordingly. Not only does modern simulation software require strong computational capabilities and accurate results, but it also demands a graphical user interface (GUI) that is user-friendly, easy to learn, and intuitive. This presents steep challenges for small and medium-sized development teams. Due to a shortage of ongoing development resources, many outstanding simulation CAE projects end up attracting little to no attention. Similarly, some well-established and capable solvers struggle to expand their user base and community influence because they don’t have a user-friendly GUI and an automated maintenance system for sustainable development. The lack of attention toward excellent solvers is undoubtedly a waste of computing resources.

Through years of dedicated research and development, the engineering simulation software WELSIM has acquired the capability to address these industry issues. Developers of exceptional solvers, particularly those working on open-source solvers, can focus on advancing their solver’s core features while entrusting the pre- and post-processing tasks to WELSIM. Additionally, WELSIM enables the establishment of an automated regression testing system, ensuring the precision of solvers. This approach significantly conserves development resources and time.

WELSIM is compatible with various solvers

From its inception, WELSIM has been positioned as a general-purpose simulation software capable of supporting diverse physical fields and analysis types. It currently seamlessly integrates with several third-party open-source solvers and, with ongoing development, will extend support to even more exceptional open-source solvers.

A user-friendly graphical user interface is an essential aspect of excellent pre- and post-processors. WELSIM already contains a comprehensive set of pre- and post-processing features.

(1) It possesses a variety of user interaction windows, such as the project tree, properties, 3D graphics, output, table, chart, and more. For more details, refer to the article “Window design and development for general-purpose simulation software”.

(2) WELSIM features a wide range of user interaction commands and menus. See the article “Design and development of context menu in simulation software” for more information.

(3) WELSIM includes a flexible material editing module. Material definitions are extensively used in engineering analysis, and WELSIM’s material module is user-friendly while covering almost all material properties used in engineering analyses. The material module also incorporates curve-fitting capabilities to derive material parameters from test data.

(4) The unit module supports over 50 quantities and 16 unit systems. All unit properties are handled in the front end, eliminating the need for the solver to consider any unit conversions. More information can be found in the article “Quantities and units in general-purpose engineering simulation software.”

(5) WELSIM offers a geometric model import functionality. It can swiftly read STEP format geometry files and display them in the 3D graphics window. The assembly model is supported. The built-in contact search feature can automatically identify contact pairs for assembly, so users will not need to manually define contact pairs.

(6) WELSIM features a fully automatic meshing module that quickly generates finite element mesh for successive analysis.

(7) WELSIM provides various analysis setting capabilities. Supported conditions include but are not limited to multi-step settings, linear algebra solver parameters, nonlinear solver coefficients, boundary conditions, field conditions, initial conditions, and more.

(8) WELSIM enables direct solver invocation for computation while allowing users to configure the solver’s directory and path.

(9) WELSIM offers extensive post-processing capabilities. Result files can be rapidly and efficiently read. Table and chart windows display maximum and minimum result values at each step. Moreover, WELSIM provides the function to record dynamic results into MP4 files and export result data to common formats, like VTK files.

(10) An automated regression testing system is provided to ensure the accuracy and stability of the solvers. Additionally, all test cases are open-sourced. Users can also easily create their own test cases.

Benefits of Using WELSIM as a Pre- and Post-Processor

There are numerous benefits to using WELSIM as the pre- and post-processor for solvers.

  1. WELSIM significantly reduces development time by focusing development resources on the core solver. While simulation CAE software includes modules such as pre- and post-processing, solvers, and mesh generators, these modules have vastly different development approaches and tactics, often falling into entirely separate technology domains. Utilizing the WELSIM frontend eliminates the burdensome task of GUI development, allowing concentration on improving and enhancing the core solver, thereby enhancing the product.
  2. WELSIM comes with an automated regression testing system, so solver developers do not need to spend efforts on creating another regression system. Regardless of the numerical methods being used, such as finite element, finite volume, or other scientific computing approaches, CAE software requires extensive automated testing to ensure solver accuracy. Establishing such a testing system can be resource-intensive. Leveraging WELSIM’s testing framework can save considerable development resources and time. See the article “Automated Regression Testing for General-Purpose Engineering Simulation CAE Software”.
  3. Collaborating with WELSIM in the simulation and computation ecosystem leads to mutual development. After years of development, WELSIM has gained international recognition within ecosystems and communities. Using the WELSIM frontend enhances the brand image of the core solver, attracting more attention from the community.
  4. WELSIM is user and collaborator-friendly. The development needs of users and collaborators are prioritized, aiming for prompt and speedy fulfillment.
  5. WELSIM has been long-term supported. Solver developers do not need to worry about the discontinuity of WELSIM development and maintenance.
  6. WELSIM already encompasses a wide range of frontend features for general-purpose CAE software, applicable to nearly any type of simulation analysis. It can quickly adapt to various new solvers.

Conclusion

WELSIM offers world-leading engineering simulation CAE pre- and post-processing modules. It continually contributes to the simulation community through its exceptional products and friendly approach to users and collaborators. Talented solver developers are encouraged to use WELSIM as a pre- and post-processor.

WELSIM is the #1 engineering simulation software for the open-source community.