CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion > OpenFOAM Mesh Utilities

when can stitchMesh be used?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree12Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   June 2, 2014, 07:24
Default
  #21
Senior Member
 
Elo´se
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 112
Rep Power: 7
Eloise is on a distinguished road
Hi Bruno,
I finally had time to work again on this setup, at least on the cylinder case. The cyclic AMI condition works great! I'll try in short future to apply it to the sphere, and then to apply a rotation in between each computation to speed up the convergence.
Thanks for the valuable help!
Regards,
Elo´se
Eloise is offline   Reply With Quote

Old   November 18, 2015, 06:48
Default
  #22
Senior Member
 
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 5
esujby is on a distinguished road
Hello,

Please i am wondering, where do i get the tolerancedict to add to the constant folder for the multi patch utility?

thanks
esujby is offline   Reply With Quote

Old   November 18, 2015, 07:55
Default
  #23
Senior Member
 
Elo´se
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 112
Rep Power: 7
Eloise is on a distinguished road
Hi,

I couldnt find it in 2.4.x distribution. But it seems the option -toleranceDict is still available in stitchMesh. Here is what the file should contain with the default values for all parameters.

Regards,
Eloise
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      toleranceDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
tolerances
    {
pointMergeTol            0.05;
edgeMergeTol             0.01;
nFacesPerSlaveEdge       5   ;
edgeFaceEscapeLimit      10  ;
integralAdjTol           0.05;
edgeMasterCatchFraction  0.4 ;
edgeCoPlanarTol          0.8 ;
edgeEndCutoffTol         0.0001;
    }
Eloise is offline   Reply With Quote

Old   January 2, 2016, 08:44
Default Use cyclicAMI instead!
  #24
Senior Member
 
Join Date: Aug 2013
Posts: 333
Rep Power: 7
Antimony is on a distinguished road
Hi All,

I am not sure how useful this post would be coming as it does about 2 years since the last post.

Nevertheless, I thought it would be useful for anyone, who like me, has been wondering how to solve the issue with stitchMesh.

Just a background on the problem I was trying to solve: It was the case that Bruno had mentioned earlier - stitching together meshes to the north, south, east and west of a given mesh. Any two would work, after which it would invariably cause problems.

I tried the utility that Bruno had put up as well - stitchMeshMultiPatch. My problem didn't get solved completely - any two would work, this time better than using stitchMesh individually, but still the problem persisted.

I read in the forums that cyclicAMI would be a better option and that is what I tried. Initially, I ran into some problems in it as well. Not with joining the mesh, but with running a simulation after.

Digging further showed that an important parameter called "transform" could be specified in the "boundary" file. I initially tried the first one I found "noOrdering" but it lead me nowhere.

Using the "banana" method, I found that there is one called "coincidentFullMatch" and gave a shot with that.

Presto, it worked!

So, at the end of this long story, for anyone looking to stitch meshes like the one I just mentioned, use the "cyclicAMI" type and "coincidentFullMatch" for the "transform" value.

Hope this proves to be useful to someone in the future!

Cheers,
Antimony
wyldckat, cutter, Tasos and 2 others like this.
Antimony is offline   Reply With Quote

Old   July 15, 2016, 01:27
Default
  #25
Senior Member
 
Join Date: Aug 2013
Posts: 333
Rep Power: 7
Antimony is on a distinguished road
Hi All,

Just had time to relook into stitchMesh and found this workaround, which seems to work.

Note that I have not tested it extensively, but I did try it in a couple of cases and it seemed to work. You have been warned!

Essentially what I found was that you can stitch two meshes well only a couple of times. Beyond that there is going to be a problem. However, if you change the way the merging and stitching is done, then you might not have the usual problem with stitchMesh.

Consider a 3x3 grid of meshes (Denote as L1,L2,L3,M1,M2,M3 and U1,U2,U3), with all of them having different mesh resolutions. The point I was trying to make was this:

1. Merge L1 and L2. And stitch using right patch of L1 and left patch of L2
2. From constant/polyMesh remove the meshModifiers file.
3. Merge L1L2 and L3. Stitch using right patch of L1L2 and left patch of L3.
4. Repeat step 2
5. Using createPatch, combine the front faces in L1L2L3 into a single patch/face (and optionally a single front face)
6. Repeat 1 through 4 for the middle meshes (M1,M2,M3) and the top meshes (U1,U2,U3)
7. For the middle meshes, use createPatch to create a single front face and a single back face.
8. For the upper meshes, use createPatch to create a single back face (and optionally a single front face).
9. Merge L1L2L3 and M1M2M3. Stitch using the front patch of L1L2L3 and back patch of M1M2M3.
10. Repeat step 2.
11. Merge L1L2L3M1M2M3 and U1U2U3. Stitch using the front patch of L1L2L3M1M2M3 and back patch of U1U2U3.
12. Repeat step 2.

Hopefully, at the end of this you will have a single mesh, with no errors in the process of stitching them.

It is a tedious process, but it seems to work. Again, I haven't tested it in a variety of configurations, and have had some trouble when trying to stitch cylindrical patches.

Hope this is useful!

Cheers,
Antimony
cutter, Eloise and Bashar like this.
Antimony is offline   Reply With Quote

Old   September 20, 2017, 17:52
Default
  #26
Member
 
Bashar
Join Date: Jul 2015
Posts: 70
Rep Power: 4
Bashar is on a distinguished road
Quote:
Originally Posted by Antimony View Post
1. Merge L1 and L2. And stitch using right patch of L1 and left patch of L2
2. From constant/polyMesh remove the meshModifiers file.
3. Merge L1L2 and L3. Stitch using right patch of L1L2 and left patch of L3.
4. Repeat step 2
5. Using createPatch, combine the front faces in L1L2L3 into a single patch/face (and optionally a single front face)
6. Repeat 1 through 4 for the middle meshes (M1,M2,M3) and the top meshes (U1,U2,U3)
7. For the middle meshes, use createPatch to create a single front face and a single back face.
8. For the upper meshes, use createPatch to create a single back face (and optionally a single front face).
9. Merge L1L2L3 and M1M2M3. Stitch using the front patch of L1L2L3 and back patch of M1M2M3.
10. Repeat step 2.
11. Merge L1L2L3M1M2M3 and U1U2U3. Stitch using the front patch of L1L2L3M1M2M3 and back patch of U1U2U3.
12. Repeat step 2.
Hi,
Thanks for sharing these instructions! I am trying your approach but I think I didn't quite get it. I attached my two meshes that I want to stitch the interfaces between them from all direction NS and EW . The small mesh should be inside the larger meshes that is why you will see that the interfaces are names a_l b_l ... and a_s b_s ... Do you think this is doable using your approach?
Attached Images
File Type: jpg mesh.jpg (118.1 KB, 12 views)
File Type: jpg two_mesh.jpg (26.4 KB, 12 views)
File Type: jpg meshinterfaces.jpg (78.5 KB, 12 views)
Bashar is offline   Reply With Quote

Old   September 22, 2017, 16:07
Default
  #27
Member
 
Bashar
Join Date: Jul 2015
Posts: 70
Rep Power: 4
Bashar is on a distinguished road
Hi,
I managed to make the two meshes works. First, I stitch the patches with the flow stream since its essential in the solution. So , I stitched the left two patches (a_s and a_l) and the two to the right (c_s and c_l) . Next step was to use the cyclicAMI interface for the patches at the North and South , so I combined (d_l and d_s) and (b_l and b_s). I checked the mesh using checkMesh and visually and its seems to be very good. I hope it will work in the simulation without any issues.

Best wishes!

Bashar
Bashar is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
stitchMesh perfect vs partial Eloise OpenFOAM Mesh Utilities 2 October 25, 2017 10:47
stitchMesh problems along patch edges ribe OpenFOAM Mesh Utilities 2 March 5, 2013 16:25
stitchMesh question? vishalsacharya OpenFOAM Native Meshers: blockMesh 0 December 10, 2012 00:41
stitchMesh dhruv OpenFOAM Mesh Utilities 13 February 23, 2012 18:14
stitchMesh marine OpenFOAM Mesh Utilities 1 April 27, 2010 10:59


All times are GMT -4. The time now is 09:49.