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

checkMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 18, 2013, 09:20
Default checkMesh
  #1
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
Dear Foamers,

I've a question regarding the checkMesh tool.
After creating my geomertry, It runs without any errors the blockMesh and I well presented my required geometry in ParaFoam.
Howver, I wanted to verify the mesh before doing any calculations by using the checkMesh.
I've an error message : Failed 1 mesh checks.
Is it an error to take into consideration or ignore it ? I thinks that something went wrong with the mesh but I don't know exactely what is it ! I've read the checkMesh report but without any help
Any helps please is welcome !
example in attached file

Thanks in advance

Kind regards

Krimo
Attached Files
File Type: gz mesh_problem_v1.tar.gz (10.0 KB, 15 views)
belkadi is offline   Reply With Quote

Old   September 19, 2013, 10:02
Default
  #2
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Your block definition is a little messed up, see the attached image.

What are the points 10, 13, 14 and 17 for? Edit your blockMeshDict so that you don't have any superflous points left.

BTW: I used pyFoamDisplayBlockMesh to visualize your block definition. That's a great tool to troubleshoot the block definition. It works, even when blockMesh fails to create a mesh, other than paraView.
Attached Images
File Type: jpg screenshot.jpg (41.1 KB, 136 views)
allanZHONG likes this.

Last edited by GerhardHolzinger; September 19, 2013 at 10:05. Reason: added glorifying note on pyFoam.
GerhardHolzinger is offline   Reply With Quote

Old   September 19, 2013, 12:51
Default
  #3
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
Dear Gerhard Holzinger
Thank you very much for your reply.
What a powerful tool the pyFoam !!! Excellent
I'll try to install it on my computer.
The vertices 10 14 13 17 are used to define the left wall.
Do you thinks it's okay ?
Following your picture I've corrected the 13 and 17 vertices, but I still got a message fail with the checkMesh !
By the way, could you please check again my corrections.
I'll try to install the pyFoam on my computer.

Many thanks for your precious informations.
Kind regards

Krimo
Attached Files
File Type: gz mesh_problem_v2.tar.gz (10.0 KB, 1 views)
belkadi is offline   Reply With Quote

Old   September 19, 2013, 13:36
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
I'm sorry to tell you, that it does not work that way.

If you check the output of checkMesh, you will see, that there are two unconnected regions.

I am not a hundred percent sure if you can use points to define a face which are not part of a block definition. The points 10, 13, 14 and 17 are not part of your block definitions, so I would not use them to define patches.


Study the attached image. This reflects your key problem - connecting the small block to the large one.

The block ( 0 1 2 3 4 5 6 7 ) corresponds to the middle one of the large blocks.

The block ( 8 9 10 11 12 13 14 1 5 ) corresponds to the small block.


You connect the two blocks with the keyword mergePatchPairs.

