|
[Sponsors] |
[blockMesh] defining and connecting two circular pipes using blockMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 29, 2013, 11:42 |
defining and connecting two circular pipes using blockMesh
|
#1 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
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 |
|
July 29, 2013, 18:22 |
|
#2 |
Member
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17 |
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 ( ); // ************************************************** *********************** / 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 case are quite general with pipes of radius 1 and small curve radius to 1 too (you may need to not have this curve). Last edited by Yosmcer; July 30, 2013 at 05:48. |
|
July 30, 2013, 06:43 |
|
#3 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Thank you very much Yosmcer. It was a great help Would you please tell me how you calculated the arc midpionts?
|
|
July 30, 2013, 11:52 |
|
#4 |
Member
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17 |
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. |
|
July 31, 2013, 08:10 |
|
#5 |
Member
Hale
Join Date: May 2013
Posts: 53
Rep Power: 13 |
Thanks you very much for the explanation.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
defining cells where connecting to one node | Asghari | FLUENT | 0 | July 11, 2006 10:36 |