CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   Blockmesh error - 2D scramjet - please help (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/84486-blockmesh-error-2d-scramjet-please-help.html)

ishaninair January 31, 2011 14:05

Blockmesh error - 2D scramjet - please help
 
I am new to OpenFaom and I want to simulate a supersonic flow using sonicFoam, inside a scramjet engine, following is my blockmesh code.

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

convertToMeters 0.001;

vertices
(
(0 0 0) //0
(20 0 0) //1
(40 0 0)
(60 0 0)
(83.75 0 0)
(100 0 0) //5
(112 0 0) //6
(268.2 0 0)
(389.75 0 0) //8
(389.75 29.25 0)
(268.2 10 0)
(112 10 0)
(100 10 0) //12
(83.75 10 0) //13
(60 10 0)
(40 10 0) //15
(20 10 0)
(0 10 0) //17
(0 29.24 0)
(20 25.8 0)
(40 22.36 0) //20
(60 18.92 0)
(83.75 14.84 0)
(100 12.05 0) //23
(112 38.05 0)
(268.2 38.05 0) //25
(389.75 -29.25 0)
(268.2 -10 0)
(112 -10 0)
(100 -10 0)
(83.75 -10 0) //30
(60 -10 0)
(40 -10 0) //32
(20 -10 0)
(0 -10 0) //34
(0 -29.25 0)
(20 -26.08 0)
(40 -22.91 0) //37
(60 -19.744 0)
(83.75 -15.98 0)
(100 -12.54 0) //40
(112 -29.25 0)
(268.2 -29.25 0) //42
(-150 0 0) //43
(-150 -29.25 0)
(-150 -150 0) //45
(0 -150 0)
(112 -150 0)
(268.2 -150 0)
(389.75 -150 0)
(600 -150 0) //50
(600 -29.25 0)
(600 0 0) //52
(600 29.25 0)
(600 150 0) //54
(389.75 150 0)
(268.2 150 0)
(112 150 0)
(0 150 0)
(-150 150 0)
(-150 29.24 0) //60
(0 0 0.5) //61 .......
(20 0 0.5) //62
(40 0 0.5)
(60 0 0.5)
(83.75 0 0.5)
(100 0 0.5) //66
(112 0 0.5) //67
(268.2 0 0.5)
(389.75 0 0.5) //69
(389.75 29.25 0.5)
(268.2 10 0.5)
(112 10 0.5)
(100 10 0.5) //73
(83.75 10 0.5) //74
(60 10 0.5)
(40 10 0.5) //76
(20 10 0.5)
(0 10 0.5) //78
(0 29.24 0.5)
(20 25.8 0.5)
(40 22.36 0.5) //81
(60 18.92 0.5)
(83.75 14.84 0.5)
(100 12.05 0.5) //84
(112 38.05 0.5)
(268.2 38.05 0.5) //86
(389.75 -29.25 0.5)
(268.2 -10 0.5)
(112 -10 0.5)
(100 -10 0.5)
(83.75 -10 0.5) //91
(60 -10 0.5)
(40 -10 0.5) //93
(20 -10 0.5)
(0 -10 0.5) //95
(0 -29.25 0.5)
(20 -26.08 0.5)
(40 -22.91 0.5) //98
(60 -19.744 0.5)
(83.75 -15.98 0.5)
(100 -12.54 0.5) //101
(112 -29.25 0.5)
(268.2 -29.25 0.5) //103
(-150 0 0.5) //104
(-150 -29.25 0.5)
(-150 -150 0.5) //106
(0 -150 0.5)
(112 -150 0.5)
(268.2 -150 0.5)
(389.75 -150 0.5)
(600 -150 0.5) //111
(600 -29.25 0.5)
(600 0 0.5) //113
(600 29.25 0.5)
(600 150 0.5) //115
(389.75 150 0.5)
(268.2 150 0.5)
(112 150 0.5)
(0 150 0.5)
(-150 150 0.5)
(-150 29.24 0.5) //121
(-150 10 0)
(-150 -10 0)
(-150 10 0.5)
(-150 -10 0.5) //125
);

blocks
(
hex (0 1 16 17 61 62 77 78) (80 40 1) simpleGrading (0.5 0.2 1) //0
hex (1 2 15 16 62 63 76 77) (200 40 1) simpleGrading (1 0.2 1)
hex (2 3 14 15 63 64 75 76) (200 40 1) simpleGrading (1 0.2 1)
hex (3 4 13 14 64 65 74 75) (200 40 1) simpleGrading (1 0.2 1)
hex (4 5 12 13 65 66 73 74) (200 40 1) simpleGrading (1 0.2 1) //4
hex (5 6 11 12 66 67 72 73) (80 40 1) simpleGrading (2 0.2 1)
hex (6 7 10 11 67 68 71 72) (100 40 1) simpleGrading (20 0.2 1) //6
hex (7 8 9 10 68 69 70 71) (40 40 1) simpleGrading (1 0.2 1)
hex (17 16 19 18 78 77 80 79) (80 100 1) simpleGrading (0.5 1 1)
hex (16 15 20 19 77 76 81 80) (200 100 1) simpleGrading (1 1 1) //9
hex (15 14 21 20 76 75 82 81) (200 100 1) simpleGrading (1 1 1)
hex (14 13 22 21 75 74 83 82) (200 100 1) simpleGrading (1 1 1)
hex (13 12 23 22 74 73 84 83) (200 100 1) simpleGrading (1 1 1)
hex (12 11 11 23 73 72 72 84) (80 100 1) simpleGrading (2 1 1)
hex (43 0 17 122 104 61 78 124) (100 40 1) simpleGrading (0.1 0.2 1) //14
hex (122 17 18 60 124 78 79 121) (100 100 1) simpleGrading (0.1 1 1)
hex (60 18 58 59 121 79 119 120) (100 100 1) simpleGrading (0.1 20 1)
hex (18 24 57 58 79 85 118 119) (100 100 1) simpleGrading (5 20 1)
hex (24 25 56 57 85 86 117 118) (50 100 1) simpleGrading (1 20 1)
hex (25 9 55 56 86 70 116 117) (25 100 1) simpleGrading (1 20 1)
hex (9 53 54 55 70 114 115 116) (30 100 1) simpleGrading (1 20 1) //20
hex (8 52 53 9 69 113 114 70) (30 40 1) simpleGrading (1 0.2 1) // Upper half
hex (34 33 1 0 95 94 62 61) (80 40 1) simpleGrading (0.5 5 1)
hex (33 32 2 1 94 93 63 62) (200 40 1) simpleGrading (1 5 1)
hex (32 31 3 2 93 92 64 63) (200 40 1) simpleGrading (1 5 1)
hex (31 30 4 3 92 91 65 64) (200 40 1) simpleGrading (1 5 1) //25
hex (30 29 5 4 91 90 66 65) (200 40 1) simpleGrading (1 5 1)
hex (29 28 6 5 90 89 67 66) (80 40 1) simpleGrading (2 5 1)
hex (28 27 7 6 89 88 68 67) (100 40 1) simpleGrading (20 5 1)
hex (27 26 8 7 88 87 69 68) (40 40 1) simpleGrading (1 5 1)
hex (35 36 33 34 96 97 94 95) (80 100 1) simpleGrading (0.5 1 1) //30
hex (36 37 32 33 97 98 93 94) (200 100 1) simpleGrading (1 1 1)
hex (37 38 31 32 98 99 92 93) (200 100 1) simpleGrading (1 1 1)
hex (38 39 30 31 99 100 91 92) (200 100 1) simpleGrading (1 1 1)
hex (39 40 29 30 100 101 90 91) (200 100 1) simpleGrading (1 1 1)
hex (40 28 28 29 101 89 89 90) (80 100 1) simpleGrading (2 1 1) //35
hex (123 34 0 43 125 95 61 104) (100 40 1) simpleGrading (0.1 5 1)
hex (44 35 34 123 105 96 95 125) (100 100 1) simpleGrading (0.1 1 1)
hex (45 46 35 44 106 107 96 105) (100 100 1) simpleGrading (0.1 0.05 1)
hex (46 47 41 35 107 108 102 96) (100 100 1) simpleGrading (5 0.05 1)
hex (47 48 42 41 108 109 103 102) (50 100 1) simpleGrading (1 0.05 1) //40
hex (48 49 26 42 109 110 87 103) (25 100 1) simpleGrading (1 0.05 1)
hex (49 50 51 26 110 111 112 87) (30 100 1) simpleGrading (1 0.05 1)
hex (26 51 52 8 87 112 113 69) (30 40 1) simpleGrading (1 5 1) //43

);

edges
(
);

patches
(
patch inlet
(
(60 121 120 59)
(122 124 121 60)
(43 104 124 122)
(123 125 104 43)
(44 105 125 123)
(45 106 105 44)
)
patch outlet
(
(53 114 115 54)
(52 113 114 53)
(51 112 113 52)
(50 111 112 51)
)
patch bottomWall
(
(45 46 107 106)
(46 47 108 107)
(47 48 109 108)
(48 49 110 109)
(49 50 111 110)
)
patch topWall
(
(59 58 119 120)
(58 57 118 119)
(57 56 117 118)
(56 55 116 117)
(55 54 115 116)
)
wall scramjetWall
(
(11 23 84 72)
(23 22 83 84)
(22 21 82 83)
(21 20 81 82)
(20 19 80 81)
(19 18 79 80)
(18 24 85 79)
(24 25 86 85)
(25 9 70 86)
(9 10 71 70)
(10 11 72 71)
(28 40 101 89)
(40 39 100 101)
(39 38 99 100)
(38 37 98 99)
(37 36 97 98)
(36 35 96 97)
(35 41 102 96)
(41 42 103 102)
(42 26 87 103)
(26 27 88 87)
(27 28 89 88)
)
empty frontAndBack
(

(11 72 72 11)
(0 1 16 17)
(61 62 77 78)
(1 2 15 16)
(62 63 76 77)
(2 3 14 15)
(63 64 75 76)
(3 4 13 14)
(64 65 74 75)
(4 5 12 13)
(65 66 73 74)
(5 6 11 12)
(66 67 72 73)
(6 7 10 11)
(67 68 71 72)
(7 8 9 10)
(68 69 70 71)
(17 16 19 18)
(78 77 80 79)
(16 15 20 19)
(77 76 81 80)
(15 14 21 20)
(76 75 82 81)
(14 13 22 21)
(75 74 83 82)
(13 12 23 22)
(74 73 84 83)
(12 11 11 23)
(73 72 72 84)
(43 0 17 122)
(104 61 78 124)
(122 17 18 60)
(124 78 79 121)
(60 18 58 59)
(121 79 119 120)
(18 24 57 58)
(79 85 118 119)
(24 25 56 57)
(85 86 117 118)
(25 9 55 56)
(86 70 116 117)
(9 53 54 55 )
(70 114 115 116)
(9 8 52 53)
(70 69 113 114)
(28 89 89 28)
(34 33 1 0)
(95 94 62 61)
(33 32 2 1)
(94 93 63 62)
(32 31 3 2)
(93 92 64 63)
(31 30 4 3)
(92 91 65 64)
(30 29 5 4)
(91 90 66 65)
(29 28 6 5)
(90 89 67 66)
(28 27 7 6)
(89 88 68 67)
(27 26 8 7)
(88 87 69 68)
(35 36 33 34)
(96 97 94 95)
(36 37 32 33)
(97 98 93 94)
(37 38 31 32)
(98 99 92 93)
(38 39 30 31)
(99 100 91 92)
(39 40 29 30)
(100 101 90 91)
(40 28 28 29)
(101 89 89 90)
(123 34 0 43)
(125 95 61 104)
(44 35 34 123)
(105 96 95 125)
(44 45 46 35)
(105 106 107 96)
(46 47 41 35)
(107 108 102 96)
(47 48 42 41)
(108 109 103 102)
(48 49 26 42)
(109 110 87 103)
(49 50 51 26)
(110 111 112 87)
(26 51 52 8)
(87 112 113 69)
)
);

