{"@attributes":{"version":"2.0"},"channel":{"title":"WELSIM","description":"#1 engineering simulation software for the open-source community.\n","link":"https:\/\/welsim.com\/","pubDate":"Sat, 04 Apr 2026 23:01:18 +0000","lastBuildDate":"Sat, 04 Apr 2026 23:01:18 +0000","generator":"Jekyll v3.10.0","item":[{"title":"WELSIM 2026R2 releases with all new dark theme\u00a0GUI","description":"<p>WELSIM, a general-purpose engineering simulation and analysis software, has released its latest 2026R2 version (internal version 3.3). Compared to the previous release, version 2026R2 introduces a majorly upgraded underlying framework alongside a new dark theme, improving the graphical user interface.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260401\\welsim_release_2026r2.png\" alt=\"welsim_release_2026r2\" \/>\n<\/p>\n\n<h2 id=\"all-new-darktheme\">All new dark\u00a0theme<\/h2>\n<p>The newly added dark theme reflects current desktop application designs and is gentler on the eyes. Users can set the appearance theme in Preferences and have three options available: Classic, Dark, and Light.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260401\\welsim_thermal_ss_dark.png\" alt=\"welsim_thermal_ss_dark\" \/>\n<\/p>\n\n<p>The Classic theme is similar to the Light theme, whereas the Dark theme features a dark background with light\u2011colored text and icons in the foreground. Starting with this version 2026R2, WELSIM\u2019s default style will be the Dark theme.<\/p>\n\n<h2 id=\"comprehensive-framework-upgrade\">Comprehensive Framework Upgrade<\/h2>\n<p>The new version upgrades the key foundational framework, including updating the GUI framework Qt from 5.15 to 6.10 and the 3D rendering engine VTK from 8.2 to 9.2.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260401\\welsim_about.png\" alt=\"welsim_about\" \/>\n<\/p>\n\n<p>Upgrading both core frameworks across major versions has improved WELSIM\u2019s stability and performance.<\/p>\n\n<h2 id=\"other-improvements-andupgrades\">Other Improvements and\u00a0Upgrades<\/h2>\n<p>The new release optimizes and advances existing features and adds more automated test cases, delivering a better user experience in WELSIM.<\/p>\n\n<hr \/>\n\n<p><em>Disclaimer: WelSim and its developers are not affiliated with Qt or VTK, nor are they associated with the above\u2011mentioned development teams or organizations. References to Qt and VTK are made solely for reference in technical blog posts and software documentation.<\/em><\/p>\n\n","pubDate":"Wed, 01 Apr 2026 00:00:00 +0000","link":"https:\/\/welsim.com\/2026\/04\/01\/welsim-2026r2-releases-with-all-new-dark-theme-gui.html","guid":"https:\/\/welsim.com\/2026\/04\/01\/welsim-2026r2-releases-with-all-new-dark-theme-gui.html"},{"title":"Multi-style interface for Qt-based desktop\u00a0software","description":"<p>Qt is one of the most popular cross-platform C++ Graphical User Interface (GUI) application frameworks in the world. Its most powerful feature is its cross-platform capability: developers write code once and, after recompilation, are able to run it on desktop (Windows, macOS, Linux), mobile (iOS, Android), and embedded systems (QNX, VxWorks, various RTOS). Software products, particularly large-scale industrial software, are frequently built on the Qt framework. From a developer perspective, this article discusses how to optimally implement multi-theme interfaces in Qt software, focusing on Dark theme.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260320\\welsim_qt_theme_dark.png\" alt=\"welsim_qt_theme_dark\" \/>\n<\/p>\n\n<p>In regards to the development of large-scale Qt desktop applications, such as IDEs, industrial control software, or productivity tools, the UI is more than just aesthetics; it concerns operational comfort during long usage sessions, the clarity of information hierarchy, and brand professionalism. As a result, modern large-scale visualization software support multiple interface styles, commonly categorized into Light and Dark themes. Because Light mode is typically the default, Dark mode requires dedicated functional implementation by developers. From a practical standpoint, just these two styles are generally sufficient for most needs.<\/p>\n\n<h2 id=\"implementation-methods\">Implementation methods<\/h2>\n<p>There are several established solutions for implementing and dynamically switching between themes in Qt. This article focuses on the two most common methods: <strong>Source Code<\/strong> and <strong>QSS files<\/strong>.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260320\\welsim_qt_theme_options.png\" alt=\"welsim_qt_theme_options\" \/>\n<\/p>\n\n<h3 id=\"setting-qstyle-in-cpython-sourcecode\">Setting QStyle in C++\/Python Source\u00a0Code<\/h3>\n<p>This is the classic approach. Developers define different themes directly in the source code, with customized colors for each theme, and apply the themes to the QApplication via the setStyle and setPalette functions. The advantage of this method is its simplicity, speed, and ease of maintenance\u200aas developers manage styles alongside other Qt code. However, because user-defined styles require access to the source code, this technique has limited scalability. For large commercial software, especially engineering software, users rarely customize interface styles anyways, making direct QStyle configuration in source code an efficient solution. The general-purpose engineering simulation software WELSIM also adopts this approach.<\/p>\n\n<h3 id=\"setting-qstylesheet-viaqss\">Setting QStyleSheet via\u00a0QSS<\/h3>\n<p>This is a more flexible and adaptable method, implemented by loading different\u00a0.qss files combined with variable substitution (using regular expressions or setProperty). One advantage is the seperation of the style from the application functionality as\u200astyle modifications do not require recompiling the source code, and end-users can modify or add QSS files to achieve custom styles. The drawbacks include slightly reduced rendering performance for complex interfaces and a relatively cumbersome development and maintenance process that requires a proficiency in QSS syntax.<\/p>\n\n<h2 id=\"light-theme-vs-darktheme\">Light Theme vs. Dark\u00a0Theme<\/h2>\n<p>Light and dark are the two primary color schemes for multi-style development. The light style is similar to the operating system\u2019s native display, so the main task in developing a multi-theme interface is implementing the dark theme. These two themes can be switched on demand, much like the map system in a car\u2019s central display where it\u2019s a\u200alight background during the day and dark background at night. Dark-themed desktop software is becoming increasingly popular because it is eye-friendly, For users of large-scale engineering software who spend extended periods viewing screens, dark interfaces effectively reduce eye strain.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260320\\welsim_qt_chart_light_dark.png\" alt=\"welsim_qt_chart_light_dark\" \/>\n<\/p>\n\n<p>Many developers mistakenly believe dark mode is a simple color inversion. In reality, directly flipping white background\/black text to black background\/white text causes visual fatigue due to extreme contrast and a halo effect. Below are the recommended color schemes for light and dark themes:<\/p>\n\n<h3 id=\"dark-theme\">Dark Theme<\/h3>\n<p><strong>Background<\/strong>: Avoid pure black (#000000); use dark gray (e.g., #121212 or #1E1E1E) for depth through shadows.\n<strong>Layout<\/strong>: Follow the \u201clighter is closer\u201d principle for persepective. The base background is darkest, while pop-ups or floating dialogs should be slightly lighter.\n<strong>Text<\/strong>: Avoid pure white (#FFFFFF); use off-white or light gray (e.g., #E0E0E0) to reduce glare.<\/p>\n\n<h3 id=\"light-theme\">Light Theme<\/h3>\n<p><strong>Background<\/strong>: Choose a very light gray (e.g., #F5F5F5) as the primary background, reserving pure white for editing or core content areas.\n<strong>Contrast<\/strong>: Use subtle borders rather than large shadows to distinguish modules.\n<strong>Color Balance<\/strong>: Ensure accent colors (status bars, icons) have enough saturation to remain visible under bright light.<\/p>\n\n<p>Notably, Qt\u2019s built-in Fusion style is an excellent base theme with built-in light and dark variants; developers can directly use Fusion as a development template.<\/p>\n\n<h2 id=\"icons\">Icons<\/h2>\n<p>Background color changes may render existing icons incompatible (e.g., icons designed for light themes become lose contrast on dark backgrounds). Qt provides solutions for multi-style icons, with three common methods:<\/p>\n<ol>\n  <li>Using QStyle Standard\u00a0Icons\nAutomatically adapts to light\/dark themes in Fusion mode - the most convenient option. However, Qt\u2019s built-in standard icons are limited and only sufficient for small software; large applications require custom icons.<\/li>\n  <li>Dynamic SVG Color\u00a0Changing\nReplace fixed colors (e.g., fill=\u201d#000000\u201d) in SVG icons with fill=\u201dcurrentColor\u201d. Qt automatically replaces currentColor with the widget\u2019s foreground color (palette.color(QPalette::WindowText)). This only works for single-color icons; multi-color icons cannot achieve ideal results.<\/li>\n  <li>Dual Icon Sets (Light +\u00a0Dark)\nThe standard for large software. Despite needing to create and maintain two icon sets, it is the most efficient method, supporting complex and high-quality icons. This is the approach used for icons in WELSIM\u2019s light and dark styles.<\/li>\n<\/ol>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260320\\welsim_icons_light_dark.png\" alt=\"welsim_icons_light_dark\" \/>\n<\/p>\n\n<p>When using two sets of icon themes, determine whether the application\u2019s current theme is dark. If it is, apply the dark icons; otherwise, use the light icons. There are several ways to detect a dark theme; for Qt 6.5 and above, you can use the following method:<\/p>\n\n<p><code class=\"language-plaintext highlighter-rouge\">\nbool isDark() {\u00a0\n\u00a0  return qApp-&gt;styleHints()-&gt;colorScheme() == Qt::ColorScheme::Dark;\u00a0\n}\n<\/code><\/p>\n\n<p>Dynamically load icons in updateIcon() function.<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>void updateIcon() {\u00a0\n\u00a0QString path = isDark()\u00a0? \":\/icons\/icon_dark.svg\"\u00a0: \":\/icons\/icon_light.svg\";\u00a0\n\u00a0ui-&gt;button-&gt;setIcon(QIcon(path));\u00a0\n}\n<\/code><\/pre><\/div><\/div>\n\n<p>Place updateIcon() in the changeEvent(QEvent *e) slot function. Capture system theme changes via e-&gt;type() == QEvent::PaletteChange or e-&gt;type() == QEvent::StyleChange.<\/p>\n\n<h2 id=\"opengl-rendering-widgets\">OpenGL Rendering Widgets<\/h2>\n<p>Many large applications include OpenGL-based rendering widgets where Qt\u2019s default QWidget theme settings do not automatically apply. Manual synchronization is required:<\/p>\n<ul>\n  <li>Set the renderer\u2019s background color to match the QWidget background.<\/li>\n  <li>Configure canvas background and drawing colors.<\/li>\n<\/ul>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260320\\welsim_qt_chart_light_dark.png\" alt=\"welsim_qt_chart_light_dark\" \/>\n<\/p>\n\n<p>Taking a VTK-implemented chart as an example, synchronizing the 2D plotting area requires setting the renderer background, chart background, and axis colors, then updating the renderer.<\/p>\n\n<p>The source code for theme synchronization is shown below.<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>void myWelSimChartPlot::syncVtkThemeWithQtDark(QWidget* qtWidget)\n{\n\u00a0  vtkRenderWindow* renderWindow = this-&gt;renderWindow();\n\u00a0  vtkRendererCollection* renderers = renderWindow\u00a0? renderWindow-&gt;GetRenderers()\u00a0: nullptr;\n\u00a0  vtkRenderer* renderer = renderers\u00a0? renderers-&gt;GetFirstRenderer()\u00a0: nullptr;\n\u00a0  if (!qtWidget ||\u00a0!renderer ||\u00a0!renderWindow) return;\n   const QPalette palette = qtWidget-&gt;palette();\n\u00a0  const QColor bgColor = palette.color(QPalette::Base);\n\u00a0  const QColor fgColor = palette.color(QPalette::WindowText);\n   renderer-&gt;SetBackground(qColorToVtk(bgColor));\n   vtkColor4ub color;\n\u00a0  color.Set(bgColor.red(), bgColor.green(), bgColor.blue(), bgColor.alpha());\n\u00a0  this-&gt;chart()-&gt;GetBackgroundBrush()-&gt;SetColor(color);\n   int axisIDs[4] = { vtkAxis::BOTTOM, vtkAxis::TOP, vtkAxis::LEFT, vtkAxis::RIGHT };\n\u00a0  for (unsigned int axisIndex = 0; axisIndex &lt; 4; ++axisIndex)\n\u00a0  {\n\u00a0    int axisID = axisIDs[axisIndex];\n\u00a0    vtkAxis* axis = this-&gt;chart()-&gt;GetAxis(axisID);\n\u00a0    if (!axis) { assert(0); continue; }\n     axis-&gt;GetTitleProperties()-&gt;SetColor(qColorToVtk(fgColor));\n\u00a0    axis-&gt;GetLabelProperties()-&gt;SetColor(qColorToVtk(fgColor));\n\u00a0    axis-&gt;GetGridPen()-&gt;SetColorF(qColorToVtk(borderColor));\n\u00a0    axis-&gt;GetPen()-&gt;SetColorF(qColorToVtk(fgColor));\n\u00a0  }\n\u00a0  renderWindow-&gt;Render();\n}\n<\/code><\/pre><\/div><\/div>\n\n<p>In addition to the 2D drawing window, OpenGL-driven 3D windows can also be configured with corresponding color themes. However, in actual product design, this is often unnecessary because 3D windows provide their own color schemes. As shown in the figure, WELSIM\u2019s 3D rendering window supports three background options: blue-white gradient, black, and white. Users can customize the style and color of the 3D OpenGL rendering window to fit their needs.<\/p>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260320\\welsim_qt_3dview_dark.png\" alt=\"welsim_qt_3dview_dark\" \/>\n<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260320\\welsim_qt_3dview_light.png\" alt=\"welsim_qt_3dview_light\" \/>\n<\/p>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>Nowadays, for any well-established large-scale engineering software, supporting multiple themes has become an essential feature. At the very least, the software should include both Light and Dark modes. The core challenge lies in the implementation of the Dark theme because although the technical difficulty is not necessarily high, it involves a vast amount of meticulous development and testing. This takes significant development time as well as long-term optimization and maintenance. If the existing codebase contains local style modifications, such as setStyle or setStyleSheet functions, they must be updated accordingly. From a maintenance perspective, it is best to remove those local styling snippets and instead allow a global style manager to govern the entire software interface.<\/p>\n\n<hr \/>\n<p><em>WELSIM and its author are not affiliated with Qt or the Qt development team\/organization. All open-source software names and images referenced herein are for technical blog and software usage reference only.<\/em><\/p>\n\n","pubDate":"Fri, 20 Mar 2026 00:00:00 +0000","link":"https:\/\/welsim.com\/2026\/03\/20\/multi-style-interface-for-qt-based-desktop-software.html","guid":"https:\/\/welsim.com\/2026\/03\/20\/multi-style-interface-for-qt-based-desktop-software.html"},{"title":"Parameters in hyperelastic model curve\u00a0fitting","description":"<p>Many tasks in finite element analysis require curve fitting. Especially in materials engineering, when only experimental test data is available, engineers must perform curve fitting to determine the parameters in a given numerical model. Common types of material curve fitting include hyperelastic, plastic, viscous, core loss materials, and more.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_curvefitter_demo_ogden3.png\" alt=\"welsim_curvefitter_demo_ogden3\" \/>\n<\/p>\n\n<p>Unlike other types of curve fitting, curve fitting for finite element material models requires both a small error and physically valid fitted parameters; furthermore, these parameters must be conducive to convergence in subsequent nonlinear finite element computation. As a result, there are high standards placed on the algorithms and details of parameter fitting.<\/p>\n\n<p>Rarely do articles discuss the parameters, initial values, and reasonable bounds for hyperelastic model parameters despite their importance when implementing hyperelastic model curve fitting and verifying the rationality of fitted parameters. From a development perspective, this article discusses how to better perform curve fitting for hyperelastic material models, with a particular focus on setting parameter bounds and initial values, as well as identifying the characteristics of reasonable parameters.<\/p>\n\n<p>Due to the large number of hyperelastic models and order-dependent variation, this article describes the computational details of each hyperelastic model in separate sections to avoid confusion.<\/p>\n\n<h2 id=\"1-neo-hookean\">1. neo-Hookean<\/h2>\n<p>The neo-Hookean model is first because it is one of the most simple and classic hyperelastic models. Many other models can be simplified to the neo-Hookean model under specific parameter conditions. Its strain energy density function W is expressed as:<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_eqn_neo_hookean.png\" alt=\"welsim_mateditor_eqn_neo_hookean\" \/>\n<\/p>\n\n<p>where \u03bc is the shear modulus. During curve fitting computation, the shear modulus must be greater than zero, i.e., \u03bc&gt;0. The initial value is set to \u03bc0\u200b=E\/3, where Young\u2019s modulus E can be obtained from the slope of the stress-strain curve near the origin (strain &lt; 5%).<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_curvefit_neohookean.png\" alt=\"welsim_mateditor_curvefit_neohookean\" \/>\n<\/p>\n\n<p>To check for physical validity after parameter fitting, you can refer below for the approximate correspondence between common hyperelastic materials and \u03bc:<\/p>\n\n<table>\n  <tbody>\n    <tr>\n      <td><strong>Material Type<\/strong><\/td>\n      <td><strong>Shear Modulus \u03bc (MPa)<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>Extra-soft Rubber<\/td>\n      <td>0.3 ~ 0.5<\/td>\n    <\/tr>\n    <tr>\n      <td>Medium-hardness Rubber<\/td>\n      <td>1.0 ~ 1.5<\/td>\n    <\/tr>\n    <tr>\n      <td>Hard Rubber<\/td>\n      <td>3.0 ~ 5.0<\/td>\n    <\/tr>\n    <tr>\n      <td>Biological Soft Tissue<\/td>\n      <td>0.01 ~ 0.1<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>A fitted parameter \u03bc that differs significantly from the uniaxial tension data indicates that the material may exhibit a strong second strain invariant effect, in which the Mooney-Rivlin or other suitable models should be used instead.<\/p>\n\n<h2 id=\"2-mooney-rivlin\">2. Mooney-Rivlin<\/h2>\n<p>The Mooney-Rivlin model is another one of the most commonly used hyperelastic models in engineering analysis. It is a direct extension of the neo-Hookean model and is characterized by its simple and flexible form. If the neo-Hookean is considered the entry-level model in hyperelasticity, then the Mooney-Rivlin would be the standard model for handling small-to-moderate deformations (100%-200% strain). Its simple mathematical form and linear dependence on material constants allows it to converge easily in Finite Element Analysis (FEA) calculations.<\/p>\n\n<p>Depending on the order, the Mooney-Rivlin model has several different forms with varying amounts of parameters, the most complex being the 9-parameter model. This section uses the 9-parameter Mooney-Rivlin model as an example to discuss parameter ranges and initial value settings. Its strain energy density function W includes all combinations from linear to cubic terms:<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_eqn_mooney_rivlin9.png\" alt=\"welsim_mateditor_eqn_mooney_rivlin9\" \/>\n<\/p>\n\n<p>Physically, the shear modulus \u03bc&gt;0. Therefore, \u03bc=2(C10\u200b+C01\u200b)&gt;0. The most robust constraint for practical calculations is C10\u200b&gt;0 and C01\u200b\u22650. In many rubber materials, C10\u200b is the dominant term, and C01\u200b is relatively small; C11\u200b is also usually positive. The third-order parameter C30\u200b\u22650. C03\u200b, C21\u200b, C12\u200b can capture the sharp stiffening at extremely large deformations (strain &gt; 400%) and are generally 3\u20134 orders of magnitude smaller than the first-order parameters.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_curvefit_mr9.png\" alt=\"welsim_mateditor_curvefit_mr9\" \/>\n<\/p>\n\n<p>Regarding initial conditions, C10\u200b=0.9\u00d7(\u03bc0\u200b\/2), C01\u200b=0.1\u00d7(\u03bc0\u200b\/2), with the initial shear modulus \u03bc0\u200b=E\/3. The initial values for C11\u200b, C20\u200b, C02\u200b, C30\u200b, C21\u200b are often chosen to be small, typically 0.1% of C10\u200b. The initial values for C12\u200b and C03\u200b can be set to zero. For most synthetic rubbers (e.g., NBR, EPDM, Neoprene), the parameters generally follow the order-of-magnitude rules below:<\/p>\n\n<table>\n  <tbody>\n    <tr>\n      <td><strong>Order Classification<\/strong><\/td>\n      <td><strong>Parameter Symbol<\/strong><\/td>\n      <td><strong>Typical Value Range (MPa)<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>1st-order (Linear)<\/td>\n      <td>C10\u200b,C01<\/td>\n      <td>\u200b0.1 ~ 2.0<\/td>\n    <\/tr>\n    <tr>\n      <td>2nd-order (Transition)<\/td>\n      <td>C20\u200b,C11\u200b,C02<\/td>\n      <td>\u200b-0.2 ~ 0.2<\/td>\n    <\/tr>\n    <tr>\n      <td>3rd-order (Stiffening)<\/td>\n      <td>C30\u200b,C21\u200b,C12\u200b,C03<\/td>\n      <td>\u200b-0.05 ~ 0.1<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>The Mooney-Rivlin model has its limitations. When rubber is stretched to its limit (molecular chains fully extended), the stress rises sharply (the \u201cupturn\u201d phenomenon). The Mooney-Rivlin model cannot account for this stiffening at high strains; the Ogden or Gent model is recommended when simulating extremely large deformations (strain &gt; 300%). If the experimental data is not comprehensive, a more robust model with fewer parameters is advised, such as the Yeoh model or the 5-parameter Mooney-Rivlin model.<\/p>\n\n<h2 id=\"3-yeoh\">3. Yeoh<\/h2>\n<p>The Yeoh hyperelastic model is known for its simplicity and stability. It discards the second invariant I2\u200b (terms like C01\u200b), which is highly susceptible to experimental error, retaining only the first invariant I1\u200b. Therefore, it is more robust than the Mooney-Rivlin model when fitting large-deformation data. The strain energy density function W is as follows:<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_eqn_yeoh.png\" alt=\"welsim_mateditor_eqn_yeoh\" \/>\n<\/p>\n\n<p>Common Yeoh models are 1st to 3rd-order, with 1 to 3 parameters respectively. During fitting, C10\u200b&gt;0 is required since the material loses shear resistance and crashes the simulation immediately if C10\u200b\u22640. C20\u200b is usually negative; its magnitude is not too large and can be constrained to be greater than 1% of C10\u200b. C30\u200b is positive and is used to capture the stiffening at large strain.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_curvefit_yeoh3.png\" alt=\"welsim_mateditor_curvefit_yeoh3\" \/>\n<\/p>\n\n<p>The initial value settings are relatively simple: the initial value of C10\u200b is E\/6, where Young\u2019s modulus E is the slope of the test data at small deformations. C20\u200b=\u22120.1\u00d7C10\u200b, C30\u200b=0.01\u00d7C10\u200b.<\/p>\n\n<p>The parameters of the Yeoh model for common materials are as follows:<\/p>\n\n<table>\n  <tbody>\n    <tr>\n      <td><strong>Material Type\/Hardness<\/strong><\/td>\n      <td><strong>C10\u200b (MPa)<\/strong><\/td>\n      <td><strong>C20\u200b (MPa)<\/strong><\/td>\n      <td><strong>C30\u200b (MPa)<\/strong><\/td>\n      <td><strong>Description<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>Ultra-soft Silicone\/Gel<\/td>\n      <td>0.01 ~ 0.1<\/td>\n      <td>\u20130.001 ~ -0.01<\/td>\n      <td>0.0001 ~ 0.01<\/td>\n      <td>Very low initial modulus, stiffening occurs late.<\/td>\n    <\/tr>\n    <tr>\n      <td>Natural Rubber (40A-50A)<\/td>\n      <td>0.2 ~ 0.5<\/td>\n      <td>\u20130.02 ~ -0.1<\/td>\n      <td>0.01 ~ 0.05<\/td>\n      <td>Good ductility, obvious plateau in the mid-curve.<\/td>\n    <\/tr>\n    <tr>\n      <td>Industrial-grade Rubber (60A-70A)<\/td>\n      <td>0.6 ~ 1.2<\/td>\n      <td>\u20130.1 ~ -0.5<\/td>\n      <td>0.1 ~ 0.5<\/td>\n      <td>Medium stiffness, commonly used for tire sidewalls or seals.<\/td>\n    <\/tr>\n    <tr>\n      <td>High-hardness Elastomer (80A+)<\/td>\n      <td>1.5 ~ 5.0<\/td>\n      <td>\u20130.5 ~ -2.0<\/td>\n      <td>0.5 ~ 2.0<\/td>\n      <td>Stiffening occurs very early, curve is steep.<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<h2 id=\"4-polynomial\">4. Polynomial<\/h2>\n<p>The Polynomial hyperelastic model is also based on the power series expansion of the strain energy density function W with respect to the invariants I1\u200b and I2\u200b. It is one of the most widely used frameworks in hyperelasticity theory, and many models (Mooney-Rivlin, Yeoh, Neo-Hookean) are essentially its special cases. The general strain energy density function W is expressed as:<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_eqn_polynominal.png\" alt=\"welsim_mateditor_eqn_polynominal\" \/>\n<\/p>\n\n<p>where N is the order of the model. Common polynomial models are 1st to 3rd-order, corresponding to 2, 5, and 9 parameters. Like the Mooney-Rivlin model, during fitting, it is necessary for C10\u200b&gt;0 and C10\u200b&gt;\u2223C01\u200b\u2223. C30\u200b is also usually required to be positive. Generally, the higher the order, the smaller the magnitude of the values. The reasonable parameter ranges for hyperelastic materials are shown below.<\/p>\n\n<table>\n  <tbody>\n    <tr>\n      <td><strong>Parameter Category<\/strong><\/td>\n      <td><strong>Parameter Item<\/strong><\/td>\n      <td><strong>Typical Range (MPa)<\/strong><\/td>\n      <td><strong>Physical Behavior Description<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>Base Modulus<\/td>\n      <td>C10<\/td>\n      <td>\u200b0.1 ~ 0.6<\/td>\n      <td>Dominates small-to-medium deformation stiffness, usually positive.<\/td>\n    <\/tr>\n    <tr>\n      <td>Shear Correction<\/td>\n      <td>C01\u200b<\/td>\n      <td>0.01 ~ 0.1<\/td>\n      <td>Corrects shear behavior, usually positive.<\/td>\n    <\/tr>\n    <tr>\n      <td>Mid-range Adjustment<\/td>\n      <td>C20<\/td>\n      <td>\u200b-0.05 ~ 0.05<\/td>\n      <td>Controls slope change in the mid-curve, often negative.<\/td>\n    <\/tr>\n    <tr>\n      <td>Large-deformation Stiffening<\/td>\n      <td>C30<\/td>\n      <td>\u200b0.001 ~ 0.01<\/td>\n      <td>Controls the upturn stiffening at very high strains, must be positive.<\/td>\n    <\/tr>\n    <tr>\n      <td>Coupling Terms<\/td>\n      <td>C11\u200b,C02<\/td>\n      <td>\u200b-0.01 ~ 0.01<\/td>\n      <td>Cross-effects between I1\u200b and I2\u200b, usually close to zero.<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>For initial value settings, set C10\u200b=E\/6. C20\u200b=\u22120.1\u00d7C10\u200b, C30\u200b=0.01\u00d7C10\u200b or smaller. Although the value of C30\u200b is small, its high power amplifies its impact on the end of the curve.<\/p>\n\n<h2 id=\"5-arruda-boyce\">5. Arruda-Boyce<\/h2>\n<p>The Arruda-Boyce model is unique in hyperelastic material simulation, and it is constructed based on statistical mechanics (molecular chain network theory). The strain energy density function W is expressed as:<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_eqn_arruda_boyce.png\" alt=\"welsim_mateditor_eqn_arruda_boyce\" \/>\n<\/p>\n\n<p>A key feature of this model is its low requirement for test data, and uniaxial data alone is sufficient to start. Unlike polynomial models that require multi-axial data to determine parameters, the Arruda-Boyce model\u2019s parameters have clear physical definitions, in which relatively accurate \u03bc and \u03bbm\u200b can usually be obtained from the high-quality uniaxial tension data.<\/p>\n\n<p>The value range for the initial shear modulus \u03bc is straightforward; it must be greater than 0 and lie between 0.1~5 MPa, with common values for rubber materials ranging from 0.5~1.5 MPa. \u03bbm\u200b must be greater than and typically limited to [1.1, 20]. The model becomes extremely stiff when \u03bbm\u200b is too close to 1, leading to highly unstable numerical calculations. For most industrial rubbers, setting \u03bbm\u200b between 3.0 and 7.0 usually covers most working conditions.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_curvefit_arruda_boyce.png\" alt=\"welsim_mateditor_curvefit_arruda_boyce\" \/>\n<\/p>\n\n<p>Initial value determination is also straightforward: set \u03bc=E\/3. \u03bbm\u200b=5 is a robust starting point.<\/p>\n\n<p>Typically, the Arruda-Boyce parameters correspond to rubber materials as follows:<\/p>\n\n<table>\n  <tbody>\n    <tr>\n      <td><strong>Material<\/strong><\/td>\n      <td><strong>\u03bc (MPa)<\/strong><\/td>\n      <td><strong>\u03bbm<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>Soft Rubber (Shore 30A - 40A)<\/td>\n      <td>0.3 ~ 0.6<\/td>\n      <td>5.0 ~ 8.0<\/td>\n    <\/tr>\n    <tr>\n      <td>Medium-hardness (Shore 50A - 60A)<\/td>\n      <td>1.0 ~ 2.5<\/td>\n      <td>3.0 ~ 5.0<\/td>\n    <\/tr>\n    <tr>\n      <td>Hard Rubber (Shore 70A - 80A)<\/td>\n      <td>3.0 ~ 8.0<\/td>\n      <td>1.5 ~ 2.5<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<h2 id=\"6-blatz-ko\">6. Blatz-Ko<\/h2>\n<p>The Blatz-Ko model is a simple model used to simulate foams and porous materials. The most commonly used form contains only one parameter, the shear modulus \u03bc.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_eqn_blatz_ko.png\" alt=\"welsim_mateditor_eqn_blatz_ko\" \/>\n<\/p>\n\n<p>Like other hyperelastic models, the shear modulus must be greater than zero. Poisson\u2019s ratio \u03bd is fixed as a theoretical property of this model is that its effective Poisson\u2019s ratio is locked at approximately 0.25. This means the material is assumed to shrink significantly in volume when compressed, rather than expanding sideways like ordinary rubber. Do not use the Blatz-Ko model for solid rubber (Poisson\u2019s ratio near 0.5, incompressible).<\/p>\n\n<p>As long as the Blatz-Ko model ensures that the shear modulus \u03bc is positive (\u03bc&gt;0) and the material is indeed a compressible foam, fitting is usually straightforward.<\/p>\n\n<p>Since Poisson\u2019s ratio \u03bd is often fixed at 0.25, according to the linear elastic conversion relationship: \u03bc = E\/[2(1+\u03bd)] = E\/2.5 = 0.4E. The initial value can be set to 0.4E.<\/p>\n\n<p>Typically, the shear modulus corresponds to the materials as follows:<\/p>\n\n<table>\n  <tbody>\n    <tr>\n      <td><strong>Material Type<\/strong><\/td>\n      <td><strong>\u03bc Value Range (MPa)<\/strong><\/td>\n      <td><strong>Description<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>Ultra-light Polyurethane Foam<\/td>\n      <td>0.05 ~ 0.5<\/td>\n      <td>Extremely low density, highly compressible.<\/td>\n    <\/tr>\n    <tr>\n      <td>Medium-density Foamed Rubber<\/td>\n      <td>0.5 ~ 2.0<\/td>\n      <td>Common for shock pads and packaging.<\/td>\n    <\/tr>\n    <tr>\n      <td>High-hardness Closed-cell Foam<\/td>\n      <td>2.0 ~ 10.0<\/td>\n      <td>Structural support foam, high stiffness.<\/td>\n    <\/tr>\n    <tr>\n      <td>Solid Compressible Rubber<\/td>\n      <td>10.0+<\/td>\n      <td>Special synthetic rubbers with voids.<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<h2 id=\"7-gent\">7. Gent<\/h2>\n<p>The Gent model is a physically based hyperelastic model, similar in behavior to the Arruda-Boyce model. Its greatest advantage is its simple form, which can effectively capture the nonlinear behavior of polymer chains reaching their limiting extension length using only two constants. The mathematical form of the Gent model is a logarithmic function, and the computational cost for curve fitting is lower than that of the Arruda-Boyce model.<\/p>\n\n<p>The Gent model has only two core parameters: \u03bc (initial shear modulus) and Jm\u200b (limiting invariant). Its strain energy density function is defined as:<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_eqn_gent.png\" alt=\"welsim_mateditor_eqn_gent\" \/>\n<\/p>\n\n<p>The parameter \u03bc must be greater than 0; Jm\u200b must be greater than the maximum measured value of I1\u200b\u22123. If Jm\u200b is too small, causing (I1\u200b\u22123)\/Jm \u200b\u2265 1, the logarithm becomes undefined, so the calculation will fail.<\/p>\n\n<p>The initial value of the shear modulus \u03bc is simply determined by \u03bc=E\/3. Mathematically, Jm\u200b defines the upper limit for I1\u200b\u22123, so its initial value must be slightly larger than the invariant value corresponding to the maximum deformation observed in the experiment. To determine this, find the maximum elongation ratio \u03bbmax\u200b in the experimental data and calculate the corresponding I1\u200b. Note that the formula for I1\u200b varies slightly depending on the type of experiment. The initial value of Jm\u200b is set to 1.2\u00d7(I1_max\u200b\u22123).<\/p>\n\n<p>The empirical parameters for materials of different hardness are as follows:<\/p>\n\n<table>\n  <tbody>\n    <tr>\n      <td><strong>Material Hardness\/Type<\/strong><\/td>\n      <td><strong>Shear Modulus \u03bc (MPa)<\/strong><\/td>\n      <td><strong>Limiting Constant Jm<\/strong><\/td>\n      <td><strong>Description<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>Ultra-soft Gel\/Soft Tissue<\/td>\n      <td>0.01 ~ 0.15<\/td>\n      <td>0 ~ 150<\/td>\n      <td>Extremely stretchable, stiffens very late.<\/td>\n    <\/tr>\n    <tr>\n      <td>Natural Rubber (40A)<\/td>\n      <td>0.3 ~ 0.6<\/td>\n      <td>30 ~ 80<\/td>\n      <td>Excellent ductility, high stiffening point.<\/td>\n    <\/tr>\n    <tr>\n      <td>Industrial Rubber (60A)<\/td>\n      <td>1.0 ~ 2.0<\/td>\n      <td>10 ~ 25<\/td>\n      <td>Medium stiffness, stiffens rapidly after 3\u20134x stretch.<\/td>\n    <\/tr>\n    <tr>\n      <td>High-hardness Elastomer (80A)<\/td>\n      <td>3.0 ~ 7.0<\/td>\n      <td>2 ~ 8<\/td>\n      <td>Stiffens within a very short distance, increased brittleness.<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<h2 id=\"8-ogden\">8. Ogden<\/h2>\n<p>The Ogden hyperelastic model is one of the most powerful and flexible hyperelastic models available today. It is constructed directly based on the principal stretches \u03bbi\u200b. The strain energy density function of the Ogden model adopts a series superposition form expanded by order n, where n represents the model order.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_eqn_ogden.png\" alt=\"welsim_mateditor_eqn_ogden\" \/>\n<\/p>\n\n<ul>\n  <li>1st-order Ogden: 2 parameters, suitable for small deformations and simple rubber materials, highest computational efficiency.<\/li>\n  <li>2nd-order Ogden: 4 parameters, balances accuracy and efficiency, mainstream for general industrial simulations.<\/li>\n  <li>3rd-order Ogden: 6 parameters, suitable for large-deformation, highly nonlinear complex elastomers, highest fitting accuracy. The Ogden model maintains solid predictive capability even when strains reach 700% or higher.<\/li>\n<\/ul>\n\n<p>The Ogden model has relatively more parameters, and higher-order versions require combined fitting of multiple sets of test data, such as uniaxial, pure shear, and equibiaxial, to prevent non-physical solutions and overfitting. Parameters must satisfy thermodynamic stability constraints, and reasonable bounds must be set during fitting. For example, set \u03bc1\u200b&gt;\u2223\u03bc2\u200b\u2223&gt;\u2223\u03bc3\u200b\u2223, 1&lt;\u03b11\u200b&lt;10, \u221210&lt;\u03b12\u200b&lt;10, \u221215&lt;\u03b13\u200b&lt;15.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260201\\welsim_mateditor_curvefit_ogden3.png\" alt=\"welsim_mateditor_curvefit_ogden3\" \/>\n<\/p>\n\n<p>Initial values for curve fitting are often set as follows: \u03b11\u200b=2, \u03b12\u200b=2, \u03b13\u200b=6, \u03bc1\u200b=0.6\u03bc0\u200b, \u03bc2\u200b=0.1\u03bc0\u200b, \u03bc3\u200b=0.05\u03bc0\u200b, where the initial shear modulus \u03bc0\u200b=E\/3. Young\u2019s modulus E is obtained from the slope of the test data at low strains.<\/p>\n\n<p>The empirical data fitted by common Ogden hyperelastic models is as follows:<\/p>\n\n<table>\n  <tbody>\n    <tr>\n      <td><strong>Material Type<\/strong><\/td>\n      <td><strong>Parameter<\/strong><\/td>\n      <td><strong>Typical Value Range<\/strong><\/td>\n      <td><strong>Description<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>Soft Rubber \/ Silicone<\/td>\n      <td>\u03bc<\/td>\n      <td>0.01 ~ 0.5 MPa<\/td>\n      <td>Low modulus, gentle curve.<\/td>\n    <\/tr>\n    <tr>\n      <td>\u00a0<\/td>\n      <td>\u03b1<\/td>\n      <td>-10 ~ 10<\/td>\n      <td>Usually includes positive and negative exponents to fit tension\/compression symmetry.<\/td>\n    <\/tr>\n    <tr>\n      <td>Industrial Hard Rubber<\/td>\n      <td>\u03bc<\/td>\n      <td>1.0 ~ 10.0 MPa<\/td>\n      <td>High stiffness, large initial slope from combined \u03bc.<\/td>\n    <\/tr>\n    <tr>\n      <td>\u00a0<\/td>\n      <td>\u03b1<\/td>\n      <td>1.5 ~ 20<\/td>\n      <td>Large positive exponents to simulate severe stiffening at large deformations.<\/td>\n    <\/tr>\n    <tr>\n      <td>Biological Soft Tissue<\/td>\n      <td>\u03bc<\/td>\n      <td>0.001 ~ 0.1 MPa<\/td>\n      <td>Extremely soft, highly sensitive to small deformations.<\/td>\n    <\/tr>\n    <tr>\n      <td>\u00a0<\/td>\n      <td>\u03b1<\/td>\n      <td>10 ~ 50<\/td>\n      <td>Exponents are usually very large to simulate the \u201clock-up\u201d effect of fibrous connective tissue.<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>Although curve fitting has relatively mature numerical methods, fitting material parameters for finite element computation requires the consideration of many physical constraints, ensuring that the parameters are conducive to convergence in subsequent finite element calculations. Oftentimes due to the lack of test data, curve fitting for hyperelastic materials becomes complex which places high demand on both developers and users.<\/p>\n\n<p>The main test data required for hyperelastic material model fitting includes uniaxial tension, equibiaxial tension, and pure shear deformation data. The author discusses this in detail in the article \u201c<a href=\"https:\/\/welsim.com\/2020\/07\/23\/hyperelastic-material-models-and-curve-fitting.html\">Hyperelastic Material Models and Curve Fitting<\/a>\u201d.<\/p>\n\n<p>Currently, WELSIM can accurately fit hyperelastic model curves. The independent and free engineering software MatEditor and CurveFitter also feature the aforementioned curve fitting capabilities. Users can download and use this software directly.<\/p>\n\n<hr \/>\n","pubDate":"Sun, 01 Feb 2026 00:00:00 +0000","link":"https:\/\/welsim.com\/2026\/02\/01\/parameters-in-hyperelastic-model-curve-fitting.html","guid":"https:\/\/welsim.com\/2026\/02\/01\/parameters-in-hyperelastic-model-curve-fitting.html"},{"title":"Generate the contact and boundary conditions for the CalculiX\u00a0solver","description":"<p>CalculiX is a well-known open-source Finite Element Analysis software that focuses on structural mechanics (static, dynamic, nonlinear) and thermal analysis. It is suitable for scientific research, teaching, and small-to-medium engineering scenarios.\u00a0<\/p>\n\n<p>The core advantages of CalculiX are as follows:\u00a0<\/p>\n\n<p>Open-Source and Free. It is licensed under the GNU General Public License (GPL) which allows individuals, enterprises, and research institutions to freely use, modify, and distribute the source code.\u00a0<\/p>\n\n<p>INP File Format Compatibility. It supports the INP input file format used by Abaqus. Most Abaqus models can be directly imported into CalculiX for solving, which lessens the learning curve for users.\u00a0<\/p>\n\n<p>Lightweight Solver. The solver features streamlined code and requires less hardware resources compared to commercial software, making it ideal for fast computation of small-to-medium scale models.\u00a0<\/p>\n\n<p>Seamless Third-Party Integration. It offers excellent compatibility with third-party preprocessors and postprocessors, facilitating the integration of pre\/post-processing tools with the solver.<\/p>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_finite_element_thermal_exhaust_manifold.png\" alt=\"welsim_finite_element_thermal_exhaust_manifold\" \/>\n<\/p>\n\n<p>In a previous article titled <a href=\"https:\/\/welsim.com\/2024\/03\/19\/generate_calculix_solver_files_using_welsim.html\">Generate CalculiX solver files using WELSIM<\/a>, the author introduced methods to quickly generate CalculiX input scripts. Currently, WELSIM serves as a robust preprocessor to generate input files for CalculiX and greatly simplifies the process of performing finite element analysis with CalculiX. This article elaborates on the commands for generating contact and boundary conditions.<\/p>\n\n<h2 id=\"contact\">Contact<\/h2>\n<p>In the finite element structural analysis of multi-body systems, contact setup is an essential step. This section describes the generation of two common contact types: bonded contact and separable contact.<\/p>\n\n<h3 id=\"bonded-contact\">Bonded Contact<\/h3>\n<p>Bonded contact is a contact condition used to simulate a fully rigid connection between multiple bodies. It is applicable to scenarios where there is no relative sliding, separation, or gaps between components (e.g., welded joints, adhesive bonds, cured interference fits, and rigid bolted connections). Bonded contact enforces identical nodal displacements across the contact interface, essentially \u201cfusing\u201d multiple independent components into a single integrated structure.<\/p>\n\n<p>The setup for bonded contact in WELSIM is shown in the figure below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_contact_bonded.png\" alt=\"welsim_calculix_contact_bonded\" \/>\n<\/p>\n\n<p>When converting to CalculiX commands, the *TIE keyword is used. The generated input commands are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>*Tie, Name=ID_15, Position tolerance=0.01, Adjust=No\nTarget_Surface_15, Master_Surface_15\n<\/code><\/pre><\/div><\/div>\n\n<p>The surface elements defined in the mesh file are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** Box_to_Box_1\n*SURFACE, TYPE=ELEMENT, NAME=Master_Surface_15       \n70, S2       63, S2       74, S2       61, S2       66, S1       69, S2\n** Box_to_Box_1*SURFACE, TYPE=ELEMENT, NAME=Target_Surface_15      \n166, S3      185, S2      160, S3      173, S2      171, S4      169, S3\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"separable-contact\">Separable Contact<\/h3>\n<p>Separable contact is a nonlinear contact condition used to simulate three interface states between multiple bodies: contact, sliding, and separation. Its core characteristic is that the contact interface only transmits normal pressure (no tensile forces) and allows free sliding or sticking in the tangential direction. It is suitable for scenarios involving dynamic contact and separation between components (e.g., gear engagement, sheet metal forming, bearing rolling, and mechanical impact). Based on friction assumptions, it can be further grouped into frictionless contact and frictional contact.<\/p>\n\n<p>The setup for separable contact in WELSIM is shown in the figure below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_contact_frictional.png\" alt=\"welsim_calculix_contact_frictional\" \/>\n<\/p>\n\n<p>When converting to CalculiX commands, the *CONTACT keyword is used. It is important to note that CalculiX requires that the master surface (also known as the independent surface) is defined using elements. The slave surface (also known as the dependent surface) can be defined using either elements or nodes.<\/p>\n\n<p>The corresponding generated CalculiX commands are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** Box_to_Box 1\n*Surface interaction, Name=SurfaceInteraction_15\n*Surface behavior, Pressure-overclosure=Hard\n*Friction 0.15\n*Contact Pair, Interaction=SurfaceInteraction_15, Type=Surface to surface\nTarget_Surface_15, Master_Surface_15\n<\/code><\/pre><\/div><\/div>\n\n<h2 id=\"boundary-conditions-in-structural-analysis\">Boundary conditions in structural analysis<\/h2>\n<p>Setting boundary conditions is a critical step in finite element analysis and a key function of preprocessing software for generating solver commands. WELSIM supports a wide range of CalculiX boundary conditions. This section demonstrates how a preprocessor generates boundary conditions for structural analysis and presents the corresponding solver commands.<\/p>\n\n<h3 id=\"constraints-or-displacement\">Constraints or Displacement<\/h3>\n<p>Displacement boundary conditions are essential (Dirichlet) boundary conditions used to constrain the nodal displacement degrees of freedom (DOFs) of a model. Their role is to restrict the rigid-body motion of the structure and simulate real-world support constraints (e.g., fixed supports, pin supports), serving as the foundational conditions for static and dynamic structural analysis. In regards to 3D models:<\/p>\n\n<p>For solid elements, translational DOFs in the X\/Y\/Z directions (Ux\/Uy\/Uz) can be constrained.<\/p>\n\n<p>For shell elements, additional rotational DOFs about the X\/Y\/Z axes (Rx\/Ry\/Rz) can be constrained.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_bc_displacement.png\" alt=\"welsim_calculix_bc_displacement\" \/>\n<\/p>\n\n<p>The corresponding generated CalculiX solver commands are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** BC Name: Displacement    \n*Boundary    ID_22, 1, 1, 1    \n*Boundary    ID_22, 2, 2, 2    \n*Boundary    ID_22, 3, 3, 3    \n*Boundary    ID_22, 6, 6, 0.523599\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"pressure\">Pressure<\/h3>\n<p>Pressure boundary conditions are surface loads applied to structural surfaces, classified as distributed loads. Their essence is to simulate engineering scenarios involving fluid pressure, contact pressure, gas loads, etc., by specifying the normal force per unit area (e.g., internal pressure in pressure vessels, wind loads, lateral soil pressure).<\/p>\n\n<p>Pressure is one of the most common boundary conditions in structural finite element analysis. The sign convention for pressure determines the load direction. Positive Pressure: The load direction points toward the interior of the surface, causing a compressive effect on the structure (e.g., internal pressure in pressure vessels). Negative Pressure: The load direction points away from the exterior of the surface, causing a tensile effect on the structure (e.g., atmospheric pressure on the outer wall of a vacuum vessel).\u00a0<\/p>\n\n<p>The pressure boundary condition setup is shown in the figure below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_bc_pressure.png\" alt=\"welsim_calculix_bc_pressure\" \/>\n<\/p>\n\n<p>The corresponding generated solver commands are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** BC Name: Pressure    \n*DLOAD    ID_20, P, 123\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"force\">Force<\/h3>\n<p>Force boundary conditions are loads applied to geometric key points, edges, or surfaces, used to simulate localized loading scenarios in engineering (e.g., bolt preload, lifting eye tension, pin forces). Force is one of the most fundamental boundary conditions in structural mechanics.<\/p>\n\n<p>However, applying force on geometric surfaces in the finite element numerical method is non-trivial. It typically involves coupling the DOFs of multiple nodes to a single reference node, which then used to distribute a concentrated load across a group of nodes (e.g., applying the force to the reference node, which is then automatically distributed to the coupled group).<\/p>\n\n<p>As shown in the figure, in the force setup of WELSIM, the user can select surfaces, edges, or points of the geometry and specify the force magnitudes in the three coordinate directions.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_bc_force.png\" alt=\"welsim_calculix_bc_force\" \/>\n<\/p>\n\n<p>The generated solver commands for the force are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>*COUPLING, REF NODE=46, SURFACE=ID_17, CONSTRAINT NAME=c17    \n*KINEMATIC    1    3\n** BC Name: Force    \n*CLOAD, OP=NEW    46, 1, 100    \n*CLOAD, OP=NEW    46, 2, 200    \n*CLOAD, OP=NEW    46, 3, 300\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"nodal-force\">Nodal Force<\/h3>\n<p>Nodal force boundary conditions are concentrated loads applied directly to single or multiple nodes. They represent the most fundamental form of load application after meshing. Nodal forces are more oriented toward direct post-meshing operations, making them suitable for refined load control or special scenario simulations.<\/p>\n\n<p>Nodal forces are loads applied directly to the mesh nodes. The total applied force is the superposition of forces based on the number of nodes selected.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_bc_nodalforce.png\" alt=\"welsim_calculix_bc_nodalforce\" \/>\n<\/p>\n\n<p>The generated solver commands are straightforward, using *CLOAD to apply loads based on the selected nodes:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** BC Name: Nodal Force    \n*CLOAD    ID_18, 1, 10    \n*CLOAD    ID_18, 2, 20    \n*CLOAD    ID_18, 3, 30\n** Nodal_Force\n*NSET, NSET=ID_18        \n82, 84, 86, 88, 95, 96, 103, 104, 107, 108,         \n111, 112, 145, 146, 147, 148, 149, 150\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"gravity\">Gravity<\/h3>\n<p>Gravity boundary conditions fall under the category of body forces, used to simulate the effect of the Earth\u2019s gravitational field on the structure. They work by assigning an inertial force proportional to the mass to each element of the model. Gravity is applicable to almost all structural analyses involving self-weight effects (e.g., building beams and slabs, mechanical components, ground-based spacecraft conditions).<\/p>\n\n<p>Gravity is essentially a body force induced by acceleration, and its magnitude is directly proportional to the mass of the elements. The setup in WELSIM is shown in the figure below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_dc_gravity.png\" alt=\"welsim_calculix_dc_gravity\" \/>\n<\/p>\n\n<p>The generated solver commands are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** DC Name: Earth Gravity    \n*Dload    Eall, Grav, 9.807, 0, 0, -1\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"rotational-velocity\">Rotational Velocity<\/h3>\n<p>Rotational velocity boundary conditions are used to simulate the scenario where a structure rotates uniformly around an axis. This condition induces centrifugal forces and Coriolis forces (which need to be considered for high-speed rotation) within the structure. Classified as inertial loads, they are widely applied in the analysis of rotating machinery (e.g., flywheels, impellers, centrifuges, turbine rotors).<\/p>\n\n<p>The input parameters include the axis of rotation, the origin of rotation, and the magnitude of the rotational velocity. The input setup is shown in the figure below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_dc_rotationalvelocity.png\" alt=\"welsim_calculix_dc_rotationalvelocity\" \/>\n<\/p>\n\n<p>The generated solver commands are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** DC Name: Rotational Velocity    \n*Dload    ID_21, CENTRIF, 100, 5, 5, 0, 0, 0, 1\n<\/code><\/pre><\/div><\/div>\n\n<h2 id=\"common-boundary-in-thermalanalysis\">Common boundary in thermal\u00a0analysis<\/h2>\n<h3 id=\"temperature\">Temperature<\/h3>\n<p>In finite element thermal analysis, temperature boundary conditions are essential (Dirichlet) boundary conditions that directly define the temperature values of specific regions of the model. They are suitable for scenarios where the surface or nodal temperatures are known (e.g., the wall of a constant-temperature water tank, components in contact with a large heat source, temperature-controlled surfaces of thermal equipment).<\/p>\n\n<p>In the heat conduction governing equation, temperature boundary conditions act as enforced constraints, directly fixing the temperature DOFs of the boundary nodes. The solver prioritizes satisfying these constraints before calculating the internal temperature field distribution. The setup for WELSIM is shown in the figure below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_bc_temperature.png\" alt=\"welsim_calculix_bc_temperature\" \/>\n<\/p>\n\n<p>The generated CalculiX solver commands are as follows,<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** BC Name: Temperature    \n*Boundary, op=New    ID_23, 11, 11, 0\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"heat-flux\">Heat Flux<\/h3>\n<p>The heat flux boundary condition is a thermal load that directly defines the heat flow rate per unit area across a solid surface. It is suitable for scenarios where the heat input or output on a surface is known (e.g., the surface of an electric heater, solar collectors, walls subjected to high-temperature gas impingement).<\/p>\n\n<p>Heat flux is a core parameter where a positive direction indicates heat flowing into the solid, and a negative direction indicates heat flowing out of the solid. The input interface is shown below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_bc_heatflux.png\" alt=\"welsim_calculix_bc_heatflux\" \/>\n<\/p>\n<p>The generated CalculiX solver commands are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** BC Name: Heat Flux    \n*Dflux    ID_24, S, 0.5\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"body-heatflux\">Body Heat\u00a0Flux<\/h3>\n<p>Body heat flux is a volumetric thermal load used to simulate heat generation or dissipation from internal heat sources within a solid. Unlike surface heat flux boundary conditions, body heat flux is applied directly to the volume elements of the model instead of acting on surfaces, making it suitable for temperature field analysis driven by internal heat sources.<\/p>\n\n<p>The unit of body heat flux in the SI system is W\/m\u00b3, where positive values indicate heat generation, and negative values indicate heat absorption. The user input interface is shown below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_dc_heat_generation.png\" alt=\"welsim_calculix_dc_heat_generation\" \/>\n<\/p>\n\n<p>The generated CalculiX solver commands are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>*DFLUX\nID_31,BF,10.\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"convection\">Convection<\/h3>\n<p>Convection boundary conditions, also known as film boundary conditions, are used to simulate convective heat transfer between a solid surface and the adjacent fluid (gas or liquid). They are one of the most commonly used boundary conditions in engineering thermal analysis, with applications in electronic device cooling, pipe heat exchange, automotive engine cooling, and other scenarios.<\/p>\n\n<p>The convection heat transfer coefficient is the core parameter characterizing the intensity of convective heat transfer, while the ambient temperature parameter refers to the temperature of the mainstream fluid far from the solid surface. The input interface in WELSIM is shown below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_bc_convection.png\" alt=\"welsim_calculix_bc_convection\" \/>\n<\/p>\n\n<p>The generated CalculiX solver commands are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** BC Name: Convection    \n*Film, op=New    \nID_29_S1, F1, 80, 123    \nID_29_S2, F2, 80, 123    \nID_29_S3, F3, 80, 123    \nID_29_S4, F4, 80, 123\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"thermal-radiation\">Thermal radiation<\/h3>\n<p>The radiation boundary condition is used to simulate heat transfer between a solid surface and the surrounding environment (potentially other solid surfaces) via thermal radiation. It is fundamentally governed by the Stefan\u2013Boltzmann law and is suitable for heat exchange scenarios in media such as vacuum or gas (e.g., spacecraft thermal control, heat dissipation from high-temperature equipment). As a nonlinear boundary condition, the heat flux is proportional to the fourth power of the temperature, requiring iterative calculations for solution.<\/p>\n\n<p>Users are required to input two parameters: emissivity (a value between 0 and 1) and the ambient temperature. The input interface is shown below.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260116\\welsim_calculix_bc_radiate.png\" alt=\"welsim_calculix_bc_radiate\" \/>\n<\/p>\n\n<p>The generated commands for the thermal radiation boundary condition are as follows:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>** BC Name: Radiation    \n*Radiate, op=New    \nID_30_S1, R1, 30, 0.9    \nID_30_S2, R2, 30, 0.9    \nID_30_S3, R3, 30, 0.9    \nID_30_S4, R4, 30, 0.9\n<\/code><\/pre><\/div><\/div>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>In finite element analysis, there is a wide variety of boundary conditions that involve not only the parameters of the conditions themselves, but also the selected elements or nodes. For preprocessing software, generating commands for various boundary conditions is a complex undertaking.<\/p>\n\n<p>WELSIM is capable of establishing a comprehensive range of boundary conditions and can quickly generate any input files required by the CalculiX solver, which can be directly used for computation. Users can leverage WELSIM as a preprocessor for CalculiX.<\/p>\n\n<p>CalculiX also supports some additional boundary conditions such as *CONSTRAINT and *EQUATION. These were not discussed in this article as they are less frequently used in standard analyses.<\/p>\n\n<p>The input file format of CalculiX is highly similar to that of Abaqus; therefore, the content described in this article can also be applied to the Abaqus solver.<\/p>\n\n<hr \/>\n\n<p><em>Disclaimer: WelSim and the author are not affiliated with CalculiX or Abaqus, and have no direct relationship with the development teams or organizations behind CalculiX and Abaqus. The use of open-source software names and images herein is solely for reference in technical blog articles and software usage guidance.<\/em><\/p>\n","pubDate":"Fri, 16 Jan 2026 00:00:00 +0000","link":"https:\/\/welsim.com\/2026\/01\/16\/generate-the-contact-and-boundary-conditions-for-the-calculix-solver.html","guid":"https:\/\/welsim.com\/2026\/01\/16\/generate-the-contact-and-boundary-conditions-for-the-calculix-solver.html"},{"title":"WELSIM 2026R1 Releases to Support Particle Generation and Enhance Electromagnetic Simulation","description":"<p>WELSIM, the general-purpose engineering simulation and analysis software, has released its latest version 2026R1 (Internal Version: 3.2). Compared to the previous version, 2026R1 comes with a host of new features and enhancements, enabling WELSIM to better support various types of engineering simulation CAE analyses, with notable improvements in particle and electromagnetic simulation capabilities.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260105\\welsim_release_2026r1.png\" alt=\"welsim_release_2026r1\" \/>\n<\/p>\n\n<h2 id=\"support-for-particle-generation\">Support for Particle Generation<\/h2>\n<p>The new version introduces particle generation from geometric models, along with the ability to adjust particle generation methods and particle density. This feature simplifies the setup of smoothed particle and molecular dynamics simulations in WELSIM.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260105\\welsim_sph_generate_particles_mesh_denser.png\" alt=\"welsim_sph_generate_particles_mesh_denser\" \/>\n<\/p>\n\n<p>WELSIM is committed to supporting open data exchange, so users can also export particle data to VTK-format files for visualization or further analysis in other software tools.<\/p>\n\n<h2 id=\"enhanced-support-for-the-openradioss-solver\">Enhanced Support for the OpenRadioss Solver<\/h2>\n<p>The latest version improves compatibility with the OpenRadioss solver, allowing WELSIM to generate more types of OpenRadioss input files. The newly added input cards include: Fabric Geometric Property \/PROP\/TYPE16, Self-contact \/INTER\/TYPE24, and the SPH Cell Command SPHCEL. Meanwhile, a wide range of new material properties have been incorporated, such as LAW6 (HYD_VISC), LAW24 (CONC), LAW25 (COMPSH), LAW58 (FABR_A), LAW73, and LAW74. MatEditor, the standalone material editing software, has been updated with the same features accordingly.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260105\\mateditor_hill_orthotropic.png\" alt=\"mateditor_hill_orthotropic\" \/>\n<\/p>\n\n<h2 id=\"enhanced-support-for-palace\">Enhanced Support for Palace<\/h2>\n<p>The new version strengthens compatibility with Palace, the open-source electromagnetic solver. WELSIM now supports more Palace solver types and fully upgrades Palace and its dependent libraries to their latest versions. On the post-processing model, the Poynting Vector result type has been added.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20260105\\welsim_em_poynting_vector.png\" alt=\"welsim_em_poynting_vector\" \/>\n<\/p>\n\n<h2 id=\"other-enhancements-and-upgrades\">Other Enhancements and Upgrades<\/h2>\n<p>With this release, WELSIM is more stable and user-friendly through optimizations to existing features.<\/p>\n\n<hr \/>\n\n<p><em>Disclaimer: WELSIM and its authors are not affiliated with OpenRadioss or Palace, nor do they have any connection with the respective development teams and organizations. The references to OpenRadioss and Palace herein are solely for informational purposes in technical blog posts and software usage guidance.<\/em><\/p>\n","pubDate":"Mon, 05 Jan 2026 00:00:00 +0000","link":"https:\/\/welsim.com\/2026\/01\/05\/welsim-2026r1-releases-to-support-particle-generation-and-enhance-electromagnetic-simulation.html","guid":"https:\/\/welsim.com\/2026\/01\/05\/welsim-2026r1-releases-to-support-particle-generation-and-enhance-electromagnetic-simulation.html"},{"title":"Compile the open-source electromagnetic simulation solver\u00a0Palace","description":"<p>Palace is a parallel finite element solver developed by AWS Labs for full-wave 3D electromagnetic simulation, released under the Apache 2.0 open-source license. This solver supports full-wave frequency\/time-domain simulation, eigenmode analysis, and parameter extraction for electrostatics\/magnetostatics. It is compatible with platforms ranging from laptops to supercomputers and supports GPU acceleration, enabling the modeling of quantum computing hardware, RF\/microwave devices, antennas, and other systems.<\/p>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20251227\\welsim_palace_logo.png\" alt=\"welsim_palace_logo\" \/>\n<\/p>\n\n<p>The author previously published a brief article introducing how to compile Palace on Windows, titled <a href=\"https:\/\/welsim.com\/2023\/11\/20\/compile-the-electromagnetic-simulation-solver-palace-in-windows.html\">Compile the electromagnetic simulation solver Palace in Windows<\/a>. Expanding upon that earlier work, this article details the compilation process more in-depth, with a particular focus on the compilation of dependent libraries. The dependent libraries discussed in this article are as follows:<\/p>\n\n<ul>\n  <li><strong>Hypre<\/strong>: A large-scale linear algebra matrix computation library, using version 2.33.<\/li>\n  <li><strong>MUMPS<\/strong>: An open-source software library for solving large-scale sparse linear systems of equations. This example uses version 5.8.1.<\/li>\n  <li><strong>ARPACK-NG<\/strong>: A library that supports complex linear matrix computations and is used for eigenvalue computation. Primarily written in Fortran, it can be compiled independently. It is necessary to manually modify parts of the source code by using the diff files provided by Palace.<\/li>\n  <li><strong>GSLib<\/strong>: Used for interpolation computations in high-order spectral elements.<\/li>\n  <li><strong>libCEED<\/strong>: A linear algebra computation management framework that supports parallel computing across various CPUs, GPUs, and clusters. This example uses version 0.12.<\/li>\n  <li><strong>MFEM<\/strong>: A flexible, efficient, and scalable finite element discretization framework used as the core solving dependency library for Palace. This example uses version 4.8.1.It is necessary to manually modify parts of the source code by using the diff files provided by Palace.<\/li>\n<\/ul>\n\n<h3 id=\"system-environment-and-compilers\">System Environment and Compilers<\/h3>\n\n<ul>\n  <li>Operating System: Windows 11, 64-bit<\/li>\n  <li>Compilers: Visual Studio 2022 Community (C++17), Intel Fortran Compiler 2022, and Intel MKL 2024.<\/li>\n  <li>Palace Version: 0.15<\/li>\n<\/ul>\n\n<h2 id=\"compiling-hypre\">Compiling Hypre<\/h2>\n<p>Hypre is an open-source high-performance parallel linear solver library developed by Lawrence Livermore National Laboratory (LLNL) designed specifically for large-scale scientific computing and engineering simulation. Its core objective is to solve large-scale sparse linear systems of equations (in the form of Ax=b) efficiently, particularly strong at handling ultra-large-scale problems in distributed memory parallel environments. Hypre natively supports MPI parallelism, enabling it to utilize the full computing power of distributed memory architectures, such as supercomputers and clusters, and easily handle linear systems with millions or even billions of degrees of freedom. This stark advantage distinguishes Hypre from smaller solvers (e.g., Eigen).<\/p>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20251227\\welsim_hypre_logo.png\" alt=\"welsim_hypre_logo\" \/>\n<\/p>\n\n<p>Compiling Hypre on Windows is simple. You can directly use the built-in CMake configuration file to generate Visual Studio project files, which will in turn produce the static library file.<\/p>\n\n<p>When configuring CMake, set the parameters as follows:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>HYPRE_WITH_MPI = ON\nHYPRE_USING_OPENMP = ON\nHYPRE_WITH_CUDA = OFF\nHYPRE_ENABLE_SYCL = OFF\nHYPRE_INSTALL_PREFIX=D:\/WelSimLLC\/CodeDV\/3rdParty\/hypre\/myInstall\nCMAKE_INSTALL_PREFIX=D:\/WelSimLLC\/CodeDV\/3rdParty\/hypre\/myInstall\n<\/code><\/pre><\/div><\/div>\n\n<p>If the compilation proceeds smoothly, then the hypre.lib static library file will be generated.<\/p>\n\n<h2 id=\"compiling-mumps\">Compiling MUMPS<\/h2>\n<p>To solve Wave Port problems, the Palace solver requires one of three direct linear algebra solvers: SuperLU, STRUMPACK, or MUMPS. MUMPS is selected as the dependent library given that the author is relatively familiar with it.<\/p>\n\n<p>MUMPS is an open-source parallel sparse direct solver library co-developed by French institutions including INRIA and CNRS. Its core objective is to solve large-scale sparse linear systems of equations (Ax=b) using the direct method. Unlike Hypre, which primarily relies on iterative methods, MUMPS computes without iteration by leveraging matrix decomposition (LU\/Cholesky) via direct methods. This approach delivers higher precision and more robustness, making it particularly well-suited for solving sparse matrix problems involving asymmetric, symmetric positive definite, or indefinite matrices.<\/p>\n\n<p>MUMPS depends on BLAS\/LAPACK (basic linear algebra libraries) and SCALAPACK (parallel linear algebra library). In this case, the dependency is the Intel MKL Library.<\/p>\n\n<p>The original version of MUMPS does not provide a compilation method for Windows. Instead, you can opt for the scivision\/mumps version available on GitHub, which offers a CMake-based compilation approach for seamless implementation. The latest version 5.8.1 was downloaded for this example.<\/p>\n\n<p>First ensure that the environment variable contains the following configuration: <code class=\"language-plaintext highlighter-rouge\">MKLTOOL= C:\\Program Files (x86)\\Intel\\oneAPI\\mkl\\latest<\/code><\/p>\n\n<p>Under CMake configuration, set the following parameters:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>MUMPS_openmp = ON\nMUMPS_parallel = OFF\n<\/code><\/pre><\/div><\/div>\n\n<p>Once the Visual Studio project files are generated, compile the project to produce all static libraries of MUMPS. The generated static libraries are illustrated in the figure below.<\/p>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20251227\\welsim_mumps_libs.png\" alt=\"welsim_mumps_libs\" \/>\n<\/p>\n\n<h2 id=\"compiling-arpack\">Compiling ARPACK<\/h2>\n<p>For eigenvalue-related computations (e.g., eigenmode calculations), Palace requires a complex-number eigenvalue solver such as SLEPc or ARPACK. In this example, ARPACK is selected as the complex-number solver for Palace.<\/p>\n\n<p>ARPACK is an open-source library for large-scale eigenvalue and eigenvector computations, co-developed by institutions including Rice University and Sandia National Laboratories. Its core objective is to efficiently compute a subset of eigenvalues and their corresponding eigenvectors for large sparse matrices. Unlike libraries such as Hypre and MUMPS, which are designed to solve linear systems of equations (Ax=b), ARPACK focuses specifically on tackling eigenvalue problems (Ax=\u03bbx or Ax=\u03bbBx).<\/p>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20251227\\welsim_arpack.png\" alt=\"welsim_arpack\" \/>\n<\/p>\n\n<p>Download ARPACK-NG from GitHub and use its built-in CMake build configuration. Ensure that the environment variable contains the entry <code class=\"language-plaintext highlighter-rouge\">MKLTOOL=C:\\Program Files (x86)\\Intel\\oneAPI\\mkl\\latest<\/code>; this allows CMake to automatically locate the BLAS and LAPACK libraries within MKL. Set the following parameters in CMake:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>ICE = ON\nEigen = ON\nBuild_SHARED_LIBS = OFF\n<\/code><\/pre><\/div><\/div>\n<p>Meanwhile, you need to make corresponding modifications to the source files based on the diff files located in the extern\/patch\/arpack-ng folder under the Palace directory. After generating the Visual Studio project files, you can directly compile the project to obtain the ARPACK static library.<\/p>\n\n<h2 id=\"compiling-gslib\">Compiling GSLib<\/h2>\n<p>GSLIB is an open-source parallel sparse communication library designed to efficiently support sparse data gather\/scatter communication and operators in parallel numerical simulation scenarios, such as the finite element method, spectral element method, and finite difference method. It greatly simplifies the development of parallel sparse communication and lowers the barrier to distributed memory programming. Its adaptive algorithms ensure efficient communication in large-scale parallel computing, satisfying ultra-large-scale simulation requirements.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20251227\\welsim_gslib.png\" alt=\"welsim_gslib\" \/>\n<\/p>\n\n<p>Since GSLIB does not come with CMake configuration files, it is unable to automatically generate Visual Studio project files on Windows, requiring you to create the Visual Studio project files manually. Create a new static library project named <code class=\"language-plaintext highlighter-rouge\">gslib-palace<\/code>, and add all the source files and header files to this project.\nIn the preprocessor definitions of the Visual Studio project, add <code class=\"language-plaintext highlighter-rouge\">GSLIB_USE_CBLAS<\/code> and <code class=\"language-plaintext highlighter-rouge\">GSLIB_USE_MKL<\/code>.<\/p>\n\n<p>During compilation, when the following error messages appear:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>unary minus operator applied to unsigned type, result still unsigned\n<\/code><\/pre><\/div><\/div>\n\n<p>You will need to modify the code, for example, changing<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>p[map-&gt;n].el = -(uint)1;\n<\/code><\/pre><\/div><\/div>\n\n<p>to<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>p[map-&gt;n].el = 0-(uint)1;\n<\/code><\/pre><\/div><\/div>\n\n<p>This allows the compilation to succeed.\nWhen the following error message appears:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>potentially uninitialized local pointer variable 'h' used\n<\/code><\/pre><\/div><\/div>\n\n<p>You will need to modify the code and initialize the pointer with a NULL value.<\/p>\n\n<p>If you receive a prompt indicating that the <code class=\"language-plaintext highlighter-rouge\">fgs_free<\/code> function has been defined redundantly, simply comment out the <code class=\"language-plaintext highlighter-rouge\">fgs_setup<\/code>, <code class=\"language-plaintext highlighter-rouge\">fgs_free<\/code>, and <code class=\"language-plaintext highlighter-rouge\">fgs_unique<\/code> functions.<\/p>\n\n<h2 id=\"compiling-libceem\">Compiling libCEEM<\/h2>\n\n<p>libCEED is an efficient and scalable discretization library that focuses on high-performance computational discretization based on finite element and spectral element methods. It provides a lightweight algebraic interface for linear and nonlinear operators as well as preconditioners; it supports runtime selection and optimized implementations across a variety of computing devices such as CPUs and GPUs.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20251227\\welsim_libceed.png\" alt=\"welsim_libceed\" \/>\n<\/p>\n\n<p>Compiling libCEED is the most challenging part of the entire task because libCEED does not provide CMake configuration files and contains numerous options. Coupled with the fact that Visual Studio does not support C99 syntax, extensive manual modifications to the source files are required, especially modifications related to dynamic arrays. For example, change the following dynamic array:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>CeedInt num_points[num_elem];\n<\/code><\/pre><\/div><\/div>\n\n<p>to:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>CeedInt *num_points = (CeedInt *)malloc(num_elem * sizeof(CeedInt));\n<\/code><\/pre><\/div><\/div>\n\n<p>After usage, you also need to free the array from memory at the end using the <code class=\"language-plaintext highlighter-rouge\">free<\/code> function: <code class=\"language-plaintext highlighter-rouge\">free(num_points);<\/code>.\nCertain strings containing file paths also require modification. For instance, change:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>*(relative_file_path) = strstr(absolute_file_path, \"ceed\/jit-source\");\n<\/code><\/pre><\/div><\/div>\n\n<p>to:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>#ifdef\n _WIN32\n  *(relative_file_path) = strstr(absolute_file_path, \"ceed\\\\jit-source\");\n#else\n  *(relative_file_path) = strstr(absolute_file_path, \"ceed\/jit-source\");\n#endif\n<\/code><\/pre><\/div><\/div>\n\n<p>Since Visual Studio\u2019s support for weak functions differs from that of Linux, the weak functions in the source code need to be modified as follows:\nOriginal code:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>#define\n CEED_BACKEND(name, num_prefixes, ...)       \\\n  CEED_INTERN int name(void) __attribute__((weak)); \\\n  int             name(void) { return CeedRegister_Weak(__func__, num_prefixes, __VA_ARGS__); }\n#include\n \"ceed-backend-list.h\"\n<\/code><\/pre><\/div><\/div>\n\n<p>Modified code:<\/p>\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>#ifdef _WIN32\n#define CEED_BACKEND(name, num_prefixes, ...)       \\\n        CEED_INTERN int name(void) __declspec(selectany); \\\n        int             name(void) { return CeedRegister_Weak(__func__, num_prefixes, __VA_ARGS__); }\n#else\n#define CEED_BACKEND(name, num_prefixes, ...)       \\\n        CEED_INTERN int name(void) __attribute__((weak)); \\\n        int             name(void) { return CeedRegister_Weak(__func__, num_prefixes, __VA_ARGS__); }\n#include \"ceed-backend-list.h\"\n#endif\n<\/code><\/pre><\/div><\/div>\n\n<p>Visual Studio does not support the <code class=\"language-plaintext highlighter-rouge\">__restrict__<\/code> keyword and requires it to be changed to <code class=\"language-plaintext highlighter-rouge\">__restrict<\/code>.<\/p>\n\n<p>Other minor modifications need to be made, such as replacing popen with <code class=\"language-plaintext highlighter-rouge\">_popen<\/code> and pclose with <code class=\"language-plaintext highlighter-rouge\">_pclose<\/code>. Additionally, there is an environment variable setting: <code class=\"language-plaintext highlighter-rouge\">setenv(\"RUST_TOOLCHAIN\", \"nightly\", 0)<\/code>, which needs to be modified as follows:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>char env_str[1024];\nsnprintf(env_str, sizeof(env_str), \"%s=%s\", \"nightly\", 0);\n_putenv(env_str);\n<\/code><\/pre><\/div><\/div>\n\n<p>To reduce complexity, this compilation supports only CPU parallel computing and does not require GPU parallel support. Therefore, in the <code class=\"language-plaintext highlighter-rouge\">ceed-backend-list.h<\/code> file, only the following functionalities need to be enabled:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>CEED_BACKEND(CeedRegister_Opt_Blocked, 1, \"\/cpu\/self\/opt\/blocked\")\nCEED_BACKEND(CeedRegister_Opt_Serial, 1, \"\/cpu\/self\/opt\/serial\")\nCEED_BACKEND(CeedRegister_Ref, 1, \"\/cpu\/self\/ref\/serial\")\nCEED_BACKEND(CeedRegister_Ref_Blocked, 1, \"\/cpu\/self\/ref\/blocked\")\nCEED_BACKEND(CeedRegister_Xsmm_Blocked, 1, \"\/cpu\/self\/xsmm\/blocked\")\nCEED_BACKEND(CeedRegister_Xsmm_Serial, 1, \"\/cpu\/self\/xsmm\/serial\")\n<\/code><\/pre><\/div><\/div>\n\n<p>All other computing functionalities can be commented out. Upon successful compilation, the static library for libCEED will be generated.<\/p>\n\n<h2 id=\"compiling-mfem\">Compiling MFEM<\/h2>\n<p>MFEM is the core solver of Palace, an open-source high-order finite element library led by the Lawrence Livermore National Laboratory (LLNL). Designed specifically for large-scale scientific computing and engineering simulation, its core objective is to provide a flexible, efficient, and scalable finite element discretization framework. MFEM also serves as a mainstream open-source finite element tool for computational fluid dynamics, electromagnetic simulation, structural mechanics, nuclear physics, and other fields.<\/p>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20251227\\welsim_mfem_logo.png\" alt=\"welsim_mfem_logo\" \/>\n<\/p>\n\n<p>Compiling MFEM is relatively straightforward. You can generate Visual Studio project files via CMake for compilation. Set the following options to ON in CMake:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>MFEM_USE_MPI = ON\nMFEM_USE_ZLIB = ON\nMFEM_USE_METIS = ON\nMFEM_USE_LAPACK = ON\nMFEM_USE_LEGACY_OPENMP = ON\nMFEM_THREAD_SAFE = ON\nMFEM_USE_MUMPS = ON\n<\/code><\/pre><\/div><\/div>\n\n<p>Meanwhile, you need to make corresponding modifications to the source files based on the diff files located in the extern\/patch\/mfem folder under the Palace directory. Since there are quite a few source files to be modified, you should proceed with patience and care. Alternatively, you can first compile the code on Linux, then copy and overwrite the automatically modified mfem folder to the mfem directory that needs to be compiled on Windows. Generate the Visual Studio project files and compile them directly to obtain the MFEM static library.<\/p>\n\n<h2 id=\"compiling-palace\">Compiling Palace<\/h2>\n<p>At this point, all complex dependent libraries have been successfully compiled. Proceed to the final step of this project: use the built-in CMake configuration file to generate Visual Studio project files and compile Palace. Note that you should select the CMakeLists.txt file located in the palace subdirectory instead of the one in the root directory, as the latter is used for generating the SuperBuild.<\/p>\n\n<p>Set the following parameters in CMake:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>PALACE_WITH_ARPACK = ON\nPALACE_WITH_OPENMP = ON\nPALACE_WITH_SLEPC = OFF\nMPI_Fortran_WORKS = C:\/Program Files (x86)\/Microsoft SDKs\/MPI\/Include\/x64\n<\/code><\/pre><\/div><\/div>\n\n<p>Configure the following paths:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>nlohmann_json_DIR = D:\/WelSimLLC\/CodeDV\/3rdParty\/nlohmann_json\/json-3.12.0\/myInstall\/share\/cmake\/nlohmann_json\nfmt_DIR = D:\\WelSimLLC\\CodeDV\\3rdParty\\fmt\\fmt-11.0.2\\myInstall\\lib\\cmake\\fmt\nscn_DIR = D:\\WelSimLLC\\CodeDV\\libPack\\lib\\scn\\cmake\\scn\nMFEM_DIR = D:\/WelSimLLC\/CodeDV\/libPack\/lib\/palace\/mfem-cmake\narpackng_DIR = D:\\WelSimLLC\\CodeDV\\libPack\\lib\\palace\\arpack-cmake\\arpackng\n<\/code><\/pre><\/div><\/div>\n\n<p>Open the generated Visual Studio project, and you will see a static library project named <code class=\"language-plaintext highlighter-rouge\">libpalace<\/code> and an executable project named <code class=\"language-plaintext highlighter-rouge\">palace<\/code>. If the compiler reports missing header files or the linker indicates unresolved functions during compilation, you can directly add the relevant paths and static libraries to the projects.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20251227\\welsim_palace_vs_projects.png\" alt=\"welsim_palace_vs_projects\" \/>\n<\/p>\n\n<p>After completing the compilation, you can run a test on palace.exe. Note that you need to place all dynamic dependent libraries (such as the MKL dynamic libraries) in the same directory as palace.exe before running it.<\/p>\n\n<p>Run a simple test case. The output shown below indicates that the compilation has been successful basically.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20251227\\welsim_palace_output.png\" alt=\"welsim_palace_output\" \/>\n<\/p>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>As open-source electromagnetic field simulation solvers are presently scarce, Palace stands out as the most feature-rich one available. As a result, Palace relies on a large number of dependent libraries, and its version is still under continuous iterations. Some of these dependencies only support Linux builds, which adds to the complexity of compiling Palace on Windows. This article documents the complete compilation process of Palace and provides a resource for the open-source community on how to build Palace for Windows.<\/p>\n\n<p>There are also other dependent libraries that are relatively easy to compile, such as Eigen, fmt, Metis, and nlohmann\/json. Experienced developers can often independently build these libraries on Windows, so it is not discussed in this article.<\/p>\n\n<p>The author has included the compiled palace.exe executable file in the WELSIM installation package, so you are able to directly obtain the Windows version of palace.exe from the WELSIM installer without having to compile it yourself.<\/p>\n\n<p>This article describes the configuration of Palace for CPU multi-core parallel computing. The compilation methods for GPU-accelerated versions,\u200asuch as CUDA, HIP, or SYCL,\u200awill be discussed in future articles.<\/p>\n\n<hr \/>\n\n<p><small>\nWelSim and the author are not affiliated with Palace, Hypre, MUMPS, ARPACK, GSLIB, libCEED, or MFEM, nor do they have any direct connections with the development teams or institutions behind these projects. The references to the names and images of these open-source software in this article are solely for the purpose of technical blog documentation and software usage guidance.\n<\/small><\/p>\n\n","pubDate":"Sat, 27 Dec 2025 00:00:00 +0000","link":"https:\/\/welsim.com\/2025\/12\/27\/compile-the-open-source-electromagnetic-simulation-solver-alace.html","guid":"https:\/\/welsim.com\/2025\/12\/27\/compile-the-open-source-electromagnetic-simulation-solver-alace.html"},{"title":"Generating Particles for Complex Geometries Using WELSIM","description":"<p>With the development of modern engineering simulation, particle-based simulation has been increasingly adopted by the industry; the need for particle-related computations and software has emerged in various fields of engineering and science. In addition to pure particle simulation, such as molecular dynamics, there are also coupled methods with continuum approaches that enable further sophistication, like the finite element method. One example is the SPH (Smoothed Particle Hydrodynamics) method, which simulates the motion of fluids and granular materials.<\/p>\n\n<p>As a result of this increased complexity, the demands on particle simulation are also rising which places special emphasis on particle generation specifically, as it is the first and most critical step in the entirity of the simulation. Therefore, algorithms and processes to generate particles are particularly vital. SimLet has previously discussed the numerical methods for generating particles in the article titled \u201cAutomatic Generation of Simulation Particles.\u201d<\/p>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250929\\welsim_sph_demo_crank_shaft.png\" alt=\"welsim_sph_demo_crank_shaft\" \/>\n<\/p>\n\n<p>Generating particles for simple geometric models, like cubes, is not difficult. However, when the geometry becomes more complex, particle generation becomes challenging, so currently there are not many software solutions on the market that can generate particles for arbitrary shapes. WELSIM is already capable of handling complex geometry and can even export particles as external files for use in other software. This article provides a brief introduction on how to generate particles in WELSIM.<\/p>\n\n<p>1.Open WELSIM and Import a STEP Geometry Model<\/p>\n\n<p>In this example, a cylindrical model with a circular hole is imported. Set the geometry\u2019s Create Particles property to True.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250929\\welsim_sph_generate_particles_geometry.png\" alt=\"welsim_sph_generate_particles_geometry\" \/>\n<\/p>\n\n<p>2.Click the Meshing Button to Automatically Generate Particles<\/p>\n\n<p>In this setup, 441 particles are generated.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250929\\welsim_sph_generate_particles_mesh.png\" alt=\"welsim_sph_generate_particles_mesh\" \/>\n<\/p>\n\n<p>3.Increase Particle Density<\/p>\n\n<p>Modify the Maximum Size value in the Mesh Settings. When set to 0.01 m, the particle density increases.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250929\\welsim_sph_generate_particles_mesh_settings.png\" alt=\"welsim_sph_generate_particles_mesh_settings\" \/>\n<\/p>\n\n<p>4.Adjust Particle Display Size for Clarity<\/p>\n\n<p>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.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250929\\welsim_sph_generate_particles_mesh_3dview.png\" alt=\"welsim_sph_generate_particles_mesh_3dview\" \/>\n<\/p>\n\n<p>Now, a larger number of particles can be seen \u2014 16,060 in total. Easy and efficient generation of particles at any desired density is supported by WELSIM.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250929\\welsim_sph_generate_particles_mesh_denser.png\" alt=\"welsim_sph_generate_particles_mesh_denser\" \/>\n<\/p>\n\n<p>5.Export the Particles<\/p>\n\n<p>Once particle generation is complete, export the particle file. Right-click the Mesh object and select Export Particles from the context menu.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250929\\welsim_sph_export_particles.png\" alt=\"welsim_sph_export_particles\" \/>\n<\/p>\n\n<p>6.Once in the Export Dialog<\/p>\n\n<p>Enter the file name and select the export format. WELSIM currently supports the VTK PolyData format; more formats will be included in future versions.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250929\\welsim_sph_export_dialog.png\" alt=\"welsim_sph_export_dialog\" \/>\n<\/p>\n\n<p>The exported file can be loaded and used by other software. For example, ParaView is used here to visualize the exported particles as shown in the image.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250929\\welsim_sph_export_vtp_paraview.png\" alt=\"welsim_sph_export_vtp_paraview\" \/>\n<\/p>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>This article outlines the steps for generating particles using WELSIM. Users simply import a geometry in STEP format, through an automatic mesh-like method, to quickly generate particles at various densities. Although a simple geometry was used here, the same process can be applied to complex models. WELSIM also allows for particle data to be exported and used in other applications. This particle generation feature is already available in version 2025R3 and will continue to be improved in future releases.<\/p>\n\n<p><small>\nWELSIM has no direct affiliation with the author or the developers of ParaView. ParaView is referenced here purely as a technical example for demonstration purposes.\n<\/small><\/p>\n\n","pubDate":"Mon, 29 Sep 2025 00:00:00 +0000","link":"https:\/\/welsim.com\/2025\/09\/29\/generating-particles-for-complex-geometries-using-welsim.html","guid":"https:\/\/welsim.com\/2025\/09\/29\/generating-particles-for-complex-geometries-using-welsim.html"},{"title":"Methods for Automatic Particle Generators","description":"<p>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.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250820\\welsim_sph_analysis.png\" alt=\"welsim_sph_analysis\" \/>\n<\/p>\n\n<p>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.<\/p>\n\n<h2 id=\"lattice-structures\">Lattice Structures<\/h2>\n<p>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.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250820\\welsim_lattice_types.png\" alt=\"welsim_lattice_types\" \/>\n<\/p>\n\n<p>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.<\/p>\n\n<h2 id=\"finite-element-mesh-conversion\">Finite Element Mesh Conversion<\/h2>\n<p>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.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250820\\welsim_mesh_to_particles.png\" alt=\"welsim_mesh_to_particles\" \/>\n<\/p>\n\n<p>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.<\/p>\n\n<h2 id=\"network-based-generation\">Network-Based Generation<\/h2>\n<p>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.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250820\\welsim_network_growth.png\" alt=\"welsim_network_growth\" \/>\n<\/p>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>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.<\/p>\n\n","pubDate":"Wed, 20 Aug 2025 00:00:00 +0000","link":"https:\/\/welsim.com\/2025\/08\/20\/methods-for-automatic-particles-generators.html","guid":"https:\/\/welsim.com\/2025\/08\/20\/methods-for-automatic-particles-generators.html"},{"title":"Orthotropic Hill Plasticity Model","description":"<p>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.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250722\\hill_augmented_manufacturing2.png\" alt=\"hill_augmented_manufacturing\" \/>\n<\/p>\n\n<p>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 \u201cThe Mathematical Theory of Plasticity\u201d 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.<\/p>\n\n<p>It\u2019s 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.<\/p>\n\n<p>The Hill yield criterion is given by:<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250722\\hill_yield_equation.png\" alt=\"hill_yield_equation\" \/>\n<\/p>\n\n<p>For shell elements, the yield function is given by:<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250722\\hill_yield_equation4.png\" alt=\"hill_yield_equation2\" \/>\n<\/p>\n\n<p>Where \u03c3 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.<\/p>\n\n<p>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\u2019s yield stresses under different loading conditions must be measured:<\/p>\n\n<ul>\n  <li>\u03c311, \u03c322, \u03c333 are obtained from tensile tests.<\/li>\n  <li>\u03c312, \u03c313, \u03c323 are obtained from shear tests.<\/li>\n<\/ul>\n\n<p>For shell elements, Lankford parameters are used to determine the Hill parameters. A Lankford parameter r\u2090 is defined as the ratio of plastic strain in the plane to that in the thickness direction. For orthotropic anisotropy, r\u2090 can be obtained from simple tensile tests:<\/p>\n\n<ul>\n  <li>r\u2080\u2080: tensile direction aligned with the orthotropic axis 1.<\/li>\n  <li>r\u2089\u2080: tensile direction perpendicular to the orthotropic axis 1.<\/li>\n<\/ul>\n\n<p>Once r\u2080\u2080, r\u2084\u2085, r\u2089\u2080 are measured, the Hill parameters can be calculated. Higher Lankford values indicate better formability.<\/p>\n\n<p>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.<\/p>\n\n<h2 id=\"support-for-the-orthotropic-hill-model-in-welsim\">Support for the orthotropic Hill model in WelSim<\/h2>\n<p>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.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250722\\mateditor_hill_orthotropic.png\" alt=\"mateditor_hill_orthotropic\" \/>\n<\/p>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n<p>WelSim already provides support for the Hill model and can be integrated with OpenRadioss for transient simulations involving orthotorpic plastic deformation.<\/p>\n\n<hr \/>\n<p><small>\nWelSim and authors have no direct affiliation with developers of OpenRadioss. References to OpenRadioss here are solely for technical blogging and software usage discussion.\n<\/small><\/p>\n\n","pubDate":"Tue, 22 Jul 2025 00:00:00 +0000","link":"https:\/\/welsim.com\/2025\/07\/22\/orthotorpic-hill-plasticity-model.html","guid":"https:\/\/welsim.com\/2025\/07\/22\/orthotorpic-hill-plasticity-model.html"},{"title":"Running OpenGL-based applications in a sandbox\/virtual machine","description":"<p>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\u2019t require installing or purchasing a separate OS, which is a significant advantage. However, the sandbox is only available on Windows Professional or Enterprise editions.<\/p>\n\n<p>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.<\/p>\n\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250701\\welsim_sandbox_mateditor_blank_gui.png\" alt=\"welsim_sandbox_mateditor_blank_gui\" \/>\n<\/p>\n\n<p>The fix is straightforward\u2014simply add the OpenGL libraries to MatEditor.<\/p>\n\n<p>1.Download the Mesa OpenGL library from GitHub. The project name is <em>mesa-dist-win<\/em>.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250701\\welsim_sandbox_mesa_win_dist.png\" alt=\"welsim_sandbox_mesa_win_dist\" \/>\n<\/p>\n\n<p>2.Choose the appropriate version for your operating system and build type. In this case, the <em>release-msvc<\/em> version is selected.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250701\\welsim_sandbox_mesa_download.png\" alt=\"welsim_sandbox_mesa_download\" \/>\n<\/p>\n\n<p>3.Extract the files, open the extracted directory, and type cmd in the address bar to open a command prompt. Then, run the <em>perappdeploy.bat<\/em> file.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250701\\welsim_sandbox_run_cmd.png\" alt=\"welsim_sandbox_run_cmd\" \/>\n<\/p>\n\n<p>4.The command line will launch and display relevant information. Press any key to continue.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250701\\welsim_sandbox_mesa_run1.png\" alt=\"welsim_sandbox_mesa_run1\" \/>\n<\/p>\n\n<p>5.Follow the prompts by inputting the executable file folder: <em>C:\\Program Files\\WELSIM\\MatEditor<\/em>, the executable file name: <em>runMatEditor.exe<\/em>, and selecting the processor architecture: <em>x64<\/em>.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250701\\welsim_sandbox_mesa_run3.png\" alt=\"welsim_sandbox_mesa_run3\" \/>\n<\/p>\n\n<p>6.The OpenGL library is now added to MatEditor. You can re-run the application, and the main window should now display correctly.<\/p>\n<p align=\"center\">\n  <img src=\"\\assets\\blog\\20250701\\welsim_sandbox_mesa_applied_mateditor.png\" alt=\"welsim_sandbox_mesa_applied_mateditor\" \/>\n<\/p>\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>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.<\/p>\n\n<hr \/>\n<p><small>\nWelSim 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.\n<\/small><\/p>\n","pubDate":"Tue, 01 Jul 2025 00:00:00 +0000","link":"https:\/\/welsim.com\/2025\/07\/01\/running-OpenGL-based-applications-in-a-sandbox-virtual-machine.html","guid":"https:\/\/welsim.com\/2025\/07\/01\/running-OpenGL-based-applications-in-a-sandbox-virtual-machine.html"}]}}