|
[Sponsors] |
April 5, 2013, 17:33 |
Merging edge patches
|
#1 |
Member
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17 |
I am facing a problem when I try to merge some patches.
(I'm working with OpenFOAM 2.1.1 Updated to 2.2.0) These patches appears because I try to have different mesh resolution. I simplified my mesh to have only the problematic part: It will be solved as plane (unity thickness). CDGF, DEHG and GHJI squares will be meshed with squares. ABEC and EBKJ trapeze will be meshed with trapezes. Points of the meshes will be strictly the same at the interfaces CE and EJ Overall mesh will be better in the squares than in the trapezes. The way I generated it can be found on LShaped1.zip attachment. The -block option gives: Code:
paraFoam -block The problem I have is that at the CE and EI interface, blockMesh generate a "defaultFaces" patch. Removing the front and back faces, I would like to have this type of borders: But the defaultFaces came and gives this: This is really a problem because this inner face makes icoFoam having: Code:
--> FOAM FATAL ERROR: Continuity error cannot be removed by adjusting the outflow. Please check the velocity boundary conditions and/or run potentialFoam to initialise This problem seams related to this thread (but they are using stitchMesh): http://StitchMesh on two patches And masb seams to have also a problem of internal patches that are not removed here: Internal faces between blocks
Do not hesitate to send me private message to correct my English. Last edited by Yosmcer; April 14, 2013 at 12:02. |
|
April 8, 2013, 16:35 |
|
#2 |
Member
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17 |
Maybe a solution could be to change the way to generate the mesh.
Instead of making the square meshed part out of three squares, an idea could be to have a bigger square that include the empty, than removing this space. So that would make the problematic faces "face matching" instead of "defaultFaces". However, I'm not sure how to define the necessary in the blockMeshDict. topoSet seams to be the way to remove the space that I do not want (but I have to define the blockMeshDict before). Can someone guide me in this path? Last edited by Yosmcer; April 11, 2013 at 06:33. |
|
April 11, 2013, 13:17 |
|
#3 |
Member
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17 |
Deeper try to remove this ******* defaultFaces patch. After having ran blockMesh, all in the polyMesh directory:
1) I open "boundary" file. 2) I note the start face and the number of faces. 3) I go to "face" file. 4) I delete the faces going from "startFace" to "startFace+nFaces" (the last faces of the list in my case) 5) I change the number at the beginning of the list to remove the nFaces I have just deleted. 6) I go to "owner" file and repet step 4 and 5. 7) I come back to "boundary" file to delete defaultFaces entry, and decrement de number of boundary at the beginning of the list. But I still do not get it (I will look in the side of "neighbour" file as I didn't change it, and that the new problem is between neighbour cells): ould Neighbour cells are related to internal faces. Maybe I should not delete this faces, but add neighbour informations (and still deleting the defaultFaces patch from boundary). I found more informations about neighbours here: owner and neighbor So they are listed by faces, in the idea that each face have an owner cell and a neighbour cell. As there are less faces in "neighbour" file than in "owner" file, I suppose blockMesh put all the internal faces first in the "owner" file, so that it has only to put the internal faces values in the "neighbour" file (and nothing instead of the previously -1 for the externals faces). So, new idea: 1) I open "boundary" file. 2) I note the start face and the number of faces. 3) I note the number of internal faces (I can find it in the neighbour file) lets name it NInternalFaces. 4) I go to "face" file. 5) I copy the faces going from "startFace" to "startFace+nFaces" (the last faces of the list in my case) 6) I paste them after the NInternalFaces'th faces. 7) I go to "owner" file and repet step 5 and 6. 8) I come back to "boundary" file to delete defaultFaces entry, and decrement de number of boundary at the beginning of the list. 9) Adding the number nFaces to the startFaces numbers of the other boundary patches (their start face have been changed as we changed the order of faces) 10) Adding the neighbour needed by the internal faces I want to create (but how ?) So, now, I'm searching how I could manage to make point 10, adding the neighbour informations. (I wonder if it wouldn't be simpler to write a code that directly generate the needed mesh as my problem is only a 2D case). Last edited by Yosmcer; April 11, 2013 at 16:49. |
|
April 14, 2013, 13:57 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Yosmcer,
I got a bit lost in your description... even more because of the ABC nomenclature vs OpenFOAM's numeric one. Nonetheless, my questions and respective solutions:
Best regards, Bruno
__________________
|
|
April 14, 2013, 17:05 |
|
#5 |
Member
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17 |
Hello wyldckat,
A big thanks to all your work. Sorry for that ABC... I wanted to make it simple to clarify, but it seems that made the opposite. I learned a bit too late about the "paraFoam -block".
Now, I will try to understand (so don't do it ):
Again, a big thanks for your response, even bigger because it is not your predilection domain (running CFD cases). Last edited by Yosmcer; April 15, 2013 at 15:44. |
|
May 20, 2013, 11:35 |
|
#6 |
Member
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17 |
Finally, I simply made more blocks to allow face matching.
With this method, I have no more continuity errors, and when done with a m4 macro, this is not so difficult, even for the more complex mesh. I attached the result of the more complex case I done and the m4 macro I used to generate the willing blockMesDict file (I putted the .m4 in a .zip file as the forum system do not accept.m4 files; just decompress the file to have it). At the center, there is an empty square (no fluid) surrounded by walls, this square is included in an fluid square with square-shaped mesh, and finally included in a round fluid part. My problem was to have no interface between the fluid square and the round part. Inlet and outlet are in the external perimeter. Hope it may help other peoples. Thanks to the moderator that renamed the title of my post, I mistyped "ege" instead of "edge". Thanks again for all those who tried to help, especially wyldckat. Last edited by Yosmcer; May 21, 2013 at 02:13. |
|
June 25, 2013, 10:01 |
Possible solution
|
#7 |
New Member
Arnau
Join Date: Jan 2012
Posts: 17
Rep Power: 14 |
Hi Yosmcer,
I think I managed to solve the problem you report in "What I already tried", section 2. I mean the part where you get the following error message: Code:
--> FOAM FATAL ERROR: Face 795 reduced to less than 3 points. Topological/cutting error B. Old face: 2(440 465) new face: 2(76 153) http://www.cfd-online.com/Forums/ope...tml#post435852 Good luck! Arnau. |
|
November 15, 2014, 07:40 |
stitch meshes with different distributions
|
#8 | |
Member
|
Quote:
That post was very useful for me. But I have a question. If we have different mesh distribution in each patch, how can we merge them together? For example, I've made 4 blocks that have interfaces by each other (please find the blockMeshDict in the attachment). I want to merge the patches in the interfaces by using mergePatchPairs , but I encounter to the following error: Code:
Zero length edge detected. Probable projection error: slave patch probably does not project onto master. Code:
Points on patch sides do not match to within tolerance 1.17982e-07 From function perfectInterface::setRefinement(polyTopoChange& ref) const in file perfectInterface/perfectInterface.C at line 220. Thank you in advance, Hossein Domain.zip blocks.png Last edited by atoof; November 15, 2014 at 14:06. |
||
November 15, 2014, 14:09 |
|
#9 |
Member
|
[QUOTE=atoof;519293]Dear Bruno,
That post was very useful for me. But I have a question. If we have different mesh distribution in each patch, how can we merge them together? For example, I've made 4 blocks that have interfaces by each other (please find the blockMeshDict in the attachment). I want to merge the patches in the interfaces by using mergePatchPairs , but I encounter to the following error: Code:
Zero length edge detected. Probable projection error: slave patch probably does not project onto master. Code:
Points on patch sides do not match to within tolerance 1.17982e-07 From function perfectInterface::setRefinement(polyTopoChange& ref) const in file perfectInterface/perfectInterface.C at line 220. Thank you in advance, Hossein |
|
November 15, 2014, 14:44 |
|
#10 |
Member
|
I think that when patchA is merged to patchB and patchD is merged to patchC, the name of each vertex is changed and therefore the third mergepair is not allowed.
Solving above problem is very for me. Any hint is very welcome. |
|
November 16, 2014, 14:31 |
|
#11 |
Member
|
Any hint or suggestion?
|
|
November 16, 2014, 15:51 |
|
#12 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings atoof,
Hints:
Bruno
__________________
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
Problem using AMI | vinz | OpenFOAM Running, Solving & CFD | 298 | November 13, 2023 09:19 |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
Possible bug with stitchMesh and cyclics in OpenFoam | Jack001 | OpenFOAM Pre-Processing | 0 | May 21, 2016 09:00 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |