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

Cyclic boundaries in OF 21x

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

Like Tree10Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2012, 11:53
Default Cyclic boundaries in OF 21x
  #1
Member
 
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 16
morard is on a distinguished road
Hello to all,

first of all I want to apologize for opening a new thread although there is at least one with the similar name

http://www.cfd-online.com/Forums/ope...h-problem.html

but since I didn't find any answer I decided to post some questions here.
So, very briefly, I have a mesh which was ok in OF 1.7.1 but when I try to use it in 2.1.x version I've faced some errors with cyclic patches:

**Error in coupled point location: 300 faces have their 0th vertex not opposite their coupled equivalent. Average mismatch 0.0268041.

I was thinking that the problem might be in mesh numbering, so I try to re-number it but until now haven't found any solution.

Then I tried to investigate the mixer tutorial: incompressible/SRFSimpleFoam/mixer where the cyclic patches look like the patches in my case. I executed blockMesh and everything was fine. Then I tried to create just two blocks:

blocks
(
// hex (1 0 9 4 13 12 21 16) (10 20 40) simpleGrading (1 1 1)
hex (2 1 4 6 14 13 16 18) (2 20 40) simpleGrading (1 1 1)
hex (3 2 6 8 15 14 18 20) (10 20 40) simpleGrading (1 1 1)
// hex (5 10 0 1 17 22 12 13) (10 20 40) simpleGrading (1 1 1)
// hex (11 7 2 3 23 19 14 15) (10 20 40) simpleGrading (1 1 1)
);


with the following cyclic patch:

cyclic_half0
{
type cyclic;
neighbourPatch cyclic_half1;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
faces
(
//(0 9 21 12)
//(10 0 12 22)

(1 4 16 13)
);
}
cyclic_half1
{
type cyclic;
neighbourPatch cyclic_half0;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
faces
(
//(3 15 20 8)
//(11 23 15 3)

(3 8 20 15)
);
}


and then I got the following error:

--> FOAM FATAL ERROR:
face 0 area does not match neighbour by 0.0664441% -- possible face ordering problem.
patch:cyclic_half0 my area:0.999336 neighbour area:1 matching tolerance:0.0001
Mesh face:1 fc0.553 0.507 1)
Neighbour fc0 0.75 1)
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.


which is solved by adjusting the matchTolerance. But still, why does this error appear? The geometry is pretty simple, it should work without setting matchTolerance.

I'll also attach a blockMeshDict of the simple test case where the error mentioned at the top of the thread can be reproduced.

I think that there might be some convection about the block numbering in order to create good cyclics?
Does anybody have some comments, suggestions, ideas about this issue?

Regards,
Dejan
Attached Files
File Type: gz blockMeshDict.tar.gz (1.0 KB, 24 views)
morard is offline   Reply With Quote

Old   October 30, 2012, 06:05
Default
  #2
Member
 
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 16
morard is on a distinguished road
Hi again,

I've realised that the error appears only if the center of the patch rotational axis is not placed in the center of the coordinate system (0 0 0).

So, if I create a geometry in such a way that the center of the rotational axis is in the center of the coordinate system (0 0 0) the mesh is created without any problem.
But, If I now use the same mesh and shift it in x direction so that the rotational axis center is in (50 0 0), the error will appear! Why, I don't know!

Maybe it's a bug, but maybe not!

Regards,
Dejan
morard is offline   Reply With Quote

Old   November 14, 2012, 06:04
Default
  #3
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hello Dejan,
I am experiencing the same "Error in coupled point location" running OF 2.1.0. Have you seen this: http://www.openfoam.org/mantisbt/view.php?id=403 ?
I think this may be helpful for you as well.

Please report if you have any news on the subject

mad
maddalena is offline   Reply With Quote

Old   November 14, 2012, 08:17
Default
  #4
Member
 
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 16
morard is on a distinguished road
Hi Maddalena

thanks for your message. Yes, I saw that.
Well, that error depends somehow on the number of cells. When I put, for example, (20 15 50) cells for a certain block, everything is ok, but when I change it to, let say ( 30 20 50) - error! But this is just a small issue.

