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

[blockMesh] refinement of mesh around a half-cylinder-using blockMesh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2013, 09:25
Default refinement of mesh around a half-cylinder-using blockMesh
  #1
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13
Mirage12 is on a distinguished road
i would like to refine the mesh around a half cylinder, that is why i used simpleGrading to refine the area near to the surface of the half-cylinder, in order to capture the boundary layer. however it is not working ...

here is my blockMeshDict :

Code:
// The OpenFOAM Project // File: blockMeshDict
  /*
  -------------------------------------------------------------------------------
   =========         | dictionary
   \\      /         |
    \\    /          | Name:   blockMeshDict
     \\  /           | Family: FoamX configuration file
      \\/            |
      F ield         | OpenFOAM version: 2.3
      O peration     | Product of Nabla Ltd.
      A and          |
      M anipulation  | author: Amine Abd.
  -------------------------------------------------------------------------------
  */
  // FoamX Case Dictionary.
  
  FoamFile
  {
      version         2.0;
      format          ascii;
  
      root            "";
      case            "";
      instance        "";
      local           "";
  
      class           dictionary;
      object          blockMeshDict;
  }
 
  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
  
 convertToMeters 1;
  
  vertices
  (

    (-0.5 0 0)//0
    (-0.353553 0.353553 0)//1
    (0 0.5 0)//2
    (24 0.5 0)//3
    (24 -0.5 0)//4
    (0 -0.5 0)//5
    (-0.353553 -0.353553 0)//6
    (-1 0 0)//7
    (-0.707107 0.707107 0)//8
    (0 1 0)//9
    (24 1 0)//10
    (24 -1 0)//11
    (0 -1 0)//12
    (-0.707107 -0.707107 0)//13
    (-8 0 0)//14
    (-8 0.707107 0)//15
    (-8 8 0)//16
    (-0.707107 8 0)//17
    (0 8 0)//18
    (24 8 0)//19
    (24 -8 0)//20
    (0 -8 0)//21
    (-0.707107 -8 0)//22
    (-8 -8 0)//23
    (-8 -0.707107 0)//24-------------
    (-0.5 0 0.1)//25
    (-0.353553 0.353553 0.1)//26
    (0 0.5 0.1)//27
    (24 0.5 0.1)//28
    (24 -0.5 0.1)//29
    (0 -0.5 0.1)//30
    (-0.353553 -0.353553 0.1)//31
    (-1 0 0.1)//32
    (-0.707107 0.707107 0.1)//33
    (0 1 0.1)//34
    (24 1 0.1)//35
    (24 -1 0.1)//36
    (0 -1 0.1)//37
    (-0.707107 -0.707107 0.1)//38
    (-8 0 0.1)//39
    (-8 0.707107 0.1)//40
    (-8 8 0.1)//41
    (-0.707107 8 0.1)//42
    (0 8 0.1)//43
    (24 8 0.1)//44
    (24 -8 0.1)//45
    (0 -8 0.1)//46
    (-0.707107 -8 0.1)//47
    (-8 -8 0.1)//48
    (-8 -0.707107 0.1)//49
    




  );
  
  blocks
  (


    hex (7 0 1 8 32 25 26 33) (50 50 1) simpleGrading (1 1 1)//1
    hex (8 1 2 9 33 26 27 34) (50 50 1) simpleGrading (1 1 1)//2
    hex (2 3 10 9 27 28 35 34) (200 50 1) simpleGrading (16469 1 1)//3
    hex (12 11 4 5 37 36 29 30) (200 50 1) simpleGrading (16469 1 1)//4
    hex (13 12 5 6 38 37 30 31) (50 50 1) simpleGrading (1 1 1)//5
    hex (13 6 0 7 38 31 25 32) (50 50 1) simpleGrading (1 1 1)//6
    hex (14 7 8 15 39 32 33 40) (50 50 1) simpleGrading (0.03 1 1)//7
    hex (15 8 17 16 40 33 42 41) (50 80 1) simpleGrading (0.03 20 1)//8
    hex (8 9  18 17 33 34 43 42) (50 80 1) simpleGrading (1 20 1)//9
    hex (9 10 19 18 34 35 44 43) (200 80 1) simpleGrading (16469 20 1)//10
    hex (21 20 11 12 46 45 36 37) (200 50 1) simpleGrading (16469 0.05 1)//11
    hex (22 21 12 13 47 46 37 38) (50 50 1) simpleGrading (1 0.05 1)//12
    hex (23 22 13 24 48 47 38 49) (50 50 1) simpleGrading (0.03 0.05 1)//13
    hex (24 13 7 14 49 38 32 39) (50 50 1) simpleGrading (0.03 1 1)//14
    hex (5 4 3 2 30 29 28 27) (200 200 1) simpleGrading (16469 1 1)//15

  );
  
  edges

  (
    arc 5 6 (-0.17101 -0.469846 0)
    arc 6 0 (-0.469846 -0.17101 0)
    arc 0 1 (-0.469846 0.17101 0)
    arc 1 2 (-0.17101 0.469846 0)
    arc 9 8 (-0.34202 0.939693 0)
    arc 8 7 (-0.939693 0.34202 0)
    arc 7 13 (-0.939693 -0.34202 0)
    arc 13 12 (-0.34202 -0.939693 0)//----
    arc 30 31 (-0.17101 -0.469846 0.1)
    arc 31 25 (-0.469846 -0.17101 0.1)
        arc 25 26 (-0.469846 0.17101 0.1)
    arc 26 27 (-0.17101 0.469846 0.1)
    arc 34 33 (-0.34202 0.939693 0.1)
    arc 33 32 (-0.939693 0.34202 0.1)
    arc 32 38 (-0.939693 -0.34202 0.1)
    arc 38 37 (-0.34202 -0.939693 0.1)
    
    

  );
  

