# BC "cyclic" problem

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 10, 2018, 17:38 BC "cyclic" problem #1 Senior Member   Peter Shi Join Date: Feb 2017 Location: Davis Posts: 102 Rep Power: 9 Hello everyone, I met a weird problem: the far field of my mesh is a cylinder, and I set two base faces of this cylinder as "cyclic". Let's call them "front" and "back". When I generated mesh, I simply translated "back" to get "front" using vector (0 0 0.005) shown as below. back { type cyclic; inGroups 1(cyclic); nFaces 39660; startFace 2536318; matchTolerance 1000; transform translational; neighbourPatch front; separationVector (0 0 0.005); } front { type cyclic; inGroups 1(cyclic); nFaces 39660; startFace 2576138; matchTolerance 1000; transform translational; neighbourPatch back; separationVector (0 0 -0.005); } After obtaining the mesh I generated, I used command "renumberMesh", and it reports the following message: --------------------------------------------------------------------------------- --> FOAM Warning : 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 360 Specified separationVector (0 0 0.005) differs from computed separation vector 39660 ( (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 1.0842e-19 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 -4.33681e-19 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (1.11022e-16 0 0.005) (0 0 0.005) (0 0 0.005) (0 2.1684e-19 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 8.67362e-19 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 0 0.005) (0 -6.93889e-18 0.005) ... ... (a lot of vectors like that) This probably means your geometry is not consistent with the specified separation and might lead to problems. Continuing with specified separation vector (0 0 0.005) patch:front neighbour:back --------------------------------------------------------------------------------- I have no idea about what is wrong, I mean I am pretty sure I translated the face using (0 0 0.005), why it says your geometry is inconsistent with the separation vector. As a result, I did run this mesh, but it diverges very soon after 13 iterations. My mesh is not bad, so I believe the divergence is coming from this problem. I also have another question: any user has tried "cyclic" and "cyclicAMI" for the same case? If so, have you observed differences in your results? Is cyclicAMI reliable? Any advice, comment, and discussion here is highly appreciated. Thank you. Best regards, Peter Last edited by PeterShi; August 11, 2018 at 14:51.

 August 13, 2018, 15:47 #2 New Member   Gazi Yavuz Join Date: Apr 2018 Posts: 17 Rep Power: 8 Have you specified your cyclic boundaries on your own in the "polyMesh/boundary" file or you used the createPatchDict to specify them?

August 13, 2018, 16:02
#3
Senior Member

Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9
Quote:
 Originally Posted by uckmhnds Have you specified your cyclic boundaries on your own in the "polyMesh/boundary" file or you used the createPatchDict to specify them?
Hi Gazi,

I specified cyclic boundaries in the "polyMesh/boundary", as shown below.

back
{
type cyclic;
inGroups 1(cyclic);
nFaces 39660;
startFace 2536318;
matchTolerance 1000;
transform translational;
neighbourPatch front;
separationVector (0 0 0.005);
}

front
{
type cyclic;
inGroups 1(cyclic);
nFaces 39660;
startFace 2576138;
matchTolerance 1000;
transform translational;
neighbourPatch back;
separationVector (0 0 -0.005);
}

Best,
Peter

 August 13, 2018, 17:19 #4 Member     Cyrille Bonamy Join Date: Mar 2015 Location: Grenoble, France Posts: 85 Rep Power: 11 i think you can try without separationVector specified in your boundary file... The problem comes because the separationVector is not allways (0 0 0.005). Moreover the matchTolerance appears very high... Why? I would try with 0.0001 for matchTolerance and commenting the separationVector lines.

August 13, 2018, 17:43
#5
Senior Member

Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9
Quote:
 Originally Posted by cyss38 i think you can try without separationVector specified in your boundary file... The problem comes because the separationVector is not allways (0 0 0.005). Moreover the matchTolerance appears very high... Why? I would try with 0.0001 for matchTolerance and commenting the separationVector lines.
