# cubic mesh

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

June 7, 2012, 05:04
cubic mesh
#1
New Member

solOF
Join Date: Mar 2012
Posts: 26
Rep Power: 7
Hi,

I'm trying to mesh a sphere with blockMesh. I would like to have a mesh with hexahedral cells, so the solution of my problem is to construct a cubic sphere.

I found in many papers that many users of OpenFOAM employ this kind of mesh configuration. However, I don't know how to construct this mesh in my sphere using blockMesh. Could you help me, please?

Thanks!!!

In the following link you'll find an image of a cubic sphere.

Attached Images
 Screen shot 2012-06-07 at 10.54.07 AM.png (48.4 KB, 7 views)

 June 7, 2012, 05:34 #2 Senior Member   Join Date: Mar 2011 Posts: 174 Rep Power: 8 If you understand how to do it for a cylinder (for some ideas and the main concept check the web page below) http://www.cfd-online.com/Forums/ope...nder-mesh.html then you can also do it for a sphere. Just replace the middle rectangle with a cube and the rest of the parts with their 3D equivalent.

 June 8, 2012, 05:48 #3 New Member   solOF Join Date: Mar 2012 Posts: 26 Rep Power: 7 Thank you. Now the problem is that I don't know how to define a spherical element in 3D. It means: I can define two arcs for the front and back surfaces, however I cannot join such surfaces with an arc as well, since In blockMesh you cannot define the union of these elements. Any suggestion? Thank you

June 8, 2012, 06:52
#4
Senior Member

Join Date: Mar 2011
Posts: 174
Rep Power: 8
Quote:
 Thank you. Now the problem is that I don't know how to define a spherical element in 3D. It means: I can define two arcs for the front and back surfaces, however I cannot join such surfaces with an arc as well, since In blockMesh you cannot define the union of these elements. Any suggestion?
I am not sure I understand what you mean. Which are the front and back surfaces that you mention? What union must take place? It would be best to show your difficulties in a figure, with letters on the surfaces or some other way to describe it.

In order to construct this, I would
- build a cube
- build other similar cubes attached on each of its faces
- adjust the dimensions of the outer cubes (--> hexahedrals) so that their outer vertices are on the sphere radius and they touch each other (you should have a large hexahedral at this point)
- convert the outer edges to arcs and you are finished. The 3D outer elements should be similar to 1/6th of a sphere (well, minus the middle cube).

Alternatively, you can try SALOME to make your mesh.

 June 10, 2012, 07:03 #5 New Member   solOF Join Date: Mar 2012 Posts: 26 Rep Power: 7 Thank you. What I mean is that if I have an hexahedron, i define: 1) points 1,2,3,4,5,6,7,8 (the front face is composed by 1 2 3 4 and the back by 5 6 7 8) 2)surface hex(1 2 3 4 5 6 7 8) If I have a 3D curvilinear surface between points 3,4, 5 and 6 I can define an arc on the front surface and on the back surface in the following way: arc (3 4) arc(5 6) But how can I define the arc between 4,5 and between 3 6? If I define arc(4 5) arc(3 6) blockMesh is not working.... Thanks!

 June 10, 2012, 07:05 #6 Senior Member   Join Date: Mar 2011 Posts: 174 Rep Power: 8 Could you please post your blockMeshDict so far? The one that is not working. I can check this for you but I can not start from zero.

 June 11, 2012, 05:39 #7 New Member   solOF Join Date: Mar 2012 Posts: 26 Rep Power: 7 It seems that I did something wrong, but now everything is working. Thank you for your help!

 June 11, 2012, 08:24 #8 New Member   solOF Join Date: Mar 2012 Posts: 26 Rep Power: 7 Hi, I'm using blockMesh and I have a problem with the connectivities of my mesh. I've defined 2 different dominies but paraFoam seems not to properly connect them. Could you help me with this error please? This is my blockMeshDict vertices ( (-7.2175 -7.2175 7.2175) //point 0 (7.2175 -7.2175 7.2175) //point 1 (7.2175 7.2175 7.2175) //point 2 (-7.2175 7.2175 7.2175) //point 3 (-36.0875 -36.0875 36.0875)//point 4 (36.0875 -36.0875 36.0875)//point 5 (36.0875 36.0875 36.0875)//point6 (-36.0875 36.0875 36.0875)//point7 (-72.1750 -72.1750 72.1750) //point 8 (72.1750 -72.1750 72.1750) //point 9 (72.1750 72.1750 72.1750) //point 10 (-72.1750 72.1750 72.1750) //point 11 (-8.8387 -8.8387 0) //point 12 (8.8387 -8.8387 0) //point13 (-44.1937 -44.1937 0) //point14 (44.1937 -44.1937 0) //point15 (-88.3875 -88.3875 0)//point 16 (88.3875 -88.3875 0)//Point 17 ); blocks ( hex (0 1 2 3 4 5 6 7) (10 10 20) simpleGrading (1 1 1) //Block 0 hex (4 5 6 7 8 9 10 11) (10 10 10) simpleGrading (1 1 1) //Block 1 hex (0 1 13 12 4 5 15 14) (10 10 20) simpleGrading (1 1 1) //Block 2 hex (4 5 15 14 8 9 17 16) (10 10 10) simpleGrading (1 1 1) //Block 3 );

 June 11, 2012, 08:44 #9 Senior Member   Join Date: Mar 2011 Posts: 174 Rep Power: 8 You should always pay attention to the warning messages of OpenFOAM. One of your volumes is defined inside-out (therefore it appears black in paraFoam). The corresponding sequence of vertex numbers in the hex block declaration is in the wrong order. Please check the manual :-)

 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 everest ANSYS Meshing & Geometry 44 April 14, 2016 06:41 Ladnam OpenFOAM 0 September 14, 2011 06:30 sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11 arya CFX 4 June 19, 2007 12:21 Mignard FLUENT 2 March 22, 2000 06:12