[WIP] Pressure Based Solver#2812
Conversation
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
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.
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
The current viscous residual of the poisson equation uses an isotropic diffusion coefficient, this should not be the case and should thus be replaced
|
I will have to review the code myself first, it is not ready for review as of yet. |
thijsaalbers
left a comment
There was a problem hiding this comment.
The current version of the solver is ready for review. It is however not yet finished and there is a list of known issues that I am still working through. I have updated the PR description with the current status and known limitations; please read that before reviewing the implementation.
| su2double SemiSpan; /*!< \brief Wing Semi span. */ | ||
| su2double MSW_Alpha; /*!< \brief Coefficient for blending states in the MSW scheme. */ | ||
| su2double Roe_Kappa; /*!< \brief Relaxation of the Roe scheme. */ | ||
| su2double RCFactor; /*!< \brief Relaxation for the Rhie-Chow interpolation contribution. */ |
There was a problem hiding this comment.
Should this variable still be named RCfactor? This factor is named RC to remain consistent with the thesis of Akshay, it however has no relation to Rhie-Chow at all and instead functions as a means of controlling the time dependent term on the momentum coefficients for the poisson equation... I do not know why he called it RC in his thesis, nor if we should keep this same name or change it.
| //TODO: almost everything in this file is a direct or indirect copy of the code in | ||
| // the CIncNSSolver class. this will need to be refactored. |
There was a problem hiding this comment.
The only really different thing in this file from the CIncNSSolver is the wall boundary condition defintion (which is just massively simplified). I again do not know how this should be unified with the CIncNSSolver class as the C..IncEuler classes in between are massively distinct.
|
|
||
| unsigned short skipVars = nDim + solver[MESH_0][FLOW_SOL]->GetnVar(); | ||
|
|
||
| if (config->GetKind_Incomp_System() == ENUM_INCOMP_SYSTEM::PRESSURE_BASED) skipVars+=2; // skip pressure |
There was a problem hiding this comment.
This works, although i do not know why +2 and not +1...
Proposed Changes
The current work aims at getting a working version of the pressure based incompressible flow solver into the development branch.
Progress:
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
Periodic boundary conditions have not been implemented/tested at all as of yet.
Any code related to adjoints has not been considered at all either.
Current code issues:
TODO list
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
pre-commit run --allto format old commits.