|
[Sponsors] |
[cfMesh] cfMesh workflow with complex geometries |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 2, 2019, 09:45 |
cfMesh workflow with complex geometries
|
#1 |
New Member
Patryk
Join Date: Apr 2019
Posts: 2
Rep Power: 0 |
Hello,
I'd like to start my first post on this forum with a big thanks for the great tool cfMesh is. It is very convenient to use, but there is one thing that keeps it from being perfect. I have the following problem with cfMesh. The 3d geometry I start with is an .stl file containing an object bounded in a box. To create patches I use createFeatureEdges and create an .ftr file. As my object has many sharp corners it is being divided into thousands of tiny patches. It is a pain to work with so many patches so I have to merge them. One option I used is a createPatch command. It allows to merge the patches and preserve all sharp corners. (copy-pasting thousands of patch names to createPatchDict is really irritating). Unfortunately I am not able to create a boundary layer afterwards as generateBoundaryLayers refers to patch names in my .ftr file and not those created with createPatch. As it is not acceptable to ignore the boundary layer in my case, I tried a different workflow. The other option is to use mergeSurfacePatches on my .ftr file. This way I can merge those tiny patches and name them before creating a mesh. It allows to create a boundary layer by referring to a new patch name, but a different problem appears. When the patches are merged the sharp edges are not being preserved. To sum it up the two workflows I know either do not allow me to create a boundary layer or do not preserve sharp corners. I believe there must be a simple way to create a mesh with a boundary layer AND sharp edges, so could you please share with me the workflow you use when working with cfmesh? |
|
May 22, 2019, 09:51 |
|
#2 |
Senior Member
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8 |
Hi Patryk,
The problem you have defined is not clear, I use cfMesh and have never come across this problem. If you share more information about your 'complex' geometry. I can give some inputs. Krao |
|
May 24, 2019, 07:52 |
|
#3 |
New Member
Patryk
Join Date: Apr 2019
Posts: 2
Rep Power: 0 |
Hello,
Thank you for the response. I managed to partially "resolve" my problem. I would delete this thread if I knew how to do this. I am sorry. This problem appears because cfMesh does not preserve sharp corners in the geometry after you merge the patches. It seems that the only option to preserve the geometry is to divide it into many tiny patches. After using surfaceFeatureEdges sometimes there are as many as 5000 patches defining the object. When you start with a single stl containing both the object and the bounding box you are not able to find which patches refer to the box and which refer to the object. You have to do this by first generating a rough mesh and after that checking in paraFoam by trial and error which patch refers to which surface. With thousands of patches it takes a lot of time. I had the problem described earlier because I merged patches before creating the mesh and I couldn't understand why cfMesh didn't preserve sharp corners of the geometry. |
|
August 14, 2019, 10:23 |
|
#4 |
New Member
Join Date: Nov 2017
Posts: 11
Rep Power: 9 |
Hi
I'm not sure if you already though of that, anyway this is the way i handle this: For each distinctive part i want to use for boundary conditions, i create stl files and name them properly (also within the file, not only filename). Merge the stl files so there are multiple solids with their proper name within one stl file. Do the surfaceFeatureEdges. Each "subpatch" created by surfaceFeatureEdges starts with the name you gave to the solid in the stl and a increasing number. Within the meshDict, you can now use regular expressions to reference to multiple "subpatches" created by surfaceFeatureEdges. This makes life much easier. Attention here, OF v1806 has a bug that prevents regular expressions to work properly with cfMesh. Use OF v1812 and you will be fine. Let me know if this is useful or something is not clear. Cheers, nope |
|
Tags |
boundary layer, cfmesh, edge detection, featureedges |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[cfMesh] cfMesh 2D workflow layer optimization | ewlks | OpenFOAM Community Contributions | 2 | October 14, 2022 12:31 |
Tips for Handling Complex Geometries, Very Large Grids | tcarrigan | Pointwise & Gridgen | 5 | August 6, 2014 15:44 |
Meshing complex white-light/GOM based STL models | jola | Main CFD Forum | 13 | January 30, 2012 02:35 |
mesh generator for very complex geometries? | cchou2007 | Main CFD Forum | 3 | December 8, 2007 09:37 |
[Other] Mesh generator for very complex geometries | hsieh | OpenFOAM Meshing & Mesh Conversion | 3 | November 21, 2007 15:51 |