CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [cfMesh] edge detection (solved!) (https://www.cfd-online.com/Forums/openfoam-community-contributions/163559-edge-detection-solved.html)

zordiack December 1, 2015 09:15

edge detection (solved!)
 
Hi, lately I've been having a lot of trouble with cfMesh edge detection. The mesh is fine otherwise, but sharp edges are not conformed or "snapped". I have the original geometry in a file whole.stl, and I'm using the following command to detect edges:

Code:

surfaceFeatureEdges -angle 120 whole.stl whole.fms
The file whole.fms is then used as an input for cfMesh meshDict. I've attached a picture to show the problem, where the surface file whole.stl and generated mesh are shown in paraview.

http://blacklight.fi/~zordiack/cfmesh.jpg

Any help? Is this the correct way to use edge detection with cfMesh or is there a better way? I don't recall having this problem before, but I might just have been lucky. I'm using OpenFOAM-dev with cfMesh 1.1.1.

zordiack December 1, 2015 09:51

Okay this is (again) going to be one those post where I correct myself. It turns out I've been using the included angle option the wrong way around. It doesn't work the same way as in snappyHexMesh. So if you want to include i.e. all edges with at least 90 degree angle, you should use a SMALLER than 90 degrees angle specification with surfaceFeatureEdges, or just use the default (which is 45 degrees):

Code:

surfaceFeatureEdges whole.stl whole.fms
I'm happy to report that the edge detection is working again, when I use it correctly :) Here is the same mesh with correct edge detection:

http://blacklight.fi/~zordiack/cfmesh2.jpg

franjo_j December 5, 2015 16:12

You can inspect the feature edges by using:

FMSToSurface <inputSurfaceMesh>.fms <outputSurface> -exportFeatureEdges

-exportFeatureEdges writes feature edges in a vtk file, which you can visualize in ParaView.

zannatul February 4, 2016 14:43

Can you please tell me why it is saying to me that surfaceFeatureEdges command not found?

franjo_j February 5, 2016 06:31

Hi,

Quote:

Originally Posted by zannatul (Post 583754)
Can you please tell me why it is saying to me that surfaceFeatureEdges command not found?

surfaceFeatureEdges is part of cfMesh. It seems to me that you do not have cfMesh available in your environment or your OF environment is not set up correctly.

zannatul February 5, 2016 13:08

Quote:

Originally Posted by franjo_j (Post 583850)
Hi,



surfaceFeatureEdges is part of cfMesh. It seems to me that you do not have cfMesh available in your environment or your OF environment is not set up correctly.

Yes may be that is the thing. Thank you for your response


All times are GMT -4. The time now is 01:16.