Difference between revisions of "CheckMesh"

From OpenFOAMWiki
(Modify to be coherent with the new framework)
Line 1: Line 1:
== What is "non-orthogonality"? ==
+
==Name==
Is the line connecting two cell centers across the merged patches normal to the face? It is not, which represents mesh non-orthogonality.
+
<tt>checkMesh</tt> - Checks validity of a mesh.
  
== What is "skewness"? ==
+
{{VersionInfo}}{{Version2.1}}
Does the line connecting two cell centers across the merged patches go through the center of the face? It does not, which represents skewness.
+
 
 +
==Synopsis==
 +
checkMesh [OPTIONS]
 +
 
 +
==Description==
 +
Checks validity of a mesh
 +
 
 +
'''-allGeometry'''
 +
:Include bounding box checks
 +
'''-allTopology'''
 +
:Include extra topology checks
 +
'''-noTopology'''
 +
:Skip checking the mesh topology
 +
 
 +
'''-noZero'''
 +
:Exclude the ''0'' directory from the times list
 +
'''-time''' ''RANGES''
 +
:Select time steps. ''RANGES'' follows the [[Tip_Advanced_Time_Selection_Options | time selection rules]]
 +
'''-latestTime'''
 +
:Apply only on the latest time available
 +
'''-constant'''
 +
:Include the ''constant'' directory in the times list
 +
 
 +
'''-parallel'''
 +
:Run the utility in parallel
 +
'''-roots''' ''"(DIR1 [...DIRN])"''
 +
:Directories through which the data are distributed
 +
'''-region''' ''NAME''
 +
:Specify a mesh region by its ''NAME''
 +
 
 +
'''-case''' ''DIR''
 +
:Execute the command on the case directory ''DIR''. If not provided, use the current directory
 +
'''-noFunctionObjects'''
 +
:Skip the execution of the [[functionObjects]]
 +
'''-help'''
 +
:Display the help and exit
 +
 
 +
==Output explanation==
 +
The output will be explained based on the <tt>checkMesh</tt> output for the tutorial <tt>$FOAM_TUTORIALS/incompressible/icoFoam/cavity</tt>.
 +
 
 +
1. <tt>Mesh statistics</tt>
 +
    points:          882
 +
    internal points:  0
 +
    faces:            1640
 +
    internal faces:  760
 +
    cells:            400
 +
    boundary patches: 3
 +
    point zones:      0
 +
    face zones:      0
 +
    cell zones:      0
 +
 +
Overall number of cells of each type:
 +
    hexahedra:    400
 +
    prisms:        0
 +
    wedges:        0
 +
    pyramids:      0
 +
    tet wedges:    0
 +
    tetrahedra:    0
 +
    polyhedra:    0
 +
 +
2. <tt>Checking topology...</tt>
 +
    Boundary definition OK.
 +
    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                 
 +
    movingWall          20      42      ok (non-closed singly connected) 
 +
    fixedWalls          60      122      ok (non-closed singly connected) 
 +
    frontAndBack        800      882      ok (non-closed singly connected) 
 +
 
 +
3. <tt>Checking geometry...</tt>
 +
 
 +
    Overall domain bounding box (0 0 0) (0.1 0.1 0.01)
 +
    Mesh (non-empty, non-wedge) directions (1 1 0)
 +
    Mesh (non-empty) directions (1 1 0)
 +
    All edges aligned with or perpendicular to non-empty directions.
 +
    Boundary openness (8.47033e-18 -8.47033e-18 -5.901e-17) OK.
 +
    Max cell openness = 1.35525e-16 OK.
 +
    Max aspect ratio = 1 OK.
 +
    Minimum face area = 2.5e-05. Maximum face area = 5e-05.  Face area magnitudes OK.
 +
    Min volume = 2.5e-07. Max volume = 2.5e-07.  Total volume = 0.0001.  Cell volumes OK.
 +
    Mesh non-orthogonality Max: 0 average: 0
 +
    Non-orthogonality check OK.
 +
    Face pyramids OK.
 +
    Max skewness = 1e-08 OK.
 +
    Coupled point location match (average 0) OK.
 +
 
 +
4. Conclusion
 +
Mesh OK.
 +
 
 +
Geometry tests:
 +
* Bounding box
 +
