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] How to generate cyclic boundary conditions for irregular patches? (https://www.cfd-online.com/Forums/openfoam-meshing/205089-how-generate-cyclic-boundary-conditions-irregular-patches.html)

RobertHB August 9, 2018 03:43

How to generate cyclic boundary conditions for irregular patches?
 
1 Attachment(s)
Dear Foamers,
i have a constructed my numerical domain over a 3D topography. I cannot use cyclic boundaries in my blockMesh since sHM will crash because "Face xyz does not match face abc by 1.234%" (number arbitrarily chosen). But, using patch boundary conditions, this works well, both in blockMesh as well as in snappyHexMesh. So i generated this mesh. You can see the inlet patch in the foreground and the outlet patch in the background (both in black). The gray mesh in the middel is my internal mesh. I want both, inlet and outlet, to be coupled with cyclic boundary conditions.
https://www.cfd-online.com/Forums/at...5&d=1533800184

I used createPatch to create cyclic boundaries for these patches after running sHM. OF throws an error but generates two .obj files containing the patches, but no cyclic boundaries in my polyMesh. Here's the error:
Code:

cyclicPolyPatch::order : Writing neighbour faces to OBJ file "/mnt/c/OpenFOAM/run/PyrochloreSurface/cyclicInlet_faces.obj"
cyclicPolyPatch::order : Writing my faces to OBJ file "/mnt/c/OpenFOAM/run/PyrochloreSurface/cyclicOutlet_faces.obj"
cyclicPolyPatch::order : Dumping currently found cyclic match as lines between corresponding face centres to file "/mnt/
c/OpenFOAM/run/PyrochloreSurface/cyclicOutlet_faceCentres.obj"
--> FOAM Serious Error :
    From function virtual bool Foam::cyclicPolyPatch::order(Foam::PstreamBuffers&, const primitivePatch&, Foam::labelLis
t&, Foam::labelList&) const
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 1379
    Patch:cyclicOutlet : Cannot match vectors to faces on both sides of patch
    Perhaps your faces do not match? The obj files written contain the current match.
    Continuing with incorrect face ordering from now on!

--> FOAM FATAL ERROR:
For patch cyclicInlet there are 1128 face centres, for the neighbour patch cyclicOutlet there are 1068
 From function void Foam::cyclicPolyPatch::calcTransforms(const primitivePatch&, const pointField&, const vectorField
&, const pointField&, const vectorField&)
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 156.

 FOAM exiting

Do you have an idea how to couple those two patches with periodic boundary conditions?


With kind regards,
Robert


/edit: Using cyclicAMI instead of cyclic seems to be a solution using the following blockMeshDict entries (with 10 being the domain length, i.e. the distance between inlet and outlet):
Code:

cyclicInlet
    {
        //type patch;
        type cyclicAMI;
        neighbourPatch cyclicOutlet;
        transform translational;
        separationVector (0 10 0);
        faces
        (
            (0 1 5 4)
        );
    }
   
    cyclicOutlet
    {
        //type patch;
        type cyclicAMI;
        neighbourPatch cyclicInlet;
        transform translational;
        separationVector (0 10 0);
        faces
        (
            (3 2 6 7)
        );
    }



All times are GMT -4. The time now is 13:55.