-
Notifications
You must be signed in to change notification settings - Fork 827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix shared wall-inlet corner node for compressible #2266
base: develop
Are you sure you want to change the base?
Conversation
@Cristopher-Morales Can you check if this fixes the issue for you? This works for the testcase that you gave me (2D compressible channel flow). |
@Cristopher-Morales can you check if bounded scalar works for you for this setup with compressible flow? I activated it and it seems to work fine for the small testcase that you sent. It is much better than scalar upwind. |
/*! | ||
* \brief Generic implementation of the isothermal wall also covering CHT cases, | ||
* for which the wall temperature is given by GetConjugateHeatVariable. | ||
*/ | ||
void BC_Isothermal_Wall_Generic(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics, | ||
CNumerics* visc_numerics, CConfig* config, unsigned short val_marker, | ||
bool cht_mode = false); | ||
|
||
/*! | ||
* \brief Impose the scalar wall boundary condition. | ||
* \param[in] geometry - Geometrical definition of the problem. | ||
* \param[in] solver_container - Container vector with all the solutions. | ||
* \param[in] conv_numerics - Description of the numerical method. | ||
* \param[in] visc_numerics - Description of the numerical method. | ||
* \param[in] config - Definition of the particular problem. | ||
* \param[in] val_marker - Surface marker where the boundary condition is applied. | ||
*/ | ||
void BC_Isothermal_Wall(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics, | ||
CNumerics* visc_numerics, CConfig* config, unsigned short val_marker) override; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add this because scalar upwind for species transport in compressible flows showed a hard Dirichlet boundary condition of Y=0 on isothermal solid walls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@@ -1937,6 +1941,10 @@ | |||
|
|||
auto residual = numerics->ComputeResidual(config); | |||
|
|||
// this does not seem to be necessary | |||
cout << "bounded" << endl; | |||
//if (bounded_scalar) EdgeMassFluxes[iEdge] = residual[0]; |
Check notice
Code scanning / CodeQL
Commented-out code Note
@@ -1772,7 +1776,7 @@ | |||
const bool muscl = (config->GetMUSCL_Flow() && (iMesh == MESH_0)); | |||
const bool limiter = (config->GetKind_SlopeLimit_Flow() != LIMITER::NONE); | |||
const bool van_albada = (config->GetKind_SlopeLimit_Flow() == LIMITER::VAN_ALBADA_EDGE); | |||
|
|||
//const bool bounded_scalar = config->GetBounded_Scalar(); |
Check notice
Code scanning / CodeQL
Commented-out code Note
@EvertBunschoten can you check specifically the bounded scalar method? not sure if I missed something, see the comments that I left in the code. |
I'm sorry to interject on this issue with what is probably a useless comment, but I wanted to ask if this issue affects you also in 1st order simulations? In my experience MUSCL reconstruction at boundaries in SU2 is "incorrect" as it doesn't take into account the boundary condition applied and just assumed In a project of mine I have had some success by either disabling MUSCL outright at boundaries (very conservative and brutal solution), or disable it only at specific kinds of corners, which requires more memory unfortunately as one needs to somehow save if the node is a corner, etc. The "real solution" would be to either save the boundary solution in ghost nodes and use it for the gradient computation, or fix gradients in post-process with a small performance penalty. |
It looks like the edge mass fluxes are not stored when running compressible RANS simulations, preventing any species convection when using BOUNDED_SCALAR. I'm looking into why this happens. Below is the species solution after 10 iterations for the passive_transport_validation test case for the RANS solver and using BOUNDED_SCALAR. The species values specified at the inlet do not progress downstream using the current settings. |
Hi, @GiuSirianni, The problem I am addressing here is even more basic and occurs independent on the MUSCL scheme. When a corner is shared between an inlet and a wall, the inlet has to take into account that the node is shared by a wall (it has to know about no-slip for instance). |
@bigfooted I will open an issue, thank you! |
TO DO:
Proposed Changes
Give a brief overview of your contribution here in a few sentences.
Nodes shared by an inlet and a wall show nonphysical values in the corner node for energy, temperature, pressure, density. This fixes the issue
Related Work
Resolve any issues (bug fix or feature request), note any related PRs, or mention interactions with the work of others, if any.
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.
pre-commit run --all
to format old commits.