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

Change the mesh in mixerVesselAMI2D tutorial

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 19, 2017, 10:38
Default Change the mesh in mixerVesselAMI2D tutorial
  #1
New Member
 
Maria
Join Date: Feb 2017
Posts: 17
Rep Power: 2
hoemmaria is on a distinguished road
Hi!

I am quite new to OpenFoam, and very new to meshing with m4.

I would like to create a channel around the mixerVessel in the mixerVesselAMI2D tutorial. I understand that the mixer itself is divided into 8 main blocks with 4 sections inside giving five different radi (r, rb, ri, Rb, R).

What I want to do is to connect the outer radi R of the stator to a rectangular channel which is also stationary. I have added a figure of the mesh I want, where block 0-7 are to include the mixer. However, I cannot make it work.
I seem to have troubles with connecting the stator of the mixer to the blocks for the channel and I get error messages about the edges.

Code:
* * * * * * * //
Create time

Creating block mesh from
    "/home/mariaeho/OpenFOAM/mariaeho-5.0/run/DyMCase/system/blockMeshDict"
Creating block edges


--> FOAM FATAL ERROR: 
0

    From function Foam::cylindricalCS Foam::blockEdges::arcEdge::calcAngle()
    in file blockEdges/arcEdge/arcEdge.C at line 58.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::blockEdges::arcEdge::calcAngle() at ??:?
#3  Foam::blockEdges::arcEdge::arcEdge(Foam::dictionary const&, int, Foam::searchableSurfaces const&, Foam::Field<Foam::Vector<double> > const&, Foam::Istream&) at ??:?
#4  Foam::blockEdge::addIstreamConstructorToTable<Foam::blockEdges::arcEdge>::New(Foam::dictionary const&, int, Foam::searchableSurfaces const&, Foam::Field<Foam::Vector<double> > const&, Foam::Istream&) at ??:?
#5  Foam::blockEdge::New(Foam::dictionary const&, int, Foam::searchableSurfaces const&, Foam::Field<Foam::Vector<double> > const&, Foam::Istream&) at ??:?
#6  void Foam::PtrList<Foam::blockEdge>::read<Foam::blockEdge::iNew>(Foam::Istream&, Foam::blockEdge::iNew const&) at ??:?
#7  Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) at ??:?
#8  Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) at ??:?
#9  ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/blockMesh"
#10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11  ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/blockMesh"
Aborted (core dumped)
The channel I have tried to make is (-10, -6, 1) to (20,6,1) in dm.

Do you have any ideas to what I am doing wrong?

I have attached my blockMeshDict.m4 and the corresponding blockMeshDict files together with a drawing of the mesh I want.



Kind regards,
Maria Hoem
Attached Images
File Type: png BlockMesh.PNG (12.4 KB, 6 views)
Attached Files
File Type: gz CFD-online.tar.gz (9.7 KB, 0 views)
hoemmaria is offline   Reply With Quote

Old   September 27, 2017, 04:30
Default New developments
  #2
New Member
 
Maria
Join Date: Feb 2017
Posts: 17
Rep Power: 2
hoemmaria is on a distinguished road
I have worked on my problem and changed quite a lot. Now I get a different error message:

Code:
Create time

Creating block mesh from
    "/home/mariaeho/OpenFOAM/mariaeho-5.0/run/DyMCase/system/blockMeshDict"
Creating block edges
No non-planar block faces defined
Creating topology blocks
Creating topology patches

Creating block mesh topology
--> FOAM Warning : 
    From function Foam::polyMesh::polyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const cellShapeList&, const faceListList&, const wordList&, const Foam::PtrList<Foam::dictionary>&, const Foam::word&, const Foam::word&, bool)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 871
    Found 16 undefined faces in mesh; adding to default patch.

Check topology

    Basic statistics
        Number of internal faces : 56
        Number of boundary faces : 152
        Number of defined boundary faces : 152
        Number of undefined boundary faces : 0
    Checking patch -> block consistency

Creating block offsets
Creating merge list 

--> FOAM FATAL ERROR: 
Inconsistent number of faces between block pair 24 and 32

    From function void Foam::blockMesh::calcMergeInfo()
    in file blockMesh/blockMeshMerge.C at line 217.

FOAM exiting
Due to the limitation of characters I cannot copy in all of my blockMesh. I have included the file and a drawing of the problem. Here are some of the information about the two blocks that is mentioned in the error message:

Code:
convertToMeters 0.1;


blocks
(
    // block24
    hex (36 37 46 44 92 93 102 100)
    (12 12 1)
    simpleGrading (1 1 1)

    // block32
    hex (44 46 113 112 100 102 129 128)
    (50 12 1)
    simpleGrading (1 1 1)
);


