|
[Sponsors] |
[blockMesh] Unable to change mesh density in blocks |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 18, 2019, 00:07 |
Unable to change mesh density in blocks
|
#1 |
New Member
Joseph Tipton
Join Date: Jun 2010
Posts: 27
Rep Power: 16 |
I'm attaching a simplified mesh code that utilizes 5 block regions. Each block starts with a very simple mesh density of (1 1 1).
My goal is to change the x-direction mesh density. Let's take the middle block "BLOCK III". I can change the mesh density to (10 1 1) and the the blockMesh command works without a problem. Now let's say I want to change the mesh density in both "BLOCK 0" and "BLOCK IV" to (20 1 1). Now I get an error message that says: Code:
--> FOAM FATAL ERROR: Inconsistent number of faces between block pair 0 and 4 From function void Foam::blockMesh::calcMergeInfo() in file blockMesh/blockMeshMerge.C at line 221. Many thanks, ~ Joseph Code:
FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } scale 0.001; vertices ( (0 0 0) (100 0 0) (100 5 0) (105 5 0) (105 0 0) (205 0 0) (205 5 0) (205 50 0) (105 50 0) (100 50 0) (0 50 0) (0 5 0) (0 0 7) (100 0 7) (100 5 7) (105 5 7) (105 0 7) (205 0 7) (205 5 7) (205 50 7) (105 50 7) (100 50 7) (0 50 7) (0 5 7) ); blocks ( // BLOCK 0 hex (0 1 2 11 12 13 14 23) (1 1 1) simpleGrading (1 1 1) // BLOCK 1 hex (3 4 5 6 15 16 17 18) (1 1 1) simpleGrading (1 1 1) // BLOCK 2 hex (3 6 7 8 15 18 19 20) (1 1 1) simpleGrading (1 1 1) // BLOCK 3 hex (2 3 8 9 14 15 20 21) (1 1 1) simpleGrading (1 1 1) // BLOCK 4 hex (2 9 10 11 14 21 22 23) (1 1 1) simpleGrading (1 1 1) ); edges ( ); boundary ( inlet { type patch; faces ( (10 11 23 22) (11 0 12 23) ); } outlet { type patch; faces ( (6 7 19 18) (5 6 18 17) ); } upperWall { type wall; faces ( (7 8 20 19) (8 9 21 20) (9 10 22 21) ); } lowerWall { type wall; faces ( (0 1 13 12) (1 2 14 13) (2 3 15 14) (3 4 16 15) (4 5 17 16) ); } front { type empty; faces ( (13 14 23 12) (14 21 22 23) (14 15 20 21) (15 18 19 20) (15 16 17 18) ); } back { type empty; faces ( (11 2 1 0) (3 6 5 4) (8 7 6 3) (9 8 3 2) (10 9 2 11) ); } ); mergePatchPairs ( ); asfdasdf |
|
July 18, 2019, 05:25 |
|
#2 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
You can not mesh two connected blocks with different mesh density.
In the image attached, you see two blocks, with a green and a red mesh. The face the two blocks are connected, the grid lines don't match. This is why OpenFOAM aborts with an error. You have two options
|
|
July 18, 2019, 10:58 |
|
#3 |
New Member
Joseph Tipton
Join Date: Jun 2010
Posts: 27
Rep Power: 16 |
Gerhard,
Thanks so much for the reply. The thumbnail you showed does not match what I am trying to do. I am not changing the y-direction mesh density. BLOCK 0 and BLOCK IV are on the left of my domain and on top of each other. Code:
|--------------|---|----------------| | Block IV |III| Block II | | | | | |--------------|---|----------------| | Block 0 | | Block I | |--------------| |----------------| I am just trying to change the x-direction mesh density, e.g. Code:
// BLOCK 0 hex (0 1 2 11 12 13 14 23) (10 1 1) simpleGrading (1 1 1) // BLOCK 4 hex (2 9 10 11 14 21 22 23) (10 1 1) simpleGrading (1 1 1) I feel like this is too simple of a problem to be a bug in the software but I cannot understand why this is not possible. Thanks so much for your help! ~ Joseph |
|
July 19, 2019, 06:17 |
|
#4 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
Your local coordinates are messed up.
Code:
blocks ( // BLOCK 0 hex (0 1 2 11 12 13 14 23) (1 1 1) simpleGrading (1 1 1) // BLOCK 4 hex (2 9 10 11 14 21 22 23) (1 1 1) simpleGrading (1 1 1) ); |
|
July 19, 2019, 10:28 |
|
#5 |
New Member
Joseph Tipton
Join Date: Jun 2010
Posts: 27
Rep Power: 16 |
Gerhard,
Thanks so much for helping me isolate my error. I knew that blocks had to be defined in a CCW manner but did not realize the first vertex sets the origin. Best, ~ Joseph |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] converting Fluent mesh to openfoam standard mesh | deepesh | OpenFOAM Meshing & Mesh Conversion | 31 | March 29, 2017 06:59 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
[ICEM] Using mesh Density | Daniel_Khazaei | ANSYS Meshing & Geometry | 0 | May 2, 2014 19:00 |
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation | tommymoose | ANSYS Meshing & Geometry | 48 | April 15, 2013 05:24 |
Mesh sensitivity when using phase change models | BKaus | STAR-CCM+ | 0 | February 28, 2012 21:51 |