|
[Sponsors] |
October 29, 2012, 11:53 |
Cyclic boundaries in OF 21x
|
#1 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
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 |
|
October 30, 2012, 06:05 |
|
#2 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
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 |
|
November 14, 2012, 06:04 |
|
#3 |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
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 |
|
November 14, 2012, 08:17 |
|
#4 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
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 |
|
November 15, 2012, 10:45 |
|
#5 |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
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 |
|
November 15, 2012, 12:50 |
|
#6 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
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 |
|
December 18, 2012, 20:26 |
|
#7 | |
New Member
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 16 |
Quote:
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 |
||
December 19, 2012, 03:39 |
|
#8 |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
||
December 19, 2012, 04:51 |
|
#9 | |
New Member
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 16 |
Quote:
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 |
||
December 19, 2012, 05:21 |
|
#10 | |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
Quote:
Anyway: double posting is NEVER a good idea. You should be aware of this... mad |
||
December 19, 2012, 06:11 |
|
#11 |
New Member
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 16 |
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 |
|
December 19, 2012, 06:46 |
|
#12 |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
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 ); } mad |
|
December 19, 2012, 07:02 |
|
#13 | |
New Member
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 16 |
Quote:
Thank you a lot for your constructional suggestion. It can work well. Thank you again. your sincerely Michael |
||
January 31, 2013, 22:01 |
|
#14 | |
New Member
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 16 |
Quote:
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. |
||
February 1, 2013, 01:36 |
|
#15 | |
New Member
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 16 |
Quote:
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. |
||
February 1, 2013, 03:29 |
|
#16 |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
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; } ); |
|
February 2, 2013, 00:48 |
|
#17 | ||
New Member
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 16 |
Quote:
I have tried this method. Quote:
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. |
|||
April 28, 2013, 22:23 |
|
#18 |
Member
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 15 |
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 |
|
April 30, 2013, 11:12 |
|
#19 | |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
Quote:
|
||
May 1, 2013, 23:36 |
|
#20 |
New Member
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 16 |
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; } ); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with cyclic boundaries in Openfoam 1.5 | fs82 | OpenFOAM | 37 | November 29, 2024 11:15 |
Parallel refineMesh with Cyclic Boundaries | mchurchf | OpenFOAM | 8 | December 22, 2018 12:11 |
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 |