boundary
(
    rotor
    {
        type            wall;
        faces
        (
            (0 2 58 56)    // Circle of the rotor
            (2 4 60 58)
            (3 5 61 59)
            (5 7 63 61)
            (6 8 64 62)
            (8 10 66 64)
            (9 11 67 65)
            (11 1 57 67)

            (0 12 68 56)    // Four blades on the rotor
            (1 12 68 57)

            (3 14 70 59)
            (4 14 70 60)

            (6 16 72 62)
            (7 16 72 63)

            (9 18 74 65)
            (10 18 74 66)
        );
    }


    AMI1
    {
        type            cyclicAMI;
        neighbourPatch  AMI2;
        transform       noOrdering;
/* optional
        surface
        {
            type            searchableCylinder; // none
            point1          (0 0 -1);
            point2          (0 0 1);
            radius          0.5;
        }
*/
        faces
        (
            (21 20 76 77)
            (22 21 77 78)
            (23 22 78 79)
            (24 23 79 80)
            (25 24 80 81)
            (26 25 81 82)
            (27 26 82 83)
            (20 27 83 76)
        );
    }

    AMI2
    {
        type            cyclicAMI;
        neighbourPatch  AMI1;
        transform       noOrdering;
/* optional
        surface
        {
            type            searchableCylinder; // none
            point1          (0 0 -1);
            point2          (0 0 1);
            radius          0.5;
        }
*/
        faces
        (
            (29 28 84 85)
            (30 29 85 86)
            (31 30 86 87)
            (32 31 87 88)
            (33 32 88 89)
            (34 33 89 90)
            (35 34 90 91)
            (28 35 91 84)
        );
    }

    front
    {
        type            empty;
        faces
        (
            (56 58 69 68)
            (58 60 70 69)
            (59 61 71 70)
            (61 63 72 71)
            (62 64 73 72)
            (64 66 74 73)
            (65 67 75 74)
            (67 57 68 75)
            (68 69 77 76)
            (69 70 78 77)
            (70 71 79 78)
            (71 72 80 79)
            (72 73 81 80)
            (73 74 82 81)
            (74 75 83 82)
            (75 68 76 83)
            (84 85 93 92)
            (85 86 94 93)
            (86 87 95 94)
            (87 88 96 95)
            (88 89 97 96)
            (89 90 98 97)
            (90 91 99 98)
            (91 84 92 99)
            (92 93 102 100)
            (93 94 103 101)
            (94 95 105 103)
            (95 96 106 104)
            (96 97 108 106)
            (97 98 109 107)
            (98 99 111 109)
            (99 92 100 110)
        (100 102 129 128)
        (101 131 130 129)
        (101 103 132 131)
        (103 105 133 132)
        (104 135 134 133)
        (104 106 136 135)
        (106 108 137 136)
        (107 139 138 137)
        (107 109 140 139)
        (109 111 141 140)
        (110 143 142 141)
        (100 110 143 128)
        );
    }

    back
    {
        type            empty;
        faces
        (
            (0 12 13 2)
            (2 13 14 4)
            (3 14 15 5)
            (5 15 16 7)
            (6 16 17 8)
            (8 17 18 10)
            (9 18 19 11)
            (11 19 12 1)
            (12 20 21 13)
            (13 21 22 14)
            (14 22 23 15)
            (15 23 24 16)
            (16 24 25 17)
            (17 25 26 18)
            (18 26 27 19)
            (19 27 20 12)
            (28 36 37 29)
            (29 37 38 30)
            (30 38 39 31)
            (31 39 40 32)
            (32 40 41 33)
            (33 41 42 34)
            (34 42 43 35)
            (35 43 36 28)
            (36 44 46 37)
            (37 45 47 38)
            (38 47 49 39)
            (39 48 50 40)
            (40 50 52 41)
            (41 51 53 42)
            (42 53 55 43)
            (43 54 44 36)
        (44 112 113 46)
        (45 113 114 115)
        (45 115 116 47)
        (47 116 117 49)
        (48 117 118 119)
        (48 119 120 50)
        (50 120 121 52)
        (51 121 122 123)
        (51 123 124 53)
        (53 124 125 55)
        (54 125 126 127)
        (44 112 127 54)
        );
    }

    inlet 
    {
        type patch;
    faces
    (
            (119 118 134 135)
            (120 119 135 136)
            (121 120 136 137)
            (122 121 137 138)
    );
    }

    outlet
    {
        type patch;
        faces
        (
            (127 126 142 143)
            (112 127 143 128)
            (113 112 128 129)
            (114 113 129 130)
        );
    }

    fixedWalls
    {
        type wall;
        faces
        (
            (115 114 130 131)
            (116 115 131 132)
            (117 116 132 133)
        (118 117 133 134)
            (123 122 138 139)
            (124 123 139 140)
            (125 124 140 141)
            (126 125 141 142)
        );
    }
);

mergePatchPairs
(
);
I really hope some of you have some insight into this, because I am at a lost right now and this is for my master thesis.

Kind regards,
Maria
Attached Images
File Type: jpg Untitled document.jpg (25.4 KB, 6 views)
Attached Files
File Type: txt blockMeshDict.txt (22.8 KB, 0 views)
hoemmaria is offline   Reply With Quote

Old   October 6, 2017, 07:43
Default Solution to anyone having the same problem in the future.
  #3
New Member
 
Maria
Join Date: Feb 2017
Posts: 17
Rep Power: 2
hoemmaria is on a distinguished road
Here is my blockMesh.m4 file:

Code:
changecom(//)changequote([,])
define(calc, [esyscmd(perl -e 'print ($1)')])
define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])
define(pi, 3.14159265)

define(hex2D, hex ($1b $2b $3b $4b $1t $2t $3t $4t))
define(quad2D, ($1b $2b $2t $1t))
define(frontQuad, ($1t $2t $3t $4t))
define(backQuad, ($1b $4b $3b $2b))

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.1;

// Hub radius
define(r, 0.2)

// Impeller-tip radius
define(rb, 0.5)

// Baffle-tip radius
define(Rb, 0.7)

// Tank radius
define(R, 1)

// MRF region radius
define(ri, calc(0.5*(rb + Rb)))

// Thickness of 2D slab
define(z, 0.1)

// Base z
define(Zb, 0)

// Top z
define(Zt, calc(Zb + z))

// Number of cells radially between hub and impeller tip
define(Nr, 6)

// Number of cells radially in each of the two regions between
// impeller and baffle tips
define(Ni, 2)

// Number of cells radially between baffle tip and tank
define(NR, 6)

// Number of cells azimuthally in each of the 8 blocks
define(Na, 6)

// Number of cells in the thickness of the slab
define(Nz, 1)

// Number of cells in the channel 
define(Nc, 30)

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

define(vert, (x$1$2 y$1$2 $3))
define(evert, (ex$1$2 ey$1$2 $3))

define(a0, 0)
define(a1, -45)
define(a2, -90)
define(a3, -135)
define(a4, 180)
define(a5, 135)
define(a6, 90)
define(a7, 45)

define(ea0, -22.5)
define(ea1, -67.5)
define(ea2, -112.5)
define(ea3, -157.5)
define(ea4, 157.5)
define(ea5, 112.5)
define(ea6, 67.5)
define(ea7, 22.5)

define(ca0, calc(cos((pi/180)*a0)))
define(ca1, calc(cos((pi/180)*a1)))
define(ca2, calc(cos((pi/180)*a2)))
define(ca3, calc(cos((pi/180)*a3)))
define(ca4, calc(cos((pi/180)*a4)))
define(ca5, calc(cos((pi/180)*a5)))
define(ca6, calc(cos((pi/180)*a6)))
define(ca7, calc(cos((pi/180)*a7)))

define(sa0, calc(sin((pi/180)*a0)))
define(sa1, calc(sin((pi/180)*a1)))
define(sa2, calc(sin((pi/180)*a2)))
define(sa3, calc(sin((pi/180)*a3)))
define(sa4, calc(sin((pi/180)*a4)))
define(sa5, calc(sin((pi/180)*a5)))
define(sa6, calc(sin((pi/180)*a6)))
define(sa7, calc(sin((pi/180)*a7)))

define(cea0, calc(cos((pi/180)*ea0)))
define(cea1, calc(cos((pi/180)*ea1)))
define(cea2, calc(cos((pi/180)*ea2)))
define(cea3, calc(cos((pi/180)*ea3)))
define(cea4, calc(cos((pi/180)*ea4)))
define(cea5, calc(cos((pi/180)*ea5)))
define(cea6, calc(cos((pi/180)*ea6)))
define(cea7, calc(cos((pi/180)*ea7)))

define(sea0, calc(sin((pi/180)*ea0)))
define(sea1, calc(sin((pi/180)*ea1)))
define(sea2, calc(sin((pi/180)*ea2)))
define(sea3, calc(sin((pi/180)*ea3)))
define(sea4, calc(sin((pi/180)*ea4)))
define(sea5, calc(sin((pi/180)*ea5)))
define(sea6, calc(sin((pi/180)*ea6)))
define(sea7, calc(sin((pi/180)*ea7)))

define(x00, calc(r*ca0))
define(x01, calc(r*ca1))
define(x02, calc(r*ca2))
define(x03, calc(r*ca3))
define(x04, calc(r*ca4))
define(x05, calc(r*ca5))
define(x06, calc(r*ca6))
define(x07, calc(r*ca7))

define(x10, calc(rb*ca0))
define(x11, calc(rb*ca1))
define(x12, calc(rb*ca2))
define(x13, calc(rb*ca3))
define(x14, calc(rb*ca4))
define(x15, calc(rb*ca5))
define(x16, calc(rb*ca6))
define(x17, calc(rb*ca7))

define(x20, calc(ri*ca0))
define(x21, calc(ri*ca1))
define(x22, calc(ri*ca2))
define(x23, calc(ri*ca3))
define(x24, calc(ri*ca4))
define(x25, calc(ri*ca5))
define(x26, calc(ri*ca6))
define(x27, calc(ri*ca7))

