Repository navigation
Conversation
…minimum The R4 function uses the magnitudes a = |delta| and b = |proj| (Nishikawa, AIAA 2022-1374), but its denominator used the signed delta^3. On the minimum side, where delta and proj are negative, it returned e.g. 7/6 instead of 7/8, so undershoots of the reconstruction below the neighbor minimum were limited less than overshoots above the maximum. R3 and R5 use even powers and are not affected. A unit test checks that the R3, R4 and R5 functions give the same value for (proj, delta) and (-proj, -delta). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013UkNcoCEH8nFNrHWzhJCar
The supersonic ramp of the ramp test with NISHIKAWA_R4 instead of NISHIKAWA_R5. With the previous sign error, after 10 iterations from the restart rms[Rho] is -2.180 instead of -2.787. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013UkNcoCEH8nFNrHWzhJCar
The wall distance was computed only for RANS (and FEM LES/RANS). With the WALL_DISTANCE limiter in a laminar or inviscid case all distances stayed 0 and the limiter was 0 everywhere, i.e. the whole domain was first order. The wall distance is now also computed when a flow, turbulence, species or continuous adjoint limiter is WALL_DISTANCE, and a case without viscous walls stops with an error. New regression test flatplate_wall_limiter (laminar flat plate, limiter band of 2 mm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013UkNcoCEH8nFNrHWzhJCar
These limiters are first order within a distance proportional to VENKAT_LIMITER_COEFF times ADJ_SHARP_LIMITER_COEFF. With either coefficient 0 the geometric factor divides by zero and is 0 everywhere, so the case runs silently at first order. Now a configuration error asks for both coefficients > 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013UkNcoCEH8nFNrHWzhJCar
The NEMO limiters are those of the primitive variables (species densities, T, Tve, velocity, pressure, ...), but the outputs used the names of the conservative variables at the first indices: for AIR-5, LIMITER_MOMENTUM-X, LIMITER_MOMENTUM-Y and LIMITER_ENERGY were the limiters of the densities of species 1, 2 and 3. They are now LIMITER_DENSITY_<i>, LIMITER_TEMPERATURE_TR, LIMITER_TEMPERATURE_VE, LIMITER_VELOCITY-X/Y/Z and LIMITER_PRESSURE. A unit test checks the names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013UkNcoCEH8nFNrHWzhJCar
Test casesFiles (configurations, histories, limiter statistics) for each case: limiters. Meshes are from the TestCases repository. 2 MPI ranks, "develop" = 1.
The new unit test 2.
New test 3. Zero width:
4. NEMO limiter outputs:
The new unit test |
…and limiters (#2961) ## 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 - #652 added the present implementation of the periodic boundaries. - #1563 fixed the rotation in 2D and added the `periodic2D` case used here. - #1467, #763 and #1585 discuss the incomplete linear system at periodic points; this PR keeps the existing approximation. ## PR Checklist - [x] I am submitting my contribution to the develop branch. - [x] My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson). - [x] My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/). - [x] I used the pre-commit hook to prevent dirty commits and used `pre-commit run --all` to format old commits. - [x] 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. --------- Co-authored-by: rois1995 <rauxa1995@hotmail.it> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Josh Kelly <81244680+joshkellyjak@users.noreply.github.com> Co-authored-by: Nijso <bigfootedrockmidget@hotmail.com>
|
we do not have a testcase that uses nishikawa_R4, can you add one? |
…quation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
It is in this PR: |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…harger_restart references flatplate_wall_limiter wrote restart_flow.dat, which flatplate_supersonic reads next. jones_turbocharger_restart changes at round-off level (wall distance fallback). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@bigfooted should we merge this? |
| SetVolumeOutputValue("LIMITER_VELOCITY-Y", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, nSpecies+3)); | ||
| if (nDim == 3) | ||
| SetVolumeOutputValue("LIMITER_VELOCITY-Z", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, nSpecies+4)); | ||
| SetVolumeOutputValue("LIMITER_PRESSURE", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, nSpecies+nDim+2)); |
There was a problem hiding this comment.
Use the index class for NEMO instead of offsets
|
|
||
| /*--- The SHARP_EDGES and WALL_DISTANCE limiters are first order within a distance proportional to | ||
| * VENKAT_LIMITER_COEFF * ADJ_SHARP_LIMITER_COEFF, with a zero width they are first order everywhere. ---*/ | ||
| for (const auto kind : {Kind_SlopeLimit_Flow, Kind_SlopeLimit_Turb, Kind_SlopeLimit_Species, Kind_SlopeLimit_Heat, |
There was a problem hiding this comment.
Instead of looping over all possible limiters can we instead loop only over the active limiters in the config
Proposed Changes
Fixes for the slope limiters of the flow. One commit per fix; the test cases follow in the comment.
NISHIKAWA_R4: a sign error in the formula limited undershoots less than overshoots. Now both are limited the same way.WALL_DISTANCEwithout a turbulence model: the wall distance was never computed, so the limiter was zero everywhere and the solution was first order. It is now computed; a case without viscous walls stops with an error.SHARP_EDGESandWALL_DISTANCEwithVENKAT_LIMITER_COEFF= 0orADJ_SHARP_LIMITER_COEFF= 0: the case ran at first order without a warning. This is now a configuration error.New tests
ramp_r4andflatplate_wall_limiter, and two unit tests. No existing reference value changes. The values oframp_r4will be updated from the CI.Related Work
PR Checklist
pre-commit run --allto format old commits.🤖 Generated with Claude Code
https://claude.ai/code/session_013UkNcoCEH8nFNrHWzhJCar