|
[Sponsors] |
[cfMesh] surface refinement consistency in element size |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
JD
Join Date: Mar 2023
Posts: 4
Rep Power: 3 ![]() |
Hello!
I have been using cfMesh for a while now and I am really enjoying it. It is really a very powerful and fast tool. Many thanks for making this software available for everyone ![]() I am working on a contact problem consisting on two bodies as shown here. setup.jpg There are two main regions: the box with the hole from the "spring" (middle) and the spring itself (right). Each region is split in two: the contact part and the rest (highlighted in blues). My workflow is as follows: 1. boolean operation (blender) to obtain the contact interface 2. For each region (box / spring): create a STL file which has the interface and the remaining of the surface 3. Run SurfaceFeatureEdges on the STL files to generate the region*.fms files 4. Mesh each region with cartesianMesh This is my meshDict file for the first region (box). /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | cfMesh: A library for mesh generation | | \\ / O peration | | | \\ / A nd | Author: Franjo Juretic | | \\/ M anipulation | E-mail: franjo.juretic@c-fields.com | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object meshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // surfaceFile "constant/STLdata/region0.fms"; maxCellSize 0.3; keepCellsIntersectingBoundary 0 ; keepCellsIntersectingPatches { m_box { keepCells 1; } m_hole { keepCells 1; } } localRefinement { m_box { cellSize 0.2; } m_out { cellSize 0.1; } } surfaceMeshRefinement { m_box { surfaceFile "constant/STLdata/m_box.stl"; cellSize 0.2; } m_hole { surfaceFile "constant/STLdata/m_hole.stl"; cellSize 0.1; } } ----------------------- For the spring, a similar file is given with the same cellSize (0.1) at the interface. The only clear difference between the m_hole and the m_insert STL files is the triangles orientation: the normals point outwards for the spring and inwards for the box. When I look at the resulting meshes at the surface boundary, they are not as similar as I would hope. meshes.jpg The surface in the spring (m_insert) approximates better the target geometry than the surface in the box (m_hole) and the elementSizes are different. This is my mesh log ------ Nuumber of cells per region: 0 51115 1 37233 Checking patch topology for multiply connected surfaces ... Patch Faces Points Area [m^2] Surface topology Bounding box m_box 4223 4321 2.32198e-05 ok (non-closed singly connected) (-0.001 -0.001 -0.00181221) (0.001 0.001 0.000187787) m_hole 9908 9674 4.24551e-06 ok (non-closed singly connected) (-0.000636172 -0.000623503 -0.0005) (0.000633706 0.000623503 0.000187787) m_insert 10508 10275 4.26252e-06 ok (non-closed singly connected) (-0.000636189 -0.00062436 -0.0005) (0.000636349 0.00062436 0.000187787) m_lid 1024 1157 1.75691e-06 ok (non-closed singly connected) (-0.000500061 -0.000500009 0.000187787) (0.000500008 0.000500072 0.0005) Checking geometry... This is a 3-D mesh Overall domain bounding box (-0.001 -0.001 -0.00181221) (0.001 0.001 0.0005) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Mesh (non-empty, non-wedge) dimensions 3 Boundary openness (-3.74231e-17 1.33311e-16 5.69409e-18) Threshold = 1e-06 OK. Max cell openness = 3.22386e-16 OK. Max aspect ratio = 13.8916 OK. Minumum face area = 1.1164e-11. Maximum face area = 4.00143e-08. Face area magnitudes OK. Min volume = 4.90341e-17. Max volume = 7.95773e-12. Total volume = 8.2447e-09. Cell volumes OK. Mesh non-orthogonality Max: 69.0699 average: 16.532 Threshold = 70 Non-orthogonality check OK. Face pyramids OK. Max skewness = 3.19662 OK. Min/max edge length = 1.36688e-06 0.00020028 OK. Writing 18 near (closer than 3.65326e-09 apart) points to set nearPoints All angles in faces OK. Face flatness (1 = flat, 0 = butterfly) : average = 0.998973 min = 0.813311 All face flatness OK. Cell determinant (wellposedness) : minimum: 0.0271027 average: 10.5798 Cell determinant check OK. Mesh OK. -------------------- My question is: is there a better way of controlling the meshing process at the boundaries? So far, the best that has worked for me to preserve as maximum as possible the surface geometry is to combine local + surface refinement. But maybe this is not the best approach... Any ideas are very welcome. thank you and again, thanks for making cfMesh available ![]() |
|
![]() |
![]() |
![]() |
Tags |
cartesianmesh, localrefinement, multiregions, surfacemeshrefinement |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM error | Vinay Kumar V | Main CFD Forum | 0 | February 20, 2020 09:17 |
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops | avinashjagdale | OpenFOAM Meshing & Mesh Conversion | 53 | March 8, 2019 09:42 |
[snappyHexMesh] Problem: after snappyHexMesh, the cells size are not the same | kanes | OpenFOAM Meshing & Mesh Conversion | 0 | January 25, 2016 08:06 |
critical error during installation of openfoam | Fabio88 | OpenFOAM Installation | 21 | June 2, 2010 03:01 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |