A solver run is only as good as the mesh you hand it. Ask anyone who has burned a weekend on a converging-then-diverging residual plot: ninety percent of “the solver is broken” tickets are actually a badly shaped boundary layer, an unmerged CAD seam, or a surface mesh that is fine in the GUI and inconsistent at the periodic interface. Meshing is where simulation projects quietly succeed or fail.
The three tools that matter in open-source CAE in 2026 have converged on different philosophies. Gmsh is a scriptable mesher with its own geometry kernel and a language of its own. Netgen, now distributed alongside the NGSolve finite-element suite, is a library-first mesher with best-in-class automatic tetrahedral generation. SALOME is a full platform: geometry repair, meshing, supervision and solver coupling in one integrated shell.
This comparison uses live version and repository data, working scripts you can paste, and the failure modes each tool handles differently.
TL;DR: The 60-Second Verdict
- Pick Gmsh for scripted, reproducible meshes in a CI pipeline. One
.geofile, one command, deterministic output, and a Python API that runs headless. It is the default choice for OpenFOAM and Code_Aster users for good reason. - Pick Netgen/NGSolve when the downstream solver is NGSolve itself, or when you want high-quality automatic tet meshes from Python in a few lines without designing a geometry language.
- Pick SALOME when your geometry arrives from a commercial CAD package broken, and you need healing, defeaturing and mesh control in a visual workflow with a Python console attached.
- Do not pick a mesher before you pick the solver. Format compatibility and physical-group conventions will decide your week far more than the meshing algorithm.
Comparison Table (Live Data, November 2026)
| Dimension | Gmsh | Netgen / NGSolve | SALOME |
|---|---|---|---|
| Latest release | 4.15.2 (2026-03-24, PyPI) | 6.2.2608 (2026-10-01, PyPI) | Platform 9.x universal binary; SMESH module updated 2026-09-14 |
| Repository | GitLab: gitlab.onelab.info/gmsh/gmsh | GitHub: NGSolve/ngsolve — 595 stars | GitHub mirrors: SalomePlatform/smesh — 48 stars; upstream GitLab |
| License | GPL-2.0-or-later | LGPL-2.1 | LGPL-2.1 |
| Primary language | C++ with Python/Julia/C API | C++ with Python bindings | C++ and Python |
| Geometry kernel | Built-in OpenCASCADE + native GEO kernel | OpenCASCADE (OCC) via Python | OpenCASCADE, full healing toolbox |
| Element types | 1D/2D/3D, quads, hex-dominant, prisms, pyramids | Tets, prisms, quads, hexes | Tets, hexes, prisms, pyramids, quad-dominant |
| Scripting | .geo language + Python API | Python (netgen.occ) | Python console + salome -t batch |
| Headless operation | Excellent (gmsh -3 file.geo) | Excellent (library) | Good (salome -t script.py) |
| GUI | Lightweight, fast | webgui in browser | Full platform shell |
| Learning curve | Steep at first, then permanent | Shallow for simple shapes | Steep but discoverable |
| Typical user | CFD/FEA pipelines, CI meshing | NGSolve multiphysics users | CAD-to-CAE industrial workflows |
The version numbers alone tell a story: Gmsh ships point releases roughly twice a year, Netgen/NGSolve ships rolling date-stamped builds (2608 means the August 2026 cycle), and SALOME’s SMESH module was last touched in September 2026 — active, but on platform time rather than library time.
Decision Matrix
| Your situation | Recommended | Why |
|---|---|---|
| Meshes must be regenerated in CI on every geometry commit | Gmsh | Deterministic .geo scripts, no GUI state, single binary |
| You already solve with NGSolve | Netgen | Same package, same Python process, no format conversion |
| Incoming STEP files from SolidWorks fail to mesh | SALOME | Geometry healing and defeaturing before meshing |
| OpenFOAM case needs snappy-compatible background mesh | Gmsh | Well-documented boundary-layer and Physical group workflow |
| Parametric study with 200 geometry variants | Gmsh or Netgen | Both loop cleanly in Python |
| Mixed hex/tet mesh with manual block decomposition | SALOME | Hexahedral (block) meshing is a first-class module |
| Teaching a class, need students productive in one hour | Netgen webgui | Browser UI, no install on lab machines |
| Electromagnetics with curved higher-order elements | Netgen/NGSolve | Native curved elements, high-order accuracy |
Gmsh: The Scriptable Workhorse
Gmsh’s real product is not the GUI — it is the .geo language. A complete 3D meshing case, with named physical groups the solver can find by name, fits in a dozen lines:
| |
Run it headless and you get a version-4.1 .msh file that OpenFOAM, Elmer, Code_Aster and most FEA codes read directly:
| |
For parametric sweeps, the Python API avoids shelling out entirely — and it is genuinely the same engine:
| |
Two things make Gmsh win pipelines. First, -format covers nearly every solver dialect (msh2/msh4, inp, cgns, med, su2, vtk, stl), so one mesh definition can feed multiple codes. Second, Physical groups are stable identifiers: name a surface inlet once, and your boundary condition file never breaks when the topology index shifts. Teams that skip this step end up hard-coding surface numbers and re-editing solver dictionaries on every geometry change.
The cost is the learning curve of the geometry kernel. Boolean operations in OpenCASCADE fail in ways the .geo language reports cryptically, and fragmentation (BooleanFragments) is a concept you must understand before multi-material meshes behave. Once that clicks, though, Gmsh becomes the fastest path from STEP file to a mesh you can regenerate forever.
If your solver is finite-element rather than finite-volume, our deal.II vs FEniCS vs MFEM comparison covers which of those codes consumes Gmsh output most gracefully — all three read .msh directly.
Netgen/NGSolve: Library-First, Python-Native
Netgen’s pitch is different: the mesher is a library, and its natural interface is Python. With the OpenCASCADE bridge you describe geometry with real CAD primitives and get a volume mesh in three statements:
| |
The last line matters more than it looks. mesh.Curve(3) projects element edges onto the true curved geometry, which is the difference between a 2% and a 0.02% error on a cylinder resonance problem. Gmsh can produce curved elements too (Mesh.ElementOrder), but NGSolve’s high-order pipeline is the code’s core competency rather than an add-on.
Netgen is also the friendliest for exploration: from netgen.webgui import Draw; Draw(mesh) serves an interactive viewer in the browser, which is how the project demos meshing to newcomers and how remote HPC users inspect meshes without X11 forwarding. Deploying it is a one-liner in a Python environment:
| |
The limitation is scope. Netgen’s strength is automatic tetrahedral meshing of clean geometry; it is not a CAD repair tool. If your STEP export has sliver faces or mismatched tolerances, GenerateMesh will fail or produce degenerate elements, and you will need SALOME (or Gmsh’s HealShapes) before Netgen is useful. Structured hex meshing is also weaker than SALOME’s blocking approach.
SALOME: The Platform That Earns Its Weight
SALOME is the only option here that treats geometry as an input problem rather than an assumption. Its pipeline is explicit: GEOM (import, heal, defeat, partition), SMESH (mesh), PARAVIS (post-process), YACS (workflow orchestration). For industrial geometry that arrives as a 400-face STEP assembly, the healing step alone justifies the install.
Batch operation uses the embedded Python interpreter, which is how you make SALOME reproducible instead of click-driven:
| |
| |
Three practical notes for anyone adopting SALOME. Units are millimetres by default; feeding metres silently produces a mesh 1000× too coarse, and no error is raised. Groups, not indices, are the stable interface to solvers — the same lesson as Gmsh’s physical groups. And the platform is heavy: the universal binary is a multi-gigabyte download, startup takes tens of seconds, and CI usage means running the batch interpreter in a container rather than the full desktop shell.
In exchange you get meshing algorithms nothing else here matches out of the box: hexahedral blocking for structured regions, viscous layer extrusion on selected faces with growth-ratio control, and mesh quality inspection with per-element metrics before you ever launch a solver.
Mesh Quality: Where All Three Succeed or Fail Together
Regardless of tool, these are the traps that ruin results:
1. Boundary layer growth ratio above 1.3. Above roughly 1.3 the last prism layer becomes a flat sliver, and wall-shear predictions degrade without any warning. Set first-layer thickness from y+ targets, not from the visual size in the GUI.
2. Ignoring mesh independence. Run the same case at three refinement levels and compare the quantity you actually care about (drag, peak stress, resonance frequency). One mesh, however pretty, proves nothing. Gmsh’s MeshSizeFactor, Netgen’s maxh, and SALOME’s MAXSIZE all make this a two-line loop — so there is no excuse.
3. Physical groups missing or inconsistent. Solvers key boundary conditions by name. Renaming a surface in the CAD tool and re-meshing silently drops the condition; the solver then applies a default wall everywhere and your “converged” run is physically wrong.
4. Unmerged coincident faces. If a multi-solid assembly is meshed without fragmenting/gluing at interfaces, the resulting mesh is non-conformal. Codes that support hanging nodes cope; codes that do not will either refuse or produce garbage at the interface. Gmsh: BooleanFragments; SALOME: MakeFuse plus Create Group from the result; Netgen: build a single geometry with OCC booleans.
5. Sliver and cap faces from CAD. Check minimum dihedral angle and aspect ratio reports before solving. A single 0.01° sliver in a tet mesh can add days to a solve and destabilize iterative solvers.
Performance and Workflow Reality Check
For a 2-million-element tet mesh of a clean CAD part, all three produce results in tens of seconds to a few minutes on a modern workstation; the differences are small compared with the cost of fixing geometry upstream. The real performance axis is iteration speed: how long from “changed a dimension” to “new mesh in the solver”. Gmsh wins that race by a wide margin because .geo files parameterise cleanly and run headless. SALOME wins the “unknown geometry” race because it can heal what the others reject.
A pattern that works well in practice: heal and defeat in SALOME (or with gmsh.model.occ.healShapes) once, export clean STEP, then mesh parametrically with Gmsh in CI and archive the .geo alongside the results. You get industrial-grade geometry cleanup without hand-clicking meshes every release.
If the downstream physics is CFD, our OpenFOAM vs Elmer vs CalculiX breakdown explains which solver dictionaries map to which mesh group conventions; if it is molecular rather than continuum mechanics, the GROMACS vs OpenMM vs NAMD guide covers the very different world of atomistic setup.
FAQ
Which mesher is fastest for pure tetrahedral meshing of clean CAD? Netgen and Gmsh are effectively tied on clean geometry; Netgen’s automatic tet algorithm is marginally more robust on thin features, while Gmsh is easier to parallelise across a parameter sweep. SALOME is slower to start but catches geometry problems the other two will silently mesh badly.
Can Gmsh read STEP files directly?
Yes. Gmsh 4.x includes OpenCASCADE, so Merge "part.step"; inside a .geo file imports the solid, and gmsh.model.occ.importShapes() does the same from Python. You can also heal imported shapes with healShapes before meshing.
Is SALOME overkill for a single-part simulation? Usually yes. For a handful of simple parts, Gmsh or Netgen will get you to a mesh in minutes. SALOME earns its multi-gigabyte install when you have assemblies, dirty CAD, hexahedral requirements, or a need for platform-level workflow orchestration.
How do I keep meshes reproducible in CI?
Commit the meshing script, not the mesh. Gmsh .geo files and Netgen/SALOME Python scripts are deterministic given the same geometry and version, so pin the tool version (for example pip install gmsh==4.15.2) and generate meshes as a build artifact.
What mesh format should I standardise on?
If all your solvers are open-source, .msh (Gmsh 4.1) covers OpenFOAM, Elmer, CalculiX and the major FEM libraries; .med is the natural choice inside the SALOME ecosystem; .inp remains the safest interchange for CalculiX and Abaqus-derived tools.
💰 想测试你的市场判断力?我用 Polymarket 做预测市场交易——这是全球最大的预测市场平台,从大选结果到技术监管时间线,什么都可以押注。和赌博不同,这是真正的信息市场:你懂的信息越多,胜率越高。我靠预测技术相关事件的走向已经赚了不少。用我的邀请链接注册:Polymarket.com