Hi,

The reason why I have such a high tolerance is that if I set a small number for this, OpenFOAM will report the following warning to me:

------------------------------------------------------------------------------
--> FOAM FATAL ERROR:
face 188 area does not match neighbour by 55.2343% -- possible face ordering problem.
patch:back my area:5.50723e-08 neighbour area:3.12363e-08 matching tolerance:0.01
Mesh face:2536506 fc0.710155 0.0247533 1.96988e-23)
Neighbour fc0.800396 -0.00222094 0.005)
If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file.

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 212.

FOAM exiting
------------------------------------------------------------------------------

The funny thing is my two faces are exactly same.

Do you know how to solve this problem as well? One of the users told me he met the same problem before, so he set the tolerance using a large number, and the result seems to be fine.

Thank you.

Best regards,
Peter

August 13, 2018, 17:48
#6
Senior Member

Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9
Quote:
 Originally Posted by cyss38 i think you can try without separationVector specified in your boundary file... The problem comes because the separationVector is not allways (0 0 0.005). Moreover the matchTolerance appears very high... Why? I would try with 0.0001 for matchTolerance and commenting the separationVector lines.
Hi,

So I commented SeparationVector, OpenFOAM reports me the following error:

--> FOAM FATAL IO ERROR:
keyword SeparationVector is undefined in dictionary ".back".

You mentioned that the vector is not alway (0 0 0.005), why? I mean I translated one fave to get another face using (0 0 0.005), so the vector should always be (0 0 0.005)?

Thank you.

Best regards,
Peter

August 14, 2018, 05:38
#7
Member

Cyrille Bonamy
Join Date: Mar 2015
Location: Grenoble, France
Posts: 85
Rep Power: 11
Quote:
 Originally Posted by PeterShi Hi, The reason why I have such a high tolerance is that if I set a small number for this, OpenFOAM will report the following warning to me: ------------------------------------------------------------------------------ --> FOAM FATAL ERROR: face 188 area does not match neighbour by 55.2343% -- possible face ordering problem. patch:back my area:5.50723e-08 neighbour area:3.12363e-08 matching tolerance:0.01 Mesh face:2536506 fc0.710155 0.0247533 1.96988e-23) Neighbour fc0.800396 -0.00222094 0.005) 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 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 212. FOAM exiting ------------------------------------------------------------------------------ The funny thing is my two faces are exactly same. Do you know how to solve this problem as well? One of the users told me he met the same problem before, so he set the tolerance using a large number, and the result seems to be fine. Thank you. Best regards, Peter
As explained in the error message, i think it is linked to a face ordering problem.
Which meshing tool do you have used in order to mesh?

August 14, 2018, 10:56
#8
Senior Member

Peter Shi
Join Date: Feb 2017
Location: Davis
Posts: 102
Rep Power: 9
Quote:
 Originally Posted by cyss38 As explained in the error message, i think it is linked to a face ordering problem. Which meshing tool do you have used in order to mesh?
Hi,

I used Pointwise to generate mesh. After exporting the mesh from Pointwise, I used the command "renumberMesh" in OpenFOAM.

Best regards,
Peter

 August 14, 2018, 11:31 #9 Member     Cyrille Bonamy Join Date: Mar 2015 Location: Grenoble, France Posts: 85 Rep Power: 11 what is the output of checkMesh? I think you will find the solution to your problem in this thread : https://www.cfd-online.com/Forums/op...nts-order.html

 October 8, 2018, 12:56 #10 New Member   Gazi Yavuz Join Date: Apr 2018 Posts: 17 Rep Power: 8 Just specify your cyclic boundaries as "patch" in the polyMesh/boundaries file and use "createPatchDict" to specify them as cyclic condition. Otherwise, openFoam would fail to see them as cyclic boundaries. And sorry for the late reply emjay, kiski, fedvasu and 3 others like this.