Skip to content

Improved initial guess for Newton solver in data-driven fluid model#2734

Merged
EvertBunschoten merged 7 commits intodevelopfrom
feature_minitable
Feb 20, 2026
Merged

Improved initial guess for Newton solver in data-driven fluid model#2734
EvertBunschoten merged 7 commits intodevelopfrom
feature_minitable

Conversation

@EvertBunschoten
Copy link
Member

@EvertBunschoten EvertBunschoten commented Feb 19, 2026

Proposed Changes

The data-driven fluid model uses a Newton algorithm to calculate thermodynamic states for thermodynamic pairs different from density + internal energy. The initial guess for the Newton algorithm was determined through additional settings in the configuration file or by approximation with the ideal gas law.

However, these methods do not always provide an initial guess sufficiently close to the target to get the Newton algorithm to converge, especially for non-reflective boundary conditions. I have added two features which address this problem:

  1. When configuring the data-driven fluid model, a small, five-by-five thermodynamic table is generated in the density-static energy space. Pressure and temperature are stored on the nodes of this table. The initial guess for the Newton algorithm is now set according to the nearest-neighbor of the table, which brings the initial guess much closer to the target.
  2. When the thermodynamic state approaches the limits of the look-up algorithm, additional relaxation is applied such that the Newton algorithm does not go out of bounds. This improves robustness for boundary calculations, especially in dilute conditions.

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.

Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there no tests using the data-driven models? I was expecting this change to trigger some regression changes.
Maybe the Newton solves had no issues with the regressions?

@EvertBunschoten
Copy link
Member Author

Are there no tests using the data-driven models? I was expecting this change to trigger some regression changes. Maybe the Newton solves had no issues with the regressions?

Yes the existing data-driven regression test happened to run just fine with the previous initialization method. However, I experienced issues when running some more challenging turbomachinery cases that use the Giles BC.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@EvertBunschoten EvertBunschoten merged commit ae774f5 into develop Feb 20, 2026
37 checks passed
@EvertBunschoten EvertBunschoten deleted the feature_minitable branch February 20, 2026 09:14
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