Insights · Parameterization · 4 min read

Why meshes fold

Every simulation needs a map from a simple grid onto the real shape. When that map folds, the simulation is wrong, often without saying so. Here is why it happens and how it is prevented.

A CAD model describes the boundary of a part: its faces, edges and corners. A simulation needs more. It needs to know what lies between the boundaries, as a mesh of cells that fills the interior. Producing that mesh from the boundary is called parameterization, and it is the step where most of the manual work in simulation is spent.

The simplest idea, and where it breaks

The oldest way to fill a four-sided region is to blend its opposite sides: every interior point is a weighted average of points on the four boundary curves. The method is called transfinite interpolation, or a Coons patch. It costs almost nothing to compute and works well when the region is close to a rectangle.

It breaks when the boundary curves bend towards each other. The blended mesh lines then cross, and some cells are turned inside out. Such a cell has negative area. A simulation on it still produces numbers, but they describe a material that occupies the same place twice.

Drag the handles
Interpolation—
Equation-based—

Try it. With Interpolation selected, the red cells are inverted. Switch to Equation-based and they disappear. Then drag the handles and see how far the second method can be pushed: at this coarse teaching resolution it can still be broken.

Asking a differential equation instead

The second method does not blend the boundaries. It asks for the mesh that solves an elliptic partial differential equation, the same kind of equation that governs the steady flow of heat. Solutions of such equations cannot have a maximum or a minimum in the interior, and that property carries over to the mesh: its lines spread out evenly and do not cross where the first method fails.

The price: the equation is posed for the map from the shape back to the simple grid, and turning it round gives a nonlinear system of equations. Solving that quickly and reliably is a research topic of its own. The colours in the demonstration show a measure of cell quality called the scaled Jacobian: one for a perfect square, zero for a degenerate cell, negative for an inverted one.

Why this matters beyond the picture

In two dimensions a folded mesh is easy to see. In three dimensions, inside a volume, with thousands of cells, it is not. And in a simulation where the domain moves, such as a rotor turning or a structure deforming in a flow, the mesh has to be rebuilt at every step, thousands of times over, without a single inverted cell.

That is why constructions with a guarantee matter: methods that keep the map one-to-one by construction, instead of checking afterwards and repairing by hand. They turn the most manual step of simulation into one that can run unattended.

← All articles

Wondering whether this
fits your problem?

Send us a geometry and a short description, and we will take a first look.

Send us your geometry →