# 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. ```{include} _generated/u_tube_interface.viewer.inc ``` ## 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 {doc}`wire_coil_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**; {ref}`u-tube-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 ```{include} _generated/u_tube_interface.table.inc ``` Run `python examples/smoother/quad/cs_u_tube.py` to reproduce; it prints these numbers. (u-tube-hexes)= ## 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. ```{include} _generated/u_tube_hex.text.inc ``` ```{include} _generated/u_tube_hex.table.inc ``` - *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. ```{include} _generated/u_tube_hex.viewer.inc ``` 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 {doc}`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.