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

[blockMesh] Creating a blockmeshDict file

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 17, 2019, 18:59
Default Creating a blockmeshDict file
  #1
New Member
 
Andrew Lindsay
Join Date: Mar 2009
Location: Perth, Western Australia
Posts: 24
Rep Power: 17
andrewlindsay is on a distinguished road
Hello all.

I am diving in to OpenFOAM to try my hand at modelling heat transfer.

To start with, I'd like to create an axisymmetric mesh of an insulated pipe, similar to the schematic (not really to scale at this stage, but easier to explain - hopefully) in the schematic.png file.

I have created all the points by rotating +/- 2.5 degrees around the x-axis, to create the wedge geometry, then I have entered all the vertices and created all the hex cells as per the attached partial blockmesh dict file.

I have also created all the wall patches (I have just called everything a wall at this stage, as I would just be happy to begin with to get a geometry that I can see in paraView).

I have also found all the internal shared patches, but I do not know how to use these patches and what the next steps are. I was hoping for some guidance from the group.

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1906                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters   0.001;

vertices
(

   (  0                 0                   0               )    // 0M  - vertex 0  'M' is the middle point (on z = 0, used for interpolation point of arcs)
   (542.325968860433    0                   0               )    // 1M  - vertex 1  'F' is the Front Face point as per schematic.
   (  0                 9.99048221581858   -0.43619387365336)    // 2F  - vertex 2  'B' is the Back Face point as per schematic.
   (  0                 9.99048221581858    0.43619387365336)    // 2B  - vertex 3
   (542.325968860433    9.99048221581858   -0.43619387365336)    // 3F  - vertex 4
   (542.325968860433    9.99048221581858    0.43619387365336)    // 3B  - vertex 5
   (  0                19.9809644316372    -0.87238774730672)    // 4F  - vertex 6
   (  0                19.9809644316372     0.87238774730672)    // 4B  - vertex 7
   (542.325968860433   19.9809644316372    -0.87238774730672)    // 5F  - vertex 8
   (542.325968860433   19.9809644316372     0.87238774730672)    // 5B  - vertex 9
   (  0                29.9714466474557    -1.30858162096008)    // 6F  - vertex 10
   (  0                29.9714466474557     1.30858162096008)    // 6B  - vertex 11
   (542.325968860433   29.9714466474557    -1.30858162096008)    // 7F  - vertex 12
   (542.325968860433   29.9714466474557     1.30858162096008)    // 7B  - vertex 13
   (  0                39.9619288632743    -1.74477549461344)    // 8F  - vertex 14
   (  0                39.9619288632743     1.74477549461344)    // 8B  - vertex 15
   (542.325968860433   39.9619288632743    -1.74477549461344)    // 9F  - vertex 16
   (542.325968860433   39.9619288632743     1.74477549461344)    // 9B  - vertex 17
   (  0                49.9524110790929    -2.1809693682668)     // 10F - vertex 18
   (  0                49.9524110790929     2.1809693682668)     // 10B - vertex 19
   (542.325968860433   49.9524110790929    -2.1809693682668)     // 11F - vertex 20
   (542.325968860433   49.9524110790929     2.1809693682668)     // 11B - vertex 21
   (  0                59.9428932949115    -2.61716324192016)    // 12F - vertex 22
   (  0                59.9428932949115     2.61716324192016)    // 12B - vertex 23
   (263.747941178395   59.9428932949115    -2.61716324192016)    // 13F - vertex 24
   (263.747941178395   59.9428932949115     2.61716324192016)    // 13B - vertex 25
   (278.67614440867    49.9524110790929    -2.1809693682668)     // 14F - vertex 26
   (278.67614440867    49.9524110790929     2.1809693682668)     // 14B - vertex 27
   (  0                69.93337551073      -3.05335711557352)    // 15F - vertex 28
   (  0                69.93337551073       3.05335711557352)    // 15B - vertex 29
   (158.578027682038   69.93337551073      -3.05335711557352)    // 16F - vertex 30
   (158.578027682038   69.93337551073       3.05335711557352)    // 16B - vertex 31
   (193.747941178395   59.9428932949115    -2.61716324192016)    // 17F - vertex 32
   (193.747941178395   59.9428932949115     2.61716324192016)    // 17B - vertex 33
   (  0                79.9238577265486    -3.48955098922688)    // 18F - vertex 34
   (  0                79.9238577265486     3.48955098922688)    // 18B - vertex 35
   (150                79.9238577265486    -3.48955098922688)    // 19F - vertex 36
   (150                79.9238577265486     3.48955098922688)    // 19B - vertex 37
   (100                79.9238577265486    -3.48955098922688)    // 21F - vertex 38
   (100                79.9238577265486     3.48955098922688)    // 21B - vertex 39
   (117.156055364076   89.9143399423672    -3.92574486288024)    // 22F - vertex 40
   (117.156055364076   89.9143399423672     3.92574486288024)    // 22B - vertex 41
   (542.325968860433   89.9143399423672    -3.92574486288024)    // 23F - vertex 42
   (542.325968860433   89.9143399423672     3.92574486288024)    // 23B - vertex 43
   (542.325968860433   79.9238577265486    -3.48955098922688)    // 24F - vertex 44
   (542.325968860433   79.9238577265486     3.48955098922688)    // 24B - vertex 45
   (542.325968860433   69.93337551073      -3.05335711557352)    // 25F - vertex 46
   (542.325968860433   69.93337551073       3.05335711557352)    // 25B - vertex 47
   (542.325968860433   59.9428932949115    -2.61716324192016)    // 26F - vertex 48
   (542.325968860433   59.9428932949115     2.61716324192016)    // 26B - vertex 49

);