The big problem in my case is the following one:

--> FOAM FATAL ERROR:
More than one patch accessing the same transform but not of the same sign.
patch:fluid2_half0 transform:0 sign:1 current transforms1 0 0)

From function Foam::label Foam::globalIndexAndTransform::addToTransformIndex
(
const label,
const label,
const bool
) const

in file lnInclude/globalIndexAndTransformI.H at line 240.

FOAM exiting


This I cannot understand and I don't have time to check all those functions just for one geometry... If you understand what is wrong here, please let me know.

Dejan
morard is offline   Reply With Quote

Old   November 15, 2012, 10:45
Default
  #5
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi Dejan,
I think the problem is related to point order on faces. The second error you are getting follows from the first. I doubt that renumbering mesh helps at all.

I solved my problems using OF 2.1.1 and using the createPatch utility on original (not defined cyclic) patches. As for your case: try to change blockmesh cell number on the original mesh and then run createPatch.

Hope this helps.

mad
Chandsome likes this.
maddalena is offline   Reply With Quote

Old   November 15, 2012, 12:50
Default
  #6
Member
 
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 16
morard is on a distinguished road
Hi Maddalena,

yes, point order might be the problem. But I'm not sure that the second error follows from the first one. Several times I've managed to create the mesh without first error, but still the second one appeared. I have also tried to change blockMesh cell number and to use createPatch, but nothing helped.
Anyhow, I'll try again by following your suggestion. Thanks.

Dejan
morard is offline   Reply With Quote

Old   December 18, 2012, 20:26
Default
  #7
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Hello Dejan,
I am experiencing the same "Error in coupled point location" running OF 2.1.0. Have you seen this: http://www.openfoam.org/mantisbt/view.php?id=403 ?
I think this may be helpful for you as well.

Please report if you have any news on the subject

mad
Hi, Maddalena.

I have the same problem (Error in coupled point location), could you do me a favor to solve this error? Thank you very much.
If I use the createPatch, there is another error happening as below.


--> FOAM FATAL ERROR:
Attempt to cast type patch to type cyclic

From function refCast<To>(From&)
in file lnInclude/typeInfo.H at line 114.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 Foam::cyclicPolyPatch::neighbPatchID() const in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#3 Foam::cyclicPolyPatch::calcGeometry(Foam::PstreamB uffers&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 FoamlyBoundaryMesh::calcGeometry() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 FoamlyMesh::addPatches(Foam::List<FoamlyPa tch*> const&, bool) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/createPatch"
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/createPatch"
Aborted
michael1023 is offline   Reply With Quote