define(x30, calc(Rb*ca0))
define(x31, calc(Rb*ca1))
define(x32, calc(Rb*ca2))
define(x33, calc(Rb*ca3))
define(x34, calc(Rb*ca4))
define(x35, calc(Rb*ca5))
define(x36, calc(Rb*ca6))
define(x37, calc(Rb*ca7))

define(x40, calc(R*ca0))
define(x41, calc(R*ca1))
define(x42, calc(R*ca2))
define(x43, calc(R*ca3))
define(x44, calc(R*ca4))
define(x45, calc(R*ca5))
define(x46, calc(R*ca6))
define(x47, calc(R*ca7))

define(y00, calc(r*sa0))
define(y01, calc(r*sa1))
define(y02, calc(r*sa2))
define(y03, calc(r*sa3))
define(y04, calc(r*sa4))
define(y05, calc(r*sa5))
define(y06, calc(r*sa6))
define(y07, calc(r*sa7))

define(y10, calc(rb*sa0))
define(y11, calc(rb*sa1))
define(y12, calc(rb*sa2))
define(y13, calc(rb*sa3))
define(y14, calc(rb*sa4))
define(y15, calc(rb*sa5))
define(y16, calc(rb*sa6))
define(y17, calc(rb*sa7))

define(y20, calc(ri*sa0))
define(y21, calc(ri*sa1))
define(y22, calc(ri*sa2))
define(y23, calc(ri*sa3))
define(y24, calc(ri*sa4))
define(y25, calc(ri*sa5))
define(y26, calc(ri*sa6))
define(y27, calc(ri*sa7))

define(y30, calc(Rb*sa0))
define(y31, calc(Rb*sa1))
define(y32, calc(Rb*sa2))
define(y33, calc(Rb*sa3))
define(y34, calc(Rb*sa4))
define(y35, calc(Rb*sa5))
define(y36, calc(Rb*sa6))
define(y37, calc(Rb*sa7))

define(y40, calc(R*sa0))
define(y41, calc(R*sa1))
define(y42, calc(R*sa2))
define(y43, calc(R*sa3))
define(y44, calc(R*sa4))
define(y45, calc(R*sa5))
define(y46, calc(R*sa6))
define(y47, calc(R*sa7))

define(ex00, calc(r*cea0))
define(ex01, calc(r*cea1))
define(ex02, calc(r*cea2))
define(ex03, calc(r*cea3))
define(ex04, calc(r*cea4))
define(ex05, calc(r*cea5))
define(ex06, calc(r*cea6))
define(ex07, calc(r*cea7))

define(ex10, calc(rb*cea0))
define(ex11, calc(rb*cea1))
define(ex12, calc(rb*cea2))
define(ex13, calc(rb*cea3))
define(ex14, calc(rb*cea4))
define(ex15, calc(rb*cea5))
define(ex16, calc(rb*cea6))
define(ex17, calc(rb*cea7))

define(ex20, calc(ri*cea0))
define(ex21, calc(ri*cea1))
define(ex22, calc(ri*cea2))
define(ex23, calc(ri*cea3))
define(ex24, calc(ri*cea4))
define(ex25, calc(ri*cea5))
define(ex26, calc(ri*cea6))
define(ex27, calc(ri*cea7))

define(ex30, calc(Rb*cea0))
define(ex31, calc(Rb*cea1))
define(ex32, calc(Rb*cea2))
define(ex33, calc(Rb*cea3))
define(ex34, calc(Rb*cea4))
define(ex35, calc(Rb*cea5))
define(ex36, calc(Rb*cea6))
define(ex37, calc(Rb*cea7))

define(ex40, calc(R*cea0))
define(ex41, calc(R*cea1))
define(ex42, calc(R*cea2))
define(ex43, calc(R*cea3))
define(ex44, calc(R*cea4))
define(ex45, calc(R*cea5))
define(ex46, calc(R*cea6))
define(ex47, calc(R*cea7))

define(ey00, calc(r*sea0))
define(ey01, calc(r*sea1))
define(ey02, calc(r*sea2))
define(ey03, calc(r*sea3))
define(ey04, calc(r*sea4))
define(ey05, calc(r*sea5))
define(ey06, calc(r*sea6))
define(ey07, calc(r*sea7))

define(ey10, calc(rb*sea0))
define(ey11, calc(rb*sea1))
define(ey12, calc(rb*sea2))
define(ey13, calc(rb*sea3))
define(ey14, calc(rb*sea4))
define(ey15, calc(rb*sea5))
define(ey16, calc(rb*sea6))
define(ey17, calc(rb*sea7))

define(ey20, calc(ri*sea0))
define(ey21, calc(ri*sea1))
define(ey22, calc(ri*sea2))
define(ey23, calc(ri*sea3))
define(ey24, calc(ri*sea4))
define(ey25, calc(ri*sea5))
define(ey26, calc(ri*sea6))
define(ey27, calc(ri*sea7))

