CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] Problem with using createPatchDict to define cyclic boundaries (https://www.cfd-online.com/Forums/openfoam-meshing/169028-problem-using-createpatchdict-define-cyclic-boundaries.html)

kaszt April 1, 2016 21:18

Problem with using createPatchDict to define cyclic boundaries
 
1 Attachment(s)
Hello,

I'm having some problems with periodic boundary conditions for a mesh I created with Cubit to solve for laminar flow over a cylinder. I defined the top and bottom boundaries within Cubit as "periodic", but OpenFOAM doesn't recognize Cubit's definition of periodic boundaries (i.e. they were written as type "wall" in my boundary file after running fluentMeshToFoam). To solve this problem, I tried two things: first, I modified my boundary file as follows:

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//5
6
(
    //wall_4 // top and bottom; want to make this into 2 patches of type "cyclic"
    //{
        //type            wall;
        //inGroups        1(wall);
        //nFaces          400;
        //startFace      812000;
    //}
   
    // Patches for top and bottom...
    top // top boundary
    {
        type            patch;
        nFaces          200;
        startFace      812000;
    }
   
    bottom // bottom boundary
    {
        type            patch;
        nFaces          200;
        startFace      812200;
    }   
    velocity-inlet_5
    {
        type            patch;
        nFaces          200;
        startFace      812400;
    }
    outflow_6
    {
        type            patch;
        nFaces          200;
        startFace      812600;
    }
    wall_7 // cylinder walls
    {
        type            wall;
        inGroups        1(wall);
        nFaces          800;
        startFace      812800;
    }
    frontAndBackPlanes
    {
        type            empty;
        inGroups        1(empty);
        nFaces          812800;
        startFace      813600;
    }
)

Then I used a createPatchDict file to create the cyclic patches; below is how I defined my file:

Code:

// Sync coupled points
pointSync true;

// Create patches
patches
(
    {
    // Name of new patch
    name    periodic_top;
   
    // Dictionary to construct new patch from
    patchInfo
        {
        type    cyclic;
        neighbourPatch  periodic_bottom;
        matchTolerance  0.01;
       
        // optional; set transformation tensor
        transform  translational;
        separationVector    (0 50 0); // distance between two patches in "y"
        }
   
    // How to construct; either patches or set
    constructFrom  patches;
   
    // If constructFrom = patches : name of patches
    patches (top);
   
    // If constructFrom = set : name of faceSet
    set f0;
    }
   
    {
    // Name of new patch
    name    periodic_bottom;
   
    // Dictionary to construct new patch from
    patchInfo
        {
        type    cyclic;
        neighbourPatch  periodic_top;
        matchTolerance  0.01;
       
        // optional; set transformation tensor
        transform  translational;
        separationVector    (0 -50 0);
        }
   
    // How to construct; either patches or set
    constructFrom  patches;
   
    // If constructFrom = patches : name of patches
    patches (bottom);
   
    // If constructFrom = set : name of faceSet
    set f0;
    }
);

However, when I try to run
Code:

foamJob createPatch -overwrite
I get the following error:

Code:

--> FOAM FATAL ERROR:
face 61 area does not match neighbour by 2.76759620807% -- possible face ordering problem.

I have attached a picture of the mesh I am trying to work with; the periodic boundary conditions would be for the top and bottom boundaries, therefore I set the separationVector to be the distance between the boundaries in "y" (since I am using symmetry in the x-axis). I am pretty stuck with this problem, and I'm not sure if I am using the createPatchDict correctly. If anyone has any advice or tips as to what I am doing incorrectly, I would appreciate your help very much. Thank you in advance for your time!
Attachment 46424


All times are GMT -4. The time now is 15:28.