Skip to content

Fixes for rotational periodic boundaries: implicit solver, multigrid and limiters - #2961

Open
rois1995 wants to merge 5 commits into
su2code:developfrom
rois1995:fix_periodic_rotation
Open

rois1995 wants to merge 5 commits into
su2code:developfrom
rois1995:fix_periodic_rotation

Conversation

@rois1995

@rois1995 rois1995 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

This is one of seven related periodic-boundary bug-fix PRs.

PR Scope
#2961 (this PR) Rotational Jacobian, multigrid velocity rotation and limiters
#2963 Axis points, slip-wall normals and moving donor volumes
#2964 Periodic volumes, neighbor counts, sensors, stencils and coarse flags
#2965 Streamwise periodicity, auxiliary gradients and flamelet metadata
#2966 Inverse affine transforms in the parser and FEM
#2968 Diagnostics for unsupported periodic solver combinations
#2969 Translated wall-distance images

The other bug-fix PRs are drafts with their remaining validation and implementation limits documented. Their grouping does not imply a linear merge order; #2963 depends on this PR.

The fully coupled implicit operator proposed in #2967 is a separate experimental enhancement. It has been closed and deferred because no overall benefit has been established and convergence/validation issues remain. This PR retains the existing implicit approximation.

Three fixes for rotational periodic boundaries, one commit each. The test cases are in the comment below.

  • Implicit runs: the Jacobian block that a periodic point gets from its match was rotated on one side only. It is now rotated on both sides.
  • Multigrid: the coarse levels did not rotate the velocity, so the run did not converge. The velocity is now rotated on all levels.
  • Limiters: the limiters of the velocity components were rotated like a vector, but they are separate numbers. On the periodic boundary one velocity component became first order, and limiters could be negative. Each side now sends the velocity bounds and reconstruction increments in the frame of the other side, so each limiter uses the complete stencil. Nothing changes for a translation.

New tests periodic2d_no_limiter and periodic2d_multigrid; periodic2d is now also in the MPI regression. Their x86 reference values pass in CI.

Existing reference values that change: aachen_turbine_restart, jones_turbocharger_restart and multi_interface (rotational periodic, the Jacobian block), and the hybrid periodic2d (the Jacobian block and the limiters). The x86 periodic tests and the other changed cases pass in CI; the Jones restart residual references were refreshed from the serial, MPI and hybrid CI logs. The aarch64 references still need the CI runs.

No conflict with #2945 and #2959. #2956 also changes the reference values of jones_turbocharger_restart; whichever is merged second takes them from the CI.

Related Work

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

rois1995 and others added 3 commits October 6, 2026 08:27
…aries

The residual of the periodic match is added as Q*R, and the solution of the
match is Q*U, so the block added to the diagonal must be Q*J*Q^T. Only the
rows were rotated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013UkNcoCEH8nFNrHWzhJCar
The coarse levels summed the momentum residuals, gradients and Jacobian
blocks of a rotational periodic pair without rotating them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013UkNcoCEH8nFNrHWzhJCar
…stencil

The limiters of the velocity components were rotated like a vector when
taking the minimum over a periodic pair, and the min and max velocity
vectors were rotated instead of the velocity of each neighbour.
Now each side sends, in the frame of its match, the min/max of the
rotated velocities and of the rotated reconstruction increments, and
the limiter is computed once. Nothing changes without rotation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013UkNcoCEH8nFNrHWzhJCar
@rois1995

rois1995 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Test cases

Files (configurations, histories, meshes, statistics, scripts) for each case: periodicBoundaries/rotation. 2 MPI ranks, "develop" = 6db10127d1. The values of the new tests are from my machine and will be updated from the CI.

All 2D runs use navierstokes/periodic2D (45 degree sector, laminar, ROE, implicit).

convergence

1. Jacobian block: periodic2D with SLOPE_LIMITER_FLOW= NONE, CFL 100 (panel a). Develop diverges after 1046 iterations, this PR reaches rms[Rho] = -11 in 1915.

New test periodic2d_no_limiter (100 iterations): rms[Rho] -1.083101 on develop, -3.216881 with this PR.