Old   December 19, 2012, 03:39
Default
  #8
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi,
Quote:
Originally Posted by michael1023 View Post
Attempt to cast type patch to type cyclic
I believe this is not due to the cyclic patch creation, but to your boundary condition definition. Check that 0/* files content matches constant/polyMesh/boundary definition.

mad
maddalena is offline   Reply With Quote

Old   December 19, 2012, 04:51
Default
  #9
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Hi,

I believe this is not due to the cyclic patch creation, but to your boundary condition definition. Check that 0/* files content matches constant/polyMesh/boundary definition.

mad
Hi, Maddalena.

Thank you for your quick reply. Before I have createPatch, I checked the boundary condition definition settings in 0/* files to match constant/polyMesh/boundary definition. However it also had the error as I showed before.
Would you like send me your 0/* files and createPatchDict to me? I wanna compare the difference between us. Or could you give me some other suggestions?
Thank you again.

Michael
michael1023 is offline   Reply With Quote

Old   December 19, 2012, 05:21
Default
  #10
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Quote:
Originally Posted by michael1023 View Post
Would you like send me your 0/* files and createPatchDict to me?
No, I cannot. You could post here your BC before and after the patch creation and the createPatchDict as well. I can give a look to them

Anyway: double posting is NEVER a good idea. You should be aware of this...

mad
maddalena is offline   Reply With Quote

Old   December 19, 2012, 06:11
Default
  #11
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
Hi, Maddalena.

Sorry for my discourtesy and thank you for your remind and quick reply.
The attachment is my BC and createPatchDict. I will be very appreciated if you can read them.
Thank you very much.

your sincerely
Michael



Quote:
Originally Posted by maddalena View Post
No, I cannot. You could post here your BC before and after the patch creation and the createPatchDict as well. I can give a look to them

Anyway: double posting is NEVER a good idea. You should be aware of this...

mad
Attached Files
File Type: gz cyclic-Michael.tar.gz (2.2 KB, 116 views)
michael1023 is offline   Reply With Quote

Old   December 19, 2012, 06:46
Default
  #12
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi,
indeed there are some incoherency in your createPatchDict file:
Code:
    {
        // Name of new patch
        name front_cyclic;

        // Type of new patch
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.001;
            neighbourPatch  back_cyclic;
        }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches ( front );
    }

     {
        // Name of new patch
        name back_cyclic;

        // Type of new patch
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.001;
            neighbourPatch  front_cyclic;
        }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches ( back );
    }
you must use the newly created patch name as neighbor. Try to run createPatch once again and let me know.

mad
maddalena is offline   Reply With Quote

Old   December 19, 2012, 07:02
Default
  #13
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Hi,
indeed there are some incoherency in your createPatchDict file:
Code:
    {
        // Name of new patch
        name front_cyclic;

        // Type of new patch
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.001;
            neighbourPatch  back_cyclic;
        }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches ( front );
    }

     {
        // Name of new patch
        name back_cyclic;

        // Type of new patch
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.001;
            neighbourPatch  front_cyclic;
        }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches ( back );
    }
you must use the newly created patch name as neighbor. Try to run createPatch once again and let me know.

mad
Hi, Maddalena.

Thank you a lot for your constructional suggestion. It can work well. Thank you again.

your sincerely
Michael
michael1023 is offline   Reply With Quote

Old   January 31, 2013, 22:01
Default
  #14
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Hi,
indeed there are some incoherency in your createPatchDict file:
Code:
    {
        // Name of new patch
        name front_cyclic;

        // Type of new patch
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.001;
            neighbourPatch  back_cyclic;
        }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches ( front );
    }

     {
        // Name of new patch
        name back_cyclic;

        // Type of new patch
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.001;
            neighbourPatch  front_cyclic;
        }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches ( back );
    }
you must use the newly created patch name as neighbor. Try to run createPatch once again and let me know.

mad
Hi,Maddalena.

The createPatch cannot work when I preform in OpenFOAM-1.7.1 with the same createPatchDict. The errors shows that the neighbourPatch cannot recognized. Do you have the createPatchDict in OpenFOAM-1.7.1 or suggestions for me?
Thank you.
michael1023 is offline   Reply With Quote

Old   February 1, 2013, 01:36
Default
  #15
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Hi,
indeed there are some incoherency in your createPatchDict file:
Code:
    {
        // Name of new patch
        name front_cyclic;

        // Type of new patch
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.001;
            neighbourPatch  back_cyclic;
        }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches ( front );
    }

     {
        // Name of new patch
        name back_cyclic;

        // Type of new patch
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.001;
            neighbourPatch  front_cyclic;
        }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches ( back );
    }
you must use the newly created patch name as neighbor. Try to run createPatch once again and let me know.

mad
Hi,Maddalena.

The error is shown as below

Found "neighbourPatch" entry when reading cyclic patch front_cyclic
Is this mesh already with split cyclics?
If so run a newer version that supports it, if not comment out the "neighbourPatch" entry and re-run

Thank you.
michael1023 is offline   Reply With Quote

Old   February 1, 2013, 03:29
Post
  #16
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hello, have you try this?
Quote:
Originally Posted by michael1023 View Post
comment out the "neighbourPatch" entry and re-run
anyway, this is the patch definition required for any openFoam before 2.0:
Code:
patches
(
    {
        // Name of new patch
        name cyclicSides;

        // Type of new patch
    dictionary
    {
            type cyclic;

        // Optional: explicitly set transformation tensor.
            // Used when matching and synchronising points.
            //transform translational;
            //separationVector (1 0 0);
              transform rotational;
              rotationAxis (1 0 0);
              rotationCentre (0 0 0);
    }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches (right left);

        // If constructFrom = set : name of faceSet
        set f0;
    }
    
);
Chandsome likes this.
maddalena is offline   Reply With Quote

Old   February 2, 2013, 00:48
Default
  #17
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Hello, have you try this?

anyway, this is the patch definition required for any openFoam before 2.0:
Code:
patches
(
    {
        // Name of new patch
        name cyclicSides;

        // Type of new patch
    dictionary
    {
            type cyclic;

        // Optional: explicitly set transformation tensor.
            // Used when matching and synchronising points.
            //transform translational;
            //separationVector (1 0 0);
              transform rotational;
              rotationAxis (1 0 0);
              rotationCentre (0 0 0);
    }

        // How to construct: either from 'patches' or 'set'
        constructFrom patches;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches (right left);

        // If constructFrom = set : name of faceSet
        set f0;
    }
    
);
Hi,Maddalena.

I have tried this method.
Quote:
Originally Posted by michael1023
comment out the "neighbourPatch" entry and re-run
.
But it didn't work.
I think there are some difference in createPatchDict between OF-2.1.1 and OF-1.7.1.
Meanwhile, neighbourPatch cannot recognized in OF-1.7.1.
I still try the other methods. Anyway, thank you very much.
Chandsome likes this.
michael1023 is offline   Reply With Quote

Old   April 28, 2013, 22:23
Default
  #18
Member
 
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 14
sam1364 is on a distinguished road
Hi Michael,

I have the same issue defining cyclic B.C in OpenFoam version 2.1.0. can you please let me know how the createpatchDict should look like? and any other tricky part related to the version 2.1.0 of OpenFoam in doing so?

Thanks,
Pooyan


Quote:
Originally Posted by michael1023 View Post
Hi, Maddalena.

Thank you a lot for your constructional suggestion. It can work well. Thank you again.

your sincerely
Michael
sam1364 is offline   Reply With Quote

Old   April 30, 2013, 11:12
Default
  #19
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Quote:
Originally Posted by sam1364 View Post
can you please let me know how the createpatchDict should look like?
you should have an example under application/utilities/mesh/manipulation/createPatch. Anyway: https://github.com/OpenFOAM/OpenFOAM...reatePatchDict
maddalena is offline   Reply With Quote

Old   May 1, 2013, 23:36
Default
  #20
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
Hi, Sam

you can read the example of createPatch as below:

patches
(
{
// Name of new patch
name cyclicSides;

// Type of new patch
dictionary
{
type cyclic;

// Optional: explicitly set transformation tensor.
// Used when matching and synchronising points.
//transform translational;
//separationVector (1 0 0);
transform rotational;
rotationAxis (1 0 0);
rotationCentre (0 0 0);
}

// How to construct: either from 'patches' or 'set'
constructFrom patches;

// If constructFrom = patches : names of patches. Wildcards allowed.
patches (right left);

// If constructFrom = set : name of faceSet
set f0;
}

);
michael1023 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Parallel refineMesh with Cyclic Boundaries mchurchf OpenFOAM 8 December 22, 2018 12:11
Problem with cyclic boundaries in Openfoam 1.5 fs82 OpenFOAM 36 January 7, 2015 01:31
mapFields - Changing from turbulentInlet/outlet boundaries to cyclic boundaries TianC OpenFOAM Pre-Processing 8 January 16, 2013 06:15
Wrong wall distance with cyclic boundaries sebastian OpenFOAM Bugs 4 October 31, 2012 11:24
Problems with cyclic boundaries in faMeshDefinition and surfactantFoam safre OpenFOAM 3 December 12, 2011 08:56


All times are GMT -4. The time now is 03:16.