Skip to content

Conversation

@joshkellyjak
Copy link
Contributor

@joshkellyjak joshkellyjak commented Dec 7, 2025

Proposed Changes

Added abilitiy to ramp MUSCL scheme from first to second order across specified number of iterations. Two methods are implemented, ITERATION and SMOOTH_FUNCTION. ITERATION varies based on the current iteration from starting to end iteration, SMOOTH_FUNCTION enables a smooth S-Curve according to a cosine function. The option for power controls how aggresively the ramp is applied.

For ITERATION:
Power < 1 results in quicker ramp up early then slower as it approaches final value
Power = 1 results in linear (ITERATION) or cosine (SMOOTH_FUNCTION) ramp
Power > 1 results in slow initial ramping and then faster towards end

Related Work

N/A

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • 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.

@bigfooted
Copy link
Contributor

Cool, do you have a testcase as well? I guess ramping is always good for convergence when you want second order MUSCL?

@joshkellyjak
Copy link
Contributor Author

Cool, do you have a testcase as well? I guess ramping is always good for convergence when you want second order MUSCL?

Not something coarse enough to be uploaded to GitHub but I will adapt one of the available testcases for this purposes. I mainly implemented this for running cases in an optimisation loop without having to implement some method to restart if you want to go from first to second order Roe scheme. In my experience, if your case can handle second order from the start it is already going to converge pretty well but ramping may improve the the convergence - as long as you don't set too large a ramp. At the minute my determination of the coefficients for the ramp are more of an art rather than a science.

@joshkellyjak
Copy link
Contributor Author

Added testcase and update documentation

@joshkellyjak
Copy link
Contributor Author

One thing I have noticed is the CFL should be ramped down during this MUSCL ramp procedure, and then reincreased after it is finished. There can be some convergence issues if not. Here I ramp the MUSCL scheme at iteration 5000 for 2000 iterations and retain a reasonably high CFL for the case (radial turbine). There is some divergence followed by stalled residuals if I keep the CFL high throughout the ramp. Will add some functionality to do this at some point this week.

image

@pcarruscag
Copy link
Member

I do that in the Newton-Krylov startup period. At the end of the startup the CFL is reset to the initial value.

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.

3 participants