define(ey30, calc(Rb*sea0))
define(ey31, calc(Rb*sea1))
define(ey32, calc(Rb*sea2))
define(ey33, calc(Rb*sea3))
define(ey34, calc(Rb*sea4))
define(ey35, calc(Rb*sea5))
define(ey36, calc(Rb*sea6))
define(ey37, calc(Rb*sea7))

define(ey40, calc(R*sea0))
define(ey41, calc(R*sea1))
define(ey42, calc(R*sea2))
define(ey43, calc(R*sea3))
define(ey44, calc(R*sea4))
define(ey45, calc(R*sea5))
define(ey46, calc(R*sea6))
define(ey47, calc(R*sea7))

define(x50, 3)
define(y50, 0)
define(x51, 3)
define(y51, -0.494975)
define(x52, 3)
define(y52, -3)
define(x53, 0.494975)
define(y53, -3)
define(x54, 0)
define(y54, -3)
define(x55, -0.494975)
define(y55, -3)
define(x56, -3)
define(y56, -3)
define(x57, -3)
define(y57, -0.494975)
define(x58, -3)
define(y58, 0)
define(x59, -3)
define(y59, 0.494975)
define(x60, -3)
define(y60, 3)
define(x61, -0.494975)
define(y61, 3)
define(x62, 0)
define(y62, 3)
define(x63, 0.494975)
define(y63, 3)
define(x64, 3)
define(y64, 3)
define(x65, 3)
define(y65, 0.494975)

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

vertices
(
    (0 0 Zb) vlabel(origob)
    (0 0 Zt) vlabel(origot)

    (0.35355 0 Zb) vlabel(cube1b)
    (0.35355 -0.35355 Zb) vlabel(cube2b)
    (0 -0.35355 Zb) vlabel(cube3b)
    (-0.35355 -0.35355 Zb) vlabel(cube4b)
    (-0.35355 0 Zb) vlabel(cube5b)
    (-0.35355 0.35355 Zb) vlabel(cube6b)
    (0 0.35355 Zb) vlabel(cube7b)
    (0.35355 0.35355 Zb) vlabel(cube8b)

    (0.35355 0 Zt) vlabel(cube1t)
    (0.35355 -0.35355 Zt) vlabel(cube2t)
    (0 -0.35355 Zt) vlabel(cube3t)
    (-0.35355 -0.35355 Zt) vlabel(cube4t)
    (-0.35355 0 Zt) vlabel(cube5t)
    (-0.35355 0.35355 Zt) vlabel(cube6t)
    (0 0.35355 Zt) vlabel(cube7t)
    (0.35355 0.35355 Zt) vlabel(cube8t)

    vert(1, 1, Zb) vlabel(rb1b)
    vert(1, 3, Zb) vlabel(rb3b)
    vert(1, 5, Zb) vlabel(rb5b)
    vert(1, 7, Zb) vlabel(rb7b)

    vert(2, 0, Zb) vlabel(ri0b)
    vert(2, 1, Zb) vlabel(ri1b)
    vert(2, 2, Zb) vlabel(ri2b)
    vert(2, 3, Zb) vlabel(ri3b)
    vert(2, 4, Zb) vlabel(ri4b)
    vert(2, 5, Zb) vlabel(ri5b)
    vert(2, 6, Zb) vlabel(ri6b)
    vert(2, 7, Zb) vlabel(ri7b)

    vert(2, 0, Zb) vlabel(ris0b)
    vert(2, 1, Zb) vlabel(ris1b)
    vert(2, 2, Zb) vlabel(ris2b)
    vert(2, 3, Zb) vlabel(ris3b)
    vert(2, 4, Zb) vlabel(ris4b)
    vert(2, 5, Zb) vlabel(ris5b)
    vert(2, 6, Zb) vlabel(ris6b)
    vert(2, 7, Zb) vlabel(ris7b)

    vert(3, 0, Zb) vlabel(Rb0b)
    vert(3, 1, Zb) vlabel(Rb1b)
    vert(3, 2, Zb) vlabel(Rb2b)
    vert(3, 3, Zb) vlabel(Rb3b)
    vert(3, 4, Zb) vlabel(Rb4b)
    vert(3, 5, Zb) vlabel(Rb5b)
    vert(3, 6, Zb) vlabel(Rb6b)
    vert(3, 7, Zb) vlabel(Rb7b)

    vert(1, 1, Zt) vlabel(rb1t)
    vert(1, 3, Zt) vlabel(rb3t)
    vert(1, 5, Zt) vlabel(rb5t)
    vert(1, 7, Zt) vlabel(rb7t)

    vert(2, 0, Zt) vlabel(ri0t)
    vert(2, 1, Zt) vlabel(ri1t)
    vert(2, 2, Zt) vlabel(ri2t)
    vert(2, 3, Zt) vlabel(ri3t)
    vert(2, 4, Zt) vlabel(ri4t)
    vert(2, 5, Zt) vlabel(ri5t)
    vert(2, 6, Zt) vlabel(ri6t)
    vert(2, 7, Zt) vlabel(ri7t)

    vert(2, 0, Zt) vlabel(ris0t)
    vert(2, 1, Zt) vlabel(ris1t)
    vert(2, 2, Zt) vlabel(ris2t)
    vert(2, 3, Zt) vlabel(ris3t)
    vert(2, 4, Zt) vlabel(ris4t)
    vert(2, 5, Zt) vlabel(ris5t)
    vert(2, 6, Zt) vlabel(ris6t)
    vert(2, 7, Zt) vlabel(ris7t)

    vert(3, 0, Zt) vlabel(Rb0t)
    vert(3, 1, Zt) vlabel(Rb1t)
    vert(3, 2, Zt) vlabel(Rb2t)
    vert(3, 3, Zt) vlabel(Rb3t)
    vert(3, 4, Zt) vlabel(Rb4t)
    vert(3, 5, Zt) vlabel(Rb5t)
    vert(3, 6, Zt) vlabel(Rb6t)
    vert(3, 7, Zt) vlabel(Rb7t)

    vert(5, 0, Zb) vlabel(c0b)
    vert(5, 1, Zb) vlabel(c1b)
    vert(5, 2, Zb) vlabel(c2b)
    vert(5, 3, Zb) vlabel(c3b)
    vert(5, 4, Zb) vlabel(c4b)
    vert(5, 5, Zb) vlabel(c5b)
    vert(5, 6, Zb) vlabel(c6b)
    vert(5, 7, Zb) vlabel(c7b)
    vert(5, 8, Zb) vlabel(c8b)
    vert(5, 9, Zb) vlabel(c9b)
    vert(6, 0, Zb) vlabel(c10b)
    vert(6, 1, Zb) vlabel(c11b)
    vert(6, 2, Zb) vlabel(c12b)
    vert(6, 3, Zb) vlabel(c13b)
    vert(6, 4, Zb) vlabel(c14b)
    vert(6, 5, Zb) vlabel(c15b)

    vert(5, 0, Zt) vlabel(c0t)
    vert(5, 1, Zt) vlabel(c1t)
    vert(5, 2, Zt) vlabel(c2t)
    vert(5, 3, Zt) vlabel(c3t)
    vert(5, 4, Zt) vlabel(c4t)
    vert(5, 5, Zt) vlabel(c5t)
    vert(5, 6, Zt) vlabel(c6t)
    vert(5, 7, Zt) vlabel(c7t)
    vert(5, 8, Zt) vlabel(c8t)
    vert(5, 9, Zt) vlabel(c9t)
    vert(6, 0, Zt) vlabel(c10t)
    vert(6, 1, Zt) vlabel(c11t)
    vert(6, 2, Zt) vlabel(c12t)
    vert(6, 3, Zt) vlabel(c13t)
    vert(6, 4, Zt) vlabel(c14t)
    vert(6, 5, Zt) vlabel(c15t)

);

