Fix incompressible velocity inlet on intersections with viscous walls#1631
Fix incompressible velocity inlet on intersections with viscous walls#1631
Conversation
| for (auto iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { | ||
| /*--- check it is a viscous wall ---*/ | ||
| if( config->GetViscous_Wall(iMarker)) { |
There was a problem hiding this comment.
I think it would be easier if we added "GetViscousBoundary" to CPoint, we will need these checks in other boundaries, for example supersonic farfield and inlets.
If you grep for "SetSolidBoundary" you should find the 3 places where we need to add a "SetViscousBoundary" based on config->GetViscous_Wall(iMarker)
There was a problem hiding this comment.
For CEulerSolver, we need to do this in the same manner for velocity and pressure, for both total_pressure and massflow boundary type?
There was a problem hiding this comment.
With "this" I mean:
/*--- check if the inlet node is shared with a viscous wall ---*/
if (geometry->nodes->GetViscousBoundary(iPoint)) {
/*--- match the velocity and pressure for the viscous wall---*/
for (iDim = 0; iDim < nDim; iDim++)
V_inlet[iDim+prim_idx.Velocity()] = nodes->GetVelocity(iPoint,iDim);
/* pressure obtained from interior */
V_inlet[prim_idx.Pressure()] = nodes->GetPressure(iPoint);
}
There was a problem hiding this comment.
It is done already, since for compressible only the flow direction can be specified. Supersonic inlet is the only one that may need this treatment.
It is probably fine to leave temperature alone even in isothermal boundaries, having 0 velocity should avoid wrong contributions to the energy equation, we should run the "profile test" on temperature.
There was a problem hiding this comment.
OK, thanks. The failed regressions are all directly related to the change in residuals due to this modification. I can update it if there are no other changes in the code necessary for this PR.
| * \param[in] iPoint - Index of the point. | ||
| * \param[in] boundary - <code>TRUE</code> if the point belong to the physical boundary; otherwise <code>FALSE</code>. | ||
| */ | ||
| inline void SetViscousBoundary(unsigned long iPoint, bool boundary) { ViscousBoundary(iPoint) = boundary; } |
There was a problem hiding this comment.
@jtneedels maybe this type of formulation can be applied in #1635 ?
WallyMaier
left a comment
There was a problem hiding this comment.
This LGTM! Thanks for making this fix.
|
No love for supersonic inlets 😢 |
Let's make sure we do not forget about it -> #1639 |
Proposed Changes
Give a brief overview of your contribution here in a few sentences.
Fix incompressible inlet when corner nodes are shared by a viscous wall
#1613
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.