|
[Sponsors] |
[cfMesh] OpenFOAM (cfmesh) - how to delete edge features in fms file |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 11, 2019, 00:55 |
OpenFOAM (cfmesh) - how to delete edge features in fms file
|
#1 |
Member
Join Date: Aug 2018
Posts: 47
Rep Power: 8 |
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!!! |
|
July 13, 2019, 00:22 |
|
#2 |
Member
Join Date: Aug 2018
Posts: 47
Rep Power: 8 |
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? |
|
July 22, 2019, 11:08 |
|
#3 |
Senior Member
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8 |
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 |
|
July 30, 2019, 11:23 |
|
#4 |
Member
Join Date: Aug 2018
Posts: 47
Rep Power: 8 |
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. |
|
August 1, 2019, 17:27 |
[cfMesh] OpenFOAM (cfmesh) - how to delete edge features in fms file
|
#5 |
New Member
Mekuannint
Join Date: May 2016
Posts: 3
Rep Power: 10 |
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 |
|
August 5, 2019, 12:54 |
|
#6 |
Member
Join Date: Aug 2018
Posts: 47
Rep Power: 8 |
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. |
|
August 6, 2019, 04:04 |
|
#7 |
New Member
Mattia
Join Date: May 2018
Location: Novara - Italy
Posts: 29
Rep Power: 8 |
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..) |
|
August 28, 2019, 04:58 |
|
#8 |
Member
Leonardo Honfi Camilo
Join Date: Mar 2009
Location: Delft, Zuid Holland, The Netherlands
Posts: 60
Rep Power: 17 |
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. |
|
August 29, 2019, 11:58 |
|
#9 | |
Senior Member
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8 |
Hi Leonardo Honfi Camilo,
Quote:
Regards, Krao |
||
August 29, 2019, 14:22 |
|
#10 |
Member
Leonardo Honfi Camilo
Join Date: Mar 2009
Location: Delft, Zuid Holland, The Netherlands
Posts: 60
Rep Power: 17 |
Though the scripts work with Salome 8.5, this will save me time on future projects.
Cheers |
|
August 30, 2019, 07:00 |
|
#11 | |
Senior Member
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8 |
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:
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 |
||
|
|
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 |