CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Mesh quality ideas needed

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2017, 09:42
Default Mesh quality ideas needed
  #1
Member
 
Vignesh Rajendiran
Join Date: Aug 2016
Location: Chennai, India
Posts: 62
Rep Power: 10
Vignesh2508 is on a distinguished road
Hi foamers,

Recently i was trying to mesh a car stl file using sHM. But it resulted in a mesh which looks pretty bad. I do not know the reason my mesh turned out like this. When i used 'checkMesh' it showed me that the mesh it OK. But I have attached some pictures with this thread. Please take a look and comment the reason for getting such a mesh.

I was wondering if this is a problem with my stl file because i was not able to get a perfect square cell near the surface of the car. My checkmesh showed the following results.

Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           154688
    faces:            414411
    internal faces:   382229
    cells:            130242
    faces per cell:   6.11661
    boundary patches: 9
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     121962
    prisms:        1958
    wedges:        0
    pyramids:      0
    tet wedges:    2
    tetrahedra:    0
    polyhedra:     6320
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   42
            5   87
            6   1081
            7   14
            8   36
            9   4414
           12   616
           15   21
           18   9

Checking topology...
    Boundary definition OK.
 ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology
               upperwall       36       74  ok (non-closed singly connected)
               lowerwall     2328     2545  ok (non-closed singly connected)
                   inlet       10       22  ok (non-closed singly connected)
                  outlet       10       22  ok (non-closed singly connected)
                   front     8638     9171  ok (non-closed singly connected)
                    back     8607     9142  ok (non-closed singly connected)
                    Body     4720     5080  ok (non-closed singly connected)
               UB_Smooth     4921     5161  ok (non-closed singly connected)
               notchback     2912     3086  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-16 0.2 -0.31) (20 0.3 10)
    Mesh has 2 geometric (non-empty/wedge) directions (1 0 1)
    Mesh has 2 solution (non-empty) directions (1 0 1)
 ***Number of edges not aligned with or perpendicular to non-empty directions: 56371
  <<Writing 74894 points on non-aligned edges to set nonAlignedEdges
    Boundary openness (-4.07173e-18 4.24743e-14 -2.39284e-17) OK.
    Max cell openness = 3.20275e-16 OK.
    Max aspect ratio = 10.4121 OK.
    Minimum face area = 3.98553e-06. Maximum face area = 1.031.  Face area magnitudes OK.
    Min volume = 1.99454e-08. Max volume = 0.1031.  Total volume = 36.6786.  Cell volumes OK.
    Mesh non-orthogonality Max: 81.0294 average: 6.17745
   *Number of severely non-orthogonal (> 70 degrees) faces: 292.
    Non-orthogonality check OK.
  <<Writing 292 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 3.48069 OK.
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
I will later extrude my mesh ( for doing a 2D simulation) , so i think i can ignore the first error. Please give ur view.

Thanks

Vicky
Attached Images
File Type: jpg Mesh_overview.jpg (190.1 KB, 101 views)
File Type: jpg Zoomed_mesh.jpg (111.3 KB, 89 views)
File Type: jpg Zoomed_mesh_rear.jpg (122.1 KB, 78 views)
File Type: jpg Fully_zoomed.jpg (105.3 KB, 64 views)
Vignesh2508 is offline   Reply With Quote

Old   January 23, 2017, 10:12
Default
  #2
C-L
Member
 
Charlie Lloyd
Join Date: Feb 2016
Posts: 57
Rep Power: 10
C-L is on a distinguished road
Hi Vicky,

There are a couple of things that might cause this:
- When you view the mesh in paraview it can have issues dealing with polyhedron cells by default. There is a box you can tick that will help with the rendering: 'use VTKpolyhedron' underneath 'update GUI'.

-It also seems like the prism layers that you have added are very thin compared to the size of the cells close to the boundary; how are you defining them in the 'add layers' part of the SHM dict?

-Also, the checkMesh is highlighting 292 cells which are severely non-orthogonal (probably relating to the cells on the boundary). Play around with the 'add layers' parameters, such as reducing the number of layers and making them larger, to see if you get a more sensible mesh.

Charlie
C-L is offline   Reply With Quote

