Can't find my mistake blockMeshDict
I'm trying to get started with OpenFOAM and using BlockMesh as a "first" mesher to get started.
My basic simulation would be 2 squares (cubicles) stacked on top of eachother, with the top face of the small cubicle being an air inlet and the bottom face of the big cubicle being an outlet. I've defined the 16 vertices and the 2 hex blocks. Furthermore, I've tried to define the patches necessary (including a "mergePatchPairs") but the generated OpenFOAM mesh-files do not contain boundary-zones for the inlet and outlet (the top and bottom faces). Ive copied/pasted my blockMeshDict to this post in the hopes someone can explain me what I'm doing wrong ... Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
-You can either have "patches" or "boundary", not both. "boundary" was ignored and therefore no inlet or outlet appeared.
-Be careful that the number of cells must be the same in neighbouring blocks. I corrected that for you. -There was also an extra ); at the end. Code:
convertToMeters 0.001; |
Thanks for the quick help. I was not aware you could not have both, so learned already something ;)
When I copied your code over my file (after making a backup) I get the following error when I run blockMesh in the case directory: Code:
--> FOAM FATAL IO ERROR: |
Sorry, I missed a } at the end of outlet during the copy-paste stage.
I wanted to attach the file itself but the forum rules did not allow that. It must be working like this, right? |
Thanks for the heads-up. In the meantime I took the effort to install OpenFOAM 2.1 to exclude this as a possible problem-point later on.
I've edited the file accordingly and this seems to indeed add the boundaries required, thanks! I'm pretty sure I run into a new problem later on, but thanks alot for now ! |
ill defined primitiveEntry starting at keyword 'blocks'
I was trying to define cylinder mesh,and When run the blockMesh I have get the error ,
--> FOAM FATAL IO ERROR: "ill defined primitiveEntry starting at keyword 'blocks' on line 53 and ending at line 149" file: /home/diana/OpenFOAM/diana-2.3.0/run/tutorials/heatTransfer/buoyantSimpleFoam/hotcylinder/constant/polyMesh/blockMeshDict at line 149. From function primitiveEntry::readEntry(const dictionary&, Istream&) in file lnInclude/IOerror.C at line 132. Here is my blockMesh file .Please kind to help me to find the error /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0)//0 (0.02 0 0)//1 (0 0.02 0)//2 (0 0 0.5)//3 (0.02 0 0.5)//4 (0 0.02 0.5)//5 (0 0 1)//6 (0.02 0 1)//7 (0 0.02 1)//8 (-0.02 0 0) (-0.02 0 0.5) (-0.02 0 1) (0 -0.02 0) (0 -0.02 0.5) (0 -0.02 1) (0.05 0 0) (0 0.05 0) (0.05 0 0.5) (0 0.05 0.5) (0.05 0 1) (0 0.05 1) (-0.05 0 0) (-0.05 0 0.5) (-0.05 0 1) (0 -0.05 0) (0 -0.05 0.5) (0 -0.05 1) ); blocks ( hex(0 0 1 2 3 3 4 5) (2 2 10) simpleGrading (1 1 1) hex(3 3 5 4 6 6 7 8) (2 2 10) simpleGrading (1 1 1) hex(0 0 2 9 3 3 5 10) (2 2 10) simpleGrading (1 1 1) hex(3 3 5 10 6 6 8 11) (2 2 10) simpleGrading (1 1 1) hex(0 0 9 12 3 3 10 13) (2 2 10) simpleGrading (1 1 1) hex(3 3 10 13 6 6 11 14) (2 2 10) simpleGrading (1 1 1) hex(0 0 12 1 3 3 13 4) (2 2 10) simpleGrading (1 1 1) hex(3 3 13 4 6 6 14 7) (2 2 10) simpleGrading (1 1 1) hex(1 15 16 2 4 17 18 5) (3 3 10) simpleGrading (1 1 1) hex(4 17 18 5 7 19 20 8) (3 3 10) simpleGrading (1 1 1) hex(2 16 21 9 5 18 22 10) (3 3 10) simpleGrading (1 1 1) hex(5 18 22 10 8 20 23 11) (3 3 10) simpleGrading (1 1 1) hex(9 21 24 12 10 22 25 13) (3 3 10) simpleGrading (1 1 1) hex(10 22 25 13 11 23 26 14) (3 3 10) simpleGrading (1 1 1) hex(12 24 15 1 13 25 17 4) (3 3 10) simpleGrading (1 1 1) hex(13 25 17 4 14 26 19 7) (3 3 10) simpleGrading (1 1 1) ); edges ( arc 1 2 (0.01 0.0173205080756888 0) arc 4 5 (0.01 0.0173205080756888 0.5) arc 7 8 (0.01 0.0173205080756888 1) arc 2 9 (-0.01 0.0173205080756888 0) arc 5 10 (-0.01 0.0173205080756888 0.5) arc 8 11 (-0.01 0.0173205080756888 1) arc 9 12 (-0.0173205080756888 -0.01 0) arc 10 13 (-0.0173205080756888 -0.01 0.5) arc 11 14 (-0.0173205080756888 -0.01 1) arc 10 1 (0.03 0.04 0) arc 13 4 (0.03 0.04 0.5) arc 14 7 (0.03 0.04 1) ); boundary ( uppipewall { type wall; faces ( (15 16 18 17) (17 18 20 19) (16 21 22 18) (18 22 23 20) ) } downpipewall { type wall; faces ( (24 15 25 17) (17 25 26 19) (24 21 22 25) (25 22 23 26) ) } inflow { type patch; faces ( (0 2 1 0) (1 2 16 15) (0 9 2 0) (9 21 16 2) (0 12 9 0) (12 24 21 9) (0 1 12 0) (1 15 24 12) ) } outflow { type patch; faces ( (6 8 7 6) (8 20 19 7) (6 11 8 6) (11 23 20 8) (6 14 11 6) (14 26 23 11) (6 7 14 6) (7 19 26 14) ) } ); mergePatchPairs ( ); // ************************************************** *********************** // |
Hi,
1. There should be space between hex and vertices vector 2. There should be semicolon in the end of faces vector of vector in patch definition Though after these two minor corrections you will encounter problems with hex vertices numbering: Code:
Creating block mesh topology Code:
--> FOAM FATAL ERROR: |
Just a short note: Try to put a space between the "hex" and the brackets... Should help for part of the problem already...
|
Thank you very much for your information. :)
I have got the mesh |
All times are GMT -4. The time now is 23:58. |