[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.
There was a problem hiding this comment.
Please think about ways of reusing the numerics used by the scalar solvers, not duplicating code is part of the criteria for merging PRs.
| Diff_U = new su2double [nVar]; | ||
| Velocity_i = new su2double [nDim]; | ||
| Velocity_j = new su2double [nDim]; | ||
| Velocity_upw = new su2double [nDim]; | ||
| MeanVelocity = new su2double [nDim]; | ||
| Flux = new su2double [nDim]; | ||
| ProjFlux_i = new su2double [nVar]; | ||
| ProjFlux_j = new su2double [nVar]; | ||
| Jacobian_i = new su2double* [nVar]; | ||
| Jacobian_j = new su2double* [nVar]; | ||
| Jacobian_upw = new su2double* [nVar]; | ||
|
|
||
| for (iVar = 0; iVar < nVar; iVar++) { | ||
| Jacobian_i[iVar] = new su2double [nVar]; | ||
| Jacobian_j[iVar] = new su2double [nVar]; | ||
| Jacobian_upw[iVar] = new su2double [nVar]; |
There was a problem hiding this comment.
Please look at more recent examples of introducing new numerics classes or cleaning old ones, this is not the way for new code.
| Face_Flux = 0.0; | ||
| for (iDim = 0; iDim < nDim; iDim++) { | ||
| Velocity_i[iDim] = V_i[iDim+1]; | ||
| Velocity_j[iDim] = V_j[iDim+1]; | ||
| MeanVelocity[iDim] = 0.5*(Velocity_i[iDim] + Velocity_j[iDim]); | ||
| Face_Flux += MeanDensity*MeanVelocity[iDim]*Normal[iDim]; | ||
| } |
There was a problem hiding this comment.
This is not a correct implementation of Rhie-Chow momentum interpolation.
Please consider attending a developer meeting to explain your plans with this PR, the way I see it going, it's not going to make the cut to merge into develop.
There was a problem hiding this comment.
Thanks for your feedback. I will let you know when it is ready for review.
Proposed Changes
The current work aims at getting a working version of the pressure based incompressible flow solver into the development branch.
Finished:
TODO:
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.