|
[Sponsors] |
CreatePatch crashes segmentation violation in createPatch for cyclic boundaries |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Sung-Eun Kim
Join Date: Mar 2009
Posts: 76
Rep Power: 18 ![]() |
I was trying to make a cyclic boundary out of two patches on a mesh converted from FLUENT mesh. And createPatch crashed, giving segmentation error as shown below.
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Reading createPatchDict. Using relative tolerance 0.001 to match up faces and points Create polyMesh for time = 0 Adding new patch periodic-wake of type cyclic as patch 20 Moving faces from patch periodic_wake to patch 20 Moving faces from patch periodic_wake_shadow to patch 20 Doing topology modification to order faces. #0 Foam::error::printStack(Foam: ![]() #1 Foam::sigSegv::sigSegvHandler(int) in "/home/sek/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #2 __restore_rt in "/lib64/tls/libc.so.6" #3 Foam::face::normal(Foam::Field<foam::vector<double > > const&) const in "/home/sek/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #4 Foam::cyclicPolyPatch::getCentresAndAnchors(Foam:: PrimitivePatch<foam::face,> > const&, Foam::Vector<double> > const&, Foam::List<foam::face> const&, Foam::List<foam::face> const&, Foam::Field<foam::vector<double> >&, Foam::Field<foam::vector<double> >&, Foam::Field<foam::vector<double> >&, Foam::Field<double>&) const in "/home/sek/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #5 Foam::cyclicPolyPatch::order(Foam::PrimitivePatch< foam::face,> > const&, Foam::Vector<double> > const&, Foam::List<int>&, Foam::List<int>&) const in "/home/sek/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #6 Foam::polyTopoChange::reorderCoupledFaces(bool, Foam::polyBoundaryMesh const&, Foam::List<int> const&, Foam::List<int> const&, Foam::Field<foam::vector<double> > const&) in "/home/sek/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libdynamicMesh.so" #7 Foam::polyTopoChange::compactAndReorder(Foam::poly Mesh const&, bool, bool, bool, int&, Foam::Field<foam::vector<double> >&, Foam::List<int>&, Foam::List<int>&, Foam::List<foam::objectmap>&, Foam::List<foam::objectmap>&, Foam::List<foam::objectmap>&, Foam::List<foam::objectmap>&, Foam::List<foam::objectmap>&, Foam::List<foam::objectmap>&, Foam::List<foam::objectmap>&, Foam::List<foam::objectmap>&, Foam::List<foam::map<int> >&, Foam::List<int>&, Foam::List<int>&, Foam::List<foam::map<int> >&) in "/home/sek/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libdynamicMesh.so" #8 Foam::polyTopoChange::changeMesh(Foam::polyMesh&, bool, bool, bool, bool) in "/home/sek/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libdynamicMesh.so" #9 main in "/home/sek/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/createPatch" #10 __libc_start_main in "/lib64/tls/libc.so.6" #11 __gxx_personality_v0 in "/home/sek/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/createPatch" Segmentation fault |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
Could you try the 1.5.x version and let us know if it works? 1.5.x should have some fixes regarding matching. If still persists could you post the case or send it directly to me?
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
mohd mojab
Join Date: Mar 2009
Posts: 31
Rep Power: 18 ![]() |
hello
I do not why making a cyclic patch with createPatch is impossible for me. I made a simple box in blockMeshDict just to test createPatch. I tried to patch front and back with both version 1.5 and 1.5-x but both gave me the same error: Create time Reading createPatchDict. Using relative tolerance 0.001 to match up faces and points Create polyMesh for time = 0 Adding new patch Z of type cyclic as patch 5 Moving faces from patch maxZ to patch 5 Moving faces from patch minZ to patch 5 Doing topology modification to order faces. #0 Foam::error: ![]() #1 Foam::sigSegv::sigSegvHandler(int) in "/home/mou/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" . . . #10 __libc_start_main in "/lib/libc.so.6" #11 _start in "/home/mou/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/createPatch" Segmentation fault I attached the case directory. I appreciate any comments. Mou |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Markus Weinmann
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 77
Rep Power: 18 ![]() |
Hi
I had the same/similar problem a while ago. I was able to solve it by removing all additional entries in the controlDict file, e.g. libs() or other probe/averaging functions. Markus |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
mohd mojab
Join Date: Mar 2009
Posts: 31
Rep Power: 18 ![]() |
Thank you Markus for your reply. I checked the controlDict file but there is not any of extra things that you mentioned. Would you post a sample case that createPatch can work for that?
Thank you mou |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
Switch off pointSync in the createPatchDict and it works for me in 1.5.x.
(the point synchronisation doesn't handle points being on multiple cyclics) |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
mohd mojab
Join Date: Mar 2009
Posts: 31
Rep Power: 18 ![]() |
As you said mattijs, I put "false" for pointSync in the createPatchDict, and checked it by 1.5-x. I faced the same error. I just copied the createPatch directory from 1.5-x in .../utilities/mesh/manipulation/ of OpenFOAM-1.5 and compile it. Do I need to compile whole 1.5-x package?
Regards Mou |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
Yes, the changes are also to the libraries, not just to the createPatch application. You will need to compile the whole 1.5.x.
|
|
![]() |
![]() |
![]() |
![]() |
#9 |
New Member
Sumeet Kumar
Join Date: Mar 2009
Posts: 21
Rep Power: 18 ![]() |
Hi Foamers,
I am also struggling with the cyclic buondaries. I created a mesh in gambit with inlet and outet face meshes linked. Now I imported the ascii mesh in OF-1.5 and tried to couple the inlet and outlet face boundaries into a single patch of type cyclic using createPatch utility. However the utillity crashes giving the similar segmentation fault error as posted in the topic. I also removed the custom libraries libs( ...) and any function objects from controldict system file as suggested by Markus in this topic. I also tried to switch off the pointsyn flag as suggested by mattijs, but its giving the same segmentation fault error. I am posting the error messages I received :- -------------------------------------------------------------------------------------------------------------------------------- sm.kumar@linux-3:~/OpenFOAM/sm.kumar-1.5/Sumeet/annulus/annulus_case> createPatch /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : createPatch Date : Mar 23 2009 Time : 14:52:57 Host : linux-3 PID : 19511 Case : /home/sm.kumar/OpenFOAM/sm.kumar-1.5/Sumeet/annulus/annulus_case nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Reading createPatchDict. Using relative tolerance 0.001 to match up faces and points Create polyMesh for time = 0 Adding new patch perd of type cyclic as patch 4 Moving faces from patch symmetry-3 to patch 4 Moving faces from patch periodic to patch 4 Sumeet Chechk1 Doing topology modification to order faces. Sumeet Chechk2 #0 Foam::error: ![]() #1 Foam::sigSegv::sigSegvHandler(int) in "/home/sm.kumar/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #2 ?? in "/lib64/libc.so.6" #3 Foam::face::normal(Foam::Field<Foam::Vector<double > > const&) const in "/home/sm.kumar/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #4 Foam::cyclicPolyPatch::getCentresAndAnchors(Foam:: PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&, Foam::List<Foam::face> const&, Foam::List<Foam::face> const&, Foam::Field<Foam::Vector<double> >&, Foam::Field<Foam::Vector<double> >&, Foam::Field<Foam::Vector<double> >&, Foam::Field<double>&) const in "/home/sm.kumar/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #5 Foam::cyclicPolyPatch: ![]() #6 Foam: ![]() ![]() #7 Foam: ![]() ![]() #8 Foam ![]() ![]() #9 main in "/home/sm.kumar/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/createPatch" #10 __libc_start_main in "/lib64/libc.so.6" #11 __gxx_personality_v0 in "/home/sm.kumar/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/createPatch" Segmentation fault -------------------------------------------------------------------------------------------------------------------------------- I tried to go through the createPatch source to find out the step causing errors Code snippet :- Line numbers 545-555 -------------------------------------------------------------------------------------------------------------------------------- // Change mesh, use inflation to reforce calculation of transformation // tensors. Info<< " Sumeet Chechk1 " << endl; // Debug statements Info<< "Doing topology modification to order faces." << nl << endl; Info<< " Sumeet Chechk2 " << endl; // Debug statements autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, true); Info<< " Sumeet Chechk3 " << endl; // Debug statements Info<< "mapping done " << nl << endl; ----------------------------------------------------------------------------------------------------------------------------- However I could not figure out the sources of error caused during the mapping process. Please someone help me to find out what could be the possible source of error. Also share your previous similar experiences and how you resolved it. Thanks SK |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
You seem to be using 1.5. Have you tried 1.5.x? It contains fixes to do with cyclic patch matching.
|
|
![]() |
![]() |
![]() |
![]() |
#11 |
New Member
Sumeet Kumar
Join Date: Mar 2009
Posts: 21
Rep Power: 18 ![]() |
Hi mattijs,
I am quite new to OF. I started with OF-1.5 and it works gr8 on my linux terminal. I did a search to find out the topics on 1.5.x installation. On link "http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/release/" I found two compressed archives OpenFOAM-1.5-de.r1094.tgz (30Mb) ThirdParty.General_2008-12-11.tgz (125Mb)Could you specify which link to continue with? I am using openSUSE 10.3 (x86_64) Thanks in adv SK |
|
![]() |
![]() |
![]() |
![]() |
#12 |
New Member
Sumeet Kumar
Join Date: Mar 2009
Posts: 21
Rep Power: 18 ![]() |
Hi mattijs,
I just found the installation webpage the git repository. for OF 1.5.x http://www.opencfd.co.uk/openfoam/do....html#download Ignore the previous msg. Thanks! SK |
|
![]() |
![]() |
![]() |
![]() |
#13 |
New Member
Sumeet Kumar
Join Date: Mar 2009
Posts: 21
Rep Power: 18 ![]() |
Hi mattijs,
The segmentation fault error is fixed in OF-1.5.x. it works fine. However it still posts errors:- -------------------------------------------------------------------------------------------------------------------------------- Patch ![]() Perhaps your faces do not match? The obj files written contain the current match. Continuing with incorrect face ordering from now on! face 6 area does not match neighbour 5006 by 0.108917% -- possible face ordering problem. patch ![]() Mesh face:55406 vertices:4((-9.82281 -1.87413 10) (-9.92119 -1.25298 10) (-9.93765 -1.25488 10) (-9.8386 -1.87729 10)) Neighbour face:60406 vertices:4((-9.92124 -1.25262 0) (-9.82275 -1.87446 0) (-9.83854 -1.87762 0) (-9.93769 -1.25453 0)) Rerun with cyclic debug flag set for more information. From function cyclicPolyPatch::calcTransforms() in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at l ine 158. FOAM exiting -------------------------------------------------------------------------------------------------------------------------------- I have set the writeprecision to be 12 in ControlDict. I also used utilities to output the face centers of both the patches. Both the face centers differ by 9th dec place onwards. Any suggestions?? Incase I change the tol value to 0.01, it may end up in incorrect face matching. However, same tol levels would be different when running the simulations. |
|
![]() |
![]() |
![]() |
![]() |
#14 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
So what happens if you increase the matchTolerance and enable pointSync? It should still pick the closest match to couple to and the pointSync will snap the points such that there are no future errors.
|
|
![]() |
![]() |
![]() |
![]() |
#15 |
New Member
Sumeet Kumar
Join Date: Mar 2009
Posts: 21
Rep Power: 18 ![]() |
Hi Again,
I started increasing the matchTol from 0.001 and finally ended up to 1 at which createPatch could finally order the faces and create a new merged cyclic patch. (pointsync set as false). Then I tried with pointsync set as true. I got following messages :- ----------------------------------------------------------------------------------------------------------------------- Create time Reading createPatchDict. Using relative tolerance 1 to match up faces and points Create polyMesh for time = 0 Adding new patch per_final of type cyclic as patch 4 Moving faces from patch periodic to patch 4 Moving faces from patch symmetry-3 to patch 4 Doing topology modification to order faces. cyclicPolyPatch: ![]() cyclicPolyPatch: ![]() cyclicPolyPatch: ![]() --> FOAM Serious Error : From function cyclicPolyPatch: ![]() in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 1257 Patch ![]() Perhaps your faces do not match? The obj files written contain the current match. Continuing with incorrect face ordering from now on! Synchronising points. --> FOAM Warning : From function syncTools<class T, class CombineOp>::syncPointList(const polyMesh&, UList<T>&, const CombineOp&, const T&, const bool) in file /home/lcfd/OpenFOAM/OpenFOAM-1.5.x/src/OpenFOAM/lnInclude/syncToolsTemplates.C at line 1047 There are decomposed cyclics in this mesh with transformations. This is not supported. The result will be incorrect Points changed by average:0.174201962375 max:10.020097921 face 0 area does not match neighbour 5000 by 199.314% -- possible face ordering problem. patch ![]() Mesh face:55400 vertices:4((-9.98025 -0.628118 10) (-9.99742 0.628969 10) (-9.99741 -0.629182 10) (-9.92119 -1.25298 10)) Neighbour face:60400 vertices:4((-9.98025 -0.628118 -1.77636e-15) (-9.92119 -1.25298 10) (-9.99741 -0.629182 10) (-9.99742 0.628969 10)) Rerun with cyclic debug flag set for more information. From function cyclicPolyPatch::calcTransforms() in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 158. FOAM exiting ------------------------------------------------------------------------------------------------------------------------------- This states that it is not able to sync points as again newpatch-face0 is not able to match with newpatch-face(n/2).(which it was able to when pointsync was switched off) I have been rather successful with coarse grids with cyclic bc's in OF, but this is a fine mesh. Is this the cause of error and to check if there is a loss of significant digits while converting the meshes and writing new patches in OF etc etc.( leading to causing errors in calculating face areas by clipping significant digits of nodes and in face ordering) I tried setting the write precision IO in fluent3D.. mesh converter to 16. However this did not resolve the problem. It continues with the same face matching errors. Is something wrong with the calculation of transformation matrix. as far as i know it automatically calculates the rotation/translational translational matrix - is it correct. (mine is a translational cyclic) Plz help |
|
![]() |
![]() |
![]() |
![]() |
#16 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
It has dumped the match so far to obj files : "per_final_half0_faces.obj" etc. Use objToVTK+paraview to visualise those. Are both halves correctly picked up? Do the faces exactly overlay?
|
|
![]() |
![]() |
![]() |
![]() |
#17 |
Member
Join Date: Sep 2009
Posts: 45
Rep Power: 17 ![]() |
Does anybody know what pointSync does exactly ?
It is said that: " Do a synchronisation of coupled points after creation of any patches". Can anyone further explain ? Thanks a lot. |
|
![]() |
![]() |
![]() |
![]() |
#18 |
New Member
Vasu
Join Date: Oct 2009
Posts: 17
Rep Power: 17 ![]() |
Hi everyone,
I've tried to use the createPatch utility to create a cyclic patch along the same lines as the rest of the users have already posted here and as Sumeet has indicated above, I get the same segmentation fault. I'm actually using OF 1.6-x , which I'm assuming has the bugs fixed which were there prior to 1.5-x. So any advice on how to overcome this segmentation fault would be much appreciated. Thanks in advance. Best, Vasu |
|
![]() |
![]() |
![]() |
![]() |
#19 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
If you have multiple cyclics make sure to have pointSync switched off - it will try to synchronise points on opposite sides but cannot yet handle points on multiple cyclics.
Just run checkMesh on the resulting mesh (dumped to a new time directory) to make sure the resulting mesh is ok. If the problem persists please post a simple testcase here. |
|
![]() |
![]() |
![]() |
![]() |
#20 |
New Member
Vasu
Join Date: Oct 2009
Posts: 17
Rep Power: 17 ![]() |
Hello again,
Sorry for the delay in following up, I've had some end of term exams ![]() Ok I've attached a test case for createPatch. It's a wedge shaped cylinder using blockMeshDict. I've done the same case using wedge patch types for the "front" and "back" patches, and it works alright. But I want to create a cylinder with a central core region that is empty, which is why I made the mesh externally with Gambit and am trying to use createPatch on the "front" and "back" patches to make them cyclic, for an axisymmetric case. I hope that makes sense. Any ideas on how to do this without createPatch would also be very welcome. Here is the error I'm getting when I run the attached test case: Create time Create polyMesh for time = 0 Reading createPatchDict. Using relative tolerance 1 to match up faces and points Adding new patch new_front_back as patch 6 from { type cyclic; } Moving faces from patch front to patch 6 #0 Foam::error: ![]() #1 Foam::sigSegv::sigSegvHandler(int) in "/local/gvasudha/OpenFOAM/gvasudha-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so" #2 __restore_rt at sigaction.c:0 #3 changePatchID(Foam: ![]() ![]() #4 main in "/opt/software/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/createPatch" #5 __libc_start_main in "/lib64/libc.so.6" #6 _start in "/opt/software/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/createPatch" Segmentation fault Thanks in advance for any help. Best regards, Vasu |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[mesh manipulation] CreatePatch | chris1980 | OpenFOAM Meshing & Mesh Conversion | 8 | November 16, 2016 15:44 |
[mesh manipulation] CreatePatch to create cyclic boundary | sbence | OpenFOAM Meshing & Mesh Conversion | 18 | August 30, 2012 06:51 |
[Commercial meshers] CreatePatch for build cyclic patch | make | OpenFOAM Meshing & Mesh Conversion | 7 | January 21, 2009 04:46 |
[mesh manipulation] CreatePatch after subsetMesh | maka | OpenFOAM Meshing & Mesh Conversion | 2 | August 27, 2008 07:28 |
[mesh manipulation] Problem with cyclic patch and createPatch | mattijs | OpenFOAM Meshing & Mesh Conversion | 12 | August 24, 2006 04:57 |