|
[Sponsors] |
[blockMesh] Street canyon - "does not have neighbour cell face" ERROR |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 31, 2023, 17:37 |
Street canyon - "does not have neighbour cell face" ERROR
|
#1 |
New Member
Join Date: May 2023
Posts: 1
Rep Power: 0 |
Hi!
I'm new to CFD and I'm really struggling to make a mesh for a Street Canyon simulation. I hope any of you can at least point me in the right direction. In the next picture you can see my (poorly made) sketch of the geometry I'm trying to mesh, where the vertices are notated as z0 (-width) / z1 (+width): https://imgur.com/a/sIhqdJc (can't paste it as an image...¿?) Actually this is my 2nd mesh, initially I didn't include the horizontal y=1 face across the domain, and adding this was my attempt to solve the issue. Without this face, even commenting out all the boundaries, I would get the message "the mesh has multiple regions which are not connected by any face". After adding this face that message was gone, but I still get the same errors. I'm using a .m4 script to create my blockMeshDict file. If I comment out the top and frontAndBack boundaries, I can run blockMesh and checkMesh shows no errors. If I don't comment those out, I get the "face 0 in patch 4 vertices 4((0 0 -1) (5 0 -1) (5 4 -1) (0 4 -1)) does not have neighbor cell face: 4(0 1 40 19)" error. This is the .m4 script: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.01; dnl changecom(//) changequote([,]) define(LPAREN,[(])dnl define(RPAREN,[)])dnl dnl define(calc, [esyscmd(perl -e 'printf ($1)')])dnl dnl define(heightBuilding, 1) define(widthBuilding, 1) define(width, heightBuilding) define(lengthUpst, calc(5*widthBuilding)) define(lengthDownst, calc(15*widthBuilding)) define(heightUp, calc(4*heightBuilding)) dnl dnl === POINTS === //Building width = space between buildings define(x0, 0)dnl define(x1, lengthUpst)dnl define(x2, calc(lengthUpst+widthBuilding))dnl define(x3, calc(x2+widthBuilding))dnl define(x4, calc(x3+widthBuilding))dnl define(x5, calc(x4+widthBuilding))dnl define(x6, calc(x5+widthBuilding))dnl define(x7, calc(x6+widthBuilding))dnl define(x8, calc(x7+widthBuilding))dnl define(x9, calc(x8+lengthDownst))dnl define(y0, 0)dnl define(z0, -width)dnl define(z1, width)dnl define(xCount, 20)dnl define(xCount2, 100)dnl define(xCount3, 300)dnl define(yCount, 20)dnl define(yCount2, 60)dnl define(zCount, 1)dnl dnl dnl vertices ( (x0 y0 z0) //0 (x1 y0 z0) //1 (x1 heightBuilding z0) //2 (x2 heightBuilding z0) //3 (x2 y0 z0) //4 (x3 y0 z0) //5 (x3 heightBuilding z0) //6 (x4 heightBuilding z0) //7 (x4 y0 z0) //8 (x5 y0 z0) //9 (x5 heightBuilding z0) //10 (x6 heightBuilding z0) //11 (x6 y0 z0) //12 (x7 y0 z0) //13 (x7 heightBuilding z0) //14 (x8 heightBuilding z0) //15 (x8 y0 z0) //16 (x9 y0 z0) //17 (x9 heightUp z0) //18 (x0 heightUp z0) //19 (x0 y0 z1) //20 (x1 y0 z1) //21 (x1 heightBuilding z1) //22 (x2 heightBuilding z1) //23 (x2 y0 z1) //24 (x3 y0 z1) //25 (x3 heightBuilding z1) //26 (x4 heightBuilding z1) //27 (x4 y0 z1) //28 (x5 y0 z1) //29 (x5 heightBuilding z1) //30 (x6 heightBuilding z1) //31 (x6 y0 z1) //32 (x7 y0 z1) //33 (x7 heightBuilding z1) //34 (x8 heightBuilding z1) //35 (x8 y0 z1) //36 (x9 y0 z1) //37 (x9 heightUp z1) //38 (x0 heightUp z1) //39 (x1 heightUp z0) //40 (x2 heightUp z0) //41 (x3 heightUp z0) //42 (x4 heightUp z0) //43 (x5 heightUp z0) //44 (x6 heightUp z0) //45 (x7 heightUp z0) //46 (x8 heightUp z0) //47 (x1 heightUp z1) //48 (x2 heightUp z1) //49 (x3 heightUp z1) //50 (x4 heightUp z1) //51 (x5 heightUp z1) //52 (x6 heightUp z1) //53 (x7 heightUp z1) //54 (x8 heightUp z1) //55 (x0 heightBuilding z0) //56 (x0 heightBuilding z1) //57 (x9 heightBuilding z0) //58 (x9 heightBuilding z1) //59 ); blocks ( hex (0 1 2 56 20 21 22 57) (xCount2 yCount zCount) simpleGrading (1 1 1) //0 hex (56 2 40 19 57 22 48 39) (xCount2 yCount2 zCount) simpleGrading (1 1 1) //1 hex (2 3 41 40 22 23 49 48) (xCount yCount2 zCount) simpleGrading (1 1 1) //2 hex (3 6 42 41 23 26 50 49) (xCount yCount2 zCount) simpleGrading (1 1 1) //3 hex (4 5 6 3 24 25 26 23) (xCount yCount zCount) simpleGrading (1 1 1) //4 hex (6 7 43 42 26 27 51 50) (xCount yCount2 zCount) simpleGrading (1 1 1) //5 hex (7 10 44 43 27 30 52 51) (xCount yCount2 zCount) simpleGrading (1 1 1) //6 hex (8 9 10 7 28 29 30 27) (xCount yCount zCount) simpleGrading (1 1 1) //7 hex (10 11 45 44 30 31 53 52) (xCount yCount2 zCount) simpleGrading (1 1 1) //8 hex (11 14 46 45 31 34 54 53) (xCount yCount2 zCount) simpleGrading (1 1 1) //9 hex (12 13 14 11 32 33 34 31) (xCount yCount zCount) simpleGrading (1 1 1) //10 hex (14 15 47 46 34 35 55 54) (xCount yCount2 zCount) simpleGrading (1 1 1) //11 hex (15 58 18 47 35 59 38 55) (xCount3 yCount2 zCount) simpleGrading (1 1 1) //12 hex (16 17 58 15 36 37 59 35) (xCount3 yCount zCount) simpleGrading (1 1 1) //13 ); //If edges are straight lines OpenFoam can infer the edges automatically from the vertices edges ( ); boundary ( inlet { type patch; faces ( (0 56 57 20) (56 19 39 57) ); } outlet { type patch; faces ( (17 37 59 58) (58 59 38 18) ); } ground { type wall; faces ( (0 20 21 1) (4 24 25 5) (8 28 29 9) (12 32 33 13) (16 36 37 17) ); } top { type symmetry; faces ( (18 38 39 19) ); } buildings { type wall; faces ( (1 21 22 2) (2 22 23 3) (4 3 23 24) (5 25 26 6) (6 26 27 7) (8 7 27 28) (9 29 30 10) (10 30 31 11) (12 11 31 32) (13 33 34 14) (14 34 35 15) (16 15 35 36) ); } frontAndBack { type empty; faces ( (0 1 40 19) (20 39 48 21) (2 3 41 40) (22 48 49 23) (4 5 42 41) (24 49 50 25) (6 7 43 42) (26 50 51 27) (8 9 44 43) (28 51 52 29) (10 11 45 44) (30 52 53 31) (12 13 46 45) (32 53 54 33) (14 15 47 46) (34 54 55 35) (16 17 18 47) (36 55 38 37) ); } ); mergePatchPairs ( ); // ************************************************************************* // Thanks in advance! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building OpenFOAM1.7.0 from source | ata | OpenFOAM Installation | 46 | March 6, 2022 14:21 |
[blockMesh] blockMesh with double grading. | spwater | OpenFOAM Meshing & Mesh Conversion | 92 | January 12, 2019 10:00 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |
How to get the max value of the whole field | waynezw0618 | OpenFOAM Running, Solving & CFD | 4 | June 17, 2008 06:07 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |