Boundary layers and grading

The shape metric seeks squares, so a designed thin layer is the first thing smoothing relaxes. The protections, on a graded strip and on a pipe section’s O-grid whose wall slides on its circle:

worst-corner scaled J≤ 01outer edge of the kept rings

graded strip

input
min J 0.46
unprotected
min J 0.36 · layer +718 %
KeepLayer
min J 1.00 · layer as meshed
weights = 0
min J 0.05 · layer +806 %

pipe section

input
min J 0.42
wall slides
min J 0.82 · layer +17147 %
KeepLayer + wall
min J 0.81 · layer as meshed

Key points

  • A designed layer is not ideal to the metric: a rectangle of edge ratio \(r\) scores \(\varphi=((r+1/r)/2)^2\) and the objective has no target aspect, so the optimizer thickens it; Laplace less; Winslow most once its guard lets it run (Winslow smoothing).

  • Protecting a layer moves the problem to its edge: the size jump between kept and relaxed cells grows.

The protections

  • KeepLayer(seeds, rings) freezes every vertex within rings quad-rings of the seeds: the layer is kept exactly, but cannot slide; with a sliding wall, the frozen claim wins.

  • SlideColumns(columns, direction) ties rigid columns that slide together along one direction, so a straight wall can slide while the cells across the layer keep their shape; constrain.grid_columns finds the columns.

  • weights scale each quad’s shape term in optimize. Alone they do not protect a layer: Laplace and Winslow stages ignore them, and a zero weight lets the layer degrade.

The numbers

case

protection

min scaled J

size ratio max

first layer thickness change (max)

graded strip

none

0.465 → 0.358

3.61 → 2.49

718 %

graded strip

KeepLayer(rings=4)

0.465 → 1.000

3.61 → 3.06

0 %

graded strip

weights=0 on the layer quads

0.465 → 0.053

3.61 → 3.24

806 %

pipe section

OnCurve wall only (it slides)

0.420 → 0.818

1.78 → 1.40

17147 %

pipe section

KeepLayer(rings=3) + OnCurve

0.420 → 0.808

1.78 → 5.93

0 %

Every run is user_schedule(outer=5). A first-layer cell of the strip has edge ratio 20.8 : 1, so its corners score phi = 109. With KeepLayer and a sliding wall, 24 of 24 wall vertices resolve frozen; the largest move of a frozen vertex is 0.0e+00.

Check a layer by its thickness and on_target_report’s max_frozen_move: the scaled Jacobian reads 1 for a rectangle of any edge ratio.