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

[blockMesh] Problems meshing a half of a cylinder with blockMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2013, 10:47
Default Problems meshing a half of a cylinder with blockMesh
  #1
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hi FOAMers!

I'm trying to mesh a geometry formed by a half of a cylinder and a cube (the way you can see in the attached file). Although I've done the mesh, as you can see in the pic attached, I have had a little problem and I don't know what to do about that. The thing is that it forces me to divide the blocks 1 and 2 in the same amount of cells in the angular direction that block 0 is. Otherwise I get the following error message:

Code:
--> FOAM FATAL ERROR: 
Inconsistent number of faces between block pair 0 and 2

    From function blockMesh::calcMergeInfo()
    in file blockMesh/blockMeshMerge.C at line 221.
I would like to divide the cylinder uniformly in the radial direction, so I need to solve that issue.

Another curious fact I have found is that the internal faces between blocks 0 and 1, 2 and betwen block 3 and 1,2 are considered as default faces (empty) after executing blockMesh (as you can see in the attached pic). I don't know if it can cause some trouble when computing with laplacianFoam or not. If so, I would like to know how to solve that. This is my blockMeshDict file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
/*
       Mapa conceptual
       
              ·2/11
             /|\
            / | \
       3/12.  .8 \
          /7. |17 \
         / 16 |    \
     4\13·____.____·1/10
         |    |0/9
     5/14.____.6/15

*/
convertToMeters 0.001;

vertices
(
  (0   0    0)                        //vertice 0
  (30  0    0)                        // 1
  (0   30   0)                        // 2
  (-21.213203436 21.213203436    0)   // 3
  (-30 0    0)                        // 4
  (-30 -10  0)                        // 5
  (0   -10  0)                        // 6
  (-14.142135624  14.142135624   0)   // 7 
  (0 20 0)                            // 8
  (0   0    10)                       //vertice 9 -> 0'
  (30  0    10)                       // 10 -> 1'
  (0   30   10)                       // 11 -> 2'
  (-21.213203436 21.213203436    10)  // 12 -> 3'
  (-30 0    10)                       // 13 -> 4'
  (-30 -10  10)                       // 14 -> 5'
  (0   -10  10)                       // 15 -> 6'
  (-14.142135624  14.142135624   10)  // 16 -> 7' 
  (0 20 10)                           // 17 -> 8'
);

blocks
(
    hex (0 0 1 2 9 9 10 11) base (4 3 1) simpleGrading (1 1 1)      // bloc 0, 1/2 de peça
    hex (2 3 7 8 11 12 16 17) generacio (4 1 1) simpleGrading (1 1 1)     // bloc 1, generació
    hex (0 0 8 7 9 9 17 16) base (4 2 1) simpleGrading (1 1 1)       // bloc 2, sota del generació
    hex (0 0 3 4 9 9 12 13) base (2 3 1) simpleGrading (1 1 1)       // bloc 3, 1/8 cilindre esquerra 
    hex (0 4 5 6 9 13 14 15) base (3 4 1) simpleGrading (1 1 1)      // bloc 4, rectangle
);

edges
(
   arc 1 2 (-30 0 0)
   arc 2 3 (-30 0 0)
   arc 3 4 (0 -30 0)
   arc 8 7 (-20 0 0)
   arc 10 11 (-30 0 10)
   arc 11 12 (-30 0 10)
   arc 12 13 (0 -30 10)
   arc 16 17 (20 0 10)
);