:The minimal box that can contain the mesh
 +
* Non-empty, non-wedge directions
 +
:(1 1 0) means x and y are not empty neither wedges. But z is empty or wedge.
 +
* Non-empty directions
 +
:(1 1 0) means x and y are not empty directions. But z is.
 +
* Aspect ratio
 +
:Ratio between the longest and the shortest edges - 1.0 is the best.
 +
* Cell volumes
 +
:The difference between min and max should be as small as possible (or the evolution should be as smooth as possible - not check for that)
 +
* Mesh non-orthogonality
 +
:Measure the angle between the line connecting two cell centres and the normal of their common face - 0.0 is the best.
 +
* Skewness
 +
:Measure the distance between the intersection of the line connecting two cell centres with their common face and the centre of that face - smaller is better.
  
 
== Source ==
 
== Source ==

Revision as of 20:28, 5 September 2012

1 Name

checkMesh - Checks validity of a mesh.

Valid versions: OF Version 21.png

2 Synopsis

checkMesh [OPTIONS]

3 Description

Checks validity of a mesh

-allGeometry

Include bounding box checks

-allTopology

Include extra topology checks

-noTopology

Skip checking the mesh topology

-noZero

Exclude the 0 directory from the times list

-time RANGES

Select time steps. RANGES follows the time selection rules

-latestTime

Apply only on the latest time available

-constant

Include the constant directory in the times list

-parallel

Run the utility in parallel

-roots "(DIR1 [...DIRN])"

Directories through which the data are distributed

-region NAME

Specify a mesh region by its NAME

-case DIR

Execute the command on the case directory DIR. If not provided, use the current directory

-noFunctionObjects

Skip the execution of the functionObjects

-help

Display the help and exit

4 Output explanation

The output will be explained based on the checkMesh output for the tutorial $FOAM_TUTORIALS/incompressible/icoFoam/cavity.

1. Mesh statistics

   points:           882
   internal points:  0
   faces:            1640
   internal faces:   760
   cells:            400
   boundary patches: 3
   point zones:      0
   face zones:       0
   cell zones:       0

Overall number of cells of each type:
   hexahedra:     400
   prisms:        0
   wedges:        0
   pyramids:      0
   tet wedges:    0
   tetrahedra:    0
   polyhedra:     0

2. Checking topology...

   Boundary definition OK.
   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                  
   movingWall          20       42       ok (non-closed singly connected)  
   fixedWalls          60       122      ok (non-closed singly connected)  
   frontAndBack        800      882      ok (non-closed singly connected)  

3. Checking geometry...

   Overall domain bounding box (0 0 0) (0.1 0.1 0.01)
   Mesh (non-empty, non-wedge) directions (1 1 0)
   Mesh (non-empty) directions (1 1 0)
   All edges aligned with or perpendicular to non-empty directions.
   Boundary openness (8.47033e-18 -8.47033e-18 -5.901e-17) OK.
   Max cell openness = 1.35525e-16 OK.
   Max aspect ratio = 1 OK.
   Minimum face area = 2.5e-05. Maximum face area = 5e-05.  Face area magnitudes OK.
   Min volume = 2.5e-07. Max volume = 2.5e-07.  Total volume = 0.0001.  Cell volumes OK.
   Mesh non-orthogonality Max: 0 average: 0
   Non-orthogonality check OK.
   Face pyramids OK.
   Max skewness = 1e-08 OK.
   Coupled point location match (average 0) OK.

4. Conclusion

Mesh OK.

Geometry tests:

  • Bounding box
The minimal box that can contain the mesh
  • Non-empty, non-wedge directions
(1 1 0) means x and y are not empty neither wedges. But z is empty or wedge.
  • Non-empty directions
(1 1 0) means x and y are not empty directions. But z is.
  • Aspect ratio
Ratio between the longest and the shortest edges - 1.0 is the best.
  • Cell volumes
The difference between min and max should be as small as possible (or the evolution should be as smooth as possible - not check for that)
  • Mesh non-orthogonality
Measure the angle between the line connecting two cell centres and the normal of their common face - 0.0 is the best.
  • Skewness
Measure the distance between the intersection of the line connecting two cell centres with their common face and the centre of that face - smaller is better.

5 Source

Hrv