boundary
(

 inlet
    {
        type patch;
        faces
        (
          
    (16 15 40 41)
    (15 14 39 40)
    (14 24 49 39)
    (24 23 48 49)      
  );
    }
    
 outlet
    {
        type patch;
        faces
        ( 
            (10 19 44 35)
            (3 10 35 28)
            (4 3 28 29)
        (11 4 29 36)
        (20 11 36 45)    
            
       
               
        );
    }
 
 fixedWalls
    {
        type wall;
        faces
        (
    (17 16 41 42)
    (18 17 42 43)
    (19 18 43 44)
    (21 20 45 46)
    (22 21 46 47)
    (23 22 47 48)
    (2 5 30 27)
    (0 1 26 25)
    (1 2 27 26)
    (6 0 25 31)
    (5 6 31 30)

         
           );
    }      

    frontAndBack
    {
        type empty;
        faces
        ( 

    (20 21 12 11)//b11
    (11 12 5 4)//b4
    (4 5 2 3)//b15
    (3 2 9 10)//b3
    (10 9 18 19)//b10
    (9 8 17 18)//b9
    (8 15 16 17)//b8
    (7 14 15 8)//b7
    (13 24 14 7)//b14
    (22 23 24 13)//b13
    (21 22 13 12)//b12
    (12 13 6 5)//b5
    (13 7 0 6)//b6
    (0 7 8 1)//b1
    (1 8 9 2)//b2-------spiegel
    (46 45 36 37)//b11
    (37 36 29 30)//b4
    (30 29 28 27)//b15
    (27 28 35 34)//b3
    (34 35 44 43)//b10
    (33 34 43 42)//b9
    (40 33 42 41)//b8
    (39 32 33 40)//b7
    (49 38 32 39)//b14
    (48 47 38 49)//b13
    (47 46 37 38)//b12
    (38 37 30 31)//b5
    (38 31 25 32)//b6
    (32 25 26 33)//b1
    (33 26 27 34)//b2


           
       
        );
    }
);


mergePatchPairs
(
);

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

any idea, how to refine the mesh ?

Thx
Attached Images
File Type: jpg mesh.jpg (96.1 KB, 372 views)
Mirage12 is offline   Reply With Quote

Old   July 15, 2013, 11:26
Default
  #2
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
well you do some refinement, but in the wrong block.

Be aware that the blocks are counting from 0
so you have 15 blocks but the lowest number is zero
and the highest number is 14

It is the same with the points and the patches as well.

Hint for the future: have look at the whole mesh and see what
it looks like so you can easily figure out what is wrong and do not
only focus in the part that doesn't work, like the picture you displayed.

success
regards
Colin
colinB is offline   Reply With Quote

Old   July 16, 2013, 01:58
Default
  #3
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13
Mirage12 is on a distinguished road
Concerning the numbering of the blocks..you are right i was too lazy to edit it
However capturing the boundary layer is very important for me, that is why i want to refine the mesh close to surface of the geometry....

Any Idea ??
Mirage12 is offline   Reply With Quote

Old   July 16, 2013, 03:53
Default
  #4
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
Hey,

for a good resolution of the boundary layer the y+ value
gives a good indication.

so when you re done with meshing you type

yPlusRAS

in your terminal and check the values which are displayed.
(I assume you are doing a RANS calculation if you
are performing a LES calculation use yPlusLES instead)

dependant on whether you are using wall functions or not
the max values should be between 1 (no wall functions) and
300 (wall functions)

If you know your desired yPlus you can easily calculate the required
cell height with the formula mentioned here:

http://www.cfd-online.com/Wiki/Dimen...e_%28y_plus%29

I hope I could contribute,
regards
colinB is offline   Reply With Quote

Old   July 16, 2013, 04:55
Default
  #5
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13
Mirage12 is on a distinguished road
Hey colin


Thx for ur answer

I am using icoFoam, so i think using a turbulence model is not required.

Do you know how to use yPlus for laminar flow ?

Thx
Mirage12 is offline   Reply With Quote

Old   July 17, 2013, 05:49
Default
  #6
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
Hi

icoFoam is indeed for laminar flow,

so for the boundary layer resolution you should
estimate the thickness of your boundary layer
as described e.g. here:

http://en.wikipedia.org/wiki/Boundary-layer_thickness

in a different forum post it is suggested to have 10 layers
of cells within the viscous layer (see below post #4):

http://www.cfd-online.com/Forums/sta...ary-lowre.html

this should give you a good starting point.

regrads
colinB is offline   Reply With Quote

Old   July 17, 2013, 07:11
Default
  #7
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13
Mirage12 is on a distinguished road
Hello Colin

It is for me clear that #the mesh, close to the surface, should be fine, otherwise it will be hard to converge#.

I estimated the thickness of the boundary layer, and my question is, is there any feature to specify that the mesh should be fine near to surface ?

Thx
Mirage12 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Creating very fine, high accuracy mesh with snappyHexMesh JD_Welch OpenFOAM Meshing & Mesh Conversion 10 July 5, 2023 12:50
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell Arman_N OpenFOAM Meshing & Mesh Conversion 1 May 20, 2019 18:16
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 08:05
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


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