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

[blockMesh] vertical, horizontal and dend cylinder

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

Like Tree5Likes
  • 2 Post By cutter
  • 2 Post By cutter
  • 1 Post By cutter

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2014, 05:55
Default vertical, horizontal and dend cylinder
  #1
New Member
 
Yapi
Join Date: Oct 2014
Location: Norway
Posts: 7
Rep Power: 11
YellowSimulator is on a distinguished road
Hello every one. Could some one tell me how to find a tutorial on constructing a vertical, horizontal, and bend cylinder (pipe) in blockMesh?

I am new to OpenFoam and I have been trying to find a good tutorial on the matter but with little success.

Thank you for your help.

Yapi
YellowSimulator is offline   Reply With Quote

Old   November 12, 2014, 17:29
Default
  #2
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
Hi and welcome to the Forums!

The basic usage of block mesh is explained at http://www.openfoam.org/docs/user/blockMesh.php. This should give you all necessary infos on how to create blocks and curved edges for the cylinder meshes, just like this one: http://www.asergeev.com/files/qatar/...urant/mesh.jpg. Make sure to get the ordering of the nodes and the coordinate system right! Start with the inner block, add the outer blocks in incremental steps (structure like in the images below).

Please try to understand the basics first, you may then have a look at the m4 script from http://www.cfd-online.com/Forums/ope...nder-mesh.html.

In my opinion you should consider other meshers for the pipe. Please have a look at snappyHexMesh, cfMesh (cartesianMesh) and Salome. There are many others out there!

Feel free to ask if you need more directions!

Good luck!
Cutter
Attached Images
File Type: jpg cylinder1.jpg (16.5 KB, 672 views)
File Type: jpg cylinder2.jpg (22.3 KB, 879 views)
mizzou and anup5barve like this.
cutter is offline   Reply With Quote

Old   December 19, 2014, 11:59
Default
  #3
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
Section 2.4.1. (Mesh Generation) of http://www.tfd.chalmers.se/~hani/kur...oam_report.pdf
hnsxmh and arezayan87 like this.
cutter is offline   Reply With Quote

Old   December 21, 2014, 07:03
Default Thank you
  #4
New Member
 
Yapi
Join Date: Oct 2014
Location: Norway
Posts: 7
Rep Power: 11
YellowSimulator is on a distinguished road
Hi Cutter
Thank you for your last post.
YellowSimulator is offline   Reply With Quote

Old   December 21, 2014, 08:15
Default blockMesh
  #5
New Member
 
Yapi
Join Date: Oct 2014
Location: Norway
Posts: 7
Rep Power: 11
YellowSimulator is on a distinguished road
Hi Cutter
I have a bit of confusion from the tutorial http://www.openfoam.org/docs/user/bl...hp#x25-1420175

The coordinate of vertices 1 is (1,0,0.1) but this vertices lies in the plane x3 = 0
so shouldt the x3 coordinate be 0 rather than 0.1?

The coordinate of vertices 4 is (-0.1,-0.1,1) but shouldt it be (0,0,1) since it lies entirely on the x3 axis.

Could you help me with the explanation?

Best regards

Yapi
YellowSimulator is offline   Reply With Quote

Old   December 21, 2014, 08:32
Default arc
  #6
New Member
 
Yapi
Join Date: Oct 2014
Location: Norway
Posts: 7
Rep Power: 11
YellowSimulator is on a distinguished road
Hi again
I am also a bit confuse on how to specify an arc between two vertices by using a single interpolation point. for example in the tutorial vertices 1 with coordinate
(1,0,0.1) and vertice 5 with coordinate (1.3,0,1.2) are joined by an arc.

to specify this you do : arc 1 5 ( interpolation point her!!! ). How do you find these interpolation point? is is by interpolating the coordinates of the points?
in this case we should have :

arc 1 5 ( (1+1.3)/2, (0+0)/2, (0.1+1.2)/2 ) but this does not give the same result as in the tutorial.

Could you help me with that?

Thank again

Yapi
YellowSimulator is offline   Reply With Quote

Old   December 22, 2014, 11:54
Default
  #7
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
Hi,