blocks
(
    
    hex( 0  1  1  0  2  4  5  3)  water (30 30 30) simpleGrading (1 1 1) // Water - inside pipe, treat as solid for now
    hex( 2  4  5  3  6  8  9  7)  cra   (30 30 30) simpleGrading (1 1 1) // CRA - internal corrosion resistant layer of pipe
    hex( 6  8  9  7  10 12 13 11) cs    (30 30 30) simpleGrading (1 1 1) // CS - carbon steel mother pipe
    hex( 10 12 13 11 14 16 17 15) fbe   (30 30 30) simpleGrading (1 1 1) // FBE - fusion bonded epoxy anti-corrosion coating
    hex( 14 16 17 15 18 20 21 19) adh   (30 30 30) simpleGrading (1 1 1) // ADH - polypropyene adhesive
    hex( 18 26 27 19 22 24 25 23) pps1  (30 30 30) simpleGrading (1 1 1) // PPS1 - 1st layer (solid polypropylene) of insulation system
    hex( 22 32 33 23 28 30 31 29) pf1   (30 30 30) simpleGrading (1 1 1) // PF1 - 2nd layer (foam polypropylene) of insulation system
    hex( 28 30 31 29 34 36 37 35) pps2  (30 30 30) simpleGrading (1 1 1) // PPS2 - 3rd layer (solid polypropylene) of insulation system
    hex( 38 44 45 39 40 42 43 41) impp4 (30 30 30) simpleGrading (1 1 1) // IMPP4 - Outer of injection moulded polypropylene
    hex( 30 46 47 31 36 44 45 37) impp3 (30 30 30) simpleGrading (1 1 1) // IMPP3 - middle layer of injection moulded polypropylene
    hex( 32 48 49 33 30 46 47 31) impp2 (30 30 30) simpleGrading (1 1 1) // IMPP2 - middle layer of injection moulded polypropylene
    hex( 26 20 21 27 24 48 49 25) impp1 (30 30 30) simpleGrading (1 1 1) // IMPP1 - internal layer of injection moulded polypropylene
    
);

edges
(
    arc 3  2   (  0              10 0 )    // 2M
    arc 7  6   (  0              20 0 )    // 4M
    arc 11 10  (  0              30 0 )    // 6M
    arc 15 14  (  0              40 0 )    // 8M
    arc 19 18  (  0              50 0 )    // 10M
    arc 23 22  (  0              60 0 )    // 12M
    arc 29 28  (  0              70 0 )    // 15M
    arc 35 34  (  0              80 0 )    // 18M
    arc 41 40  (117.156055364076 90 0 )    // 22M
    arc 4  5   (542.325968860433 10 0 )    // 3M
    arc 8  9   (542.325968860433 20 0 )    // 5M
    arc 12 13  (542.325968860433 30 0 )    // 7M
    arc 16 17  (542.325968860433 40 0 )    // 9M
    arc 20 21  (542.325968860433 50 0 )    // 11M
    arc 24 25  (263.747941178395 60 0 )    // 13M
    arc 30 31  (158.578027682038 70 0 )    // 16M
    arc 36 37  (150              80 0 )    // 19M
    arc 42 43  (542.325968860433 90 0 )    // 23M
    arc 44 45  (542.325968860433 80 0 )    // 24M
    arc 46 47  (542.325968860433 70 0 )    // 25M
    arc 48 49  (542.325968860433 60 0 )    // 26M
    
);

boundary
(
    walls
    {
        type wall;
        faces
        (
         // Front Wall Faces
           (0  1  4  2)
           (2  4  8  6)
           (6  8  12  10)
           (10  12  16  14)
           (14  16  20  18)
           (18  26  24  22)
           (26  20  48  24)
           (22  32  30  28)
           (32  48  46  30)
           (28  30  36  34)
           (30  46  44  36)
           (38  44  42  40)
 
         // Back Wall Faces
           (3  5  1  0)
           (7  9  5  3)
           (11  13  9  7)
           (15  17  13  11)
           (19  21  17  15)
           (23  25  27  19)
           (25  49  21  27)
           (29  31  33  23)
           (31  47  49  33)
           (35  37  31  29)
           (37  45  47  31)
           (41  43  45  39)

         // Left Wall Faces
           (0  0  2  3)
           (3  2  6  7)
           (7  6  10  11)
           (11  10  14  15)
           (15  14  18  19)
           (19  18  22  23)
           (23  22  28  29)
           (29  28  34  35)
           (39  38  40  41)

         // Right Wall Faces
           (1  1  5  4)
           (4  5  9  8)
           (8  9  13  12)
           (12  13  17  16)
           (16  17  21  20)
           (20  21  49  48)
           (48  49  47  46)
           (46  47  45  44)
           (44  45  43  42)

         // Bottom Wall Faces
           (1 0 0 1)
           
        // Top Wall Faces
           (35  34  38  39)
           (39  38  40  41)
           (41  40  42  43)
          );
    }
);

//  What do I do with internal patches?


// Top internal patches
//  (3  2  4  5)
//   (7  6  8  9)
//   (11  10  12  13)
//   (15  14  16  17)
//   (19  18  26  27)
//   (27  26  20  21)
//   (23  22  32  33)
//   (33  32  24  25)
//   (25  24  48  49)
//   (29  28  30  31)
//   (31  30  46  47)
//   (39  38  36  37)
//   (37  36  44  45)
//   (3  2  4  5)
//   (7  6  8  9)
//   (11  10  12  13)
//   (15  14  16  17)
//   (19  18  26  27)
//   (27  26  20  21)
//   (23  22  32  33)
//   (33  32  24  25)
//   (25  24  48  49)
//   (29  28  30  31)
//   (31  30  46  47)
//   (39  38  36  37)
//   (37  36  44  45)

// Bottom internal patches
//   (2  3  5  4)
//   (6  7  9  8)
//   (10  11  13  12)
//   (14  15  17  16)
//   (18  19  27  26)
//   (26  27  21  20)
//   (22  23  33  32)
//   (32  33  25  24)
//   (24  25  49  48)
//   (28  29  31  30)
//   (30  31  47  46)
//   (38  39  37  36)
//   (36  37  45  44)

//Left internal patches
//   (27  26  24  25)
//   (33  32  30  31)
//   (31  30  36  37)

// Right internal patches
//   (26  27  25  24)
//   (32  33  31  30)
//   (30  31  37  36)




mergePatchPairs
(
);

// ************************************************************************* //
I hope these make sense.
Attached Images
File Type: png Schematic.png (24.6 KB, 106 views)
andrewlindsay is offline   Reply With Quote

 


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
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 11:32
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 10:59
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 01:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59


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