2. Multigrid: the same case at CFL 20 with MG_MIN_MESHSIZE= 20 (with the default, the 1600 points are too few and the run uses no multigrid). Iterations to rms[Rho] = -11 (panels b and c):

MGLEVEL= 0 MGLEVEL= 1 MGLEVEL= 2
develop 4768 stalls at -2.6 stalls at -2.7
this PR 4843 2586 2180

New test periodic2d_multigrid (MGLEVEL= 2, 300 iterations): rms[Rho] -2.741904 on develop, -4.422778 with this PR.

3. Limiters: one iteration from the same field on the sector and on the full annulus (8 copies of the sector, no periodic boundary), VENKATAKRISHNAN. With a correct periodic boundary the limiters are the same at the same points.

limiters

Largest difference of the velocity limiters to the annulus, on the periodic points:

45 degree sector 90 degree sector
develop 0.99 (limiter near 0) 2.0 (limiter -1)
this PR 2e-10 7e-11

In 3D (turbomachinery/multi_interface with MUSCL_FLOW= YES, 90 degrees): on develop the limiter of one velocity component is -1 on all 2100 points of each periodic marker, with this PR no limiter is negative.

The original case (CFL 100, VENKATAKRISHNAN_WANG, panel d) converges in 1826 iterations on develop and 1917 with this PR. The converged sector differs from the full annulus (run to rms[Rho] = -7) by 0.43 in the momentum (0.5 %) on develop and by 0.009 with this PR.

periodic2d is now also in the MPI regression (100 iterations): rms[Rho] -2.907194 on develop, -3.266248 with this PR.

The direct-flow translation checks ls89_sa, transonic_stator_restart and axial_stage2D give the same history files as develop. After preserving the original identity-rotation arithmetic, all 80 printed iterations of the translational discrete-adjoint discadj_trans_stator also match develop exactly.

Existing tests

Reference values that change:

test why develop (my machine) this PR (my machine)
aachen_turbine_restart Jacobian block -7.701420, -8.504728, -6.014939, -6.468223, ... -7.701423, -8.504851, -6.014951, -6.472219, ...
jones_turbocharger_restart Jacobian block -11.924428, -12.203366, -19.179995, -13.468776, ... -11.910586, -12.203941, -19.198816, -13.489664, ...
multi_interface Jacobian block -8.632227, -8.894736, -9.348706 -8.634558, -8.895554, -9.348754
periodic2d (hybrid, iteration 1400) Jacobian block and limiters existing CI reference -10.817607, -8.363541, -8.287457, -5.334100, ... -10.314545, -8.056213, -7.708669, -4.833054, ...
jones_turbocharger_restart (hybrid) Jacobian block existing CI reference -11.907561, -12.214137, -19.151426, -13.451780, ... -11.925871, -12.203300, -19.179088, -13.470092, ...
multi_interface (hybrid) Jacobian block existing CI reference -8.632240, -8.894740, -9.348706 -8.634571, -8.895558, -9.348754

The three turbomachinery cases have a rotational periodic boundary; a build with only the Jacobian fix gives the same new values.

Build and adjoint checks

Standalone OpenMP/MPI release build at warning level 3, with mixed precision. The three MPI periodic2D tests meet their references within the regression tolerance; the existing hybrid periodic2D, Jones and multi_interface runs succeed, and their references are updated above. No new warnings from the periodic changes; pre-commit checks pass. Earlier checks of the combined periodic branch passed the standard unit suite (44 cases / 74913 assertions) and reverse-AD units (4 cases / 29 assertions). The full OpenMP unit driver aborts in the data-driven fluid test when the optional MLPCpp support is disabled, so it is not reported as a passing suite.

The rotational periodic2D adjoint smoke runs exit successfully, but the default linear-solver settings do not converge on either develop or the branch. Tighter ILU settings improve both; these are not a complete sensitivity validation.

Comment thread SU2_CFD/src/solvers/CSolver.cpp Fixed
Comment thread SU2_CFD/src/solvers/CSolver.cpp Fixed
Comment thread SU2_CFD/src/solvers/CSolver.cpp Fixed
Comment thread SU2_CFD/src/solvers/CSolver.cpp Fixed

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants