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/)
-   -   [Commercial meshers] Problem with cyclic boundaries in Openfoam 2.3, mesh import from ICEM (https://www.cfd-online.com/Forums/openfoam-meshing/133730-problem-cyclic-boundaries-openfoam-2-3-mesh-import-icem.html)

Scabbard April 19, 2014 10:36

Problem with cyclic boundaries in Openfoam 2.3, mesh import from ICEM
 
Dear Foamers,

have a really annoying problem concerning cylic boundaries imported from ICEM. When I use the createPatch command. This is what I get after using createPatch utility:
Code:

--> FOAM FATAL ERROR:
face 722 area does not match neighbour by 0.010670375885% -- possible face ordering problem.
patch:TOP my area:0.000172697081473 neighbour area:0.000172678655029 matching tolerance:0.0001
Mesh face:5008786 fc:(-0.910732468388 -0.121136204077 0.57999998165)
Neighbour fc:(-0.91073345224 -0.121136444811 0)
If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file.
Rerun with cyclic debug flag set for more information.

    From function cyclicPolyPatch::calcTransforms()
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 221.

And the createPatch documents shows as blew
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.3.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    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;

// Patches to create.
patches
(
    {
        name cyclic01;
        patchInfo
        {
            type            cyclic;
            neighbourPatch  cyclic02;
            matchTolerance 1e-04;
        }
        constructFrom patches;
        patches (FRONT);
       
    }
   
    {
        name cyclic02;
        patchInfo
        {
            type            cyclic;
            neighbourPatch  cyclic01;
            matchTolerance 1e-04;
        }
        constructFrom patches;
        patches (BACK);
       
    }
);

Here is my original boundary documents import from icem, using fluent3DMeshtoFoam utility.
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.3.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

6
(
    CYLINDER
    {
        type            wall;
        inGroups        1(wall);
        nFaces          8556;
        startFace      4828165;
    }
    SIDE
    {
        type            symmetry;
        inGroups        1(symmetry);
        nFaces          16244;
        startFace      4836721;
    }
    FRONT
    {
        type            patch;
        nFaces          52661;
        startFace      4852965;
    }
    BACK
    {
        type            patch;
        nFaces          52661;
        startFace      4905626;
    }
    INLET
    {
        type            patch;
        nFaces          4247;
        startFace      4958287;
    }
    OUTLET
    {
        type            patch;
        nFaces          4247;
        startFace      4962534;
    }
)

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

How could I solve this problem... I have faced to this error a week and can not solve it...

Thank you so much for your help.

Best wishes,
Scabbard

wyldckat April 20, 2014 06:42

Quick answer:
  1. Check the file "applications/utilities/mesh/manipulation/createPatch/createPatchDict" for a more complete example.
  2. If the patches are not perfectly cyclic, try using "cyclicAMI".

Scabbard April 20, 2014 10:19

Quote:

Originally Posted by wyldckat (Post 487119)
Quick answer:
  1. Check the file "applications/utilities/mesh/manipulation/createPatch/createPatchDict" for a more complete example.
  2. If the patches are not perfectly cyclic, try using "cyclicAMI".

Dear Bruno,

Thank you for your help.

I use the structure mesh, and have checked in ICEM. I think both face could be perfectly cyclic.

For my case, it is a flow past a cylinder and I want to let the front&back be cyclic.

Here is my mesh:

https://drive.google.com/file/d/0B1v...it?usp=sharing

Could you help me to check where is the error? This problem annoying me for more than a week...

Best wishes,
Scabbard

wyldckat April 20, 2014 13:47

Hi Scabbard,

The file you shared only has got the mesh. Unfortunately I don't have the time to create a case just to debug your mesh :(.

If you study the file I mentioned in the previous post, you'll see where the "tolerance" settings have to be placed in "createPatchDict".

Best regards,
Bruno

Scabbard April 20, 2014 15:22

Quote:

Originally Posted by wyldckat (Post 487167)
Hi Scabbard,

The file you shared only has got the mesh. Unfortunately I don't have the time to create a case just to debug your mesh :(.

If you study the file I mentioned in the previous post, you'll see where the "tolerance" settings have to be placed in "createPatchDict".

Best regards,
Bruno

Dear Bruno,

Sorry to trouble you. I have added the matchTolerance in my createPatchDict and set up 5 values from 1e-04 to 2e-02, but still got the same error... This make me crazy...

https://drive.google.com/file/d/0B1v8BP1BA6NQTUJQYW9SU2VpUkE/edit?usp=sharing

Here is my whole case. If it is convenient for you, could you help me to check it? Thank you so much for your help.

Best wishes,
Scabbard

wyldckat April 20, 2014 15:56

1 Attachment(s)
Hi Scabbard,

Thanks, that makes it easier!
OK, OpenFOAM has been trying to tell you that the patches do not perfectly match. As you can see in the attached image, the patches do not perfectly match up, because even though the face count is identical, their relative locations are not identical. The part on the left is the bottom patch and on the right is the top patch.

As I wrote before, if "cyclic" patches don't work, you'll have to rely on "cyclicAMI" patches, which will assign weights to the corresponding faces on the other patch, even if the faces are completely different. Note that the "cyclicAMI" will not try to match up the faces directly, it will look at the location of each face and check what faces are on the other side at the same relative location.

Best regards,
Bruno

Scabbard April 21, 2014 05:02

Quote:

Originally Posted by wyldckat (Post 487181)
Hi Scabbard,

Thanks, that makes it easier!
OK, OpenFOAM has been trying to tell you that the patches do not perfectly match. As you can see in the attached image, the patches do not perfectly match up, because even though the face count is identical, their relative locations are not identical. The part on the left is the bottom patch and on the right is the top patch.

As I wrote before, if "cyclic" patches don't work, you'll have to rely on "cyclicAMI" patches, which will assign weights to the corresponding faces on the other patch, even if the faces are completely different. Note that the "cyclicAMI" will not try to match up the faces directly, it will look at the location of each face and check what faces are on the other side at the same relative location.

Best regards,
Bruno

Dear Bruno,

Thank you so much for your help. I will have a try to use cyclicAMI. However, do you know what cause the mesh changed in openFoam? Because when I check in ICEM, it seems to be the same both side around cylinder.

Best wishes,
Scabbard

wyldckat April 21, 2014 16:16

Quote:

Originally Posted by Scabbard (Post 487248)
However, do you know what cause the mesh changed in openFoam? Because when I check in ICEM, it seems to be the same both side around cylinder.

The image I provided on the previous post was taken after I made a linear translation along Z of the top patch to the same location of the bottom patch and synced the cameras in ParaView, to make sure the perspective was identical.
My guess is that since you're not comparing directly one patch on top of the other on ICEM, then the mesh only looks like it's the same.

Scabbard April 23, 2014 07:09

Quote:

Originally Posted by wyldckat (Post 487377)
The image I provided on the previous post was taken after I made a linear translation along Z of the top patch to the same location of the bottom patch and synced the cameras in ParaView, to make sure the perspective was identical.
My guess is that since you're not comparing directly one patch on top of the other on ICEM, then the mesh only looks like it's the same.


Dear Bruno,

Thank you for you help.

Best wishes,
Scabbard

zahid June 11, 2014 04:49

createPatchDict
 
Dear Bruno

I am also running with the same problem as mentioned by Scaabard, i placed the createPatchDict file in system folder, but the error remains same

face 0 area does not match neighbour by 136.618% -- possible face ordering problem.
patch:cyclic-6_half0 my area:5.18008e-06 neighbour area:2.75111e-05 matching tolerance:0.0001
Mesh face:6687680 fc:(-0.494029 0.603639 0.00271732)
Neighbour fc:(-0.494029 0.904544 0.00271732)
If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file.
Rerun with cyclic debug flag set for more information.

From function cyclicPolyPatch::calcTransforms()
in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 220.

wyldckat June 11, 2014 15:12

Greetings Zahid,

:confused: I'm not a magician nor a hacker :rolleyes: So please don't expect me to just guess the reason why you're getting that error message.

So, please provide more information, according to the guidelines given on this thread: http://www.cfd-online.com/Forums/ope...-get-help.html

In addition:
  1. Did you read and study the posts above?
  2. Are you able to compare the surface mesh on both sides of the mesh, regarding the patches that are meant to be cyclic?
Best regards,
Bruno

galap July 24, 2015 02:22

Hello,

I encountered the same problem and I could solve it by defining rotational periodicity and then by declaring the corresponding vertices in ICEM as periodic. Then Right Click on Faces in the Blocking tree -> Periodic Faces -> ensure that really every periodic face is colored accordingly. createPatch went fine after this procedure.

esujby January 8, 2016 17:54

Hello Bruno,

i have a similar issue, i get the following error message:

Code:

parallels@ubuntu:~/OpenFOAM/OpenFOAM-3.0.x/chtMRF$ splitMeshRegions -cellZones -overwrite
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  3.0.x                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 3.0.x-5ead44c48e61
Exec  : splitMeshRegions -cellZones -overwrite
Date  : Jan 08 2016
Time  : 21:37:55
Host  : "ubuntu"
PID    : 31837
Case  : /home/parallels/OpenFOAM/OpenFOAM-3.0.x/chtMRF
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0



--> FOAM FATAL ERROR:
face 0 area does not match neighbour by 0.0009400302% -- possible face ordering problem.
patch:inlet my area:6.589055e-10 neighbour area:6.589117e-10 matching tolerance:1e-06
Mesh face:10399669 fc:(-0.001969071 0.005479679 0.0379999)
Neighbour fc:(-0.001968778 0.0590001 -2.032106e-05)
If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file.
Rerun with cyclic debug flag set for more information.

    From function cyclicPolyPatch::calcTransforms()
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 221.

FOAM exiting

parallels@ubuntu:~/OpenFOAM/OpenFOAM-3.0.x/chtMRF$

Heres a link to my case (https://www.dropbox.com/sh/vaf327l8s...qBMOXNJ-a?dl=0), (note: Allrun is faulty, so i have the boundary in the polymesh already. also a copy of the boundary file is located in the case next to 0, constant and system.

please help, i don't know what exactly to do to fix it, i have tried both ciclic and cyclicAMI patch type, i have also changed my match tolerance i still get the same error.

please help.

kind regards

wyldckat January 9, 2016 12:09

Quick answer: I haven't managed to look into the case, but I suggest that you only convert the patches to "cyclic" or "cyclicAMI" after you've ran splitMeshRegions, not before.

Alhasan January 28, 2016 14:19

Hi All,
 
2 Attachment(s)
I have made a 3D mesh in ICEM for an Airfoil and transferd into openfoam, used snappyhexMesh to put the airfoil inside the mesh and did meshing.

I just wanted to change the symmetry patches the front and back of the airfoil into cyclicAMI patches to have a effects of a long airfoil
and did it sucessfully, the simulation works my question is what should be my

seperationVector (0 0 0); ???in the boundary file,

the thickness of my domain is 0.027m, when I have

Code:

SYM
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        transform translational;
        matchTolerance 0.0001;
        separationVector (0 0 0.027);
        nFaces          78084;
        startFace      6272610;
        neighbourPatch  SYM1;
    }
    SYM1
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        transform translational;
        matchTolerance 0.0001;
        separationVector (0 0 0.027);
        nFaces          72388;
        startFace      6350694;
        neighbourPatch  SYM;
    }