regarding your first post (post #5):

I think the image is not directly related to the example below. The main point of the sketch is the usage the correct node order ("Each block has a local coordinate system that must be right-handed."). First specify the bottom nodes of the hexa block and then the top nodes of the hexa block (counterclockwise, when viewing from above).

Cutter
cutter is offline   Reply With Quote

Old   December 22, 2014, 12:18
Default
  #8
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
Hi again,

regarding your second post (post #6):

The arc keyword is used to define a cricular arc (see table 5.5). A circular arc is identified uniquely by a set of three non-linear, non-coincident points: the starting point of the edge, an arbitrary interpolation point of the circular arc and the end point of the edge. Hope that helps.

The faces of the hexa that is build in the documentation sample are not parallel, it's a somewhat strange - but valid - object. This is the reason for the weird coordinates in the sample and for your problems understanding the correct usage. Have a look at the attached screenshot (note: I changed the interpolation point to (1.01 0.0 0.5) in order to improve the the visibility of the arc)!

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

convertToMeters 1;

    vertices
    (
        ( 0    0    0  )    // vertex number 0
        ( 1    0    0.1)    // vertex number 1
        ( 1.1  1    0.1)    // vertex number 2
        ( 0    1    0.1)    // vertex number 3
        (-0.1 -0.1  1  )    // vertex number 4
        ( 1.3  0    1.2)    // vertex number 5
        ( 1.4  1.1  1.3)    // vertex number 6
        ( 0    1    1.1)    // vertex number 7
    ); 


    edges
    (
        arc 1 5 (1.01 0.0 0.5)
    );


    blocks
    (
        hex (0 1 2 3 4 5 6 7)    // vertex numbers
        (10 10 10)               // numbers of cells in each direction
        simpleGrading (1 2 3)    // cell expansion ratios
    );


  boundary               // keyword
    (
    //     inlet              // patch name
    //     {
    //         type patch;    // patch type for patch 0
    //         faces
    //         (
    //             (0 4 7 3); // block face in this patch
    //         );
    //     }                  // end of 0th patch definition

    //     outlet             // patch name
    //     {
    //         type patch;    // patch type for patch 1
    //         faces
    //         (
    //             (1 2 6 5)
    //         );
    //     }

    //     walls
    //     {
    //         type wall;
    //         faces
    //         (
    //             (0 1 5 4)
    //             (0 3 2 1)
    //             (3 7 6 2)
    //             (4 5 6 7)
    //         );
    //     }
    // left
    // {
    //     type            cyclic;
    //     neighbourPatch  right;
    //     faces           ((0 4 7 3));
    // }
    // right
    // {
    //     type            cyclic;
    //     neighbourPatch  left;
    //     faces           ((1 5 6 2));
    // }
    );

//mergePatchPairs ();
Good luck!
Cutter
Attached Images
File Type: jpg blockMesh_doc.jpg (12.6 KB, 394 views)
mizzou likes this.
cutter is offline   Reply With Quote

Old   December 22, 2014, 12:28
Default
  #9
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
BTW: you can display the block mesh using the command paraFoam -block.
Attached Images
File Type: jpg paraFoam_blocks.jpg (33.9 KB, 183 views)
cutter is offline   Reply With Quote

Old   December 23, 2014, 06:40
Default Thank you
  #10
New Member
 
Yapi
Join Date: Oct 2014
Location: Norway
Posts: 7
Rep Power: 11
YellowSimulator is on a distinguished road
Hi Cutter
Thank you very much for the info. I will try now to build my cylinder.
Merry xmast and happy new year.
YellowSimulator is offline   Reply With Quote

Old   December 23, 2014, 07:11
Default interpolation point
  #11
New Member
 
Yapi
Join Date: Oct 2014
Location: Norway
Posts: 7
Rep Power: 11
YellowSimulator is on a distinguished road
Hi Cutter
I forgot to ask you one thing.
how do you find the coordinate of the linear interpolation point ?
for example in your example: We wanted to have an arc between vertices 1 and 5

so we do : arc 1 5 (x1,y1,z1 ) where x1 , y1 and z1 are the coordinate of the interpolation point between vertices 1 and 5.

My question is: How do we find x1, y1 and z1?
My guess is we should find x1, y1 and z1 such that the interpolation point lies on the arc between 1 and 5. Is that correct?

Thank you again.

Yapi
YellowSimulator is offline   Reply With Quote

Old   December 23, 2014, 07:54
Default
  #12
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
Quote:
My guess is we should find x1, y1 and z1 such that the interpolation point lies on the arc between 1 and 5. Is that correct?
Yes, exactly.
cutter is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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



All times are GMT -4. The time now is 22:01.