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

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

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

Like Tree3Likes
  • 1 Post By mturcios777
  • 1 Post By mturcios777
  • 1 Post By mbeaudoin

Reply
 
LinkBack Thread Tools Display Modes
Old   June 1, 2011, 14:02
Default Is there any easy way to connect blocks of varying resolutions using blockMesh?
  #1
Member
 
Kevin
Join Date: May 2011
Posts: 32
Rep Power: 6
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, 14:15
Default
  #2
Member
 
Kevin
Join Date: May 2011
Posts: 32
Rep Power: 6
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, 12:47
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
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, 18:33
Default
  #4
Member
 
Kevin
Join Date: May 2011
Posts: 32
Rep Power: 6
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.
murrdpirate is offline   Reply With Quote

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

Old   June 3, 2011, 11:53
Default
  #6
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
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, 00:28
Default
  #7
Member
 
Kevin
Join Date: May 2011
Posts: 32
Rep Power: 6
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, 09:26
Default
  #8
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
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

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
dsmcInitialise - dsmcFoam archymedes OpenFOAM Pre-Processing 93 February 11, 2014 02:22
fluent3DMeshToFoam bego OpenFOAM 27 May 29, 2013 13:08
Naming blocks in blockMesh balkrishna OpenFOAM 7 June 28, 2011 09:03
How can I connect 2 blocks with a different grading? Ghash OpenFOAM Native Meshers: blockMesh 3 June 29, 2010 13:25
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 06:48.