Skip to content

Remove dead axisymmetric Jacobian terms from the SST source - #2986

Open
Syphonicc wants to merge 1 commit into
su2code:developfrom
Syphonicc:fix-sst-axisym-jacobian
Open

Syphonicc wants to merge 1 commit into
su2code:developfrom
Syphonicc:fix-sst-axisym-jacobian

Conversation

@Syphonicc

Copy link
Copy Markdown

Title: Remove dead axisymmetric Jacobian terms from the SST source

Proposed Changes

In CSourcePieceWise_TurbSST::ComputeResidual, ResidualAxisymmetricConvectionDiffusion subtracts
yinv * Volume * rhov from the diagonal of Jacobian_i, but the "Implicit part" right after it assigns
Jacobian_i[i][j] = ..., so those contributions were always discarded. This PR removes the dead lines
and adds a comment explaining why the term is intentionally left out of the Jacobian.

I first tried keeping the terms (calling the axisymmetric function after the implicit block), but:

  • As written, the term is not the derivative w.r.t. the conservative variables (rho k, rho w); that would
    be yinv * Volume * v, not yinv * Volume * rho * v.
  • Either way, it reduces diagonal dominance for flow towards the axis (v < 0), where yinv is large.

Results on axisymmetric_rans/air_nozzle/air_nozzle_restart.cfg (serial, until rms[Rho] = -12):

Jacobian treatment Result
Current develop (terms overwritten) converges in 591 iterations
Terms kept as written (rho * v, both signs) stalls at rms[Rho] ~ -5.6, rms[k] and rms[w] grow
Exact derivative, only the stabilizing part (max(v, 0)) converges in 591 iterations (no benefit)

So the current behaviour is the right one, and this PR only makes it explicit. Results are bit-identical
(the removed lines never had an effect), so no regression values change. I checked
axi_rans_air_nozzle_restart (serial and 2 ranks) and axi_rans_air_nozzle_species locally.

Related Work

#2948 edits the same implicit block of the SST source; this PR does not touch those lines.

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant