# Multiblocks

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 4, 2012, 10:18 Multiblocks #1 Member   Join Date: Apr 2012 Location: France Posts: 72 Rep Power: 6 Hi, I would like to create a Mesh in multiblock. For example, you have deux blocks side by side. What's the boundary condition for the face between two blocks ? And now, if you have one cylindrical block inside the other. What's the boundary condition ? Thanks all for your help

 April 4, 2012, 11:49 #2 Senior Member   Nima Samkhaniani Join Date: Sep 2009 Location: Tehran, Iran Posts: 1,195 Blog Entries: 1 Rep Power: 16 if you use blockMesh to create two blocks, it defines that face which is in both blocks as internal face, so you need just when you are going to sub divide those blocks, use the same number of cell face for internal face in both side!

 April 5, 2012, 02:36 #3 Member   Join Date: Apr 2012 Location: France Posts: 72 Rep Power: 6 Thanks for your answer. I have already done my geometrie in my "blockMeshDict" file. It's composed with 12 points, 2 blocks, 12 edges (to create the cylindrical block). My problem is in the definition of the boundary in "blockMeshDict" file. In fact, I don't know the condition to have a continuity of the ecoulement. Should I add the orange face (cf. picture) on limits conditions? If yes, what is the associate limite condition in the file "boundary"? Same question for the second case ... Thanks all for your help ps: If you need, I can post my "blockMeshDict" and "boundary" files

 April 5, 2012, 02:57 #4 Senior Member   Nima Samkhaniani Join Date: Sep 2009 Location: Tehran, Iran Posts: 1,195 Blog Entries: 1 Rep Power: 16 refer you to my last post, there is no need for specific boundary condition! the shared face between two blocks consider as internalface so you need just to subdivide that internalface equally in both blocks Last edited by nimasam; April 5, 2012 at 03:20.

 April 5, 2012, 03:24 #5 Senior Member   Join Date: Mar 2011 Posts: 174 Rep Power: 7 Could you also explain your problem so that we may help you more? I assume that you have something like a conjugate heat transfer problem, right? In this case, you need to have a boundary condition on the interface. I assume that this is the case because otherwise it would not make sense to have two boxes next to each other instead of a bigger one with the same volume.

 April 5, 2012, 03:37 #6 Member   Join Date: Apr 2012 Location: France Posts: 72 Rep Power: 6 I'll post a clearer answer (I hope ^ ^) in the morning. Thank you. Edit : morning in France ^^, Last edited by Rider; April 5, 2012 at 04:53.

 April 5, 2012, 05:02 #7 Member   Join Date: Apr 2012 Location: France Posts: 72 Rep Power: 6 I must study an aerodynamic profil. The object is placed à 0° of incidence and saw a velocity inlet (to simulate is air-speed). This object is circular, so I chose a circular domaine (to limit cells deformation). Moreover, I want a linear repartition of the cells (to optimize the number of cells and the simulation's time). The picture 1 shows a uniforme repartition, and the second shows a linear repartition. But, to have good results, the evolution of the coefficient of cell dimensions don't overtake 20%. That's why I create 2 blocks. With this two blocks, I can respect the limite of 20% Exactly, I chose 10%). And the two blocks allow me to do an increasing evolution for the first block and decreasing for the second one. The picture 3 shows my domaine with the two blocks, and their dimensions. And we can see the initials points on the picture "initial geometrie. The picture 4 shows the surfaces where I have the inlet and the outlet. The boundary type of the external surface of the cylinder is a bordure. Yes anon_a, my problem is the interface between the two blocks and the continuity of my flow.... (surface highlight in green). Here is my blockMeshDict file : Code: ```FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (-20 -30 -30) (0 -30 -30) (140 -30 -30) (140 -30 30) (0 -30 30) (-20 -30 30) (-20 30 -30) (0 30 -30) (140 30 -30) (140 30 30) (0 30 30) (-20 30 30) ); blocks ( hex (0 1 7 6 5 4 10 11) (10 20 20) simpleGrading (0.1 1 1) hex (1 2 8 7 4 3 9 10) (70 20 20) simpleGrading (10 1 1) ); edges ( arc 0 6 (-20 0 -42.4264) arc 6 11 (-20 42.4264 0) arc 11 5 (-20 0 42.4264) arc 5 0 (-20 -42.4264 0) arc 1 7 (0 0 -42.4264) arc 7 10 (0 42.4264 0) arc 10 4 (0 0 42.4264) arc 4 1 (0 -42.4264 0) arc 2 8 (140 0 -42.4264) arc 8 9 (140 42.4264 0) arc 9 3 (140 0 42.4264) arc 3 2 (140 -42.4264 0) ); boundary ( inlet { type patch; faces ( (0 5 11 6) ); } outlet { type patch; faces ( (2 8 9 3) ); } bordure { type patch; faces ( (1 4 5 0) (2 3 4 1) (11 10 7 6) (10 9 8 7) (5 4 10 11) (4 3 9 10) (1 0 6 7) (2 1 7 8) ); } ); //``` It isn't apparent on the picture, but I have a raffinement around my study object. I hope I was clair in my explications ... And sorry if my english isn't totaly understandable. Thanks for your help

