Create wedge meshes for OpenFOAM

To create wedge mesh you should create a 3D mesh in a first place.

For example , you can use BlockMesh or create brick mesh using external mesher.

After that you create extrudeMesh utility using extrudeMeshDict:

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

// What to extrude:
//      patch   : from patch of another case ('sourceCase')
//      mesh    : as above but with original case included
//      surface : from externally read surface

//constructFrom mesh;
constructFrom patch;

// If construct from patch/mesh:
sourceCase ".";
sourcePatches (back);

// If construct from patch: patch to use for back (can be same as sourcePatch)
exposedPatchName front;

// Flip surface normals before usage. Valid only for extrude from surface or
// patch.
flipNormals false;

//- Wedge extrusion. If nLayers is 1 assumes symmetry around plane.
extrudeModel        wedge;

nLayers             1;

expansionRatio      0.001; 

sectorCoeffs
{
    axisPt      (0 0 0);
    axis        (0 0 -1);
    angle       5;  // For nLayers=1 assume symmetry so angle/2 on each side
}

// Do front and back need to be merged? Usually only makes sense for 360
// degree wedges.
mergeFaces false;   //true;

// Merge small edges. Fraction of bounding box.
mergeTol 1e-13;


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

Example could be downloaded here: extrude archive.