Merging edge patches
3 Attachment(s)
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: http://img11.hostingpics.net/pics/811524Baseresized.png 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. http://img15.hostingpics.net/pics/719367Mesh.png 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: http://img15.hostingpics.net/pics/263512Border.png But the defaultFaces came and gives this: http://img15.hostingpics.net/pics/99...faultFaces.png This is really a problem because this inner face makes icoFoam having: Code:
--> FOAM FATAL ERROR: 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. |
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? |
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): ouldhttp://img4.hostingpics.net/pics/857149wtf.png 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). |
1 Attachment(s)
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 |
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). |
2 Attachment(s)
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. |
Possible solution
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. |
stitch meshes with different distributions
3 Attachment(s)
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 Thank you in advance, Hossein Attachment 35147 Attachment 35153 |
3 Attachment(s)
[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 Thank you in advance, Hossein |
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. |
Any hint or suggestion?
|
Greetings atoof,
Quote:
Bruno |
All times are GMT -4. The time now is 00:17. |