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

[blockMesh] New to Openfoam and troubles with blockMesh!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 22, 2018, 07:41
Exclamation New to Openfoam and troubles with blockMesh!
  #1
New Member
 
Timo
Join Date: May 2018
Location: Delft
Posts: 8
Rep Power: 8
aerospacious is on a distinguished road
Dear Foamers!


I am very new to openFoam and run in some troubles with blockMesh. I've already done the cavity and hole in plate tutorial and I'm currently trying to generate my own mesh using the blockMeshDict file.
Unfortunately when I run it it gives the following error:


--> FOAM FATAL IO ERROR:
"ill defined primitiveEntry starting at keyword 'blocks' on line 42 and ending at line 114"


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

convertToMeters 1;

vertices
(
    (-5, -5,  5) // 0
    ( 0, -5,  5) // 1
    ( 5, -5,  5) // 2
    ( 5,  0,  5) // 3
    ( 0,  0,  5) // 4
    (-5,  0,  5) // 5
    (-5, -5,  0) // 6
    ( 0, -5,  0) // 7
    ( 5, -5,  0) // 8
    ( 5,  0,  0) // 9
    ( 0,  0,  0) // 10
    (-5,  0,  0) // 11
    (-5, -5, -5) // 12
    ( 0, -5, -5) // 13
    ( 5, -5, -5) // 14
    ( 5,  0, -5) // 15
    ( 0,  0, -5) // 16
    (-5,  0, -5) // 17
);

blocks
(
    hex(0 1 4  5  6  7  10 11) (10 10 10) simpleGrading (1 1 1)
    hex(1 2 3  4  7  8  9  10) (10 10 10) simpleGrading (1 1 1)
    hex(6 7 10 11 12 13 16 17) (10 10 10) simpleGrading (1 1 1)
    hex(7 8 9  10 13 14 15 16) (10 10 10) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    inlet
    {
        type wall;
        faces
        (
            (0 6  11 5)
            (6 12 17 11)
        );
    }
    outlet
    {
        type wall;
        faces
        (
            (2 8  9  3)
            (8 14 15 9)
        );
    }
    top
    {
        type wall;
        faces
        (
            (5  4  10 11)
            (4  3  9  10)
            (11 10 16 17)
            (10 9  15 16)
        );
    }
    bottom
    {
        type wall;
        faces
        (
            (0 1 7  6)
            (1 2 8  7)
            (6 7 13 12)
            (7 8 14 13)
        );
    }
    frontAndBack
    {
        type empty;
        faces
        (
            (0  1  4  5)
            (1  2  3  4)
            (12 13 16 17)
            (13 14 15 16)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
The geometry I try to create is shown in the attached image.

Thanks in advance for everyone's help


Timo
Attached Images
File Type: jpg IMG_2338.jpg (61.9 KB, 11 views)
aerospacious is offline   Reply With Quote

Old   May 23, 2018, 04:56
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

My guess would be the comma's in the vertices section, try this instead:

Code:
vertices
(
    (-5 -5  5) // 0
    ( 0 -5  5) // 1
    ( 5 -5  5) // 2
    ( 5  0  5) // 3
    ( 0  0  5) // 4
    (-5  0  5) // 5
    (-5 -5  0) // 6
    ( 0 -5  0) // 7
    ( 5 -5  0) // 8
    ( 5  0  0) // 9
    ( 0  0  0) // 10
    (-5  0  0) // 11
    (-5 -5 -5) // 12
    ( 0 -5 -5) // 13
    ( 5 -5 -5) // 14
    ( 5  0 -5) // 15
    ( 0  0 -5) // 16
    (-5  0 -5) // 17
);
tomf is offline   Reply With Quote

Old   May 23, 2018, 05:21
Default
  #3
New Member
 
Timo
Join Date: May 2018
Location: Delft
Posts: 8
Rep Power: 8
aerospacious is on a distinguished road
Thanks for the reply Tom, but unfortunately that does not work.
It gives the error at 'blocks' so I would assume I did something wrong there, but just can't see what (probably overlooking some rule I should have applied).
aerospacious is offline   Reply With Quote

Old   May 23, 2018, 05:41
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Ok, I just ran a test.

You are right that my suggestion did not solve the original issue, but it is necessary. The actual thing that goes wrong is there is a space missing after hex. This works, but generates an inside-out error. I guess you should check your order for the blocks to correspond with the order OpenFOAM expects:

Code:
    hex (0 1 4  5  6  7  10 11) (10 10 10) simpleGrading (1 1 1)
    hex (1 2 3  4  7  8  9  10) (10 10 10) simpleGrading (1 1 1)
    hex (6 7 10 11 12 13 16 17) (10 10 10) simpleGrading (1 1 1)
    hex (7 8 9  10 13 14 15 16) (10 10 10) simpleGrading (1 1 1)
tomf is offline   Reply With Quote

Old   May 23, 2018, 05:45
Default
  #5
New Member
 
Timo
Join Date: May 2018
Location: Delft
Posts: 8
Rep Power: 8
aerospacious is on a distinguished road
You're awesome Tom!
That helped a lot. I already figured out the inside out error yesterday so I just ran it without problems.
Thanks again!
aerospacious is offline   Reply With Quote

Reply

Tags
blockmesh, error, primitiveentry


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
Openfoam tutorials missing benediktus OpenFOAM Running, Solving & CFD 2 October 6, 2016 17:55
Multiregion BlockMesh Run Problem EFoster2 OpenFOAM Running, Solving & CFD 2 April 2, 2014 09:52
Install troubles on fedora yoshimitsuspeed OpenFOAM 1 July 20, 2011 03:49
Paraview installation troubles jjhall OpenFOAM Installation 3 April 17, 2008 13:59
OpenFOAM 14 parallel troubles msrinath80 OpenFOAM Running, Solving & CFD 14 July 5, 2007 05:51


All times are GMT -4. The time now is 08:28.