CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] error Meshing a 3D cube geometry with blockMesh (https://www.cfd-online.com/Forums/openfoam-meshing/66374-error-meshing-3d-cube-geometry-blockmesh.html)

GodOfLove July 13, 2009 16:09

error Meshing a 3D cube geometry with blockMesh
 
1 Attachment(s)
HI,

I would like to create a meshing for a simple 3D cube geometry in a box with blockMesh generator. However, I got the following error :

Create time Reading block mesh description dictionary
Creating block mesh
Creating blockCorners
Creating curved edges
Creating blocks
Programme terminated with errors: exit code 3, status 0.
Error messages:
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc


I sent in attachement the blockMeshDict file. If someone can helping me to find the error, that would be very appreciated.


GoDofLove


P.S.: I use a vortices, patch, etc posted by ivanyao (How to increase Mesh near the surface of the model), but the mesh could not be opened by ParaView?

GodOfLove July 13, 2009 16:14

For quick view
 
Here is the blockMesh file for quick view :

vertices (
(0 0 0)
(8 0 0)
(10 0 0)
(24 0 0)
(0 1 0)
(8 1 0)
(10 1 0)
(24 1 0)
(0 6 0)
(8 6 0)
(10 6 0)
(24 6 0)
(0 0 5)
(8 0 5)
(10 0 5)
(24 0 5)
(0 1 5)
(8 1 5)
(10 1 5)
(24 1 5)
(0 6 5)
(8 6 5)
(10 6 5)
(24 6 5)
(0 0 7)
(8 0 7)
(10 0 7)
(24 0 7)
(0 1 7)
(8 1 7)
(10 1 7)
(24 1 7)
(0 6 7)
(8 6 7)
(10 6 7)
(24 6 7)
(0 0 12)
(8 0 12)
(10 0 12)
(24 0 12)
(0 1 12)
(8 1 12)
(10 1 12)
(24 1 12)
(0 6 12)
(8 6 12)
(10 6 12)
(24 6 12)
);
blocks
(
//First block group, below
hex (0 1 5 4 12 13 17 16) (200 25 125) simpleGrading (1 1 1)
hex (1 2 6 5 13 14 18 17) (50 25 125) simpleGrading (1 1 1)
hex (2 3 7 6 14 15 19 18) (350 25 125) simpleGrading (1 1 1)
//First block group, above
hex (4 5 9 8 16 17 21 20) (200 125 125) simpleGrading (1 1 1)
hex (5 6 10 9 17 18 22 21) (50 125 125) simpleGrading (1 1 1)
hex (6 7 11 10 18 19 23 22) (350 125 125) simpleGrading (1 1 1)
//Second block group, below
hex (12 13 17 16 24 25 29 28) (200 25 50) simpleGrading (1 1 1)
hex (14 15 19 18 26 27 31 30) (350 25 50) simpleGrading (1 1 1)
//Second block group, above
hex (16 17 21 20 28 29 33 32) (200 125 50) simpleGrading (1 1 1)
hex (17 18 22 21 29 30 34 33) (50 125 50) simpleGrading (1 1 1)
hex (18 19 23 22 30 31 35 34) (350 125 50) simpleGrading (1 1 1)
//Third block group, below
hex (24 25 29 28 36 37 41 40) (200 25 125) simpleGrading (1 1 1)
hex (25 26 30 29 37 38 42 41) (50 25 125) simpleGrading (1 1 1)
hex (26 27 31 30 38 39 43 42) (350 25 125) simpleGrading (1 1 1)
//Third block group, above
hex (28 29 33 32 40 41 45 44) (200 125 125) simpleGrading (1 1 1)
hex (29 30 34 33 41 42 46 45) (50 125 125) simpleGrading (1 1 1)
hex (30 31 35 34 42 43 47 46) (350 125 125) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch inlet
(
(0 12 16 4)
(4 16 20 8)
(12 24 28 16)
(16 28 32 20)
(24 36 40 28)
(28 40 44 32)
)
patch outlet
(
(3 15 19 7)
(7 19 23 11)
(15 27 31 19)
(19 31 35 23)
(27 39 43 31)
(31 43 47 35)
)
wall upperwall
(
(8 9 21 20)
(9 10 22 21)
(10 11 23 22)
(20 21 33 32)
(21 22 34 33)
(22 23 35 34)
(32 33 45 44)
(33 34 46 45)
(34 35 47 46)
)
wall lowerwall
(
(0 1 13 12)
(1 2 14 13)
(2 3 15 14)
(12 13 25 24)
(14 15 27 26)
(24 25 37 36)
(25 26 38 37)
(26 27 39 38)
)
wall block
(
//Block
//Top
(17 18 30 29)
//Front and Back
(13 25 29 17)
(14 26 30 18)
//Left and Right side
(25 29 30 26)
(13 17 18 14)
)
wall frontAndback
(
//Front
(0 4 5 1)
(4 8 9 5)
(1 5 6 2)
(5 9 10 6)
(2 6 7 3)
(6 10 11 7)
//Back
(36 40 41 37)
(40 44 45 41)
(37 41 42 38)
(41 45 46 42)
(38 42 43 39)
(42 46 47 43)
)
);
mergePatchPairs
(
);

henrik July 13, 2009 16:20

Dear God of Love (interesting name BTW),

I think the binaries are incompatible with your system. Try blockMesh-ing one of the tutorials, for example the cavity.

Henrik

GodOfLove July 13, 2009 16:33

I using blockMesh generator already for a 2D (b/h=2.0) rib and everything work well. I make a 2D LES simulation and everything goes right. So, I dont know why the blockMesh utilities doesn't work in 3D on my system?

blockMeshDict file for 2D (b/h=2.0) rib for personal information:

vertices
(
(0 0 0)
(8 0 0)
(10 0 0)
(24 0 0)
(0 1 0)
(8 1 0)
(10 1 0)
(24 1 0)
(0 6 0)
(8 6 0)
(10 6 0)
(24 6 0)

(0 0 0.03333)
(8 0 0.03333)
(10 0 0.03333)
(24 0 0.03333)
(0 1 0.03333)
(8 1 0.03333)
(10 1 0.03333)
(24 1 0.03333)
(0 6 0.03333)
(8 6 0.03333)
(10 6 0.03333)
(24 6 0.03333)

);

blocks
(
hex (0 1 5 4 12 13 17 16) (200 25 1) simpleGrading (1 1 1)
hex (2 3 7 6 14 15 19 18) (350 25 1) simpleGrading (1 1 1)
hex (4 5 9 8 16 17 21 20) (200 125 1) simpleGrading (1 1 1)
hex (5 6 10 9 17 18 22 21) (50 125 1) simpleGrading (1 1 1)
hex (6 7 11 10 18 19 23 22) (350 125 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch inlet
(
(0 12 16 4)
(4 16 20 8)
)
patch outlet
(
(3 15 19 7)
(7 19 23 11)
)
wall upperwall
(
(8 9 21 20)
(9 10 22 21)
(10 11 23 22)
)
wall lowerwall
(
(0 1 13 12)
(1 5 17 13)
(5 6 18 17)
(2 14 18 6)
(2 3 15 14)
)

empty frontAndBack
(
(0 4 5 1)
(4 8 9 5)
(5 9 10 6)
(2 6 7 3)
(6 10 11 7)
(12 16 17 13)
(16 20 21 17)
(17 21 22 18)
(14 18 19 15)
(18 22 23 19)
)
);

mergePatchPairs
(
);

henrik July 13, 2009 16:46

Dear God of Love,

I think you have been lucky not to trigger the problem with your 2D case.

Please try this tutorial

$FOAM_TUTORIALS/oodles/pitzDaily

just to be sure ...

Henrik

GodOfLove July 14, 2009 15:30

Hi henrik,

Thank for your help. I already trying this tutorial and everything was ok. I found my mistake. I Landed with this blockMesh file :

vertices
(
//First plane (back of the domain)
(0 0 0)
(8 0 0)
(10 0 0)
(24 0 0)
(0 1 0)
(8 1 0)
(10 1 0)
(24 1 0)
(0 6 0)
(8 6 0)
(10 6 0)
(24 6 0)

//Second plane (left side of the block)
(0 0 5)
(8 0 5)
(10 0 5)
(24 0 5)
(0 1 5)
(8 1 5)
(10 1 5)
(24 1 5)
(0 6 5)
(8 6 5)
(10 6 5)
(24 6 5)

//Third plane (right side of the block)
(0 0 7)
(8 0 7)
(10 0 7)
(24 0 7)
(0 1 7)
(8 1 7)
(10 1 7)
(24 1 7)
(0 6 7)
(8 6 7)
(10 6 7)
(24 6 7)

//Fourth plane (front of the domain)
(0 0 12)
(8 0 12)
(10 0 12)
(24 0 12)
(0 1 12)
(8 1 12)
(10 1 12)
(24 1 12)
(0 6 12)
(8 6 12)
(10 6 12)
(24 6 12)

);

blocks
(
//First block group, below
hex (0 1 5 4 12 13 17 16) (200 25 5) simpleGrading (1 1 1)
hex (1 2 6 5 13 14 18 17) (50 25 5) simpleGrading (1 1 1)
hex (2 3 7 6 14 15 19 18) (350 25 5) simpleGrading (1 1 1)
//First block group, above
hex (4 5 9 8 16 17 21 20) (200 125 5) simpleGrading (1 1 1)
hex (5 6 10 9 17 18 22 21) (50 125 5) simpleGrading (1 1 1)
hex (6 7 11 10 18 19 23 22) (350 125 5) simpleGrading (1 1 1)

//Second block group, below
hex (12 13 17 16 24 25 29 28) (200 25 2) simpleGrading (1 1 1)
hex (14 15 19 18 26 27 31 30) (350 25 2) simpleGrading (1 1 1)
//Second block group, above
hex (16 17 21 20 28 29 33 32) (200 125 2) simpleGrading (1 1 1)
hex (17 18 22 21 29 30 34 33) (50 125 2) simpleGrading (1 1 1)
hex (18 19 23 22 30 31 35 34) (350 125 2) simpleGrading (1 1 1)

//Third block group, below
hex (24 25 29 28 36 37 41 40) (200 25 5) simpleGrading (1 1 1)
hex (25 26 30 29 37 38 42 41) (50 25 5) simpleGrading (1 1 1)
hex (26 27 31 30 38 39 43 42) (350 25 5) simpleGrading (1 1 1)
//Third block group, above
hex (28 29 33 32 40 41 45 44) (200 125 5) simpleGrading (1 1 1)
hex (29 30 34 33 41 42 46 45) (50 125 5) simpleGrading (1 1 1)
hex (30 31 35 34 42 43 47 46) (350 125 5) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch inlet
(
(0 12 16 4)
(4 16 20 8)
(12 24 28 16)
(16 28 32 20)
(24 36 40 28)
(28 40 44 32)
)
patch outlet
(
(3 15 19 7)
(7 19 23 11)
(15 27 31 19)
(19 31 35 23)
(27 39 43 31)
(31 43 47 35)
)
wall upperwall
(
(8 9 21 20)
(9 10 22 21)
(10 11 23 22)
(20 21 33 32)
(21 22 34 33)
(22 23 35 34)
(32 33 45 44)
(33 34 46 45)
(34 35 47 46)
)
wall lowerwall
(
(0 1 13 12)
(1 2 14 13)
(2 3 15 14)
(12 13 25 24)
(14 15 27 26)
(24 25 37 36)
(25 26 38 37)
(26 27 39 38)
//Top of the block
(17 18 30 29)

)
wall frontAndback
(
//Left and Right side of the block
(13 17 18 14)
(25 29 30 26)
//Front and back of the block
(13 25 29 17)
(14 26 30 18)
//Back of the domain
(0 4 5 1)
(4 8 9 5)
(1 5 6 2)
(5 9 10 6)
(2 6 7 3)
(6 10 11 7)
//Front of the domain
(36 40 41 37)
(40 44 45 41)
(37 41 42 38)
(41 45 46 42)
(38 42 43 39)
(42 46 47 43)
)
);

Now, it's possible to visualize the mesh with ParaView. The meshing is constant and too fine outside the boundary region so, ParaView freeze sometime. On the other hand, the meshing is too coarse in the boundary layer region and I think that need to use a ratio on the mesh like describe in the OpenFoam User's manual. I never use this fonctionality also. That gonna be a new threads! lol

Thank a lot!

GoDofLovE


All times are GMT -4. The time now is 14:11.