CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[cfMesh] OpenFOAM (cfmesh) - how to delete edge features in fms file

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By lhcamilo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2019, 00:55
Default OpenFOAM (cfmesh) - how to delete edge features in fms file
  #1
Member
 
Join Date: Aug 2018
Posts: 47
Rep Power: 8
foamF is on a distinguished road
Hi, everyone. I have some questions about cfmesh in OF.

I am using cfmesh in OF v1712 to do meshing. My practice is to use surfaceFeatureEdges (with a prescribed angle) to generate a fms file as an input to the cfmesh. With the aim to do a better meshing, I wanna to delete some edge features that I don't like. Anyone knows the way to do this?

I tried to open the fms file and manually delete some edge features. It appears to work since deleting some edge features improves the mesh quality. After it, I try to use FMSToSurface -exportFeatureEdges to generate a vtk file for visualizing in paraview, but it does not work. It appears that manual modification on the fms file may not be a good way!!!
foamF is offline   Reply With Quote

Old   July 13, 2019, 00:22
Default
  #2
Member
 
Join Date: Aug 2018
Posts: 47
Rep Power: 8
foamF is on a distinguished road
i read some old threads and found that using a work around can help the issue: (1) spilt into different stl files, (2) use surfaceFeatureEdges to extract feature edges from selected stl files and output as ftr file, and (3) use surfaceAdd to combine ftr files. The combined ftr file is used as input file for meshing with cfmesh.

But, this work around with the use of surfaceFeatureEdges to make ftr files generates an issue. It creates many different patches which cause trouble in the meshDict.

For example, for an stl file with a patch named "car", using surfaceFeatureEdges to output ftr file may generates patches like "car_0", "car_1", " car_2", etc. It causes trouble in the meshDict.

I tried using surfaceFeatureEdges to output fms file, but it won't have this kind of problem (with many patches). But, surfaceAdd doesn't support fms file, so I need to use ftr file.

Anyone knows how to avoid making many patches with ftr file?
foamF is offline   Reply With Quote

Old   July 22, 2019, 11:08
Default
  #3
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi

I actually use blender to extract the required features as .stl file, in the regions where meshing is difficult. If your model is not so complex, use clip in paraview, and then extract the surface and triangulate it, then you can use this as surface refinement. You have mentioned in your first post that, you want to delete some unwanted features, this can be achieved using blender. As soon as I create a model using CAD tool, I use blender to simplify the model, by deleting unwanted features, which are not required for simulation.

I also use surfaceFeatureEdges as mentioned by you to refine the edges. If you have found any other easy and better methods, I am curious to know.

Regards
Krao is offline   Reply With Quote

Old   July 30, 2019, 11:23
Default
  #4
Member
 
Join Date: Aug 2018
Posts: 47
Rep Power: 8
foamF is on a distinguished road
thanks for yr info.

Based on my understanding and experience, cfmesh uses fms or ftr files with extracted edges to preserve feature in meshing. (Pls let me know if I am wrong.). So, even one can manipulate edge extraction using stl files, the stl file can only be used for edge refinement instead of feature preservation).

The question in my previous post is about seeking an approach a way to manipulate the fms / ftr files for feature preservation.
foamF is offline   Reply With Quote

Old   August 1, 2019, 17:27
Default [cfMesh] OpenFOAM (cfmesh) - how to delete edge features in fms file
  #5
New Member
 
Mekuannint
Join Date: May 2016
Posts: 3
Rep Power: 10
meku is on a distinguished road
You can actually use the cfMesh python scripts for SALOME. After extracting the edges using extractFeatureEdges.py, explode all the edges, select all the edges you want to use and group them. You can export the grouped edges with the mesh as FMS file using salomeTriSurf.py python script. You can get more info here:
https://curiosityfluids.com/2019/02/...-your-meshing/

Best, Mekuannint
meku is offline   Reply With Quote

Old   August 5, 2019, 12:54
Default
  #6
Member
 
