Repository navigation
NavierStokesSLCN takes a viscoelastic model's stress as its momentum flux, with the history at the model's order (UNFILED 39) - #1300
Open
lmoresi wants to merge 2 commits into
Conversation
…flux, with the history at the model's order (UNFILED 39) The solver formed its momentum flux as the Adams-Moulton average of its flux history. With a viscoelastic model that history is the stress, which the model's BDF or exponential update already integrates in time, so the average was a second integration on top: at order 2 it diverged (the BDF-2 shear box 2.95 from Stokes at step 30; with a stiff inclusion 277). With a stress history the momentum flux is now the model's flux, as in Stokes; a viscous flux keeps the average. The solver's order also overwrote the model's, so a BDF-2 model on a solver of order 1 ran at order 1; the history is now built at the model's order, and the model keeps it. Underworld development team with AI support from Claude Code
Underworld development team with AI support from Claude Code
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NavierStokesSLCNwith a viscoelastic model now takes the model's stress as its momentum flux, as Stokes does. It also builds the stress history at the model's order. No issue was filed: this is UNFILED 39 (H1, review of #1256), and this body is the report.Measurements are by H7 (the stress-history desk, a Claude session on a 96-thread Linux workstation: Intel Xeon Gold 6240R, MPICH), serial.
The cause
F1 = a0 σ^{n+1} + a1 σ*_0 + a2 σ*_1, with weights (5/12, 8/12, -1/12) at order 2. With a viscoelastic model that history is the stress, which the model's own BDF or exponential update already integrates in time. The average was a second integration on top. Stokes and the composedNavierStokesuseσ^{n+1}.order. A BDF-2 model on a solver built withorder=1therefore ran at order 1, becauseeffective_orderis the smaller of the model's and the history's.What changes
F1is the model's flux,constitutive_model.flux(its total stress, a solvent viscosity included). A viscous flux keeps the Adams-Moulton average, which is its time integration, so viscous-only runs are unchanged.NavierStokesSLCN.constitutive_model's setter builds the stress history at the order the model asks for, and leaves the model at that order. A history that has already been used cannot change order, and the setter refuses that case.Measured
30 steps, Δt 0.1, BDF-2, rho 1e-6, 16×8 quads, against Stokes:
NavierStokesagainst Stokes: 4.8e-2 on this box)NavierStokesSLCN(order=1)given an order-2 modelBehaviour change, order 1 included:
psi_star[0]reads 0.393424 against 0.393421 on development (exact 0.393469). NavierStokesSLCN commits its stress history after the solve (#742); it refuses a stress_transport it does not honour #1256's numbers stand.NavierStokesSLCNcheckpoint written before this change will not restart identically after it: the momentum flux it was solved with is different.Tests
tests/test_1297_navier_stokes_slcn_viscoelastic_order_two.py, level 2, tier B:All three fail on development and pass here. With
test_1059,test_1063and every file that buildsNavierStokesSLCN,SNES_NavierStokesorNavierStokesSwarm(test_1247among them): 113 passed.Checklist (UW3 Style Charter)
level_2andtier_bmarkers; it fails on development (S8)Underworld development team with AI support from Claude Code