CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] defining and connecting two circular pipes using blockMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Yosmcer
  • 2 Post By Yosmcer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2013, 11:42
Default defining and connecting two circular pipes using blockMesh
  #1
Member
 
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13
Hale is on a distinguished road
Hi,

I'm having trouble in defining two circular pipes that are connected with an angle of 90 degrees using blockMesh.

Is there any tutorials or any example that shows how to define such a L-shaped circular pipe in openfoam?

thanks alot
Hale is offline   Reply With Quote

Old   July 29, 2013, 18:22
Default
  #2
Member
 
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17
Yosmcer will become famous soon enough
You can make this with a block and some edges.
Here are two examples I just made. You can copy it and adapt to your needs:

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

convertToMeters 1;

vertices
(
(0 1.292893219 0.707106781)//0
(0 2.707106781 0.707106781)//1
(0 2.707106781 -0.707106781)//2
(0 1.292893219 -0.707106781)//3
(2.707106781 0 0.707106781)//4
(1.292893219 0 0.707106781)//5
(1.292893219 0 -0.707106781)//6
(2.707106781 0 -0.707106781)//7
);

blocks
(
hex (5 4 7 6 0 1 2 3) (50 50 50) simpleGrading (1 1 1)
);

edges
(
arc 0 1 (0 2 1)
arc 1 2 (0 3 0)
arc 2 3 (0 2 -1)
arc 3 0 (0 1 0)

arc 4 5 (2 0 1)
arc 5 6 (1 0 0)
arc 6 7 (2 0 -1)
arc 7 4 (3 0 0)

arc 0 5 (0.914213563 0.914213563 0.707106781)
arc 3 6 (0.914213563 0.914213563 -0.707106781)
arc 1 4 (1.914213562 1.914213562 0.707106781)
arc 2 7 (1.914213562 1.914213562 -0.707106781)
);

boundary
(

);

mergePatchPairs
(
);

// ************************************************** *********************** /
or

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

convertToMeters 1;

vertices
(
(0 1 0)//0
(0 2 1)//1
(0 3 0)//2
(0 2 -1)//3
(3 0 0)//4
(2 0 1)//5
(1 0 0)//6
(2 0 -1)//7
);

blocks
(
hex (5 4 7 6 1 2 3 0) (50 50 50) simpleGrading (1 1 1)
);

edges
(
arc 0 1 (0 1.292893219 0.707106781)
arc 1 2 (0 2.707106781 0.707106781)
arc 2 3 (0 2.707106781 -0.707106781)
arc 3 0 (0 1.292893219 -0.707106781)

arc 4 5 (2.707106781 0 0.707106781)
arc 5 6 (1.292893219 0 0.707106781)
arc 6 7 (1.292893219 0 -0.707106781)
arc 7 4 (2.707106781 0 -0.707106781)

arc 0 6 (0.707106781 0.707106781 0)
arc 1 5 (1.414213562 1.414213562 1)
arc 2 4 (2.121320344 2.121320344 0)
arc 3 7 (1.414213562 1.414213562 -1)
);

boundary
(

);

mergePatchPairs
(
);

// ************************************************** *********************** //
Theses two edge pipe are are quite similar, but depending of how you made the pipes you want to connect, you may prefer one way to the other.

Theses case are quite general with pipes of radius 1 and small curve radius to 1 too (you may need to not have this curve).
Attached Images
File Type: jpg img.jpg (21.8 KB, 156 views)
File Type: jpg img2.jpg (12.5 KB, 102 views)
File Type: jpg imgsec.jpg (22.1 KB, 125 views)
File Type: jpg imgsec2.jpg (14.2 KB, 109 views)
m.b. likes this.

Last edited by Yosmcer; July 30, 2013 at 05:48.
Yosmcer is offline   Reply With Quote

Old   July 30, 2013, 06:43
Default
  #3
Member
 
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13
Hale is on a distinguished road
Thank you very much Yosmcer. It was a great help Would you please tell me how you calculated the arc midpionts?
Hale is offline   Reply With Quote

Old   July 30, 2013, 11:52
Default
  #4
Member
 
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17
Yosmcer will become famous soon enough
I used the Pythagoras theorem with the simplified fact that the triangles were isosceles.

So basically, for a radius circle (hypotenuse) of 1, I have sqrt(2)/2.

For more general shapes, you can use trigonometry.

ramakant and m.b. like this.
Yosmcer is offline   Reply With Quote

Old   July 31, 2013, 08:10
Default
  #5
Member
 
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13
Hale is on a distinguished road
Thanks you very much for the explanation.
Hale is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
defining cells where connecting to one node Asghari FLUENT 0 July 11, 2006 10:36


All times are GMT -4. The time now is 04:13.