mergePatchPairs
(
);

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


while running blockMesh , no errors are shown
But when i am running checkMesh following errors occur,

.................................


/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.0 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.0-21131bcbd876
Exec : checkMesh
Date : Jan 31 2011
Time : 22:25:38
Host : ubuntu
PID : 21613
Case : /home/ishan/OpenFOAM/ishan-1.7.0/run/tutorials/compressible/sonicFoam/scramjet
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 746520
internal points: 0
faces: 1487461
internal faces: 740740
cells: 371400
boundary patches: 6
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 371201
prisms: 199
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
inlet 480 962 ok (non-closed singly connected)
outlet 280 562 ok (non-closed singly connected)
bottomWall 305 612 ok (non-closed singly connected)
topWall 305 612 ok (non-closed singly connected)
scramjetWall 2550 5102 ok (non-closed singly connected)
frontAndBack 742801 746520 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.15 -0.15 0) (0.6 0.15 0.0005)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 0)
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (6.28538e-21 -6.5222e-21 2.88219e-19) OK.
***High aspect ratio cells found, Max aspect ratio: 2816.5, number of cells 200
<<Writing 200 cells with high aspect ratio to set highAspectRatioCells
***Zero or negative face area detected. Minimum area: 0
<<Writing 1 zero area faces to set zeroAreaFaces
Min volume = 1.84484e-14. Max volume = 1.3255e-08. Total volume = 0.000106075. Cell volumes OK.
Mesh non-orthogonality Max: 174.637 average: 4.18506
*Number of severely non-orthogonal faces: 1.
***Number of non-orthogonality errors: 2.
<<Writing 3 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 2 faces are incorrectly oriented.
<<Writing 2 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 33.7372, 2 highly skew faces detected which may impair the quality of the results
<<Writing 2 skew faces to set skewFaces

Failed 5 mesh checks.


............................

and when I run sonicFoam, following error message is shown in that...

............................

--> FOAM FATAL ERROR:
This mesh contains patches of type empty but is not 1D or 2D
by virtue of the fact that the number of faces of this
empty patch is not divisible by the number of cells.

From function emptyFvPatchField<Type>::updateCoeffs()
in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 150.

..................................

Please Help !!!!



Regards,
Ishan
Undergraduate
IIT Bombay

lindstroem February 1, 2011 06:42

Hi!

I'm not sure if this is the mentioned problem, but some of the problems checkMesh reports might come from the marked area. I think you have to improve the mesh in this area. This might not be the only region..

Just an idea!

Greetings
http://dl.dropbox.com/u/587565/strjet.jpg

ishaninair February 1, 2011 12:10

@ lindstroem
 
Thanks lindstroem for your reply,

I already knew that the problem is in that area, but I am not able to solve it. The Block there is a wedge and same for the upper half. But upper half is not showing any error, although everything is same.

Please Help!

lindstroem February 1, 2011 12:52

wouldnt snappyHexMesh be the right tool for that? I havent use it yet, but from what I know about it, itll be what I would choose.. Sorry, cant help you any further!
greetings

ishaninair February 1, 2011 15:00

@lindstroem : Thanks for your suggestion, I will try snappyHexMesh, but I am not sure that I will be able to make this fine mesh in snappyHexMesh as I have not used it till now.


Anyone else .. who can help for the above mentioned error????
Please!!

purduejack February 16, 2011 01:09

hi
 
if you refer to the stress analysis of a plate with a hole, i think there a part in the blockmeshdict where it shows you the patches for symmetry planes.

it is in the user guide.

i have just begun to use openfoam last month. so i wont claim that i am an expert. but do look it up. it might help.

ishaninair February 16, 2011 04:54

Hi,
I found the mistake i did, in blockmesh it's not just the orientations of the vertices in the block, but the starting vertices also play the role.

purduejack March 18, 2011 01:14

Hey its me again. I am trying to do smtg similiar to what you are doing. But I have a question, for a geometry this complex, how do you determine the nfaces and startfaces (values). this is what i am having trouble figuring out.
If you dont mind spending sometime explaining to me


All times are GMT -4. The time now is 12:20.