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 Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2019, 19: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, 104 views)
andrewlindsay is offline   Reply With Quote

Old   November 18, 2019, 04:14
Default
  #2
New Member
 
Andrew Lindsay
Join Date: Mar 2009
Location: Perth, Western Australia
Posts: 24
Rep Power: 17
andrewlindsay is on a distinguished road
Day 2 Progress?

Ok, I have had a few wins and a few losses. I have started to create my case directory structure, populating the thermophysical parameters etc that I will need.

But on the blockmesh front, I now have the following error when I try to generate my mesh.


Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1906                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : v1906 OPENFOAM=1906
Arch   : "LSB;label=32;scalar=64"
Exec   : blockMesh
Date   : Nov 18 2019
Time   : 16:05:08
Host   : DESKTOP-B09R79J
PID    : 507
I/O    : uncollated
Case   : /mnt/c/Users/andre/OneDrive/Documents/openFOAM/FieldJoint
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Creating block mesh from "system/blockMeshDict"
Creating block edges
No non-planar block faces defined
Creating topology blocks
--> FOAM Warning : 
    From function Foam::vector Foam::cellModel::centre(const labelList&, const Foam::UList<Foam::Vector<double> >&) const
    in file meshes/meshShapes/cellModel/cellModel.C at line 72
    zero or negative pyramid volume: -196.945 for face 0
--> FOAM Warning : 
    From function Foam::vector Foam::cellModel::centre(const labelList&, const Foam::UList<Foam::Vector<double> >&) const
    in file meshes/meshShapes/cellModel/cellModel.C at line 72
    zero or negative pyramid volume: -196.945 for face 3
--> FOAM FATAL ERROR:
Block hex (0 1 1 0 2 3 4 5) water (30 30 30) simpleGrading (1(1) 1(1) 1(1)) has inward-pointing faces
    4(0 1 3 2) 4(0 5 4 1)
    
file: /mnt/c/Users/andre/OneDrive/Documents/openFOAM/FieldJoint/system/blockMeshDict.blocks at line 78.

    From function void Foam::blockDescriptor::check(const Foam::Istream&)
    in file blockDescriptor/blockDescriptor.C at line 85.
    
FOAM exiting
The corresponding blockmeshDict file is now as follows:

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  3  4  5)  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
(
);

// ************************************************************************* //
andrewlindsay is offline   Reply With Quote

Old   November 18, 2019, 06:29
Default
  #3
New Member
 
Andrew Lindsay
Join Date: Mar 2009
Location: Perth, Western Australia
Posts: 24
Rep Power: 17
andrewlindsay is on a distinguished road
OK, So I am getting a little bit further into the blockMesh.

I have figured out the issue I was getting with the negative volumes, I had the front and back points swapped around. Now that I have fixed that I have gotten a lot further than I was.

Now the error that I am getting is with specifying the Top Wall patch.

The error I am getting is as follows:

face 43 in patch 0 does not have a neighbour cell face:4(34 35 39 38)

The fixed blockmeshDict is as follows:
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 3 5 4 2) (30 30 30) simpleGrading (1 1 1) // Water
  hex ( 3 5 4 2 7 9 8 6) (30 30 30) simpleGrading (1 1 1) // CRA
  hex ( 7 9 8 6 11 13 12 10) (30 30 30) simpleGrading (1 1 1) // CS
  hex ( 11 13 12 10 15 17 16 14) (30 30 30) simpleGrading (1 1 1) // FBE
  hex ( 15 17 16 14 19 21 20 18) (30 30 30) simpleGrading (1 1 1) // ADH
  hex ( 19 27 26 18 23 25 24 22) (30 30 30) simpleGrading (1 1 1) // PPS1
  hex ( 23 33 32 22 29 31 30 28) (30 30 30) simpleGrading (1 1 1) // PF1
  hex ( 29 31 30 28 35 37 36 34) (30 30 30) simpleGrading (1 1 1) // PPS2
  hex ( 39 45 44 38 41 43 42 40) (30 30 30) simpleGrading (1 1 1) // IMPP4
  hex ( 31 47 46 30 37 45 44 36) (30 30 30) simpleGrading (1 1 1) // IMPP3
  hex ( 33 49 48 32 31 47 46 30) (30 30 30) simpleGrading (1 1 1) // IMPP2
  hex ( 27 21 20 26 25 49 48 24) (30 30 30) simpleGrading (1 1 1) // IMPP1

);

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  5  3)
            (3  5  9  7)
            (7  9  13  11)
            (11  13  17  15)
            (15  17  21  19)
            (19  27  25  23)
            (27  21  49  25)
            (23  33  31  29)
            (33  49  47  31)
            (29  31  37  35)
            (31  47  45  37)
            (39  45  43  41)

 
         // Back Wall Faces
            (2  4  1  0)
            (6  8  4  2)
            (10  12  8  6)
            (14  16  12  10)
            (18  20  16  14)
            (22  24  26  18)
            (24  48  20  26)
            (28  30  32  22)
            (30  46  48  32)
            (34  36  30  28)
            (36  44  46  30)
            (40  42  44  38)


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


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


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

          );
    }
);

//  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
(
);

// ************************************************************************* //
andrewlindsay is offline   Reply With Quote

Old   November 18, 2019, 09:56
Default
  #4
New Member
 
Andrew Lindsay
Join Date: Mar 2009
Location: Perth, Western Australia
Posts: 24
Rep Power: 17
andrewlindsay is on a distinguished road
OK, so I have isolated my problem to the following geometry.



I created the original hex block using the vertices (1 2 3 4 5 6 7 8) as per the image below.



Then I created the surface patches as (5 9 12 8) and (9 10 11 12)



blockMesh is saying that patch (5 9 12 8) does not have a neighbour. Is this because the original hex block vertices were 6 and 7?
andrewlindsay is offline   Reply With Quote

Old   November 19, 2019, 08:00
Default
  #5
New Member
 
Andrew Lindsay
Join Date: Mar 2009
Location: Perth, Western Australia
Posts: 24
Rep Power: 17
andrewlindsay is on a distinguished road
Well, I tried to subdivide it up so that I didn't have the mid block patches. But I still have the same problem.

Any assistance would be greatly appreciated.

The blockmeshDict file can be downloaded here if anyone is keep to help.

https://login.filesanywhere.com/fs/v...89586173aeab9a


Regards

Andrew
andrewlindsay is offline   Reply With Quote

Old   November 19, 2019, 09:33
Default
  #6
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 68
Rep Power: 16
David* is on a distinguished road
Good work explaining your problem, but I still don't get it (not used to blockMesh as I work with snappyHexMesh). Only advice I have:
- for a working mesh, you do not have to define "internals"
- https://cfd.direct/openfoam/user-gui...26-1920005.3.2 "To connect two blocks with face matching, the two patches that form the connection should simply be ignored from the patches list."
- you can define points as variables:
Code:
xmin -36.4; 
ymin -210.0;
zmin 72.2;

vertices        
(
    ( $xmin $ymin $zmin )
)
And I hope you do use some script to generate this huge blockMeshDict file, if not see the OF wiki for some hints on scripting.
David* is offline   Reply With Quote

Old   November 20, 2019, 00:38
Default
  #7
New Member
 
Andrew Lindsay
Join Date: Mar 2009
Location: Perth, Western Australia
Posts: 24
Rep Power: 17
andrewlindsay is on a distinguished road
Another day, but now one milestone completed.

I have finally managed to get my geometry (albeit just a single wedge) to be converted from a blockmeshDict into something that hopefully OpenFOAM will be able to use.
I have now got a polymesh folder with files located in it, so I will take that as a win.
I only have the one entry in the boundaries file, but I guess that's simply because I set everything to a wall. When I get home tonight I will start on my next step of making the mesh axisymmetric and finding out how to define the correct boundary conditions and initial conditions to perform a cht* solid analysis.

For interest, here is my current blockmeshDict
Attached Files
File Type: txt blockMeshDict.txt (25.2 KB, 37 views)
andrewlindsay is offline   Reply With Quote

Old   November 20, 2019, 08:37
Default
  #8
Member
 
Damian Berghof
Join Date: May 2019
Posts: 41
Rep Power: 10
virengos will become famous soon enough
That's really awesome what you all are doing with blockMesh, I really appreciate it.
But have you tried Salome (which is also OpenSource and both available on Linux and Windows) to create the blocks and the hex mesh? It can be easily created and converted to OpenFOAM with the ideasUnvToFoam command within ~20 minutes. Few weeks ago I wrote a post about how to mesh a curved pipe:
https://virengos.com/2019/09/29/fast-and-easy-way-to-create-full-hex-elements-meshes-for-curved-pipes-with-salome/

best,
Damian
__________________
Get more support about Meshing with Salome and Visualization with ParaView in my growing groups
https://bit.ly/2lFfDkQ
https://bit.ly/2k2u8Pj
virengos is offline   Reply With Quote

Old   August 15, 2020, 10:56
Default Insulated pipe Boundary Condition
  #9
Member
 
Sachin
Join Date: Aug 2014
Location: India
Posts: 84
Rep Power: 11
Sachin m is on a distinguished road
Hi,
What is the boundary condition that you use for insulation in pipe?
Sachin m is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 22:53
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 12:32
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 02:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59


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