Hex refinement negative quality afterwards
Here I am again spamming the forum :)
I have a question concerning hex refinement.
I'm currently meshing a geometry involving a cornering wing geometry.
I made the blocking around this wing and other geometry elements, linked bunched several edges. So far all good. When i check the pre mesh quality at this point all looks very good.
At this point I want to refine the mesh around the wing (the mesh within the boundary layer). For this I use Pre-Mesh Parasm Refinement and a 3 to 1 ratio in all directions. I only select the blocks around the wing geometry that I want to refine.
Before converting the mesh to an unstructured mesh to resolve the refinements, I check the premesh quality again, which now shows me that a few negative quality cells are present in the mesh. So the volume orientation of the cells is wrong. I have tried the fix inverted blocks option to resolve the negative quality elements, but without succes. I also tried the pre mesh smooting option.
What I also tried was to convert the mesh to an unstructured mesh, resolve the refinements by a standart pattern and then use the mesh smoother but without succes.
I included a small illustration showing the location of the negative quality cells.
I also included an illustration showing the scan planes, which look very weird after the hex refinement. One way or another it does not look always this bad, but the location of the negative quality cells is always the same. Could it be that some edges are wrong projected after refining the blocks? I checked the associations several times and everythins seemed to be ok. But I understand that the weird looking parts are the cause of my negative and low quality cells. I am only not sure on how to solve this.
For comparison I also included an illustration of the scan planes before refining the blocks.
Could anyone tell me how I can prevent these cells from having a negative quality? Does anyone has an idea about the cause? Could it be that I wasn't carefull enough selection the spacing and number of elements?
That for reading my post.
Adjust edge distributions...
Sorry I didn't get to this sooner... I have a bunch of CFD-Online stuff that I missed...
Anyway, I don't know why this went horribly wrong, but I don't think it is what you should have used anyway.
Refine 3 to 1 is what you should use if you just want to refine a portion of the model... Like the blocks around a car mirror for acoustical analysis or something like that. It allows for hanging nodes between the refined blocks and the unrefined blocks, even in a multiblock solver.
In this case, you should simply adjust your mesh distribution.
You can refine by adjusting each edge, which may be ideal since you can refine asymmetrically, but if you want to refine an entire hexa model by some arbitrary amount, here is a script to do it for you... (no warranty expressed or implied, use at your own risk) ;)
No worries, I appreciate your help very much!
I actually want to refine only a portion of my hex mesh. The potion around the airfoil I want to refine. Since I don't want the entire fine mesh to run through my whole model this seemed a good option. I rather don't use hanging nodes for this is why I uses to solve refinement options.
I'll try to choose my spacings more carefully maybe this helps.
And I'll have a look at the hanging nodes option.
I'm not sure when exactly I'll be doing this but I'll keep you informed.
Thanks a lot for the script, that was one of the things I still needed to program. You saved me a lot of time!!
And good you mentioned there are no claims possible :)
Thanks a lot!
Another question, when I use the script you provided above to scale the hex mesh some of the egdes have a different distribution afterwards. Hereby the smooth transition is violated...
Do you have an idea or any suggestion on how to prevent this?
The script just scales the first layer heights by the name number as it uses to reduce the number of nodes.
It was intended to be used across the entire mesh so it was expecting both end spacings to be scaled by the same number and didn't anticipate volume changes (told you there was no guarantee;)).
If you want to keep those end spacings matched, you could "link spacing". This is an option under edge params in older versions, but is also found under "match edges" in 12.1. Or, since it is a script, you could just "match edges" in your script after the refine command.
I remember the no garuantee policy :p
I also thought of using the match edge option.
But it seems that this option doesn't work for linked bunch edges.
Is this true? Or did I create a new bug with my script? :)
I haden't thougth of using the "SP Linked" option. I just tried it and it seems it doesn't work as well.
Strangely enough as I just mentioned the edges I can't change are linked bunched edges...
I must mention that I tried linking the edges with this option after I used the replay script you provided.
This might be the reason I guess...
Do you have any sugestions why this would be the case?
Kind regards and thanks!
You can read the script... it is just simple. It doesn't have any logic to check for linked spacing or anything like that.
It just does a simple math operation to replace the value of the "spacing" with a new value after scaling...
When it gets to a value like "linked 34 67" or what ever, the function can't complete the operation and it fails.
Take it to the next step.
I should add that I do have a feature request to turn the concept of the simple script into a real feature for scaling edge params. Perhaps we could add a note that the real feature should support linked spacing...
:) This explains...
If this feature would be available soon could you let me know?
|All times are GMT -4. The time now is 01:27.|