Wednesday, June 8, 2016

Code For Straight Pipe In BlockMesh

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

convertToMeters 1;

vertices
(
    (0 0 0)
    (0.1 0 0)  
    (0.1 0.1 0) 
    (0 0.1 0) 
    (0 0 1)  
    (0.1 0 1) 
    (0.1 0.1 1) 
    (0 0.1 1)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (40 40 200) simpleGrading (1 1 2)

);

edges
(
);

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

mergePatchPairs
(
);

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

No comments:

Post a Comment