Feature Refinement not working as expected - 2 ISSUES

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

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:
RefineFeatureAngleIssue

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.

What am I missing about this feature?
Thanks,
Dale

Without 150 degree Feature Refinement:

With 150 degree Feature Refinement:

1 Like

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

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 :disappointed_relieved:

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… :blush:

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… :cry:

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 :wink: 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… :slight_smile:

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

3 Likes

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

Your post 11 comments only on Issue #2.

I need to use the parametric algorithm due to its ability to set layering parameters.

I believe OpenFoam is open source so you guys could do something about this and then you would really stand out from the pack :slight_smile:.

Certainly the code is there in OpenFoam to do this because as I said, I believe that following a defined edge is precisely achieved for all Background Mesh Box Face and geometry intersection edges at all levels of refinement. Just do the Surface/Feature Refinements the same way, at the same time as Background Mesh Box Face and geometry intersections are done.

Do you not see that there are 2 separate issues here?

I was afraid this would happen :disappointed_relieved:

Dale