Mesh

Elmer Studio meshes the geometry with gmsh and writes a native Elmer mesh, including the boundary elements and their parent elements, which Elmer needs for boundary fluxes. Home  Build Mesh builds it. Compute builds it when needed.

Physics-controlled mesh

By default Mesh 1 is physics-controlled: pick an Element size from Extremely fine to Extremely coarse (Home  Element Size does the same), and Elmer Studio chooses the sizes. Two physics refine it automatically:

  • Laminar Flow uses a finer, fluid-calibrated size;

  • Pressure Acoustics uses at most a fifth of the wavelength (λ/5) at the highest frequency of the study.

User-controlled mesh

Set Sequence type to User-controlled mesh, or add nodes from the Mesh ribbon, to build the mesh from a sequence:

Node Purpose

Size

Element size on the entire geometry, or on selected domains, boundaries, edges or points. Use a predefined size or Custom: Maximum element size, Minimum element size, Maximum element growth rate, Curvature factor, Resolution of narrow regions.

Free Tetrahedral

Unstructured tetrahedra (3D).

Free Triangular

Unstructured triangles (2D).

Free Quad

Unstructured quadrilaterals (2D).

Mapped

A structured quadrilateral mesh on four-sided 2D domains.

Distribution

The number of elements along selected boundaries (edges in 3D), with grading: Element ratio (last element over first), geometric or arithmetic sequence, symmetric, reversed.

Size settings mean what they mean in COMSOL:

  • Maximum element growth rate limits how fast elements grow away from a refined region. Without it, a refined edge sits next to coarse elements, and local quantities such as electrode currents can be off by tens of percent.

  • Curvature factor is the element size relative to the radius of curvature.

  • Resolution of narrow regions is about the number of element layers across a narrow region.

Element order

The mesh is quadratic or linear according to the physics discretization (Geometry shape order / element order: Automatic). You can force linear or quadratic on Mesh 1.

Statistics and quality

  • Mesh  Statistics lists the numbers of elements, boundary elements and nodes, the element order and the minimum and average element quality in the Table pane. The Mesh 1 Settings window shows them too.

  • Mesh  Plot Quality colours the elements by quality.

  • Mesh  Clear Mesh removes the mesh.

Advanced

Mesh 1 has the gmsh 3D algorithm (Delaunay, Frontal, HXT) and 2D algorithm (Frontal-Delaunay, Delaunay, Frontal-Delaunay for quads, MeshAdapt), and Optimize element quality.

Tips

  • Mesh convergence: make the mesh size a parameter, for example hmax = h0/hd, and sweep hd. The Wrench tutorial does this.

  • Thin electrolyte gaps and electrode edges: refine with a Size node on the electrode boundary and keep a growth rate of about 1.1–1.3.

  • For a curved electrode with a smooth current density, a Mapped mesh with a graded Distribution is often the most accurate (see Electrochemistry tutorial).

All settings are listed in Reference › Mesh.