Context
The rotated strong free-slip constraint now supports a prescribed non-zero wall-normal
datum u.n = ũ_n on the LINEAR solve path (commit 1a08d398 on
feature/free-surface-tangent): one rotated matrix, a switchable datum (0 = free-slip /
held, ũ_n = prescribed radial), differing only in the constraint RHS. Validated serial
in tests/test_1018_rotated_freeslip.py (datum-zero matches free-slip to round-off;
u.n = cos θ imposed to machine precision).
This lets the free-surface consistent solve drop its ill-conditioned penalty natural
BC (penalty=1e5·(n̂·v − ũ_n)·n̂) — the term that trips newtonls line search on an
otherwise linear solve — in favour of the strong rotated constraint.
Remaining work
-
Wire the FreeSurface manager. In free_surface.py::_build_consistent, register
rotated free-slip on the surface and set consistent._rotated_freeslip_datum = {surface: un_target.sym} (updated each step in _solve_consistent), removing the
add_natural_bc penalty. Confirm the material-surface advection is unchanged /
improved (no penalty leak).
-
Clean pyx API. Let add_rotated_freeslip_bc(conds, boundary, normal=...) accept a
non-zero conds (constant / sympy expr / field .sym) and store it, replacing the
private solver._rotated_freeslip_datum route. Needs a Cython rebuild. Update
_classify_walls (currently unpacks 2-tuples) if the stored form changes.
-
Parallel np2/np4. The datum application (_set_rows_local, the xhat ownership
loop, build_rotation per-node datum eval) is written ownership-safe but untested in
parallel. Add an np2 case to the datum test.
-
Nonlinear path. solve_rotated_freeslip_nonlinear currently raises on a datum.
Extend it (the datum enters the constrained residual / initial-feasible guess) if a
prescribed normal is ever needed with a nonlinear rheology.
-
CBF σ_nn regression. datum=0 is bit-path-identical (so σ_nn recovery is safe), but
add an explicit test that boundary_normal_traction is unchanged with the new code.
Origin
Found while building a fresh annulus free-surface convection driver and tracing why a
linear solve tripped newtonls (the penalty BC). See also #402 (composition transport
for temperature convection).
Underworld development team with AI support from Claude Code
Context
The rotated strong free-slip constraint now supports a prescribed non-zero wall-normal
datum
u.n = ũ_non the LINEAR solve path (commit1a08d398onfeature/free-surface-tangent): one rotated matrix, a switchable datum (0 = free-slip /held, ũ_n = prescribed radial), differing only in the constraint RHS. Validated serial
in
tests/test_1018_rotated_freeslip.py(datum-zero matches free-slip to round-off;u.n = cos θimposed to machine precision).This lets the free-surface consistent solve drop its ill-conditioned penalty natural
BC (
penalty=1e5·(n̂·v − ũ_n)·n̂) — the term that tripsnewtonlsline search on anotherwise linear solve — in favour of the strong rotated constraint.
Remaining work
Wire the FreeSurface manager. In
free_surface.py::_build_consistent, registerrotated free-slip on the surface and set
consistent._rotated_freeslip_datum = {surface: un_target.sym}(updated each step in_solve_consistent), removing theadd_natural_bcpenalty. Confirm the material-surface advection is unchanged /improved (no penalty leak).
Clean pyx API. Let
add_rotated_freeslip_bc(conds, boundary, normal=...)accept anon-zero
conds(constant / sympy expr / field.sym) and store it, replacing theprivate
solver._rotated_freeslip_datumroute. Needs a Cython rebuild. Update_classify_walls(currently unpacks 2-tuples) if the stored form changes.Parallel np2/np4. The datum application (
_set_rows_local, the xhat ownershiploop,
build_rotationper-node datum eval) is written ownership-safe but untested inparallel. Add an np2 case to the datum test.
Nonlinear path.
solve_rotated_freeslip_nonlinearcurrently raises on a datum.Extend it (the datum enters the constrained residual / initial-feasible guess) if a
prescribed normal is ever needed with a nonlinear rheology.
CBF σ_nn regression. datum=0 is bit-path-identical (so σ_nn recovery is safe), but
add an explicit test that
boundary_normal_tractionis unchanged with the new code.Origin
Found while building a fresh annulus free-surface convection driver and tracing why a
linear solve tripped
newtonls(the penalty BC). See also #402 (composition transportfor temperature convection).
Underworld development team with AI support from Claude Code