CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Can not produce clean mesh at sharp edges

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2019, 10:39
Default Can not produce clean mesh at sharp edges
  #1
New Member
 
Febrian Akhmad Baehaqi
Join Date: Jul 2019
Location: Bandung
Posts: 5
Rep Power: 6
febrianbaehaqi is on a distinguished road
Hi guys, I'm new to OpenFOAM and still learning about it. So I got a problem here. I'm trying to mesh a wing with sharp trailing edge using snappyHexMesh. But It seems that I can not produce a clean mesh at the trailing edge and keep getting jagged trailing edge.

Here are the screenshot and the snappyHexMeshDict that I used. I try to keep the skewness of the mesh as low as possible to keep the accuracy of the results.

Thank you, best regard from me. I appreciate all your answers.
Attached Files
File Type: zip system.zip (190.4 KB, 16 views)
febrianbaehaqi is offline   Reply With Quote

Old   July 21, 2019, 22:58
Default Have You Tried Surface Orient and Feature Extract
  #2
Member
 
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 12
pbrady2013 is on a distinguished road
Hi,


That can be a limitation with snappy in very sharp edges.


The snappy dictionary that you've included looks to be from the motorbike tutorial and not your case. Did you include the right dictionary?


Either way, when I come across this I double check two things:
  1. surfaceOrient to make sure my STLs all have the same directions
  2. surfaceFeatureExtract to provide a set of locations for snappy to merge to - these get reflected in the snappy dictionary
Beyond that, and while snappy is a great tool, it may not be appropriate for the specific mesh that you are after.


Cheers,
-pete
pbrady2013 is offline   Reply With Quote

Old   July 21, 2019, 23:31
Default
  #3
New Member
 
Febrian Akhmad Baehaqi
Join Date: Jul 2019
Location: Bandung
Posts: 5
Rep Power: 6
febrianbaehaqi is on a distinguished road
Hi Pete, thank you for your answer I really appreciate that

Yes, the snappy dictionary came from the motorbike tutorial since I am very new to OpenFOAM and sHM. But I make some adjusment to the dictionary but still can not find the right adjustment to get rid of this sharp edges problems. Or could you give me some recommendation of sHM dict from tutorial that appropriate for my case? I will really appreciate that.

Actually my case is an UAV MALE. The sHM did a good job for meshing the UAV except the trailing edges both the wing and the tail. The fuselage seems fine I guess. Although mesh at the joint between fuselage and the wing is not very satisfying. I also have a very bad mesh at the tip of the wing.

I only have 1 stl file that is the geometry of the UAV because I still confuse how to make patches in OpenFOAM. I guess the surfaceOrient will not work in my case.

Here are my surfaceFeatureExtractDict. Should I change the includedAngle to 180?

Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

iMALE.stl
{
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges no;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}


// Write options

// Write features to obj format for postprocessing
writeObj yes;
}
Thanks, my best regards.
Febrian
febrianbaehaqi is offline   Reply With Quote

Old   July 22, 2019, 01:30
Default Suggestions to Proceed
  #4
Member
 
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 12
pbrady2013 is on a distinguished road
Hey,


A couple of things:


surfaceOrient is not really designed to split patches to create boundary conditions. Rather it ensures that all the sub-patches in the STL have the same orientation so that snappy does not see them all as lots of little patches and will mesh cells across.


No, I'd probably start by leaving the included angle at 150 as that will pick up the junction between the wings and main bodies.


If you want to test the edges that are being selected, open up the OBL files in ParaView (or write VTKs) together with the STL. Then you can see if the trailing edge is being selected for refinement. This can be a great way to see the difference when changing the included angles.



I must admit though that while I enjoy the flexibility of snappy, for a case like this it would not be my first choice. For simple geometries I usually start with blockMesh. Other than that I'd jump to an unstructured generator like GMSH or Salome.


Trailing edges and tips can be tough. Adjusting the included angle and refinement should get the wing/body junction OK though.



Cheers,
-pete
pbrady2013 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Multi Region Mesh of a car filter Zephiro88 OpenFOAM Meshing & Mesh Conversion 3 September 11, 2019 19:34
[snappyHexMesh] SHM problem : KVLCC2 with appendage mesh sc.park OpenFOAM Meshing & Mesh Conversion 1 March 13, 2016 13:28
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10


All times are GMT -4. The time now is 15:43.