CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   Flow Around A Wall (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/105334-flow-around-wall.html)

rickcjmac July 27, 2012 18:54

Flow Around A Wall
 
I'm not sure if this is the right spot for this, but here I go. I am trying to learn OF and I've gone through the tutorials. I am trying to simulate a flow around a wall. I attached a picture of what I am using as my geometry. It is a top view. I modified the cavity example's blockmeshdict file so that the points and blocks match up, I think. I modified the patches to do likewise, with the flow going from left to right. Here is what my blockmeshdict file looks like now:

Code:

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

convertToMeters 0.1;

vertices
(
            (0 0 0) //  1
        (1 0 0) //  2
        (2 0 0) //  3
        (3 0 0) //  4
        (3 2 0) //  5
        (2 2 0) //  6
        (1 2 0) //  7
        (0 2 0) //  8
        (1 1 0) //  9
        (2 1 0) // 10
            (0 0 1) // 11
        (1 0 1) // 12
        (2 0 1) // 13
        (3 0 1) // 14
        (3 2 1) // 15
        (2 2 1) // 16
        (1 2 1) // 17
        (0 2 1) // 18
        (1 1 1) // 19
        (2 1 1) // 20
);

blocks
(
    hex (0 1 6 7 10 11 16 17) (10 20 1) simpleGrading (1 1 1)
    hex (1 2 9 8 11 12 19 18) (10 10 1) simpleGrading (1 1 1)
    hex (2 3 4 5 12 13 14 15) (10 20 1) simpleGrading (1 1 1)
    hex (8 9 5 6 18 19 15 16) (10 10 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    movingWall
    {
        type wall;
        faces
        (
            (0 10 17 7)
            (8 18 16 6)
            (9 19 15 5)
            (3 13 14 4)       
        );
    }
    fixedWalls
    {
        type wall;
        faces
        (
            (0 1 11 10)
            (1 2 12 11)
            (2 3 13 12)
            (7 6 16 17)
            (6 5 15 16)
            (5 4 14 15)
            (8 9 19 18)
            (1 8 18 11)
            (2 9 19 12)

        );
    }
    frontAndBack
    {
        type empty;
        faces
        (
                (0 1 6 7)
                (1 2 9 8)
                (2 3 4 5)
                (8 9 5 6)
                (10 11 16 17)
                (11 12 19 18)
                (12 13 14 15)
                (18 19 15 16)
        );
    }
);

mergePatchPairs
(
);

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

Is this approach a good one? How can I get this to work? Right now it won't compile when I run blockMesh. I'm in over my head, but it would be very helpful if I could get this to work.

Thank you for your time :)

Justinus July 28, 2012 06:11

Internal face
 
Hey Richard,

there should be an errormassage like: "Trying to specify a boundary face 4(8 9 19 18) on the face on cell 1 which is either an internal face or already belongs to some other patch."
This tells you this is an internal face.

Try a wall made out of 8 vertices. I assume you will have to define 8 blocks: 3 above your wall, 3 below, 1 left of it and 1 right of it.

Is it right you wanted to have a flow from vertices 0 1 2 3 13 12 11 10 (inlet) to vertices 7 6 5 4 14 15 16 17 ? So you still have to define them as patch like

inlet {
type patch;
faces (
(0 1 11 10)
(1 2 12 11)
(2 3 13 12)
); }

Same for your atmosphere
and define some boundary like velocity and pressure for these patches.


All times are GMT -4. The time now is 02:56.