Code:
boundary
(
master
{
type patch ;
faces
(
(1 2 6 5)
);
}
slave
{
type patch ;
faces
(
( 12 15 11 8 )
);
}
...

Code:
mergePatchPairs
(
( master slave )
);
Attached Images
File Type: jpg twoBlocks.jpg (45.4 KB, 83 views)
Attached Files
File Type: txt log.checkMesh.txt (3.4 KB, 6 views)
GerhardHolzinger is offline   Reply With Quote

Old   September 20, 2013, 04:10
Default
  #5
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
Dear Gerhard Holzinger,

Again thank you for your useful informations.
I'll follow your suggestions to create two blocks and use the mergePatachesPairs.
I've only one question, I'll be very happy if your reply to it.
I'll use the mesh from your last picture.
Theb lock (8 9 10 11 12 13 14 15) I'll use it for example as an injector with air.
The block (0 1 2 3 4 5 6 7) will contain water for example.
I'll use the interFoam to simulate mixing water with air.
To define the right wall should I use the (1 5 6 2) ? As the left wall (0 4 7 3)
Or Define the right wall as : (5 12 8 1)
(1 8 11 2)
(2 11 15 6)
(5 12 15 6)

Kind regards

Many thanks

Krimo
belkadi is offline   Reply With Quote

Old   September 20, 2013, 04:44
Default
  #6
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Quote:
To define the right wall should I use the (1 5 6 2) ? As the left wall (0 4 7 3)
Yes, this is the way to do it.

Then you define the left face of the small block as a patch and use mergePatchPairs to connect the two blocks.

What will happen is, that all the faces of the smaller patch (12 15 11 8) will be used to remove faces from the patch (1 2 6 5).

In the end, the small patch (12 15 11 8) will disappear, and the right wall of the large block, will have a hole.

Then, checkMesh will report only 1 region.

checkMesh will most probably report some errors due to the mesh modifications, e.g. concave cells. But that's another story.
GerhardHolzinger is offline   Reply With Quote

Old   September 20, 2013, 04:49
Default
  #7
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
Excellent !
I'll follow all these precious suggestions.
Will be back !

Many thanks

Krimo
belkadi is offline   Reply With Quote

Old   September 20, 2013, 05:28
Default
  #8
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
I've modified my file.

When I use in the end of the blockMeshDict file the patches key word it works.
But when using the mergePatchPairs it doesn't work !
Could you please check the error for me. I don't understand the error source !

Thanks and apologies for the very basic questions !

Kind regards

Krimo
Attached Files
File Type: gz mesh_problem_v2.tar.gz (10.0 KB, 3 views)
belkadi is offline   Reply With Quote

Old   September 20, 2013, 05:52
Default
  #9
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
I don't mean to be mean, but

read the error message!


Code:
--> FOAM FATAL ERROR: 
Patch named leftwall not found.
Available patch names: 
8
(
slave
inlet
leftWall
rightWall
upperWall
lowerWall
frontAndBack
defaultFaces
)

Can you find the problem?
akidess likes this.
GerhardHolzinger is offline   Reply With Quote

Old   September 20, 2013, 06:21
Default
  #10
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
ohhh
I've used leftwall instead leftWall
Many thanks ! now it works !
Now I can continue to thinks how I can solve the problem !
I'll not forget your help

Kind regards

Krimo
belkadi is offline   Reply With Quote

Old   September 20, 2013, 06:22
Default
  #11
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
Just to add;

When I used the checkMesh,
I've Failed 2 mesh chacks. I'll see if I can ignore this
The blockMesh works
belkadi is offline   Reply With Quote

Old   September 20, 2013, 07:04
Default
  #12
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
In my test case (two blocks that are connected with mergePatchPairs) checkMesh reports no errors and checkMesh -allGeometry -allTopology reports two errors (concave cells and face tets).

I assume that this comes from the hanging nodes - or something similar.

Maybe someone that is more into the whole mesh generation thing can comment on that one.
GerhardHolzinger is offline   Reply With Quote

Old   September 20, 2013, 08:02
Default
  #13
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
I don't know if I can ignore these errors or try to fix it ?
If not how I can do it ? redfine the vertices of small block ?
belkadi is offline   Reply With Quote

Old   September 20, 2013, 08:14
Default
  #14
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
The errors are about the cells that result from the way blockMesh connects the two blocks.

Let me try some ascii, ignore the grey x'es.

o----o
|xxx |
|xxx o---o
|xxx |xx |
o----o---o


You see two cells, that are connected. The left cell has five nodes (the four corner nodes and the hanging node), whereas the right cell has only four. checkMesh will report the left cell as concave, because there are faces with parallel face normal vectors (the green and the blue face). However, there is nothing wrong with this cell.

If we - manually modify the location of the nodes, we get rid of the error

o----o
| xxx \
| xxxx o--o
| xxx / xs |
o----o-----o

Now we have moved the hanging node with the result, that the face normal vectors of the green and the blue faces are not parallel anymore.


You can try this if you connect two blocks that are meshed with only one cell. Then you can easily play around with the node coordinates.

Last edited by GerhardHolzinger; September 20, 2013 at 08:16. Reason: repaired ascii "drawing"
GerhardHolzinger is offline   Reply With Quote

Old   September 20, 2013, 09:16
Default
  #15
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
I'm afraid, but I don't think that I've well understood your answer.
I've well meshed the two blocks with only one cell, the results is in attached file.
Should I change the coordinates of the face (1 5 6 2) ?
I don't think that I've got the message clearly to apply it to my own case.

Sorry for stupid questions !

Kind regards

Krimo
Attached Images
File Type: jpg image.jpg (38.0 KB, 184 views)
belkadi is offline   Reply With Quote

Old   September 20, 2013, 09:38
Default
  #16
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Sorry, use 2 cells for the blocks, then you can play with the node coordinates.

Using 1 cell gives garbage results.
Attached Images
File Type: jpg sreenshotMesh.jpg (24.9 KB, 176 views)
GerhardHolzinger is offline   Reply With Quote

Old   September 20, 2013, 09:46
Default
  #17
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
Where can I find the node coordinate ?
Is it inside the generated file points (created in the polymesh repository)
or it's simply the (1 2 6 5) vertices ?
belkadi is offline   Reply With Quote

Old   September 20, 2013, 10:05
Default
  #18
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
It's in the points file. This file is a list of coordinates.

There, the coordinates of the node X are at the X-th entry of this list.
GerhardHolzinger is offline   Reply With Quote

Old   September 20, 2013, 10:15
Default
  #19
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
Ok, So if I'll understood I've to find the hanging node in this file to modify it from the :
o----o
|xxx |
|xxx o---o
|xxx |xx |
o----o---o

to the following form :

o----o
| xxx \
| xxxx o--o
| xxx / xs |
o----o-----o

Right ?
belkadi is offline   Reply With Quote

Old   September 20, 2013, 10:44
Default
  #20
Member
 
belkadi
Join Date: May 2013
Location: France
Posts: 31
Rep Power: 13
belkadi is on a distinguished road
Should I modify the cells coordinates which have a triangular form to a rectangular form ? This is what you mean ?
Sorry, I'm new with this issues and with openfoam.
I believe that it's a very basic questions but I want really to understand and learn.

Kind regards

Krimo
Attached Images
File Type: jpg image2.jpg (43.8 KB, 126 views)
belkadi 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
[Other] How to delete cells in OF based on CheckMesh? AndTen OpenFOAM Meshing & Mesh Conversion 15 July 27, 2018 07:13
[mesh manipulation] checkMesh Erros after refineMesh mgdenno OpenFOAM Meshing & Mesh Conversion 10 October 14, 2014 06:16
checkMesh Errors after refineMesh mgdenno OpenFOAM 0 July 30, 2012 22:39
Checkmesh shows fault in snappyhexmeshed pipe senol OpenFOAM 2 July 13, 2012 15:12
[Other] CheckMesh for mesh quality gdbaldw OpenFOAM Meshing & Mesh Conversion 2 October 18, 2007 01:11


All times are GMT -4. The time now is 20:19.