Old   January 23, 2017, 11:24
Default
  #3
Member
 
Vignesh Rajendiran
Join Date: Aug 2016
Location: Chennai, India
Posts: 62
Rep Power: 10
Vignesh2508 is on a distinguished road
Hi Charlie,

Thank you for your reply. The mesh images that i posted are the ones where i tried to add layers. This might be the problem. My stl file is a 3d model of a car. But I was trying to do a 2D simulation from that. My idea was to do a sHM on the model and then finally do an extrudeMesh to convert that to a 2D mesh. In my blockmesh file i tried to choose a domain of thickness 0.1m.

In this domain of 0.1m the model is not protruded straight but has an angle. This might be the reason why i got the problem on the interface between the surface and the mesh. Even if i add layers that is not properly applied on the surface.

Can you suggest me a method to do a 2D simulation of that without this problem?

Thanks
Vignesh2508 is offline   Reply With Quote

Old   January 24, 2017, 06:29
Default
  #4
Member
 
Vignesh Rajendiran
Join Date: Aug 2016
Location: Chennai, India
Posts: 62
Rep Power: 10
Vignesh2508 is on a distinguished road
Charlie,

As you suggested i tried to modify the layers to eliminate the non orthogonal faces. But first i switched off the add layers option in the beginning. Even then the number of orthogonal faces did not seem to decrease. Is there any reason behind it.

Thanks
Vignesh2508 is offline   Reply With Quote

Old   January 24, 2017, 07:49
Default
  #5
C-L
Member
 
Charlie Lloyd
Join Date: Feb 2016
Posts: 57
Rep Power: 10
C-L is on a distinguished road
The issue is likely due to how you are creating the '2D' slice - if there is variation in the third direction then the case isn't 2D and it sounds like that is the case. I recommend using a CAD package (SALOME might be able to do this) to take a slice through the car .stl file and then extruding that surface and saving it as a separate .stl.

There may be other ways to treat the CAD file using Snappy/blockMesh but I have not come across it myself!

Keep the 'add layers' function disabled for now until you can get a decent quality surface mesh.

Hope that helps!
C-L is offline   Reply With Quote

Old   January 24, 2017, 08:02
Default
  #6
C-L
Member
 
Charlie Lloyd
Join Date: Feb 2016
Posts: 57
Rep Power: 10
C-L is on a distinguished road
Hi Vickky,

I have just checked the CAD method in SALOME and it is fairly straight forward to create a 2D slice from and stl and then extrude it. SALOME is worth learning if you don't have access to commercial CAD software.
C-L is offline   Reply With Quote

Old   January 24, 2017, 09:10
Default
  #7
Member
 
Vignesh Rajendiran
Join Date: Aug 2016
Location: Chennai, India
Posts: 62
Rep Power: 10
Vignesh2508 is on a distinguished road
Charlie,

I will look into salome but are there are any learning materials available for that specifically.

And i wanted to tell that i increased the Max orthogonal value in the mesh quality control to 180 so that the sHM will ignore the non ortho faces and try to add layers. While doing that i was able to add layers and improve the mesh. I do not know if this is right.

Thanks

Vicky
Vignesh2508 is offline   Reply With Quote

Old   December 7, 2017, 10:45
Default
  #8
Member
 
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10
elmo555 is on a distinguished road
Quote:
Originally Posted by Vignesh2508 View Post
But it resulted in a mesh which looks pretty bad.
To view the inside of the mesh, I'd recommend you to clip it (instead of slicing), and then tick "crinkle clip". This way, cells that would be sliced will be displayed in 3D. Have a look the attached screenshot for an example.

crinkle.png
elmo555 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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
[ANSYS Meshing] Ideas needed: Hexahedron Mesh Refinement? Alex M ANSYS Meshing & Geometry 5 April 20, 2018 02:52
[ICEM] Unexplained changes of mesh quality and blocking approach salumi ANSYS Meshing & Geometry 9 November 23, 2016 05:14
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 04:21
[Other] Quality Mesh Analysis > relation with convergence vitorspadetoventurin OpenFOAM Meshing & Mesh Conversion 1 November 29, 2014 04:54


All times are GMT -4. The time now is 02:54.