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

[blockMesh] Meshing a cylinder

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2018, 10:38
Default Meshing a cylinder
  #1
Member
 
ssa
Join Date: Sep 2018
Posts: 93
Rep Power: 7
ssa_cfd is on a distinguished road
Hi all,

I want to do a simulation of flow through pipe. I created the cylinder using blockMesh. The mesh looks different. I need an axisymmetric mesh. How to achieve this using openfoam.??

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

convertToMeters 1;

vertices
(
    (0.25 0 0) //0
    (0 0.25 0) //1
    (-0.25 0 0) //2
    (0 -0.25 0) //3
    
     (0.25 0 1) //4
    (0 0.25 1) //5
    (-0.25 0 1) //6
    (0 -0.25 1) //7
    
  
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (50 50 50) simpleGrading (1 1 1)
);

edges
(
  arc 0 1 (0.17677 0.17677 0) 
arc 1 2 (-0.17677 0.17677 0)
arc 2 3 (-0.17677 -0.17677 0)
arc 3 0 (0.17677 -0.17677 0)
    
 arc 4 5 (0.17677 0.17677 1) 
arc 5 6 (-0.17677 0.17677 1)
arc 6 7 (-0.17677 -0.17677 1)
arc 7 4 (0.17677 -0.17677 1)
);

boundary
(
    inlet
    {
       
        
        
        type    patch;
        faces
        (
            (3 2 1 0)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (4 5 6 7)
          
        );
    }
    walls
    {
        type wall;
        faces
        (
              (0 1 5 4)
            (1 2 6 5)
            (2 3 7 6)
            (3 0 4 7)
	  
        );
    }
   
    
);

mergePatchPairs
(
);

// ************************************************************************* //
Attached Images
File Type: png cylinder.png (36.5 KB, 174 views)
ssa_cfd is offline   Reply With Quote

Old   November 26, 2018, 05:08
Default
  #2
Senior Member
 
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 7
yambanshee is on a distinguished road
To make an axi-symmetric mesh for a cylinder in blockmesh, the best block structure to use is something like what is shown in the attached figure
Attached Images
File Type: jpg index.jpg (25.3 KB, 97 views)
yambanshee is offline   Reply With Quote

Old   November 26, 2018, 05:19
Default
  #3
Member
 
ssa
Join Date: Sep 2018
Posts: 93
Rep Power: 7
ssa_cfd is on a distinguished road
hi yambanshee,

I already made it using four hex blocks. Thanks for your reply.
ssa_cfd is offline   Reply With Quote

Old   July 6, 2023, 00:17
Default
  #4
New Member
 
FOAMraj
Join Date: Apr 2021
Posts: 19
Rep Power: 5
BIRAJ is on a distinguished road
Hi ssa_cfd, can you share me the blockMesh file of axisymmetric mesh in cylinder? Thank you
BIRAJ is offline   Reply With Quote

Reply


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
[ICEM] Meshing inclined cylinder with PBC tetra mesh ICEM shashi_soman ANSYS Meshing & Geometry 0 September 26, 2015 18:27
Meshing inclined cylinder with PBC tetra mesh ICEM shashi_soman Mesh Generation & Pre-Processing 1 September 26, 2015 18:05
[blockMesh] meshing a cylinder Nico A. OpenFOAM Meshing & Mesh Conversion 0 April 7, 2011 11:09
[snappyHexMesh] SnappyHexMesh Meshing inside a cylinder nammari OpenFOAM Meshing & Mesh Conversion 5 March 11, 2011 19:49
Best Meshing scheme for Cylinder Nutrex Main CFD Forum 4 July 29, 2008 11:03


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