for both patches when i have 0 0 0.027 the S-A simulation works without any issues but the results dont make sense as the flow appears to be not leaving the domain (no cross flow) and some unexplainable recirculations close to the SYM patches,

when I have SYM (0 0 0.027) and SYM1 (0 0 -0.027) the simulation starts works till 525 and then crashes due to time step continuity error can some one please tell me whats

seperationVector ? and what should it it be for such simple airfoil case where the SYM patch actual coordinates are (0 0 0) and SYM1 coordinates in the geometry are (0 0 0.027)

or maybe my BC is the reason I have also attached my U and P BC

Alhasan January 30, 2016 14:57

separationVector
 
Quote:

Originally Posted by jmf (Post 411228)
Hi

Finally I fixed this with the cyclic patches definition in the boundary dictionary :

Code:

   
    neighbourPatch  cyclic1;
    transform      translational;
    separationVector ( 0 0 0.5 );

The separation vector was previously (0, 0, 0). It used to work on my cases before. Here it worked only on one processor, and not at all in parallel. Weird...


Wishes

Jean-Michel

Hi Michel,

How do you know what is your separationVector Can you please Explain, I have been trying to do Transitional Peridocity for an airfoil in the spanwise direction and failing miserably, futher explained in this post

http://www.cfd-online.com/Forums/ope...tml#post582845

