Repository navigation
Add a docs example: axisymmetric swirl, a collapsing core - #63
Merged
Merged
Conversation
…lor-Hood mesh Axisymmetric-with-swirl Navier-Stokes in (r, z) with Weighted(r) momentum equations, P2/P1 triangles from Gmsh, and a manufactured self-similar core whose force is the residual of our own equations at that field. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
A scalar Weighted(r) heat problem (rate about 3) and the swirl system at c = 0.2 and 0.1 (velocity rate above 2.7, pressure rate above 1.7), plus a freshness check of the committed figures. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
New docs page with the equations, driver, mesh, solve, measured convergence and cost tables, and limits. The two images are committed with a checksum of their sources; the docs build runs no solve. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
linear_residual.jl saves the Newton matrix at t = 0.5 and factorizes it once with UMFPACK or KLU. UMFPACK reaches 6e-15 (124k unknowns) and 3e-14 (490k); KLU is 1000 times slower and far less accurate. The page states the measurements and points at LinearSolve PR 1414. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
It is the residual at the accepted state advanced one step, not DFBDF's own Newton right-hand side. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.312 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Member
|
cite the paper, mention the provenance |
Member
|
include an animation |
Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
The axisymmetric swirl page now cites the OpenAI preprint it takes its scalings from, says what comes from it and what is ours, and embeds an animation of the c = 0.1 run rendered by examples/axisym_swirl/animation.jl, with its own checksum checked by the NavierStokes test group. Agent-Harness: Claude Code 2.1.318 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
xtalax
marked this pull request as ready for review
November 5, 2026 22:41
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.
Adds a docs page, "Axisymmetric swirl: a collapsing core": what a finite element run of our own axisymmetric-with-swirl Navier-Stokes discretization does, driven by a manufactured self-similar collapsing core with the exponents of the forced-blowup paper. It is our own discretization, nothing more: it does not reproduce, prove or disprove that paper, whose blowing-up flow is not even axisymmetric. The force is defined as the residual of our manufactured family and is ours.
What is in it:
examples/axisym_swirl/(mesh.geograded toward the origin and parametrised bycthrough Gmsh's onelab,manufactured.jlwith the exact field and the residual forces compiled withbuild_function(...; cse = true)and registered with@register_symbolic,axisym_swirl.jlwith the PDESystem in (r, z),ibp = Dict(eq => Weighted(r))on the three momentum equations, the continuity equation weighted as0 ~ Dr(r*ur) + r*Dz(uz)paired with p, P2/P1 Taylor-Hood,natural = [Γaxis]for the axis, a pinned pressure and the r-weighted L2 error;figures.jlandchecksum.jlrender the two committed images and a checksum),test/NavierStokes/axisym_swirl.jl(c = 0.2 then 0.1 at tau_end = 0.1, asserting velocity rate above 2.7 and pressure rate above 1.7, plus the scalar Weighted(r) heat test with rate above 2.7; a freshness test compares a checksum of the example sources with the committedaxisym_swirl.fnv1a, as in #59),docs/src/axisymmetric_swirl.md(entry after the Navier-Stokes example) and two committed images (268 KB mesh picture, 150 KB core picture: swirl at t = 0.5, 0.9 and 0.99 and the error staying flat as the core collapses).All numbers on the page were measured by running the committed example on this host (UMFPACK,
new_W_dt_cutoff = 0). Relative r-weighted L2 error, velocity / pressure: c = 0.1: 1.83e-4 / 1.95e-3 at t = 0.5, 1.78e-4 / 1.84e-3 at 0.9, 1.68e-4 / 1.92e-3 at 0.99; c = 0.05: 2.21e-5 / 4.76e-4, 2.14e-5 / 4.78e-4, 2.23e-5 / 4.86e-4; c = 0.025: 2.72e-6 / 1.19e-4, 2.68e-6 / 1.19e-4, 2.71e-6 / 1.19e-4. Observed rates between successive c: about 3.0 for velocity and 2.0 for pressure at every time. Cost: c = 0.1 has 4,870 cells and 32,324 unknowns (23.5 s, 2.7 GiB peak), c = 0.05 has 18,894 cells and 124,138 unknowns (101 s, 3.95 GiB), c = 0.025 has 75,004 cells and 490,169 unknowns (421 s, 9.49 GiB); 427 to 428 steps each, zero rejected steps and zero Newton failures; compile plus warm-up about 55 s per process.Docs build: no solve is added to it (static code blocks executed by the tests, like the other pages) and the two images are committed, so the build delta is within noise (1m48.71 s with and without the page). The c = 0.1 run behind the figures takes about 2m19 including compile and is run by
julia --project=docs examples/axisym_swirl/figures.jl; any edit tomesh.geo,manufactured.jl,axisym_swirl.jlorfigures.jl(even a comment) changes the checksum and needs that one command or the freshness test fails.Choices I want to be explicit about. (1)
new_W_dt_cutoff = 0is kept here, unlike #62's DFG example: at c = 0.05 the default cutoff gives a pressure error 22% worse at t = 0.5 (5.82e-4 against 4.76e-4) for only 16% less solve time. (2) UMFPACK is used at every size, not KLU, and its linear solves are checked: on the Newton matrix W at t = 0.5 extracted from the c = 0.05 and c = 0.025 runs (each solver alone in its own process), UMFPACK's default settings reach a relative residual of 6.4e-15 at 124,138 unknowns (1.1 s, 1.4 GiB) and 2.6e-14 at 490,169 unknowns (4.9 s, 4.0 GiB), about nine orders of magnitude below the spatial errors, so the linear solves do not contaminate the error table; KLU is both slower and less accurate here (8.0e-6 in 1015 s and 8.4 GiB at 124k; at 490k it was still factorizing at the 25-minute cap with at least 20 GiB, so no residual was obtained); earlier at 26k unknowns it took 181 s and 6.2 GiB against 17 s and 2.6 GiB, and at 32k it had not finished after 10 minutes. The measurement is one state (t = 0.5) for this system only and says nothing about other saddle-point matrices (the DFG matrices need the pivot-tolerance route); every step needed about one Newton iteration, so a linear solve error would not be iterated away, but here it is at rounding level; the right-hand side used is the residual at the accepted state with time advanced one step, not DFBDF's own Newton right-hand side (the page says so). The page also points at LinearSolve.jl PR #1414 (opt-inpivot_toleranceandstrategyforUMFPACKFactorization, open when written) as the route for large problems once released. The script isexamples/axisym_swirl/linear_residual.jl(not checksum-covered). (3)Weightedis imported asusing PDEBase.StrongForm: Weighted(not exported or documented in this package yet). (4) The example's error function uses internals (sol.disc_data.space.dh,sol.original_sol) because there is no public error-norm API.Local results on Julia 1.12.1:
GROUP=NavierStokespasses (the new test 19/19 in 2m01, the DFG test 15/15), no boundary-completeness warning, Core and QA pass, the docs build exits 0, Runic clean, Codex approved. typos is not installed locally, so identifiers and prose were scanned by hand. Findings for separate work:Weightedexport and docs; this is the first test of Navier-Stokes on P2/P1 triangles from Gmsh; long symbolic sources compile without common-subexpression elimination (the force is registered here as the workaround; fix proposed as its own PRs); the@profilesegfault at 124k was not reproduced.🤖 Posted by an AI agent · harness: Claude Code 2.1.318 · model: claude-sonnet-5-5
Review: unreviewed
Session: 43e03fde-3384-4386-bae9-03e81f19ba7c