# Feature Refinement not working as expected - 2 ISSUES

_ ISSUE #1 WITH FEATURE REFINEMENT - Incorrect Sharp Angle Condition _

Since I have been forced to abandon the Hex Dominant Automatic Algorithm and start using the Hex Dominant Parametric Algorithm due to its more detailed control in creating yPlus layers, I have also been forced to learn how to use more Refinement types.

The âFeature Refinementâ has me pulling my hair out as I expect it to refine along surface edges that join other surface edges at âsharpâ angles. Doing so under the premise that if there is a âsharpâ angle, you most likely want to keep it defined in the mesh.

Under that premise, I am not getting the expected results.

I think I have narrowed the issue down to the fact that the Feature Refinement does just the opposite, it refines the mesh when the intersection angle of the surface edges are LESS âsharpâ than the included angle.

Here is the Help Pop-up pane:

If this graphically depicted angle defines the first edge that you want considered as âsharpâ then all edges that are that sharp or sharper would be GREATER than or equal to that angle, not less than.

My intuitive brain originally just ignored the words âless thanâ and the resulting mesh I get when I use the defaulted angle of 150 degrees confused my brain. My geometry does not have any angles greater than 150 deg so my brain said the resulting mesh would be no different than without this refinement BUT all edges in the mesh were refined, even ones that are almost parallel.

Thanks,
Dale

Without 150 degree Feature Refinement:

With 150 degree Feature Refinement:

1 Like

_ ISSUE #2 - FEATURE REFINEMENT - Mesh Edges Do Not Follow Geometry Edges _

But IRREGARDLESS of my Issue #1 lets assume that I actually wanted all the edges in my geometry refined by Feature Refinement (sort of like a Surface Refinement, which I also behaves as I am about to show).

Here I am showing the model geometry with a highlighted surface on it (note the clean curved edges):

Here is mesh with a Feature Refinement set at an included angle such that it would refine all edges in my geometry (note the appearance of NOT clean edges anymore):

What I expected was to maintain my clean looking edges in the mesh. I do not think there is any reason that the algorithm could not maintain the look of those curved geometry edges by making my geometryâs clean curved line into a bunch of little mesh face edges whose endpoints of one edge of each face are ON the curved line. This would result in a smooth looking edge in the mesh, not the jagged mesh edge that we see.

Does anyone else want it to appear to have clean geometry edges left in their mesh?

Hi @DaleKramer!

I merged both of your posts because they are related and switching between both would not make much sense. Let me tag @Get_Barried and @vgon_alves who might help you out in the meantime.

Best,

Jousef

@jousefm

I believe that they are completely UN-related to each other

Other than both having to do with a particular feature, the discussion will likely be completely different.

I think it will be confusing to have them in one topic.

Dale

@DaleKramer interesting observations, thanks for taking the time to explain them. Could you share your project(s)? If you want to keep them private, share them with support please. It would be easier to answer your concerns after looking into them. Thanks.

Babak

I have started a new public project that I will be introducing into my XFLR5 vs CFD topic.

The project is called XFLR5vsCFD.

Both un-related issues can be seen in mesh â174k Refined HexPara Mesh 4â operation âRefine Wing D4L5 Feature A150D1L6â

It was already shared with support.
Dale

@DaleKramer I only see â2.03mb 5118 Refined HexPara Mesh 1â and â3.02mb Layered and 5118 Refined HexPara Mesh 2â in your project, neither of which have a feature refinement. Is that the right project?

@gholami

Sorry, I have been working on the project and it was getting messy, I forgot I should have left that one, I have recreated the mesh you are looking forâŠ

Dale

@gholami

In order to reduce the effects of Issue #2, I increase mesh refinement A LOT, this helps but does not eliminate the jaggies problem.

These jaggies are causing serious problems for me when I yPlus layer a mesh.

Please see this post and the posts around it to see for yourself.

Thanks for taking a look at these problems.
Dale

To emphasis this Issue #1 I created this very simple project with 1 simple geometry and 1 feature refined mesh.

Here is the relevant geometry with significant items labeled:

I want to use a Feature Refinement to ensure that Edges 1,2,3, and 4 are âFeaturedâ in the mesh.

What I expected that I could do was to enter an angle such as 150 degrees and expect to get a mesh such that any edges at surface intersections that are GREATER than 150 degrees would be âFeaturedâ precisely in it.

What happens in this example, when I put 150 degrees as the parameter, is that ALL edges get Featured at the Refinement Distance and Level specified (Included Angle was 150, Distance was .001, Level was 3) as shown in this image:

Clearly you can see that ALL edges have been refined and some (Namely 1,2,3, and 4) have been actually blunted and have lost definition at the ends of the edge.

In this image Edge 3 is closest to the camera, you can see the light colored blunted edge and the left end of the edge is completely lost in a messy corner on the left (this edge in effect also shows Issue #2).

Funny that the only edges that have lost definition are the ones that I wanted to Feature to make sure they show up precisely in the meshâŠ

I believe that to solve both issues the following needs to be done:

1. Change the Less than logic to Greater than in Feature Refinement.
2. Once Edges 1,2,3 and 4 can actually be isolated in code, then make sure that the Edges get precisely represented in the mesh.

I believe it is likely that the true surface edges are âlostâ in the mesh BEFORE the Feature refinement code gets a chance to make its angle determinations and decide what to keep in the mesh precisely but that is not my problem I just want the feature refinement to do what is expected of it.

Dale

I just realized that what I am asking for as far as keeping an edge precisely defined in the mesh is already being done for all edges that are on the Background Mesh Box Face and geometry intersection edges without even having to ask the mesher to do that, I just want to be able to do the same on my geometryâŠ

What you are observing is one of the limitation of hex meshing at boundaries in general, and snappyHexMesh in particular. In your example, you have a wedge with a 20Â° angle. Capturing the sharp edge from the inside in difficult with hex cells as one of its faces has to collapse on itself.
That said, it does not mean that you never capture such sharp corners. Try the hex-dominant preview mesher, there you donât need to deal with all the unnecessary details of hex-parametric. In particular, you can assign feature refinements to a face, which is applied to all its edges. While you can very quickly iterate over a few set of settings, I do not know a reliable way to always capture such a sharp corner with snappyHexMesh.
The good news is there are ways, e.g. other meshers and other methods, to avoid this problem altogether. We are aware of problems like the one you described here and are not far leveling up our meshing capabilities. More will follow soon.

Babak

2 Likes

My post #10 was mainly about Issue #1 which you have not commented on in your post 11.