Regards,
Hasan K.J

[ Moderator note: This post and the one below were moved from this other thread: http://www.cfd-online.com/Forums/ope...-parallel.html ]

jmf January 31, 2016 04:53

Cyclic boundary
 
In your example, the correct setting should be :

Code:

cyclic0
        {
            type            cyclicAMI;
            matchTolerance  0.0001;
            neighbourPatch  cyclic1;
            transform      translational;
            separationVector (0 0 0.027);
        }
        cyclic1
        {
            type            cyclicAMI;
            matchTolerance  0.0001;
            neighbourPatch  cyclic0;
            transform      translational;
            separationVector (0 0 -0.027);
        }

The reason of the crash is not cyclic boundary definition. Your simulation would not start otherwise. Check your mesh, fvSchemes, etc

Best wishes

J-Michel

Jack001 May 27, 2016 05:54

I would just like to make use of the excellent advice in this thread to ask if anyone has had the following problem:

creating cyclics works fine using createPatch on my mesh. However, in a different case, I first merge the aforementioned mesh with another (rotor stator meshes) using mergeMeshes, and then run createPatch in an attempt to create cyclics (on the same patches as before) but now I get the face ordering error! What can be wrong? Does merge meshes change the ordering of the faces of my patches?

I experimented around and cyclicAMI doesnt produce any error, but I am worried about using cyclicAMI because the mesh periodic patches should be identical (they come from turbogrid). Is there any harm using cyclicAMI?

sajjadli September 22, 2016 04:17

sector of cylinder
 
1 Attachment(s)
hello guys
is it possible to define "cyclic" or "cyclicAMI" boundary condition for faces "A" and "B" in bellow figure?
thanks for your replies.

wyldckat September 24, 2016 14:02

Quote:

Originally Posted by sajjadli (Post 618866)
is it possible to define "cyclic" or "cyclicAMI" boundary condition for faces "A" and "B" in bellow figure?

Quick answer: depends on whether the mesh has a perfect rotational match or not. In other words, if you rotate the A patch the necessary angle on which the A and B surfaces are overlapping, then the lines around those patches must also match.


All times are GMT -4. The time now is 18:49.