CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Is there any easy way to connect blocks of varying resolutions using blockMesh?

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By mturcios777
  • 1 Post By murrdpirate
  • 1 Post By mturcios777
  • 1 Post By mbeaudoin

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2011, 15:02
Default Is there any easy way to connect blocks of varying resolutions using blockMesh?
  #1
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
Say I have two 1 m^3 blocks attached to each other, sharing a face. One block is filled with a mesh of 1 million 1 cm^3 cubes and the other is filled with a mesh of 1 thousand 10 cm^3 cubes. Is there any easy way to have blockMesh connect them?
murrdpirate is offline   Reply With Quote

Old   June 1, 2011, 15:15
Default
  #2
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
Ah, I guess that is one major use of the grading function. I am thinking that I should create a block in between my two blocks and use a cell expansion ratio of 10 in all directions. Is that right?

Forgive me, I'm still a bit new.
murrdpirate is offline   Reply With Quote

Old   June 2, 2011, 13:47
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
There is a utility called stitchMesh, which has a case similar to what you want documented here:

http://openfoamwiki.net/index.php/Im...ith_interfaces

If you are working with blockMesh, then you don't need the import step. Abrupt changes in discretization can cause problems, so be careful. Increasing resolution tenfold may have adverse effects on your solution. Using grading is likely to be more stable.
murrdpirate likes this.
mturcios777 is offline   Reply With Quote

Old   June 2, 2011, 19:33
Default
  #4
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
Sweet, that does look like it will do exactly what I'm trying to do.

I wonder if it'll also solve another problem I'm having. I'm trying to figure out how to deal with multiple blocks that share a face with a single other block (see attached image). Even if the resolution is exactly the same, this doesn't seem to work. I also tried using mergePatchPairs...but that didn't seem to work either.

The only thing I know will work is making sure that each face of every block is connected exactly to a face of another block (i.e. chopping the domain into a bunch of cubes). At that point I might as well create the mesh by hand.
Charles_CFD likes this.
murrdpirate is offline   Reply With Quote

Old   June 2, 2011, 23:51
Default
  #5
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
Oops, never posted the image. Here it is.
murrdpirate is offline   Reply With Quote

Old   June 3, 2011, 12:53
Default
  #6
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
From my understanding of the stitching process, you'd have to first stitch the two smaller blocks and make sure the two faces that connect with the large block are defined as one face (not that hard), then stitch the resultant mesh with the large block.

There are places where this can go wrong in a general case (just off the top of my head, parallel faces can sometimes be a pain). With stuff like this, I've had success writing a script/program which places all the points and calculates all the proper cell expansion ratios and writes out your blockMeshDict; I use GNU Octave, but use whatever you are familiar with. It may seem like a whole lot of work, but you'd be doing that stuff anyway when doing it by hand, and this way if the result is wrong you can always debug the script/program which is a lot easier than analyzing the final mesh.
murrdpirate likes this.
mturcios777 is offline   Reply With Quote

Old   June 4, 2011, 01:28
Default
  #7
Member
 
Kevin
Join Date: May 2011
Posts: 33
Rep Power: 15
murrdpirate is on a distinguished road
Ahh I knew I wouldn't be able to avoid any programming for too long. But I think you're right that that is the way to go. I think I have a pretty good idea in mind. Thanks.
murrdpirate is offline   Reply With Quote

Old   June 4, 2011, 10:26
Default
  #8
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hello,

The GGI interface was created exactly for handling such topology with non-conformal meshes. You might want to give it a try.

Martin

Quote:
Originally Posted by murrdpirate View Post
Sweet, that does look like it will do exactly what I'm trying to do.

I wonder if it'll also solve another problem I'm having. I'm trying to figure out how to deal with multiple blocks that share a face with a single other block (see attached image). Even if the resolution is exactly the same, this doesn't seem to work. I also tried using mergePatchPairs...but that didn't seem to work either.

The only thing I know will work is making sure that each face of every block is connected exactly to a face of another block (i.e. chopping the domain into a bunch of cubes). At that point I might as well create the mesh by hand.
murrdpirate likes this.
mbeaudoin is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Commercial meshers] fluent3DMeshToFoam bego OpenFOAM Meshing & Mesh Conversion 31 August 16, 2023 10:04
[blockMesh] How can I connect 2 blocks with a different grading? Ghash OpenFOAM Meshing & Mesh Conversion 4 September 14, 2016 11:27
dsmcInitialise - dsmcFoam archymedes OpenFOAM Pre-Processing 94 July 15, 2016 17:14
Naming blocks in blockMesh balkrishna OpenFOAM 7 June 28, 2011 10:03
O-grid for cylinder with varying diameter and several blocks lama ANSYS Meshing & Geometry 4 December 21, 2009 09:57


All times are GMT -4. The time now is 13:08.