blocks
(
    // cube1
    hex2D(cube3, cube2, cube1, origo)
    (Na Na 1)
    simpleGrading (1 1 1)

    // cube2
    hex2D(cube4, cube3, origo, cube5)
    (Na Na 1)
    simpleGrading (1 1 1)

    // cube3
    hex2D(cube5, origo, cube7, cube6)
    (Na Na 1)
    simpleGrading (1 1 1)

    // cube4
    hex2D(origo, cube1, cube8, cube7)
    (Na Na 1)
    simpleGrading (1 1 1)

// mixer vessel:

    // block0
    hex2D(cube1, cube2, ri1, ri0)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block1
    hex2D(cube2, cube3, ri2, ri1)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block2
    hex2D(cube3, cube4, ri3, ri2)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block3
    hex2D(cube4, cube5, ri4, ri3)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block4
    hex2D(cube5, cube6, ri5, ri4)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block5
    hex2D(cube6, cube7, ri6, ri5)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block6
    hex2D(cube7, cube8, ri7, ri6)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block7
    hex2D(cube8, cube1, ri0, ri7)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block0
    hex2D(ris0, ris1, Rb1, Rb0)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block1
    hex2D(ris1, ris2, Rb2, Rb1)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block2
    hex2D(ris2, ris3, Rb3, Rb2)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block3
    hex2D(ris3, ris4, Rb4, Rb3)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block4
    hex2D(ris4, ris5, Rb5, Rb4)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block5
    hex2D(ris5, ris6, Rb6, Rb5)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block6
    hex2D(ris6, ris7, Rb7, Rb6)
    (Na Ni Nz)
    simpleGrading (1 1 1)

    // block7
    hex2D(ris7, ris0, Rb0, Rb7)
    (Na Ni Nz)
    simpleGrading (1 1 1)

//channel:

    // block8
    hex2D(Rb1, c1, c0, Rb0)
    (Nc Na Nz)
    simpleGrading (1 1 1)

    // block9
    hex2D(c3, c2, c1, Rb1)
    (Nc Nc Nz)
    simpleGrading (1 1 1)

    // block10
    hex2D(c4, c3, Rb1, Rb2)
    (Na Nc Nz)
    simpleGrading (1 1 1)

    // block11
    hex2D(c5, c4, Rb2, Rb3)
    (Na Nc Nz)
    simpleGrading (1 1 1)

    // block12
    hex2D(c6, c5, Rb3, c7)
    (Nc Nc Nz)
    simpleGrading (1 1 1)

    // block13
    hex2D(c7, Rb3, Rb4, c8)
    (Nc Na Nz)
    simpleGrading (1 1 1)

    // block14
    hex2D(c8, Rb4, Rb5, c9)
    (Nc Na Nz)
    simpleGrading (1 1 1)

    // block15
    hex2D(c9, Rb5, c11, c10)
    (Nc Nc Nz)
    simpleGrading (1 1 1)

    // block16
    hex2D(Rb5, Rb6, c12, c11)
    (Na Nc Nz)
    simpleGrading (1 1 1)

    // block17
    hex2D(Rb6, Rb7, c13, c12)
    (Na Nc Nz)
    simpleGrading (1 1 1)

    // block18
    hex2D(Rb7, c15, c14, c13)
    (Nc Nc Nz)
    simpleGrading (1 1 1)

    // block19
    hex2D(Rb0, c0, c15, Rb7)
    (Nc Na Nz)
    simpleGrading (1 1 1)
);

