Using createPatch in place of couplePatches
Hi, all.
I used to use couplePatches whenever I imported a mesh file with cyclic bc's. I know that with 1.5 couplePatches has been integrated into createPatch, but I have been unable to find any significant documentation or examples on how to do this. If any of you could, please provide an example or point me to some documentation. The specifics of what I'm doing are creating a mesh in gmsh. The cyclic bc's are created as one physical group and they import into openfoam as such. Apparently, though, the importation involves some ordering problems for the cyclic bc faces. Previously to v1.5 couplePatches solved this problem. |
Hi Scott,
have a look in the
Hi Scott,
have a look in the thread entitled CreatePatch to create cyclic boundary it tells you all about how to use createPatch and about a bug in 1.5 that seems to be fixed in 1.5.x. I still dit not test it, it's compiling ... The createPatchDict examples all look correct to me and it's quite straighforward definition of the patches (or the patch) to use. |
So, finished compiling 1.5.x.
So, finished compiling 1.5.x. 5 minutes walltime left were just entough to run it and it's fine. So I think you definitively have to move to 1.5.x to use it.
|
That's what I get for asking a
That's what I get for asking a question before really trying to find the answer myself. I found the createPatchDict example file and it is indeed rather straightforward. Thank you for taking the time to respond, nonetheless.
|
createPatch in 1.5-dev for cyclic Patches
Hi,
I am trying to import a fluent mesh similar to the one in boundaryLaunderSharma and need to create cyclic patches. After import I change the boundary file to look like this: Quote:
Quote:
Quote:
Am I missing something obvious? I thought the bug was solved years ago.... Thanks in advance... Pal |
creating cyclic boundary condition
Hi, I am having difficulty in creating cyclic boundary condition, I have done it this way:
1- I created a mesh in Gambit (Quarter of a cylinder) and I called the two planes symmetrya and symmetryb. and I set them to be symmetry for periodic bc. 2-set the writePrecision in system/controlDict to 12. 3-In the end of *.msh file I saw (0 "Cells:") (12 (0 1 5eb78 0)) (12 (2 1 5eb78 1 4)) (0 "Zones:") (45 (2 fluid fluid)()) (45 (3 mass-flow-inlet ariinlet2)()) (45 (4 symmetry symmetryb)()) (45 (5 symmetry symmetrya)()) (45 (6 pressure-outlet outlet)()) (45 (7 wall wall)()) (45 (8 mass-flow-inlet airinlet1)()) (45 (9 mass-flow-inlet fuelinlet)()) (45 (11 interior default-interior)()) I did not change anything here, and leave it as it is. 3-then I ran fluentMeshTofoam *.msh : Building boundary and internal patches. Creating patch 0 for zone: 3 start: 1 end: 25 type: mass-flow-inlet name: ariinlet2 Creating patch 1 for zone: 4 start: 26 end: 10345 type: symmetry name: symmetryb Creating patch 2 for zone: 5 start: 10346 end: 20665 type: symmetry name: symmetrya Creating patch 3 for zone: 6 start: 20666 end: 23898 type: pressure-outlet name: outlet Creating patch 4 for zone: 7 start: 23899 end: 34233 type: wall name: wall Creating patch 5 for zone: 8 start: 34234 end: 34263 type: mass-flow-inlet name: airinlet1 Creating patch 6 for zone: 9 start: 34264 end: 34306 type: mass-flow-inlet name: fuelinlet Creating patch 7 for zone: 11 start: 34307 end: 1181033 type: interior name: default-interior Adding new patch ariinlet2 of type patch as patch 0 Adding new patch symmetryb of type symmetryPlane as patch 1 Adding new patch symmetrya of type symmetryPlane as patch 2 Adding new patch outlet of type patch as patch 3 Adding new patch wall of type wall as patch 4 Adding new patch airinlet1 of type patch as patch 5 Adding new patch fuelinlet of type patch as patch 6 Patch default-interior is internal to the mesh and is not being added to the boundary. Default patch type set to empty Writing mesh... to "constant/polyMesh" done. End 4-It creates in the constant/polymesh ---> boundary : 7 ( ariinlet2 { type patch; nFaces 25; startFace 1146727; } symmetryb { type symmetryPlane; nFaces 10320; startFace 1146752; } symmetrya { type symmetryPlane; nFaces 10320; startFace 1157072; } outlet { type patch; nFaces 3233; startFace 1167392; } wall { type wall; nFaces 10335; startFace 1170625; } airinlet1 { type patch; nFaces 30; startFace 1180960; } fuelinlet { type patch; nFaces 43; startFace 1180990; } ) 5-then I define the createPatchDict in /system and within that I have: matchTolerance 1E-3; pointSync true; patches ( { name symmetrya; type cyclic; constructFrom patches; patches (symmetrya symmetryb); } ); 6-then I ran createPatch, this was the outcome: Create time Reading createPatchDict. Using relative tolerance 0.001 to match up faces and points Create polyMesh for time = 0 Moving faces from patch symmetrya to patch 2 Moving faces from patch symmetryb to patch 2 Doing topology modification to order faces. Synchronising points. Points changed by average:0 max:0 Removing patches with no faces in them. Removing empty patch symmetryb at position 1 Removing patches. Writing repatched mesh to 1 End 7-It creates a folder /1/polyMesh and within that: []$ ls boundary cellZones faces faceZones neighbour owner points pointZones 8-vi boundary : 6 ( ariinlet2 { type patch; nFaces 25; startFace 1146727; } symmetrya { type symmetryPlane; nFaces 20640; startFace 1146752; } outlet { type patch; nFaces 3233; startFace 1167392; } wall { type wall; nFaces 10335; startFace 1170625; } airinlet1 { type patch; nFaces 30; startFace 1180960; } fuelinlet { type patch; nFaces 43; startFace 1180990; } ) 8-I copy all the contents of this folder to constant/polymesh/ 9- I did changed the symmetryplane type now to cyclic for symmetrya 10-I did the simpleFoam and I received this error: Create time Create mesh for time = 0 face 0 area does not match neighbour 10320 by 21.8435% -- possible face ordering problem. patch:symmetrya my area:0.000277 neighbour area:0.000344925 matching tolerance:0.001 Mesh face:1146752 vertices:4((0 0 0.1123) (0.05 0 0.1123) (0.05 0 0.11784) (0 0 0.11784)) Neighbour face:1157072 vertices:4((0 0.043315 0) (0 0.0502135 0) (0.05 0.0502135 0) (0.05 0.043315 0)) Rerun with cyclic debug flag set for more information. From function cyclicPolyPatch::calcTransforms() in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 150. FOAM exiting Can anyone help me with this problem? |
You need renumbering the patches.
i am not sure if the createPatch utilites has as function. i do the renumbering in ICEMCFD Quote:
|
Hi mcjicpm2,
Ive got exactly the same problem as you. I did renumberMesh as waynezw0618 mentionned, but It does not work... I created a cycle patch by using createPatch like so : //////////////////////////////////////// matchToTolerance 1E-3; pointSync true; patches { { name frontAndBack; dictionary { type patch; } constructFrom patches; patches (front back); } } ///////////////////////////////////////// After having successfully run createPatch, I went to the boundary file and removed the type "patch" as the type "cyclic". Then, when I want to use decomposePar I got this on the screen: /////////////////////////////////////////////////////////////////////////////// Create time Create mesh for time = 0 face 66 area does not match neighbour 14089 by 0.106552% -- possible face ordering problem. patch:frontAndBack my area:9.9849e-06 neighbour area:9.99554e-06 matching tolerance:0.001 Mesh face:1215005 vertices:4((-0.711454 -0.08125 0.625) (-0.667023 -0.08125 0.625) (-0.666929 -0.0810225 0.625) (-0.711373 -0.0810281 0.625)) Neighbour face:1229028 vertices:4((-0.711454 -0.08125 0.103) (-0.711373 -0.0810279 0.103) (-0.66693 -0.0810222 0.103) (-0.667023 -0.08125 0.103)) Rerun with cyclic debug flag set for more information. From function cyclicPolyPatch::calcTransforms() in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 180. FOAM exiting /////////////////////////////////////////////////////////////////////////////////// I hope you guys can help me :). Thanks in advance! |
Problem solved by changing the match tolerance to 0.2.
|
All times are GMT -4. The time now is 15:08. |