CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Periodic Boundary Condition For The Edges of Parallelogram (https://www.cfd-online.com/Forums/openfoam-pre-processing/227110-periodic-boundary-condition-edges-parallelogram.html)

anhkenyt May 18, 2020 03:19

Periodic Boundary Condition For The Edges of Parallelogram
 
1 Attachment(s)
hi foamer,
I want to define 4 cyclics boundary for 4 edges of the parallelog channel. But I have a problem with 2 edges which were tilted against the axis (look at the picture below).
I was used gmsh to meshing and used createPatchDict to create cyclic boundary.
Code:

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

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

// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
//      with transformations (i.e. cyclics).
pointSync false;

// Optional: Write cyclic matches into .obj format; defaults to false.
writeCyclicMatch  false;

// Patches to create.
patches
(
    {
        //- Master side patch
        name            in_1;
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.0001;
            neighbourPatch  out_1;
            transform      translational;
                      separationVector  (8e-6 0 0) ;
        }
        constructFrom patches;
        patches (in1);
    }

    {
        //- Slave side patch
        name            out_1;
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.0001;
            neighbourPatch  in_1;
            transform      translational;
                        separationVector  (-8e-6 0 0);
        }
        constructFrom patches;
        patches (out1);
    }

    {
        //- Master side patch
        name            in_2;
        patchInfo
        {
            type            cyclic;
          // inGroups        1(cyclicAMI);
            matchTolerance  0.0001;
            neighbourPatch  out_2;
            transform      translational;
                        separationVector  (0 -8e-6 0 ) ;     
                }
        constructFrom patches;
        patches (in2);
    }

    {
        //- Slave side patch
        name            out_2;
        patchInfo
        {
            type            cyclic;
          // inGroups        1(cyclicAMI);
            matchTolerance  0.0001;
            neighbourPatch  in_2;
            transform      translational;
                        separationVector  (0 8e-6 0 );
        }
        constructFrom patches;
        patches (out2);
    }
);

I face a problem :"face 0 area does not match neighbour by 22.2222% -- possible face ordering problem.
patch:in_2 my area:1e-13 neighbour area:8e-14 matching tolerance:0.0001
"
I was tried cyclicAMI but it is not fit in my solver which I was developed.
Any one help me to create cyclic boundary for these edge.
Thank you so much,https://drive.google.com/open?id=15D...KKszyYE6sCUSqg


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