edges
(
    arc ri0b ri1b evert(2, 0, Zb)
    arc ri1b ri2b evert(2, 1, Zb)
    arc ri2b ri3b evert(2, 2, Zb)
    arc ri3b ri4b evert(2, 3, Zb)
    arc ri4b ri5b evert(2, 4, Zb)
    arc ri5b ri6b evert(2, 5, Zb)
    arc ri6b ri7b evert(2, 6, Zb)
    arc ri7b ri0b evert(2, 7, Zb)

    arc ris0b ris1b evert(2, 0, Zb)
    arc ris1b ris2b evert(2, 1, Zb)
    arc ris2b ris3b evert(2, 2, Zb)
    arc ris3b ris4b evert(2, 3, Zb)
    arc ris4b ris5b evert(2, 4, Zb)
    arc ris5b ris6b evert(2, 5, Zb)
    arc ris6b ris7b evert(2, 6, Zb)
    arc ris7b ris0b evert(2, 7, Zb)

    arc Rb0b Rb1b evert(3, 0, Zb)
    arc Rb1b Rb2b evert(3, 1, Zb)
    arc Rb2b Rb3b evert(3, 2, Zb)
    arc Rb3b Rb4b evert(3, 3, Zb)
    arc Rb4b Rb5b evert(3, 4, Zb)
    arc Rb5b Rb6b evert(3, 5, Zb)
    arc Rb6b Rb7b evert(3, 6, Zb)
    arc Rb7b Rb0b evert(3, 7, Zb)

    arc ri0t ri1t evert(2, 0, Zt)
    arc ri1t ri2t evert(2, 1, Zt)
    arc ri2t ri3t evert(2, 2, Zt)
    arc ri3t ri4t evert(2, 3, Zt)
    arc ri4t ri5t evert(2, 4, Zt)
    arc ri5t ri6t evert(2, 5, Zt)
    arc ri6t ri7t evert(2, 6, Zt)
    arc ri7t ri0t evert(2, 7, Zt)

    arc ris0t ris1t evert(2, 0, Zt)
    arc ris1t ris2t evert(2, 1, Zt)
    arc ris2t ris3t evert(2, 2, Zt)
    arc ris3t ris4t evert(2, 3, Zt)
    arc ris4t ris5t evert(2, 4, Zt)
    arc ris5t ris6t evert(2, 5, Zt)
    arc ris6t ris7t evert(2, 6, Zt)
    arc ris7t ris0t evert(2, 7, Zt)

    arc Rb0t Rb1t evert(3, 0, Zt)
    arc Rb1t Rb2t evert(3, 1, Zt)
    arc Rb2t Rb3t evert(3, 2, Zt)
    arc Rb3t Rb4t evert(3, 3, Zt)
    arc Rb4t Rb5t evert(3, 4, Zt)
    arc Rb5t Rb6t evert(3, 5, Zt)
    arc Rb6t Rb7t evert(3, 6, Zt)
    arc Rb7t Rb0t evert(3, 7, Zt)
);

