Skip to content

[WIP] Pressure Based Solver#2812

Draft
thijsaalbers wants to merge 19 commits into
developfrom
feature_pressure_based_2026
Draft

[WIP] Pressure Based Solver#2812
thijsaalbers wants to merge 19 commits into
developfrom
feature_pressure_based_2026

Conversation

@thijsaalbers

@thijsaalbers thijsaalbers commented May 7, 2026

Copy link
Copy Markdown

Proposed Changes

The current work aims at getting a working version of the pressure based incompressible flow solver into the development branch.

Current performance issues:

  • Time step size is very limited due to pressure-velocity coupling. (This issue is carried over from old pressure based versions). Attempts have been made with multiple PISO corrections but to no avail

  • Convergence issues with RANS

    • At high reynolds numbers the solver becomes difficult to resolve and needs a very large number of linear solver iterations for the poisson equation.
    • SA works (under low enough reynolds numbers) but SST diverges quickly.
  • Periodic boundary conditions have not been implemented at all as of yet.

Current code issues:

  • Failing regression tests due to a different value for the RMS[W] for incompressible density based simulations due to unknown reason.
  • mpirun version 4 of openMPI sometimes gives issues such as nans at startup which are resolved with version 5.
  • The constructor and non dimensionalization of the CPBIncEulerSolver is largely a direct duplicate of CIncEulerSolver except for the nVar definition and different fluid models which are not yet supported by the PB solver.
  • Lots of dead code in the form of variable definitions remain intertwined with used code and should be removed.

TODO list

  • Fix issues mentioned above
  • Validation and Verification
  • Documentation, Tutorials etc.

Related Work

This work is based on earlier attempts by Nitish Anand (2024) and Akshay Koodly (2021), see feature branches feature_PBFlow_V8 and feature_Pressure_based respectively. Also see PR #2210

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.

@thijsaalbers thijsaalbers self-assigned this May 7, 2026

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Comment thread SU2_CFD/src/numerics/poisson.cpp Outdated
Comment thread SU2_CFD/src/numerics/pbflow.cpp Outdated
Comment thread SU2_CFD/src/numerics/pbflow.cpp Outdated
Implements the full class structure required for the pressure-based solver in a minimal form.
The code compiles and runs but does not yet contain any numerical/physical implementation.

Future work will focus on implementing solver logic.

Note: In the previous attempts (see related work) there is noticeable code duplication between CIncEuler and CPBIncEuler.
The final architecture may be revised depending on how the implementation of CPBIncEuler evolves.
/*--- Store the number of vertices on each marker for deallocation later ---*/

nVertex.resize(nMarker);
for (iMarker = 0; iMarker < nMarker; iMarker++)
Comment thread SU2_CFD/src/drivers/CDriver.cpp Fixed
Comment thread SU2_CFD/src/solvers/CPBIncEulerSolver.cpp Fixed
Comment thread SU2_CFD/src/solvers/CPBIncEulerSolver.cpp Fixed
Comment thread SU2_CFD/src/drivers/CDriver.cpp Fixed
Comment thread SU2_CFD/src/drivers/CDriver.cpp Fixed
Comment thread SU2_CFD/include/variables/CPoissonVariable.hpp Fixed
Comment thread SU2_CFD/include/solvers/CPoissonSolver.hpp Fixed
Comment thread SU2_CFD/include/solvers/CPoissonSolver.hpp Fixed
Comment thread SU2_CFD/include/solvers/CPBIncEulerSolver.hpp Fixed
Centered residual is not yet implemented as the old code did not have a working version. Upwind residual is functional but requires cleanup and move to more appropiate file.
Variables are a work in progress and still include some commented out code related to energy and pressure
@thijsaalbers thijsaalbers reopened this Jul 3, 2026
@thijsaalbers

Copy link
Copy Markdown
Author

I will have to review the code myself first, it is not ready for review as of yet.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants