CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

square cylinder obstacle

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 25, 2012, 19:01
Default square cylinder obstacle
  #1
Member
 
Join Date: Nov 2011
Posts: 44
Rep Power: 5
fferroni is on a distinguished road
Hello

I am trying to make a blockMeshDict file for a 2D square cylinder obstacle (viewed from above), to show vortex shedding. I need it without centerline symmetry. Perhaps someone already has one, and would kindly share?

I have tried making it but I've just started openFOAM so I still don't have the hang of blockMesh. I get:


Check topology

Basic statistics
Number of internal faces : 8
Number of boundary faces : 32
Number of defined boundary faces : 32
Number of undefined boundary faces : 0
Checking patch -> block consistency

Creating block offsets
Creating merge list

--> FOAM FATAL ERROR:
Inconsistent number of faces between block pair 0 and 4

From function blockMesh::calcMergeInfo()
in file blockMesh/blockMeshMerge.C at line 221.

FOAM exiting


In my drawing, blocks 0 and 4 share 1 face, but I never specified in the boundaries since it was an internal face.

My square is a 1x1, with 2L on either side, 2L in front and 12L behind.


Can anyone shed some light please? It's Friday night and I'm stuck here trying to figure what I'm doing wrong

-------------
convertToMeters 0.001;

vertices
(
(0 0 -0.5)
(2 0 -0.5)
(3 0 -0.5)
(15 0 -0.5)
(15 2 -0.5)
(15 3 -0.5)
(15 5 -0.5)
(3 5 -0.5)
(2 5 -0.5)
(0 5 -0.5)
(0 3 -0.5)
(0 2 -0.5)
(2 2 -0.5)
(3 2 -0.5)
(3 3 -0.5)
(2 3 -0.5)

(0 0 0.5)
(2 0 0.5)
(3 0 0.5)
(15 0 0.5)
(15 2 0.5)
(15 3 0.5)
(15 5 0.5)
(3 5 0.5)
(2 5 0.5)
(0 5 0.5)
(0 3 0.5)
(0 2 0.5)
(2 2 0.5)
(3 2 0.5)
(3 3 0.5)
(2 3 0.5)
);

blocks
(
hex (0 1 12 11 16 17 28 27) (10 10 1) simpleGrading (1 1 1)
hex (11 12 15 10 27 28 31 26) (10 10 1) simpleGrading (1 1 1)
hex (10 15 8 9 26 31 24 25) (20 15 1) simpleGrading (1 1 1)
hex (15 14 7 8 31 30 23 24) (20 15 1) simpleGrading (1 1 1)
hex (1 2 13 12 17 18 29 28) (20 15 1) simpleGrading (1 1 1)
hex (14 5 6 7 30 21 22 23) (20 15 1) simpleGrading (1 1 1)
hex (13 4 5 14 29 20 21 30) (20 15 1) simpleGrading (1 1 1)
hex (2 3 4 13 18 19 20 29) (20 15 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
pressure-outlet
{
type patch;
faces
(
(3 4 20 19)
(4 5 21 20)
(5 6 22 21)
);
}

velocity-inlet
{
type patch;
faces
(
(11 0 16 27)
(10 11 27 26)
(9 10 26 25)
);
}

wall-upper
{
type wall;
faces
(
(6 7 23 22)
(7 8 24 23)
(8 9 25 24)
);
}

wall-lower
{
type wall;
faces
(
(0 1 17 16)
(1 2 18 17)
(2 3 19 18)

);
}

obstacle-front
{
type wall;
faces
(
(15 12 28 31)
(14 15 31 30)
(12 13 29 28)
(13 14 30 29)
);
}


);

mergePatchPairs
(
);
fferroni is offline   Reply With Quote

Old   May 26, 2012, 04:26
Default
  #2
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 463
Rep Power: 9
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Hi;
the error is quite clear: you defined two adjacent blocks with different number of cells on their common face.

In you case the face is that one between block #0 and block #4 which are:

hex (0 1 12 11 16 17 28 27) (10 10 1) simpleGrading (1 1 1)
hex (15 14 7 8 31 30 23 24) (20 15 1) simpleGrading (1 1 1)

they share a face parallel to the Y axis, if you see though they have a different number of cells along that direction: 10 for block 0 and 15 for block 4.
Since also block 7 has 15 division along the Y direction, changing block 1 to this may solve your problem:

Code:
hex (0 1 12 11 16 17 28 27) (10 15 1) simpleGrading (1 1 1)
lovecraft22 is offline   Reply With Quote

Old   May 26, 2012, 04:48
Thumbs up
  #3
Member
 
Join Date: Nov 2011
Posts: 44
Rep Power: 5
fferroni is on a distinguished road
Aaaah... ok!

I now understand what the error means. I didn't know you had to match the block divisions at interfaces (although it's logical you would need to...)

There were other ones that were not matched, but I got it working

Thank you!!!

Fran
fferroni is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undergrad Civil Student: need help with simulating 2d flow past a square cylinder Karim Byasse Main CFD Forum 0 May 5, 2012 22:58
LES of a square cylinder gfilip OpenFOAM Running, Solving & CFD 1 June 24, 2010 12:33
grids for flow over a square cylinder student Main CFD Forum 4 April 21, 2009 06:50
solving airfoil like square cylinder problem? zonexo Main CFD Forum 1 May 27, 2006 15:16
drag calulation over a square cylinder sex00 Main CFD Forum 4 February 2, 2001 08:16


All times are GMT -4. The time now is 23:59.