CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Commercial meshers] Problem with cyclic boundaries in Openfoam 2.3, mesh import from ICEM

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 19, 2014, 11:36
Default Problem with cyclic boundaries in Openfoam 2.3, mesh import from ICEM
  #1
Member
 
Join Date: Dec 2013
Location: Newcastle
Posts: 54
Rep Power: 12
Scabbard is on a distinguished road
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

Last edited by Scabbard; April 20, 2014 at 11:12. Reason: Changed [QUOTE] to [CODE][/CODE]
Scabbard is offline   Reply With Quote

Old   April 20, 2014, 07:42
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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".
Aabadani likes this.
wyldckat is offline   Reply With Quote

Old   April 20, 2014, 11:19
Default
  #3
Member
 
Join Date: Dec 2013
Location: Newcastle
Posts: 54
Rep Power: 12
Scabbard is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
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
Scabbard is offline   Reply With Quote

Old   April 20, 2014, 14:47
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
wyldckat is offline   Reply With Quote

Old   April 20, 2014, 16:22
Default
  #5
Member
 
Join Date: Dec 2013
Location: Newcastle
Posts: 54
Rep Power: 12
Scabbard is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
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
Scabbard is offline   Reply With Quote

Old   April 20, 2014, 16:56
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
Attached Images
File Type: jpg side_by_Side.jpg (102.8 KB, 691 views)
fumiya likes this.
__________________
wyldckat is offline   Reply With Quote

Old   April 21, 2014, 06:02
Default
  #7
Member
 
Join Date: Dec 2013
Location: Newcastle
Posts: 54
Rep Power: 12
Scabbard is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
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
Scabbard is offline   Reply With Quote

Old   April 21, 2014, 17:16
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by Scabbard View Post
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.
wyldckat is offline   Reply With Quote

Old   April 23, 2014, 08:09
Default
  #9
Member
 
Join Date: Dec 2013
Location: Newcastle
Posts: 54
Rep Power: 12
Scabbard is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
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
Scabbard is offline   Reply With Quote

Old   June 11, 2014, 05:49
Default createPatchDict
  #10
New Member
 
Syed Zahid
Join Date: Mar 2014
Location: Bangalore, Karnataka, INDIA
Posts: 5
Rep Power: 12
zahid is on a distinguished road
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.
zahid is offline   Reply With Quote

Old   June 11, 2014, 16:12
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Zahid,

I'm not a magician nor a hacker 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
__________________
wyldckat is offline   Reply With Quote

Old   July 24, 2015, 03:22
Default
  #12
Member
 
Fabian E.
Join Date: Nov 2009
Posts: 38
Rep Power: 17
galap is on a distinguished road
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.
galap is offline   Reply With Quote

Old   January 8, 2016, 18:54
Default
  #13
Senior Member
 
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 12
esujby is on a distinguished road
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
esujby is offline   Reply With Quote

Old   January 9, 2016, 13:09
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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.
wyldckat is offline   Reply With Quote

Old   January 28, 2016, 15:19
Default Hi All,
  #15
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
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
Attached Files
File Type: c p.c (1.2 KB, 39 views)
File Type: c U.c (1.3 KB, 28 views)
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius
Alhasan is offline   Reply With Quote

Old   January 30, 2016, 15:57
Default separationVector
  #16
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
Quote:
Originally Posted by jmf View Post
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 ]
__________________
"Real knowledge is to know the extent of one's ignorance." - Confucius

Last edited by wyldckat; March 28, 2016 at 15:18. Reason: see "Moderator note:"
Alhasan is offline   Reply With Quote

Old   January 31, 2016, 05:53
Default Cyclic boundary
  #17
jmf
Member
 
Jean-Michel FONTAINE
Join Date: Aug 2009
Location: Orleans - France
Posts: 55
Rep Power: 17
jmf is on a distinguished road
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
jmf is offline   Reply With Quote

Old   May 27, 2016, 06:54
Default
  #18
Member
 
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11
Jack001 is on a distinguished road
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?
Jack001 is offline   Reply With Quote

Old   September 22, 2016, 05:17
Default sector of cylinder
  #19
New Member
 
sajad
Join Date: Dec 2014
Posts: 5
Rep Power: 11
sajjadli is on a distinguished road
hello guys
is it possible to define "cyclic" or "cyclicAMI" boundary condition for faces "A" and "B" in bellow figure?
thanks for your replies.
Attached Images
File Type: jpg Part1.JPG (47.6 KB, 164 views)
sajjadli is offline   Reply With Quote

Old   September 24, 2016, 15:02
Default
  #20
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by sajjadli View Post
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.
__________________
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Commercial meshers] A problem to use the mesh made by ICEM in openfoam 278379rea OpenFOAM Meshing & Mesh Conversion 3 June 6, 2016 03:54
Ansys 14.5 Problem Import Mesh from ICEM CFD to CFX Smiling Assassin CFX 1 May 9, 2014 03:27
[Commercial meshers] ICEM tetra mesh for OpenFoam cfGreen OpenFOAM Meshing & Mesh Conversion 4 October 24, 2013 07:13
[ICEM] ICEM Structured Mesh Problem OMJT ANSYS Meshing & Geometry 3 March 22, 2013 11:06
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52


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