boundary
(
    AMI1
    {
        type            cyclicAMI;
        neighbourPatch  AMI2;
        transform       noOrdering;

        faces
        (
            quad2D(ri1, ri0)
            quad2D(ri2, ri1)
            quad2D(ri3, ri2)
            quad2D(ri4, ri3)
            quad2D(ri5, ri4)
            quad2D(ri6, ri5)
            quad2D(ri7, ri6)
            quad2D(ri0, ri7)
        );
    }

    AMI2
    {
        type            cyclicAMI;
        neighbourPatch  AMI1;
        transform       noOrdering;

        faces
        (
            quad2D(ris1, ris0)
            quad2D(ris2, ris1)
            quad2D(ris3, ris2)
            quad2D(ris4, ris3)
            quad2D(ris5, ris4)
            quad2D(ris6, ris5)
            quad2D(ris7, ris6)
            quad2D(ris0, ris7)
        );
    }

    front
    {
        type            empty;
        faces
        (
            frontQuad(cube1, cube2, ri1, ri0)
            frontQuad(cube2, cube3, ri2, ri1)
            frontQuad(cube3, cube4, ri3, ri2)
            frontQuad(cube4, cube5, ri4, ri3)
            frontQuad(cube5, cube6, ri5, ri4)
            frontQuad(cube6, cube7, ri6, ri5)
            frontQuad(cube7, cube8, ri7, ri6)
            frontQuad(cube8, cube1, ri0, ri7)
            frontQuad(ris0, ris1, Rb1, Rb0)
            frontQuad(ris1, ris2, Rb2, Rb1)
            frontQuad(ris2, ris3, Rb3, Rb2)
            frontQuad(ris3, ris4, Rb4, Rb3)
            frontQuad(ris4, ris5, Rb5, Rb4)
            frontQuad(ris5, ris6, Rb6, Rb5)
            frontQuad(ris6, ris7, Rb7, Rb6)
            frontQuad(ris7, ris0, Rb0, Rb7)
        frontQuad(Rb0, Rb1, c1, c0)
        frontQuad(Rb1, c3, c2, c1)
        frontQuad(Rb1, Rb2, c4, c3)
        frontQuad(Rb2, Rb3, c5, c4)
        frontQuad(Rb3, c7, c6, c5)
        frontQuad(Rb3, Rb4, c8, c7)
        frontQuad(Rb4, Rb5, c9, c8)
        frontQuad(Rb5, c11, c10, c9)
        frontQuad(Rb5, Rb6, c12, c11)
        frontQuad(Rb6, Rb7, c13, c12)
        frontQuad(Rb7, c15, c14, c13)
        frontQuad(Rb0, Rb7, c15, c0)
        frontQuad(origo, cube3, cube2, cube1)
        frontQuad(origo, cube1, cube8, cube7)
        frontQuad(cube5, origo, cube7, cube6)
        frontQuad(cube4, cube3, origo, cube5)
        );
    }

    back
    {
        type            empty;
        faces
        (
            backQuad(cube1, cube2, ri1, ri0)
            backQuad(cube2, cube3, ri2, ri1)
            backQuad(cube3, cube4, ri3, ri2)
            backQuad(cube4, cube5, ri4, ri3)
            backQuad(cube5, cube6, ri5, ri4)
            backQuad(cube6, cube7, ri6, ri5)
            backQuad(cube7, cube8, ri7, ri6)
            backQuad(cube8, cube1, ri0, ri7)
            backQuad(ris0, ris1, Rb1, Rb0)
            backQuad(ris1, ris2, Rb2, Rb1)
            backQuad(ris2, ris3, Rb3, Rb2)
            backQuad(ris3, ris4, Rb4, Rb3)
            backQuad(ris4, ris5, Rb5, Rb4)
            backQuad(ris5, ris6, Rb6, Rb5)
            backQuad(ris6, ris7, Rb7, Rb6)
            backQuad(ris7, ris0, Rb0, Rb7)
        backQuad(Rb0, Rb1, c1, c0)
        backQuad(Rb1, c3, c2, c1)
        backQuad(Rb1, Rb2, c4, c3)
        backQuad(Rb2, Rb3, c5, c4)
        backQuad(Rb3, c7, c6, c5)
        backQuad(Rb3, Rb4, c8, c7)
        backQuad(Rb4, Rb5, c9, c8)
        backQuad(Rb5, c11, c10, c9)
        backQuad(Rb5, Rb6, c12, c11)
        backQuad(Rb6, Rb7, c13, c12)
        backQuad(Rb7, c15, c14, c13)
        backQuad(Rb0, Rb7, c15, c0)
        backQuad(origo, cube3, cube2, cube1)
        backQuad(origo, cube1, cube8, cube7)
        backQuad(cube5, origo, cube7, cube6)
        backQuad(cube4, cube3, origo, cube5)
        );
    }

);

mergePatchPairs
(
);


// ************************************************************************* //
I also have an inlet, outlet, fixedWall and movingWall boundary definition, but it could not fit in the code here in the forum.
Attached Images
File Type: png blockMesh_couettecube.png (11.2 KB, 6 views)
hoemmaria is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 30 August 23, 2017 13:25
Multi Region Mesh of a car filter Zephiro88 OpenFOAM Native Meshers: snappyHexMesh and Others 2 September 8, 2016 08:54
Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10


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