U-tube interface and outer box

Two surfaces of the examples/u_tube_box.py hex mesh, each smoothed as a free-standing surface, as built or with perturbed input.

Key points

  • interface: the tube wall (face tag interface), its two open ends frozen. outer box: the six outer faces (tag outer); planes held by OnSurface(plane), the twelve creases slide on OnCurve(line), the eight corners and the rim of the tube’s two openings frozen.

  • The targets are analytic: the tube is exactly a radius about the U’s centreline (the example’s project_to_wall, radial normal) and the box is six planes, so unlike Helical wire surface the surface is independent of the mesh.

  • Both surfaces are already good, so the as-built gain is modest; the box, planar and almost all squares, has little to gain and some numbers get slightly worse. From perturbed input both return to nearly their as-built end state.

  • The smoother does not touch the hexes; The hexes measures carrying the wall into them.

  • Perturbed input: every movable vertex shifted by up to 0.2 of its local edge length, then put back on its surface.

The numbers

run

quads

inverted

overlapping

min scaled J

mean scaled J

worst 5 % scaled J

as built

2040

0 → 0

0 → 0

0.5148 → 0.5755

0.9581 → 0.9703

0.7914 → 0.8730

perturbed input

2040

0 → 0

0 → 0

0.2624 → 0.5763

0.9164 → 0.9703

0.6684 → 0.8731

  • as built: min scaled J rose (0.5148 → 0.5755), mean scaled J rose (0.9581 → 0.9703), worst 5 % rose (0.7914 → 0.8730); no quad is inverted or overlapping at the end.

  • perturbed input: min scaled J rose (0.2624 → 0.5763), mean scaled J rose (0.9164 → 0.9703), worst 5 % rose (0.6684 → 0.8731); no quad is inverted or overlapping at the end.

  • as built: vertices of the U-tube wall moved 0.41 local edges on average (largest 2.63); the size ratio between neighbours went 1.90 → 1.36.

  • perturbed input: vertices of the U-tube wall moved 0.48 local edges on average (largest 2.88); the size ratio between neighbours went 2.41 → 1.37.

Outer box (tag outer; planes, creases and corners held):

run

quads

inverted

overlapping

min scaled J

mean scaled J

worst 5 % scaled J

as built

5000

0 → 0

0 → 0

0.7071 → 0.7993

0.9980 → 0.9983

1.0000 → 0.9964

perturbed input

5000

0 → 0

0 → 0

0.5304 → 0.7991

0.9386 → 0.9983

0.8292 → 0.9964

  • as built: min scaled J rose (0.7071 → 0.7993), mean scaled J rose (0.9980 → 0.9983), worst 5 % fell (1.0000 → 0.9964); no quad is inverted or overlapping at the end.

  • perturbed input: min scaled J rose (0.5304 → 0.7991), mean scaled J rose (0.9386 → 0.9983), worst 5 % rose (0.8292 → 0.9964); no quad is inverted or overlapping at the end.

  • as built: vertices of the outer box moved 0.04 local edges on average (largest 1.43); the size ratio between neighbours went 1.17 → 1.37.

  • perturbed input: vertices of the outer box moved 0.21 local edges on average (largest 1.93); the size ratio between neighbours went 1.60 → 1.37.

Run python examples/smoother/quad/cs_u_tube.py to reproduce; it prints these numbers.

The hexes

  • examples/smoother/quad/cs_u_tube_hex.py takes the order-1 hex mesh (the corner geometry a .re2 file holds) and puts the smoothed wall’s vertices in place of the old ones.

  • The wall is the one surface between a one-layer solid shell and a one-layer fluid shell, so re-lofting those shells from it (what the example’s construction would do) is the same as moving those vertices; every other vertex (the stair-step side, the box, the shrunk core) is the example’s own.

  • Measured at the 8 corners (what .re2 holds) and re-read on a finer lattice at order 7, the solver’s.

Carrying the smoothed interface into the hexes replaces its 2072 vertices by the smoothed ones (it moved 0.40 local edges on average, largest 2.63) and leaves every other vertex where the example put it. At the corners that makes 28 of 26652 hexes inverted (min scaled J 0.1968 → -0.2687, mean 0.9488 → 0.9457) and, re-read at order 7, 28 inverted (min 0.1968 → -0.2687). 16 of the 28 inverted hexes are in the solid region and 12 in the fluid region; 28 of them touch the interface. The 4080 hexes that touch the interface read min 0.1968 → -0.2687 at the corners (the solid shell and the fluid shell, one hex layer each); the remaining 22572 hexes are unchanged (min 0.4397 → 0.4397).

The smoothed interface cannot be carried into the volume for this case. The carried mesh is not valid, so the view below shows only the mesh as built (all toggles stay). Every inverted hex touches the interface: it is a layer between the moved surface and the vertices beyond it, which did not move.

mesh

hexes

min scaled J

mean

worst 5 %

inverted

order-7 sampling: min / inverted

conforming, watertight

as built

26652

0.1968

0.9488

0.6796

0

0.1968 / 0

yes

smoothed wall carried in

26652

-0.2687

0.9457

0.6673

28

-0.2687 / 28

yes

Scaled Jacobian of the order-1 hexes read at their 8 corners (what a .re2 file holds), and the same trilinear map re-read on an 8^3 lattice (order 7, the solver’s).

  • Exterior: every named face by boundary group, one checkbox each (outer starts off so interface is visible). Cross-section: along the U and across both legs, by scaled Jacobian or region (fluid or solid). Drag to orbit.

Run python examples/smoother/quad/cs_u_tube_hex.py to reproduce; it prints these numbers.

Notes and caveats
  • interface separates fluid from solid, so hexmesh.boundary_mesh(mesh, "interface") returns every quad twice, once per side; the script keeps one of each pair.

  • The surfaces are too large for the data to keep a stage history, so the viewer shows only the input and the final state (panels and histogram as in Simple geometries). The outer box is five times the wall’s size, and so is its data file.

  • The tables are regenerated by docs/_ext/gen_smoother_quad_assets.py and docs/_ext/gen_smoother_quad_hexviews_assets.py; nothing is typed in.