April 5, 2012, 05:39
#8
Senior Member

Join Date: Mar 2011
Posts: 174
Rep Power: 7
Ok, now it is much clearer.

When I use your blockMesh to generate the geometry, the following appears in the blockMesh report:
Quote:
 Basic statistics Number of internal faces : 1 Number of boundary faces : 10 Number of defined boundary faces : 10 Number of undefined boundary faces : 0 Checking patch -> block consistency
This means that all the faces that are common for two blocks (such as faces 10-4-1-7 and 7-1-4-10 in your picture) are considered internal and you do not have to define anything on them. Do not worry about internal faces, unless you want to apply a different solver in each region (and you don't want to here). All conservation properties are satisfied. The only thing you have to take care of, as nimasam mentioned, is to have the same number, position and size of faces.

Regarding the object inside the field, you will have to create it and then you will have to impose a boundary condition on its faces. That's another story.

Other than that, I would suggest also trying to build your mesh another way: After a lot of struggling with many tools, I have recently moved to SALOME, an excellent (French!) program. I believe it will make your life easier, you will get tired very quickly with blockMesh.

 April 5, 2012, 05:58 #9 Member   Join Date: Apr 2012 Location: France Posts: 72 Rep Power: 6 Ok. I will use the same solver for the two volumes : simpleFoam. I already done a simulation, and my aerodynamic coefficients (Cx et Cz) diverge ... That's why I create this topic. For the object I already create it and impose its boundary condition. In fact, I simulated my study with a cuboc domaine and the results were corrects. Now I want to refine my results. So, my divergence problem shouldn't due to the blockMesh ? May be my snappyHexMesh ? Or, my boundary conditions ? I don't know SALOME, it was validated by professional users ? Did you realise pre-processing, meshing, calcul and post-processing on it ?

April 5, 2012, 06:54
#10
Senior Member

Join Date: Mar 2011
Posts: 174
Rep Power: 7
Quote:
 my aerodynamic coefficients (Cx et Cz) diverge
Do you mean that your simulation diverges or that the coefficients that you calculate do not agree with the previous results? If it is the latter, maybe something went wrong during their calculation. Does the rest of the field seem ok?

Divergence in a simulation can be (and is frequently) caused by a bad mesh.
After running blockMesh (and also after running snappyHexMesh), you should always run checkMesh, which gives you information about the quality of your mesh.
In your case and without the object inside, I get this warning:
Quote:
 *Number of severely non-orthogonal faces: 640. Non-orthogonality check OK. <
There are various ways to visualize the bad faces (nonOrthoFaces), such as
results with checkMesh...please comment
The problem however, is how to correct them in blockMesh. It can get very tricky for complex geometries.

I use SALOME (http://www.salome-platform.org/) to define the geometry and mesh.
Then I export to .unv format and import to OF with ideasUnvToFoam.
It seems pretty professional to me :-)
Some people alternatively suggest enGrid but I have not tried that yet.
Just search a little around this forum and you will find some information.

April 5, 2012, 08:19
#11
Member

Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 6
Quote:
 Originally Posted by anon_a Do you mean that your simulation diverges or that the coefficients that you calculate do not agree with the previous results? If it is the latter, maybe something went wrong during their calculation. Does the rest of the field seem ok?

Yes, the coefficients tant I calculate aren't anormal (10e34), so I closed the simulation and I don't look the field ... I think that I have correctly defined the calcul of the coefficients (because it's the same condition that my cubic domaine).

Quote:
 Originally Posted by anon_a Divergence in a simulation can be (and is frequently) caused by a bad mesh. After running blockMesh (and also after running snappyHexMesh), you should always run checkMesh, which gives you information about the quality of your mesh. In your case and without the object inside, I get this warning: There are various ways to visualize the bad faces (nonOrthoFaces), such as results with checkMesh...please comment The problem however, is how to correct them in blockMesh. It can get very tricky for complex geometries.

You're right ! Many faces aren't non-orthogonal. But, like you spotlight it, the problem is how to correct them ...

Quote:
 Originally Posted by anon_a I use SALOME (http://www.salome-platform.org/) to define the geometry and mesh. Then I export to .unv format and import to OF with ideasUnvToFoam. It seems pretty professional to me :-) Some people alternatively suggest enGrid but I have not tried that yet. Just search a little around this forum and you will find some information.
I'll look this later, if possible I would like to do my study in the same software

April 6, 2012, 07:51
#12
Senior Member

Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,151
Rep Power: 20
Quote:
 Originally Posted by Rider You're right ! Many faces aren't non-orthogonal. But, like you spotlight it, the problem is how to correct them ...
Using square blocks to mesh a cylindrical domain is bad, and will be bad in any other meshing software as well. Build an OGrid (see picture) and your solution will be a lot better. You can do that in blockMesh.
__________________
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2

 April 10, 2012, 05:21 #13 Member   Join Date: Apr 2012 Location: France Posts: 72 Rep Power: 6 Edit : I try to do an O-grid but I have warnings during the generation and during checkMesh. Can you help me to solve this problem ? Here is my blockMeshDict file : Code: ```FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 -0 0 ) (160 -0 0 ) (0 -12.5 0 ) (160 -12.5 0 ) (0 -0 12.5 ) (160 -0 12.5 ) (0 12.5 0 ) (160 12.5 0 ) (0 -0 -12.5 ) (160 -0 -12.5 ) (0 -8 8 ) (160 -8 8 ) (0 8 8 ) (160 8 8 ) (0 8 -8 ) (160 8 -8 ) (0 -8 -8 ) (160 -8 -8 ) (0 -30 0 ) (160 -30 0 ) (0 -0 30 ) (160 -0 30 ) (0 30 0 ) (160 30 0 ) (0 -0 -30 ) (160 -0 -30 ) (0 -21.213 21.213 ) (160 -21.213 21.213 ) (0 21.213 21.213 ) (160 21.213 21.213 ) (0 21.213 -21.213 ) (160 21.213 -21.213 ) (0 -21.213 -21.213 ) (160 -21.213 -21.213 ) (0 -50 0 ) (160 -50 0 ) (0 -0 50 ) (160 -0 50 ) (0 50 0 ) (160 50 0 ) (0 -0 -50 ) (160 -0 -50 ) (0 -50 50 ) (160 -50 50 ) (0 50 50 ) (160 50 50 ) (0 50 -50 ) (160 50 -50 ) (0 -50 -50 ) (160 -50 -50 ) ); blocks ( hex (2 10 0 16 3 11 1 17) (10 10 60) simpleGrading (1 1 10) hex (10 4 12 0 11 5 13 1) (10 10 60) simpleGrading (1 1 10) hex (12 6 14 0 13 7 15 1) (10 10 60) simpleGrading (1 1 10) hex (14 8 16 0 15 9 17 1) (10 10 60) simpleGrading (1 1 10) hex (18 26 10 2 19 27 11 3) (10 20 60) simpleGrading (1 1 10) hex (26 20 4 10 27 21 5 11) (10 20 60) simpleGrading (1 1 10) hex (20 28 12 4 21 29 13 5) (10 20 60) simpleGrading (1 1 10) hex (28 22 6 12 29 23 7 13) (10 20 60) simpleGrading (1 1 10) hex (22 30 14 6 23 31 15 7) (10 20 60) simpleGrading (1 1 10) hex (30 24 8 14 31 25 9 15) (10 20 60) simpleGrading (1 1 10) hex (24 32 16 8 25 33 17 9) (10 20 60) simpleGrading (1 1 10) hex (32 18 2 16 33 19 3 17) (10 20 60) simpleGrading (1 1 10) hex (34 42 26 18 35 43 27 19) (10 20 60) simpleGrading (1 1 10) hex (42 36 20 26 43 37 21 27) (10 20 60) simpleGrading (1 1 10) hex (36 44 28 20 37 45 29 21) (10 20 60) simpleGrading (1 1 10) hex (44 38 22 28 45 39 23 29) (10 20 60) simpleGrading (1 1 10) hex (38 46 30 22 39 47 31 23) (10 20 60) simpleGrading (1 1 10) hex (46 40 24 30 47 41 25 31) (10 20 60) simpleGrading (1 1 10) hex (40 48 32 24 41 49 33 25) (10 20 60) simpleGrading (1 1 10) hex (48 34 18 32 49 35 19 33) (10 20 60) simpleGrading (1 1 10) ); edges ( arc 2 10 (0 -11 4) arc 3 11 (160 -11 4) arc 16 2 (0 -11 -4) arc 17 3 (160 -11 -4) arc 10 4 (0 -4 11) arc 11 5 (160 -4 11) arc 4 12 (0 4 11) arc 5 13 (160 4 11) arc 12 6 (0 11 4) arc 13 7 (160 11 4) arc 6 14 (0 11 -4) arc 7 15 (160 11 -4) arc 14 8 (0 4 -11) arc 15 9 (160 4 -11) arc 8 16 (0 -4 -11) arc 9 17 (160 -4 -11) arc 18 26 (0 -27.716 11.481 ) arc 19 27 (160 -27.716 11.481 ) arc 26 20 (0 -11.481 27.716 ) arc 27 21 (160 -11.481 27.716 ) arc 20 28 (0 11.481 27.716 ) arc 21 29 (160 11.481 27.716 ) arc 28 22 (0 27.716 11.481 ) arc 29 23 (160 27.716 11.481 ) arc 22 30 (0 27.716 -11.481 ) arc 23 31 (160 27.716 -11.481 ) arc 30 24 (0 11.481 -27.716 ) arc 31 25 (160 11.481 -27.716 ) arc 24 32 (0 -11.481 -27.716 ) arc 25 33 (160 -11.481 -27.716 ) arc 32 18 (0 -27.716 -11.481 ) arc 33 19 (160 -27.716 -11.481 ) ); );``` Last edited by Rider; April 10, 2012 at 10:43.

 April 11, 2012, 06:34 #14 Senior Member   Join Date: Apr 2010 Posts: 151 Rep Power: 8 One thing you have forgotten is to specify the patches. Please post your warning messages, so we can help you.

 April 11, 2012, 10:19 #15 Member   Join Date: Apr 2012 Location: France Posts: 72 Rep Power: 6 With the patches, the warning messages are so long ... My complete blockMeshDict is the next : Code: ```FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 -0 0 ) (160 -0 0 ) (0 -12.5 0 ) (160 -12.5 0 ) (0 -0 12.5 ) (160 -0 12.5 ) (0 12.5 0 ) (160 12.5 0 ) (0 -0 -12.5 ) (160 -0 -12.5 ) (0 -8 8 ) (160 -8 8 ) (0 8 8 ) (160 8 8 ) (0 8 -8 ) (160 8 -8 ) (0 -8 -8 ) (160 -8 -8 ) (0 -30 0 ) (160 -30 0 ) (0 -0 30 ) (160 -0 30 ) (0 30 0 ) (160 30 0 ) (0 -0 -30 ) (160 -0 -30 ) (0 -21.213 21.213 ) (160 -21.213 21.213 ) (0 21.213 21.213 ) (160 21.213 21.213 ) (0 21.213 -21.213 ) (160 21.213 -21.213 ) (0 -21.213 -21.213 ) (160 -21.213 -21.213 ) (0 -50 0 ) (160 -50 0 ) (0 -0 50 ) (160 -0 50 ) (0 50 0 ) (160 50 0 ) (0 -0 -50 ) (160 -0 -50 ) (0 -50 50 ) (160 -50 50 ) (0 50 50 ) (160 50 50 ) (0 50 -50 ) (160 50 -50 ) (0 -50 -50 ) (160 -50 -50 ) ); blocks ( hex (2 10 0 16 3 11 1 17) (10 10 60) simpleGrading (1 1 10) hex (10 4 12 0 11 5 13 1) (10 10 60) simpleGrading (1 1 10) hex (12 6 14 0 13 7 15 1) (10 10 60) simpleGrading (1 1 10) hex (14 8 16 0 15 9 17 1) (10 10 60) simpleGrading (1 1 10) hex (18 26 10 2 19 27 11 3) (10 20 60) simpleGrading (1 1 10) hex (26 20 4 10 27 21 5 11) (10 20 60) simpleGrading (1 1 10) hex (20 28 12 4 21 29 13 5) (10 20 60) simpleGrading (1 1 10) hex (28 22 6 12 29 23 7 13) (10 20 60) simpleGrading (1 1 10) hex (22 30 14 6 23 31 15 7) (10 20 60) simpleGrading (1 1 10) hex (30 24 8 14 31 25 9 15) (10 20 60) simpleGrading (1 1 10) hex (24 32 16 8 25 33 17 9) (10 20 60) simpleGrading (1 1 10) hex (32 18 2 16 33 19 3 17) (10 20 60) simpleGrading (1 1 10) hex (34 42 26 18 35 43 27 19) (10 20 60) simpleGrading (1 1 10) hex (42 36 20 26 43 37 21 27) (10 20 60) simpleGrading (1 1 10) hex (36 44 28 20 37 45 29 21) (10 20 60) simpleGrading (1 1 10) hex (44 38 22 28 45 39 23 29) (10 20 60) simpleGrading (1 1 10) hex (38 46 30 22 39 47 31 23) (10 20 60) simpleGrading (1 1 10) hex (46 40 24 30 47 41 25 31) (10 20 60) simpleGrading (1 1 10) hex (40 48 32 24 41 49 33 25) (10 20 60) simpleGrading (1 1 10) hex (48 34 18 32 49 35 19 33) (10 20 60) simpleGrading (1 1 10) ); edges ( arc 2 10 (0 -11 4) arc 3 11 (160 -11 4) arc 16 2 (0 -11 -4) arc 17 3 (160 -11 -4) arc 10 4 (0 -4 11) arc 11 5 (160 -4 11) arc 4 12 (0 4 11) arc 5 13 (160 4 11) arc 12 6 (0 11 4) arc 13 7 (160 11 4) arc 6 14 (0 11 -4) arc 7 15 (160 11 -4) arc 14 8 (0 4 -11) arc 15 9 (160 4 -11) arc 8 16 (0 -4 -11) arc 9 17 (160 -4 -11) arc 18 26 (0 -27.716 11.481 ) arc 19 27 (160 -27.716 11.481 ) arc 26 20 (0 -11.481 27.716 ) arc 27 21 (160 -11.481 27.716 ) arc 20 28 (0 11.481 27.716 ) arc 21 29 (160 11.481 27.716 ) arc 28 22 (0 27.716 11.481 ) arc 29 23 (160 27.716 11.481 ) arc 22 30 (0 27.716 -11.481 ) arc 23 31 (160 27.716 -11.481 ) arc 30 24 (0 11.481 -27.716 ) arc 31 25 (160 11.481 -27.716 ) arc 24 32 (0 -11.481 -27.716 ) arc 25 33 (160 -11.481 -27.716 ) arc 32 18 (0 -27.716 -11.481 ) arc 33 19 (160 -27.716 -11.481 ) ); boundary ( inlet { type patch; faces ( (0 16 2 10) (0 10 4 12) (0 12 6 14) (0 14 8 16) (2 18 26 10) (10 26 20 4) (4 20 28 12) (12 28 22 6) (6 22 30 14) (14 30 24 8) (8 24 32 16) (16 32 18 2) (2 18 26 10) (26 42 36 20) (20 36 44 28) (28 44 38 22) (22 38 46 30) (30 46 40 24) (24 40 48 32) (32 48 34 18) ); } outlet { type patch; faces ( (1 17 3 11) (1 11 5 13) (1 13 7 15) (1 15 9 17) (3 19 27 11) (11 27 21 5) (5 21 29 13) (13 29 23 7) (7 23 31 15) (15 31 25 9) (9 25 33 17) (17 33 19 3) (3 19 27 11) (27 43 37 21) (21 37 45 29) (29 45 39 23) (23 39 47 31) (31 47 41 25) (25 41 49 33) (33 49 35 19) ); } bordure { type patch; faces ( (49 35 34 48) (35 43 42 34) (44 45 39 38) (38 39 47 46) (42 43 37 36) (36 37 45 44) (49 48 40 41) (41 40 46 47) ); } );``` Thanks for your help !

April 11, 2012, 10:57
#16
Senior Member

Join Date: Apr 2010
Posts: 151
Rep Power: 8
You had the a series of warnings like
Code:
```--> FOAM Warning :
From function cellModel::mag(const labelList&, const pointField&)
in file meshes/meshShapes/cellModel/cellModel.C at line 128
zero or negative pyramid volume: -24848.1 for face 5```
This is because the order of the nodes in the blocks matters. I corrected the blockMeshDict lines 69-88. there is still something wrong with the patches, though.
Attached Files
 blockMeshDict.txt (6.4 KB, 13 views)

 April 12, 2012, 03:00 #17 Member   Join Date: Apr 2012 Location: France Posts: 72 Rep Power: 6 Thanks. Edit : It's good

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post risku9 ANSYS Meshing & Geometry 3 October 20, 2010 11:21 jufri Phoenics 2 October 12, 2005 02:34

All times are GMT -4. The time now is 15:30.

 Contact Us - CFD Online - Top