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] Trouble using blockMesh for axisymmetric geometry (https://www.cfd-online.com/Forums/openfoam-meshing/166399-trouble-using-blockmesh-axisymmetric-geometry.html)

twinturbotom February 8, 2016 20:41

Trouble using blockMesh for axisymmetric geometry
 
3 Attachment(s)
All,
I'm having trouble using blockMesh for a simple axisymetric geometry. I have collapsed two edges per User Guide 5.3.3. I also rotated the geometry to straddle the XY plane. I am unable to generate a single cell thickness as shown in the image. Please note the angle here is set to 45 degrees for easy viewing, the issue shows up when a small angle is used (<5 degrees).

I am able to create an axisymmetric mesh using the Main ContribEample. However, my geometry should be along X and I prefer the vertex numbering from the user manual.

Where am I going wrong here? I am obviously missing something important when collapsing edges for an axisymmetric blockMesh.

Thanks!


Code:

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

convertToMeters 1;
 
vertices
(

    (0 0 0)
    (1.1 0 0)
    (1.1 0.095 -0.095)
    (0 0.095 -0.095)
    (0 0.095 0.095)
    (1.1 0.095 0.095)

);
 
blocks
(
hex (0 1 2 3 4 5 5 4) (20 10 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(

);

mergePatchPairs
(
);

// ************************************************************************* //


twinturbotom February 8, 2016 20:59

The issue is in the vertex numbering which influences the local coordinate system used by blockMesh.

The vertex numbers should be changed such that x3 (referenced below) of the local coordinate system is in the direction of the unit cell and not as shown in the user manual 5.3.3.



Code:

The local coordinate system is defined by the order in which the vertices are presented in the block definition according to:

the axis origin is the first entry in the block definition, vertex 0 in our example;
the x1 direction is described by moving from vertex 0 to vertex 1;
the x2 direction is described by moving from vertex 1 to vertex 2;
vertices 0, 1, 2, 3 define the plane x3 = 0;
vertex 4 is found by moving from vertex 0 in the x3 direction;
vertices 5,6 and 7 are similarly found by moving in the x3 direction from vertices 1,2 and 3 respectively.

Code:

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

convertToMeters 1;
 
vertices
(

    (0 0 0)
    (1.1 0 0)
    (1.1 0.095 -0.09499999999999999)
    (0 0.095 -0.09499999999999999)
    (0 0.095 0.09499999999999999)
    (1.1 0.095 0.09499999999999999)

);
 
blocks
(
hex (0 4 3 0 1 5 2 1) (20 1 40) simpleGrading (1 1 1)
);

edges
(
);

boundary
(

);

mergePatchPairs
(
);

// ************************************************************************* //



All times are GMT -4. The time now is 16:53.