CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] vertical, horizontal and dend cylinder (https://www.cfd-online.com/Forums/openfoam-meshing/144311-vertical-horizontal-dend-cylinder.html)

YellowSimulator November 12, 2014 04:55

vertical, horizontal and dend cylinder
 
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

cutter November 12, 2014 16:29

2 Attachment(s)
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

cutter December 19, 2014 10:59

Section 2.4.1. (Mesh Generation) of http://www.tfd.chalmers.se/~hani/kur...oam_report.pdf

YellowSimulator December 21, 2014 06:03

Thank you
 
Hi Cutter
Thank you for your last post.

YellowSimulator December 21, 2014 07:15

blockMesh
 
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 December 21, 2014 07:32

arc
 
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

cutter December 22, 2014 10:54

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 December 22, 2014 11:18

1 Attachment(s)
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

cutter December 22, 2014 11:28

1 Attachment(s)
BTW: you can display the block mesh using the command paraFoam -block.

YellowSimulator December 23, 2014 05:40

Thank you
 
Hi Cutter
Thank you very much for the info. I will try now to build my cylinder.
Merry xmast and happy new year.

YellowSimulator December 23, 2014 06:11

interpolation point
 
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

cutter December 23, 2014 06:54

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.


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