boundary
(
    blocMetalic
    {
        type patch;
        faces
        (
            (1 10 11 2)
        );
    }
    aillant
    {
        type patch;
        faces
        (
            (1 0 9 10)
	    (0 6 15 9)
        );
    }
    aigua
    {
        type patch;
        faces
        (
            (3 2 11 12)
	    (4 3 12 13)
	    (5 4 13 14)
	    (6 5 14 15)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
Besides, when I apply splitMeshRegions to create the regions directories it creates 2 more regions, these are domain0 and domain2. I don't know if this is related with the previous issue I mentioned before...

Thanks in advance!
Attached Images
File Type: jpg Captura de 2013-11-24 21:43:57.jpg (24.2 KB, 174 views)
File Type: jpg Captura de 2013-11-25 16:31:11.jpg (38.3 KB, 110 views)
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!

Last edited by zfaraday; November 25, 2013 at 15:04. Reason: changed what is painted in red (radial to angular)
zfaraday is offline   Reply With Quote

Old   November 26, 2013, 08:33
Default
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Well, I've been trying other ways to define that mesh and I finally found the way you can see in the attached picture and in the blockMeshDict file pasted here:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
/*
       Mapa conceptual

              .7/9
             /|\
            / | \
           / 2·5 \
     10/15.  /|\  \
         / \. | \  \
        /  /11/16\  \
       /  /   |   \  \
      /  /    |    \  \
12/17.__.___20.21___.__.6/8
     |  0/3   |     1/4
     .________.
   13/18     14/19

*/
convertToMeters 0.001;

vertices
(
  (-20   0    0)                        //vertice 0
  ( 20   0    0)                        // 1
  (0    20    0)                        // 2
  (-20   0   10)                        //vertice 3
  ( 20   0   10)                        // 4
  (0    20   10)                        // 5
  (30    0    0)                        // 6
  (0    30    0)                        // 7 
  (30    0   10)                        // 8
  (0    30   10)                        // 9
  (-21.213203436 21.213203436    0)     // 10 
  (-14.142135624  14.142135624   0)     // 11 
  (-30   0    0)                        // 12 
  (-30 -10    0)                        // 13 
  (0   -10    0)                        // 14 
  (-21.213203436 21.213203436   10)     // 15 
  (-14.142135624  14.142135624  10)     // 16 
  (-30   0   10)                        // 17 
  (-30 -10   10)                        // 18 
  (0   -10   10)                        // 19 
  (0     0    0)                        // 20
  (0     0   10)                        // 21
);

blocks
(
    hex (20 20 1 2 21 21 4 5) (12 6 1) simpleGrading (1 1 1)
    hex (20 20 2 0 21 21 5 3) (12 6 1) simpleGrading (1 1 1)
    hex (2 1 6 7 5 4 8 9) (12 3 1) simpleGrading (1 1 1)
    hex (11 2 7 10 16 5 9 15) (6 3 1) simpleGrading (1 1 1)
    hex (0 11 10 12 3 16 15 17) (6 3 1) simpleGrading (1 1 1)
    hex (13 14 20 12 18 19 21 17) (9 5 1) simpleGrading (1 1 1)
    
);

edges
(
   arc 1 2 (-20 0 0)
   arc 2 11 (-20 0 0)
   arc 11 0 (0 -20 0)
   arc 6 7 (-30 0 0)
   arc 7 10 (-30 0 0)
   arc 10 12 (0 -30 0)
   arc 4 5 (-20 0 10)
   arc 5 16 (-20 0 10)
   arc 16 3 (0 -20 10)
   arc 8 9 (-30 0 10)
   arc 9 15 (-30 0 10)
   arc 15 17 (0 -30 10)
   arc 2 0 (0 -20 0)
   arc 5 3 (0 -20 10)
);

boundary
(
    blocMetalic
    {
        type patch;
        faces
        (
            (6 7 9 8)
        );
    }
    aillant
    {
        type patch;
        faces
        (
            (1 6 8 4)
	    (20 1 4 21)
            (14 20 21 19)
        );
    }
    aigua
    {
        type patch;
        faces
        (
            (7 10 15 9)
            (10 12 17 15)
            (12 13 18 17)
            (13 14 19 18)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
Meshing in this way I finally got the mesh structure I was looking for but now I noticed that other internal faces are auto defined as default faces by OpenFOAM when I apply blockMesh. These are the ones shown in the attached pic.

The issue mentioned above I found out that it isolates the blocks that the faces belong to when applying laplacianFoam, as it can be seen in the other attached pic. Therefore I need to get rid of those default faces auto defined when I apply blockMesh.

I would be really grateful if someone could give me any advice to solve that problem, because I've been trying many tricks the latest days but I still haven't found out the proper way to solve it.

Regards.
Attached Images
File Type: jpg Captura de 2013-11-26 14:12:46.jpg (36.6 KB, 110 views)
File Type: jpg Captura de 2013-11-26 14:18:59.jpg (42.6 KB, 76 views)
File Type: jpg Captura de 2013-11-26 14:23:55.jpg (45.8 KB, 83 views)
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   December 11, 2013, 03:41
Default
  #3
Member
 
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 70
Rep Power: 16
Thangam is on a distinguished road
Hi,

default faces usually arise if you have not defined those faces in your boundary definition (in the blockMesh file). In your blockmesh file, you have not defined the top and bottom surfaces and some surfaces within the geometry. I guess you have include these surfaces in the boundary section of your blockMesh file and define them according to your physical problem suitably as patches or walls.I think once you have defined all the surfaces in the geometry and got rid of the default faces, you should be able to process it.

Hope this helps.
Thangam 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
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 11:12
[ICEM] Simple pipe meshing - problems with y+ in CFX Keizers ANSYS Meshing & Geometry 23 January 15, 2015 08:00
[ICEM] Problems with meshing a 3D wing w/winglet cesarcg ANSYS Meshing & Geometry 10 March 18, 2013 12:12
[blockMesh] Specifying boundary faces failes in blockMesh blaise OpenFOAM Meshing & Mesh Conversion 0 May 10, 2010 03:56
ICEM CFD Meshing Problems: Hexa Dominant Evan CFX 6 July 3, 2006 12:37


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