|
[Sponsors] |
October 14, 2011, 11:52 |
stitchMesh
|
#1 |
Member
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 15 |
Hi Foamers,
I am having some problems with stitchMesh utility. May be could suggest me a correct or a better way. I am having 5 different geometries, which are to be meshed independently, and then merged together. i generate these geometries in Salome 6.0 and then export it as .stl files to be meshed by sHM. Now, say that I have patch 1 in geometry 1 and patch 2 in geometry 2 which are to be merged and stitched. Since these must be identical patches, I have a single .stl file for both these patches, that I use it in both the geometries. After the sHM has been done, I find that they are not exactly the same, but there is an overlap. So, when i use stitchMesh (I have tried the -perfect flag, the -partial flag and without any flag and these are the results of stitchMesh without any flag, as the other two threw some errors), i do not get both nFaces for both as 0, but some faces are left in the patches. How can I avoid this situation? I am attaching the figures below of the patches to be stitched and the mesh after it is stitched |
|
October 15, 2011, 05:18 |
|
#2 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Hi dhruv,
why don't you generate the meshes with shM, then use mergeMesh to merge them, and then stitch patches? I've described this for a very simple case here: http://www.cfd-online.com/Forums/ope...hes-p-t-u.html Let me know if this is of any help... Best regards, Tomislav |
|
October 17, 2011, 03:35 |
stitchMesh
|
#3 | |
Member
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 15 |
Hi Tomislav,
I had checked your post earlier, and this is exactly what I did. I just made the geometry in Salome, and generate the mesh in Snappy. However, when I stitchMesh between the two patches, there are always some residual faces. Although, they are few in number, I guess it would not be correct to delete them altogether. Quote:
|
||
October 17, 2011, 03:42 |
|
#4 |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18 |
I haven't checked whether this has already been mentioned: You could have a look at stitchMeshToleranceDict, e.g. the one attached (remove the .txt), which has to be put in the constant folder and controls whether points on the boundary patch are moved for stitching.
Arne |
|
October 17, 2011, 04:13 |
|
#5 | |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Quote:
have you tried the build compound mesh option in salome? This way you can merge the meshes before exporting them to .stl, and have multiple merged stl surfaces. If you do this, the internal overlapping patches should be gone (through the compounding) and shm can mesh the interior.... Check this out: http://docs.salome-platform.org/salo...unds_page.html The algorithm should allow for compounds without 3D algorithms, and even if it does not, if I remember correctly, exporting to .stl will only export the surface mesh anyway. Tomislav |
||
October 17, 2011, 08:10 |
stitchToleranceDict
|
#6 | ||
Member
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 15 |
Quote:
Thanks for your reply. I did what you said, and placed the file in case/constant folder but it seems that the file is not being read by stitchMesh. I am attaching here the logfile for stitchMesh. I did not make any changes to your file. Do I have to provide any other changes to the file, to make it working (like case name, or the path, etc. ). Moreover, these values suggest that there is a default stitchToleranceDict file located somewhere. How can I find that? Quote:
Dhruv |
|||
October 18, 2011, 08:07 |
|
#7 | |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18 |
Hi Druv,
indeed, the command has an addition, e.g. Quote:
Also, you might need to make some adjustments in the dict to see some changes in your case. Arne |
||
October 19, 2011, 08:07 |
stitchMeshToleranceDict
|
#8 | |
Member
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 15 |
Hi Arnoldinho,
Thanks for the reply. I tried running my case with the new stitchMeshToleranceDict. However, the results are still bad. One of the patches gets stitched nicely (6 faces still remains as residual, but its better that 120 faces previously), however, the other one shows no effect. (190 and 200 faces as residual in the two patches). I tried a range of values for the different entries, but the effect is quite negligible in the second case. I am not able to understand, whether it is the problem due to Salome or OpenFoam. I tried to model my surface in a different way in Salome, however the results are pretty much the same. I am now confused how to proceed further Quote:
|
||
October 24, 2011, 04:10 |
|
#9 |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18 |
Hi dhruv,
when using stitchMesh, you have to make sure that all of your patches get stitched (number of faces on the previous patches must be zero in the boundary file), a reduced number does not help you. Otherwise the solver will crash somewhen. You also have to make sure that your patches have (exactly) the same dimensions in x, y and z. I tried a very (very) long time using Salome meshes, also in combination with engrid meshes for the boundary layer. Even after mergeMeshes and stitchMesh have worked, the results were very bad! Therefore, I changed back to sHM, which really works nice! The new 2.0 version seems to have edge mapping now, so it might be worth trying it! Arne Last edited by Arnoldinho; October 24, 2011 at 05:42. |
|
October 25, 2011, 07:00 |
|
#10 | |
Member
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 15 |
Hi Arne,
The problem is that I am using a mesh which has been generated in sHM using the edge feature of OF 2.0. I create only the geometry in Salome. Then, i export it as .stl in OF, and mesh it with sHM. Everything is exact till I do the meshing. After the meshing, the two adjacent faces (which are to be merged and stitched together), which have even the same .stl file for two cases, doesn't come out exactly the same. Quote:
|
||
October 25, 2011, 07:08 |
|
#11 |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18 |
Sorry, but then I don't get what you are doing... Using sHM and an .stl file e.g. to 'cut out' things from a surrounding mesh, creates only one mesh. Where are the others coming from? Can you upload a case including the meshes that you want to merge?
Arne |
|
October 27, 2011, 05:51 |
Got it!!
|
#12 |
Member
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 15 |
Hi Arne,
sorry for the late reply. I got all things in order, after modifying the stitchMeshToleranceDict several times. Thanks for the advice. I am however concerned that I had to do a lot of manipulations, for a relatively simple geometry, and one set of conditions were not enough to do the stitch for different faces. Regards, dhruv. |
|
October 27, 2011, 05:54 |
|
#13 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Hi,
I'm curious, why don't you use the compound mesh in Salome, since you are already using it to generate STLs for the shm, and feed the compounded stl surface to shm thus avoiding having to stitch the patches in the first place? T. |
|
February 23, 2012, 18:14 |
|
#14 |
New Member
tanzil tjhin
Join Date: Jan 2012
Posts: 4
Rep Power: 14 |
Hello,
I also have a problem with stitchMesh and it could be related to this thread. Im working about flow simulation on a Tunnel and making my mesh purely with OF. Since i have a large number of cells, i managed to split the calculation area in two parts. The big box contains purely of hexaedra and will be generated with blockMesh. The small box located in the middle of the big box and contains the Object, that completely meshed with snappyHexMesh (exclusive the layer). Merging both boxes works well and stitching the patches at time directories 0 and time step 1 are fine. Issue is im not able to stitch patches with my latest meshtime directory. The geometry dimensions are identic and i've tried all flags from stitchMesh. Two different Errors occurs depend on the flag and they are: - Zero length edge detected. Probable projection error: slave patch probably does not project onto master. - Points on patch sides do not match to within tolerance 2.561e-06 (this one with -perfect) I've played around with the toleranceDict but also without success. Indeed i found out in paraview that my slavepatch deviate from my masterpatch line when i enough zoom in. As you can see in the picture, the red line display the slavepatch, while the white one the masterpatch. I dont understand why stitchMesh works fine before snapping procedure or why this small different line appear after snapping stage? Have anyone encounter such problem? Any reply is welcome |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[mesh manipulation] stitchMesh perfect vs partial | Eloise | OpenFOAM Meshing & Mesh Conversion | 2 | October 25, 2017 11:47 |
[mesh manipulation] stitchMesh: multiple meshes | GerhardHolzinger | OpenFOAM Meshing & Mesh Conversion | 3 | August 25, 2017 13:43 |
[mesh manipulation] StitchMesh sigFpe / bad point | liquidspoon | OpenFOAM Meshing & Mesh Conversion | 2 | November 29, 2015 15:19 |
[snappyHexMesh] SnappyHexMesh and StitchMesh | New_OpenFOAM_user | OpenFOAM Meshing & Mesh Conversion | 1 | September 7, 2014 17:53 |
[mesh manipulation] Problem with stitchMesh: it does not work in meshes with several common patches | arnau1985 | OpenFOAM Meshing & Mesh Conversion | 2 | June 25, 2013 09:49 |