Repository navigation
Viscoelastic stress past the conformation limit: a positive-definite convected step and a log-conformation history - #795
Conversation
…convected step and a log-conformation history Two things lose the conformation c = sigma/G + I at a re-entrant corner or a stagnation point at high Weissenberg number, measured on the cross-slot: - The step. The upper-convected BDF-1 step is F c* F^T (F = I + dt L) less its second-order term dt^2 L c* L^T, so it goes indefinite once dt |L| ~ 1. convected_step="deformation" keeps the term (source += dt(L s* L^T + G L L^T)): positive-definite for any step, still first order. The exponential step completes the relaxation target's stretch to a product the same way, written in x = dt/lam rather than the integrator's alpha, which is clamped to one in the elastic limit. max_elastic_timestep reports no limit for this step. - The store. Interpolation, projection and per-cell fits undershoot near a corner singularity, and a fit extrapolates to the cell edges. stress_history="log_conformation" stores psi = log c; the model reads sigma* = G (exp psi* - I), a conformation whatever was done to psi. It implies the deformation step. Every flavour transports its stored tensor by pure advection, so none changes; the step stays on c, where relaxation is linear. The model owns the encoding (encode_history; the decode is its carried-stress read); the solver stores the model's record (one helper for the flux and the commit), builds a log store dimensionless, and hands the history the encoding for the inflow datum. The default NavierStokes decodes its history flux; SNES_NavierStokes, which reads the history as a flux, and the multi-material model refuse the log store. stokes.tau projects the decoded stress. The health check reports where the logarithm's floor (1e-12, round-off only) acted. Tests (test_1065): the one-step extension closed form for both integrators and both representations, and the linear step's indefinite -0.818; the shear start-up across four flavours and both integrators against the discrete recurrence in sigma_xy and N1 (every deformation term lives in sigma_xx); units-model cases in test_1064. Underworld development team with AI support from Claude Code Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017kSkAq7oJ5J3XisuvLBovo
|
Adversarial review before the push (two reviewers: the units change and this branch, briefed for over-complexity as well as defects). Applied here:
Recorded: |
…Stokes velocity history offers every semi-Lagrangian scheme global_evaluate applied monotone="clamp" on the rank that asked for a point, bounding it by that rank's nearest nodes; for a departure point evaluated on another rank those are the wrong neighbourhood. The bound now runs on the evaluating rank (first pass and containment round), on non-dimensional values like the nodal data it compares with. Serial results are unchanged. #682's level-set reproduction (LeVeque swirl, 128^2 quad, P2, SLCN with clamp): volume at np 1/2/4/8 now 0.0706771442/415/438/412 (np 8 was 1.6% off). NavierStokesSLCN(velocity_transport=...) chooses the velocity history among the four semi-Lagrangian schemes, through one _value_history helper shared with AdvDiffusionSLCN(transport=...). Forward schemes need order=1; the forward integration-point fit is linear and refuses a P2 velocity. tests: test_1103 (lid-driven cavity, Re 100, three schemes against recorded values and each other); test_1066 adds the cavity (equal to serial at np 3/4/6). tests/parallel at np 4: 168 passed, 1 xfailed, 1 failed (test_1063_constrained_freeslip_parallel[ti], fails identically on #795's 05d5248). Serial set: 393 passed. Underworld development team with AI support from Claude Code Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017kSkAq7oJ5J3XisuvLBovo
Why this is red, and what it needsThe two CI failures are not this PR's. They are byte-identical across #785, #789, #795 and #800: Both tests were already fixed on
So this branch is stale, not broken — 58 commits behind The merge is not clean, and the conflicts are the same on all four
The fifth, at the top of Order mattersAll four touch Found in the backlog sweep (#819). No commits pushed to this branch. |
Same two files and five hunks as the other stale transport branches. scripts/test.sh keeps this branch's broader `tests/test_110*py`; development narrowed it to `test_1100*py`, leaving the other test_110* files matching no glob — #721 recurring. scripts/check_test_coverage.py verifies it. Four of the five ddt.py hunks have an empty development side: this branch's own additions, flagged because surrounding context moved. The fifth takes both — the base-class ETD coefficients (#739) and development's `_note_history_shift` — and duplicates nothing, verified on the merged tree. Underworld development team with AI support from Claude Code
This branch is the base of a four-PR stack (#785 -> #789 -> #795 -> #800) and was 71 commits behind development, which is why all four showed the same two CI failures: tests development had already renamed (test_1060_nitsche_freeslip's absolute 1e-4 bound and test_1070_free_surface_plume's strong-vs-penalty ratio). The refresh belongs here, at the root, so each PR's diff against its base stays its own work rather than growing development's history. Two conflicts, both this branch's own additions. scripts/test.sh keeps the broader `tests/test_110*py` glob -- development narrowed it to `test_1100*py`, which matches none of the other test_110* files here (#721 recurring); scripts/check_test_coverage.py verifies it. Four of the five ddt.py hunks have an empty development side, and the fifth takes both: this branch's base-class `update_exp_coefficients` / `_exp_alpha` / `_exp_phi` (#739, which replaced three per-flavour copies dating from b6b0e7a in April) and development's `_note_history_shift`. Verified on the merged tree: one definition of each. Underworld development team with AI support from Claude Code
Stacked on #789. Lets the viscoelastic Stokes solve reach the high-Weissenberg regime of the benchmark flows: with it the creeping UCM cross-slot shows its purely elastic pitchfork, where before every run from De 0.5 stalled or hung.
What lost the conformation, measured on the cross-slot at De 0.8:
F c* Fᵀ(F = I + dt L) less its second-order termdt² L c* Lᵀ, so it goes indefinite oncedt|L|is of order one. A smaller timestep did not help: at a corner|L|grows with resolution.Two options on
ViscoElasticPlasticFlowModel(upper-convected, first order):convected_step="deformation"keeps the dropped term: positive-definite for any step, still first order. The exponential step completes the relaxation target's stretch to a product the same way.stress_history="log_conformation"(2-D) storesψ = log cand readsσ* = G(exp ψ* − I); it implies the deformation step. The flavours are untouched: each transports its stored tensor by pure advection, and the step stays onc, where relaxation is linear, so neither integrator changes.The model owns the encoding. The default
NavierStokesdecodes its history flux;SNES_NavierStokesand the multi-material model refuse the log store.stokes.tauprojects the decoded stress; the health check reports where the logarithm's floor acted.Result, cross-slot, full resolution, forward history, seeded: growth rate of the asymmetry −0.77, −0.24, +0.06, +0.27 at De 0.5, 0.65, 0.72, 0.8 (De = λU/H, H the half-width), onset near 0.71, against 0.62 expected from Poole et al. (full-width 0.31). The conformation stays above 0.33 everywhere.
Tests (
test_1065, and log cases intest_1064): the one-step extension closed form for both integrators and both representations, plus the linear step's indefinite −0.818; the shear start-up across four flavours and both integrators against the discrete recurrence in σ_xy and N1; the units model. The stress-history, swarm and advection files pass (316); the style gate is clean.Limits: first order; the log history 2-D only; not for stresses that are not conformations (geodynamic VEP with no objective rate).
Underworld development team with AI support from Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_017kSkAq7oJ5J3XisuvLBovo