Repository navigation
feat(domain): reproduce the Kolmogorov solver-in-the-loop study - #316
Draft
dionhaefner wants to merge 2 commits into
Draft
dionhaefner wants to merge 2 commits into
dionhaefner wants to merge 2 commits into
Conversation
JAX-CFD, INS.jl and XLB take an optional `state` and `return_state`, so a chain of calls continues the staggered or lattice solver exactly instead of restarting it from the cell-centred velocity.
optimization/kolmogorov_sil trains a periodic CNN corrector on each solver's coarse Kolmogorov run in three arms (supervised, gradient stopped at the solver, differentiated through the solver) and gates on the reference, the closure of chained calls, the FD gradient of the training loss and finite training. optimization/kolmogorov_sil_stability trains longer, on three seeds, and rolls every corrector out for 200 intervals. studies/kolmogorov-sil holds the scripts and results that reproduce the study.
This was referenced Oct 30, 2026
Base automatically changed from
feat/kolmogorov-chain-gradient
to
feat/kolmogorov-forward
October 30, 2026 16:09
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.
Relevant issue or PR
For reproduction, not for merge. It collects the solver-in-the-loop study of the Kolmogorov flow in one place, so its results can be rerun, for instance for a paper. It replaces #273 (native solver state) and #274 (
optimization/kolmogorov_sil), and is stacked on #272.Description of changes
The study trained a learned corrector through each differentiable ns-grid solver. It did not become a benchmark. Every solver that runs the turbulent flow passed every training check, so training did not separate the solvers beyond the forward cost that
forward/kolmogorovalready measures. The one defect it found, PICT's adjoint tolerance (#294), is caught as well bygradient/chain_fd_checkin #272, which needs neither a corrector nor native state.Two commits:
stateandreturn_stateinputs let a chain of calls continue a staggered or lattice solver exactly, instead of restarting it from the cell-centred velocity.optimization/kolmogorov_sil: the CI-size feasibility and cost check from feat(domain): add a Kolmogorov-flow solver-in-the-loop benchmark to ns-grid #274.optimization/kolmogorov_sil_stability: longer training on three seeds, with 200-interval rollouts of every trained corrector. It takes about half an hour per solver on an A100, and most of a day for PICT, so it is not meant for CI.studies/kolmogorov-sil/: the commands, scripts and result tables.python -m mosaic.benchmarks.cli run -o results/stability-XLB -p ns-grid \ -e optimization/kolmogorov_sil_stability -s XLB --no-plots python studies/kolmogorov-sil/summarize.py results/sil results/stability-*Findings
The full tables are in
studies/kolmogorov-sil/README.md.Testing done
mainon 2026-10-28, with PICT including fix(solver): make PICT's VJP linear in the cotangent #294.mainor the stack below it. Since then INS.jl has moved to its CUDA backend (perf(solver): run INS.jl on its CUDA backend #307), and the native-state change has not been ported to that backend.