Join Date: Aug 2018
Posts: 47
Rep Power: 8
foamF is on a distinguished road
thx, meku.

I have made some tests on the use of Salome to extract edges and export fms files. Salome really works very well with cfMesh.
foamF is offline   Reply With Quote

Old   August 6, 2019, 04:04
Default
  #7
New Member
 
Mattia
Join Date: May 2018
Location: Novara - Italy
Posts: 29
Rep Power: 8
time- is on a distinguished road
If you work with Salome to preprocess your geometry (and I really suggest you to do so), you don't really need extractFeatureEdges.py

You can manually create an edge group, named featureEdges and select only the edges you want to resolve. This way when you export your fms file using triSurf().writeFms() the geometry will have only the edges you need as feature edges and you have 100% control on how your tria get processed (more or less..)
time- is offline   Reply With Quote

Old   August 28, 2019, 04:58
Default
  #8
Member
 
Leonardo Honfi Camilo
Join Date: Mar 2009
Location: Delft, Zuid Holland, The Netherlands
Posts: 60
Rep Power: 17
lhcamilo is on a distinguished road
On a related topic.
did you have to modify salomeTriSurf.py in order to make it work with salome 9.3? That is aside from converting it from python 2 to python 3.

I keep getting a type error, I thought I would ask before diving into the code.

Edit: Never mind, I just use Salome 8.5 instead. It works fine. Though te cfMesh scripts should be updated at some point

Last edited by lhcamilo; August 28, 2019 at 06:46.
lhcamilo is offline   Reply With Quote

Old   August 29, 2019, 11:58
Default
  #9
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi Leonardo Honfi Camilo,

Quote:
Originally Posted by lhcamilo View Post
On a related topic.
did you have to modify salomeTriSurf.py in order to make it work with salome 9.3? That is aside from converting it from python 2 to python 3.

I keep getting a type error, I thought I would ask before diving into the code.

Edit: Never mind, I just use Salome 8.5 instead. It works fine. Though te cfMesh scripts should be updated at some point
In the the following link go through comment 19 and 25(page 2), there you will find the updated python scripts by Mattia, which can be used with Salome 9.3. General workflow to create a flawless mesh in cfMesh

Regards,
Krao
Krao is offline   Reply With Quote

Old   August 29, 2019, 14:22
Default
  #10
Member
 
Leonardo Honfi Camilo
Join Date: Mar 2009
Location: Delft, Zuid Holland, The Netherlands
Posts: 60
Rep Power: 17
lhcamilo is on a distinguished road
Though the scripts work with Salome 8.5, this will save me time on future projects.



Cheers
Krao likes this.
lhcamilo is offline   Reply With Quote

Old   August 30, 2019, 07:00
Default
  #11
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi Mattia and other members as well,

Though I am using cfMesh from several days I have never tried to generate the mesh with Salome. This week I started learning Salome to use it along cfMesh. Until now with the help of many threads and tutorials available I can run the mesh utility successfully. But my question is, you have mentioned,

Quote:
If you work with Salome to preprocess your geometry (and I really suggest you to do so), you don't really need extractFeatureEdges.py

You can manually create an edge group, named featureEdges and select only the edges you want to resolve. This way when you export your fms file using triSurf().writeFms() the geometry will have only the edges you need as feature edges and you have 100% control on how your tria get processed (more or less..)
Can you please elaborate more on this. I tried to make several groups inside inside the mesh for example features covering hub. tips and leading and trailing edge of a propeller. As required by cfMesh all the features forms closed loop. I am able to see these features inside the .fms file as well, but I am confused about how to define these features as refinements in meshDict?

Previously I used to use .stl and I used to extract feature edges using surfaceFeatureExtract and later converting it to .vtk using FMSToSurface -exportFeatureEdges and used the .vtk under edge refinement. Now please let me know how to define the extracted features from Salome inside meshDict. Although this question is directed to Mr. Mattia, I request other users also to provide their valuable insight.

Thank you all in advance,

Krao
Krao 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
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 12:32
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 02:41
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


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