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] blockMesh - Curved surface - 3D - edge grading (https://www.cfd-online.com/Forums/openfoam-meshing/251195-blockmesh-curved-surface-3d-edge-grading.html)

dasith0001 August 1, 2023 22:21

blockMesh - Curved surface - 3D - edge grading
 
1 Attachment(s)
Hi Foamers,

I am attempting to get to perfect mesh using blockMesh. my geometry has a curved channel, please see the figure.

So far the mesh is error free but checkMesh complains over high orthogonal cells. Theses cells are located along the y-axis, at the very edge of the curved channel ( along the curved line towards the end of top right).

I've tried edge grading to make those cells bigger as possible which seems to solve the problem but I am losing the smoothness of the curve.

I've attached the blockMesh file as well.

PHP Code:

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

scale   1;

upperLevel 0.1;
blockBx 10;
blockBz 100;


vertices
(

(    
0.302195033    -0.039764330    0.053750000    )    //    0 A
(    0.321082223    -0.042249600    0.053750000    )    //    1
(    0.3324025    -0.032730084    0.053750000    )    //    2
(    0.303333079    -0.029867757    0.053750000    )    //    3

(    0.302195033    -0.039764330    $upperLevel    )    //    4
(    0.321082223    -0.042249600    $upperLevel    )    //    5
(    0.3324025    -0.032730084    $upperLevel    )    //    6
(    0.303333079    -0.029867757    $upperLevel    )    //    7

(    0.303333079    -0.029867757    0.053750000    )    //    8 B
(    0.332402500    -0.032730084    0.053750000    )    //    9
(    0.334010000     0.000000000    0.053750000    )    //    10
(    0.304800000     0.000000000    0.053750000    )    //    11

(    0.303333079    -0.029867757    $upperLevel    )    //    12 
(    0.332402500    -0.032730084    $upperLevel    )    //    13
(    0.334010000     0.000000000    $upperLevel    )    //    14
(    0.304800000     0.000000000    $upperLevel    )    //    15

(    0.331155391    0.043575078    0.053750000    )    //    16 C
(    0.302195033    0.039764330    0.053750000    )    //    17
(    0.331155391    0.043575078    $upperLevel    )    //    18
(    0.302195033    0.039764330    $upperLevel    )    //    19


);

edges
(

arc    3    0        (    0.302804490     -0.034820693     0.05375    )    // A
arc    2    1        (    0.322635444     -0.0367596656     0.05375    )    //
arc    7    4        (    0.302804490     -0.034820693     $upperLevel    )    //
arc    6    5        (    0.322635444     -0.0367596656     $upperLevel    )    //

arc    11    8        (    0.304433049    -0.014951879    0.05375        )    //
arc    10    9        (    0.333607883    -0.016384768    0.05375        )    //
arc    15    12        (    0.304433049    -0.014951879    $upperLevel    )    //
arc    14    13        (    0.333607883    -0.016384768    $upperLevel    )    //

arc    17    11        (    0.304148061    0.019924782    0.05375        )    //
arc    16    10        (    0.333295584    0.02183424    0.05375        )    //
arc    19    15        (    0.304148061    0.019924782    $upperLevel    )    //
arc    18    14        (    0.333295584    0.02183424    $upperLevel    )    //


);


blocks
(
    
//hex (0 1 2 3 4 5 6 7) (20 20 100) edgeGrading (0.1 10 10 0.1 1 50 50 1 1 1 1 1) // - A
    
hex (0 1 2 3 4 5 6 7) (20 20 100edgeGrading (1 10 10 1 1 50 50 1 1 1 1 1// - A

    
hex (8 9 10 11 12 13 14 15) ($blockBx 20 $blockBzsimpleGrading (1 1 1// (x y z) // 1 - B

    
hex (11 10 16 17 15 14 18 19) ($blockBx 30 $blockBzsimpleGrading (1 1 1// (x y z) // 1 - C

);    


boundary
(

    
front
    
{
        
type symmetry;
        
faces
        
(
        (
0 1 5 4)
        
        );
    }

    
back
    
{
        
type symmetry;
        
faces
        
(
        (
18 16 17 19)  
        );
    }

    
minZ
    
{
        
type patch;
        
faces
        
(
        (
0 3 2 1)
        (
8 11 10 9)
        (
11 17 16 10)     
        );
    }

    
maxZ
    
{
        
type patch;
        
faces
        
(
        (
4 5 6 7)
        (
12 13 14 15)
        (
15 14 18 19)    
        );
    }

    
axis
    
{
        
type wall;
        
faces
        
(
        (
0 4 7 3)
        (
8 12 15 11)
        (
11 15 19 17)    
        );
    }

    
maxY
    
{
        
type wall;
        
faces
        
(
   
        );
    }

    
interWall
    
{
        
type wall;
        
faces
        
(
        (
1 2 6 5)    
        );
    }

    
masterA1
    
{
        
type wall;
        
faces
        
(
        (
2 3 7 6)   
        );
    }

    
slaveB1
    
{
        
type wall;
        
faces
        
(
        (
9 8 12 13)    
        );
    }


);

mergePatchPairs
(
            (
masterA1 slaveB1)

);

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

What can I do to improve the mesh if I want to stick with blockMesh. ( which I really do).
Or do I have to say good buy to my good old friend (blockMesh) and turned into snappy ?

your thoughts on this highly appreciated.
Thank you

PS: my mesh could be fine as it is but I am always too sceptical about it.

LuckyTran August 1, 2023 23:40

1 Attachment(s)
snappy is not that scary. But the key to blockMesh is understanding that you need a topology change. You have a 3-way singularity meeting on a surface. You need to relieve the grid stress and allow that singularity to occur inside the domain to improve the orthogonal quality. Still, it is quite cumbersome to define all the edges in blockMesh and snappy can save you a lot of time.

dasith0001 August 2, 2023 02:16

Hi,

Thank you for the quick reply. Sorry I forgot to mention, apart from my personal preference, 99% of the time, I'm dealing with 2D geometry unlike this example. And as you know, Snappy meshes in 3D which I really do not need to.

Quote:

Originally Posted by LuckyTran (Post 854515)
You need to relieve the grid stress and allow that singularity to occur inside the domain to improve the orthogonal quality.

Could you please elaborate on the quoted, I understand that I have multiple points with the same coordinates, should I shift the overlapping points into the mesh ? Or did I understand this completely wrong ?

Thank you
Dasith


All times are GMT -4. The time now is 03:51.