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

[snappyHexMesh] can snappy run with multiple block in blockMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By BakedAlmonds
  • 3 Post By Antimony
  • 1 Post By mo_na
  • 1 Post By CFDMagnus

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2016, 06:34
Default can snappy run with multiple block in blockMesh
  #1
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 10
BakedAlmonds is on a distinguished road
Hi,

As the title suggested, is there a way to run snappy with multiple blocks within blockMesh? As of current, i did: blockMesh > surfaceFeatureExtract > snappyHexMesh.
And only the block (defined in blockMesh) with the coordinates specified by locationInMesh (defined in sHMD) is retained.

Anyhow able to do it?
sourav90 likes this.
BakedAlmonds is offline   Reply With Quote

Old   July 14, 2016, 06:47
Default
  #2
Member
 
mo_na's Avatar
 
Mona
Join Date: Mar 2016
Location: Berlin
Posts: 49
Rep Power: 10
mo_na is on a distinguished road
Hi,

normally it shouldn't be a problem to have multiple blocks when using snappy.
Did you look at your mesh after running blockMesh and check if everything was created correctly in the first place?
If you don't figure it out, maybe you could post your blockMeshDict and snappyHexMeshDict and also some screenshots of paraview showing your mesh?

Cheers,
Mona
mo_na is offline   Reply With Quote

Old   July 14, 2016, 06:58
Default
  #3
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 10
BakedAlmonds is on a distinguished road
Thank you!!!

I have attached the blockMesh and sHMD files in it.
Together is a picture of the blocks that are generated by blockMesh.
Attached Images
File Type: png blocks.png (20.1 KB, 139 views)
Attached Files
File Type: gz multipleBlocks.tar.gz (1.9 KB, 37 views)
BakedAlmonds is offline   Reply With Quote

Old   July 14, 2016, 08:11
Default
  #4
Member
 
mo_na's Avatar
 
Mona
Join Date: Mar 2016
Location: Berlin
Posts: 49
Rep Power: 10
mo_na is on a distinguished road
I saw that in your blockmesh the vertices 20,21,22 and 23 are exactly the same as 28,29,30 and 31. I am not sure if this might cause a problem.
Also you need to make sure that your locationInMesh doesn't lie on a boundary (I don't know the size of your geometry).
And do you get any error messages when running blockMesh or snappyHexMesh?
mo_na is offline   Reply With Quote

Old   July 14, 2016, 08:24
Default
  #5
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 10
BakedAlmonds is on a distinguished road
Hi, I do not get any error message when running that script, just then the final result is that only one of the blocks remain after snappy.

The identical vertices is so that i can put different number of mesh.
I tried using the same (ie change 28 29 30 31 to 20 21 22 23) and got the following message

Code:
Creating block mesh topology
--> FOAM Warning : 
    From function polyMesh::polyMesh(... construct from shapes...)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 903
    Found 16 undefined faces in mesh; adding to default patch.

Check topology

    Basic statistics
        Number of internal faces : 1
        Number of boundary faces : 34
        Number of defined boundary faces : 34
        Number of undefined boundary faces : 0
    Checking patch -> block consistency

Creating block offsets
Creating merge list 

--> FOAM FATAL ERROR: 
Inconsistent number of faces between block pair 4 and 5

    From function blockMesh::calcMergeInfo()
    in file blockMesh/blockMeshMerge.C at line 221.

FOAM exiting
BakedAlmonds is offline   Reply With Quote

Old   July 14, 2016, 08:56
Default
  #6
Member
 
mo_na's Avatar
 
Mona
Join Date: Mar 2016
Location: Berlin
Posts: 49
Rep Power: 10
mo_na is on a distinguished road
Did you run checkMesh after running blockMesh?
This could give you a hint... I am quite sure that the problem lies already in your blockMesh and not in snappy
mo_na is offline   Reply With Quote

Old   July 14, 2016, 11:04
Default
  #7
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 10
BakedAlmonds is on a distinguished road
errrrmmm.. this is what i get. I am not sure if there are any errors in it. It looks fine to me?
Attached Files
File Type: txt logCheck.txt (4.3 KB, 32 views)
BakedAlmonds is offline   Reply With Quote

Old   July 14, 2016, 22:06
Default
  #8
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

If you have duplicate vertices and define duplicate faces, then snappyHexMesh will work only on the block that locationInMesh is in.

If you want it to consider the entire domain, you must combine the meshes. Typically you will need to merge the meshes and stitch them, which may not always work.

Unless you have very good reason to have duplicate vertices and faces, I would suggest that you just use a single set to create your blocks. This way, when you create the blockmesh, OF will take care to merge faces that lie on top of each other.

To cut a long story short, if you have multiple non-connected/merged blocks and you do snappy, it will keep (mainly) only the block that has the locationInMesh point.

Cheers,
Antimony
sourav90, gpouliasis and Kavi like this.
Antimony is offline   Reply With Quote

Old   July 15, 2016, 05:58
Default
  #9
Member
 
mo_na's Avatar
 
Mona
Join Date: Mar 2016
Location: Berlin
Posts: 49
Rep Power: 10
mo_na is on a distinguished road
Hi,

I think Antimony's answer should help you
Also I looked at your checkMesh logfile and there are no errors, but you should also take the warnings seriously:
Code:
***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D. 
...
The mesh has multiple regions which are not connected by any face.
sourav90 likes this.
mo_na is offline   Reply With Quote

Old   November 29, 2018, 07:30
Default faceMerging works.
  #10
New Member
 
Magnus Hoffmann
Join Date: Sep 2018
Posts: 4
Rep Power: 8
CFDMagnus is on a distinguished road
Help is within the user guide:


To connect two blocks with face matching, the two patches that form the connection should simply be ignored from the patches list. blockMesh then identifies that the faces do not form an external boundary and combines each collocated pair into a single internal faces that connects cells from the two blocks.


So just outcommenting the faces from the patch list will do.

That's it. Check whether there is a visible boundary face/wall inside the blockMesh before using snappyHexMesh.
sourav90 likes this.
CFDMagnus 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
[blockMesh] Multiple boundary conditions in one block EOC OpenFOAM Meshing & Mesh Conversion 13 November 3, 2020 02:26
[snappyHexMesh] Snappy extruding my .stl file through my blockMesh abigail_s OpenFOAM Meshing & Mesh Conversion 1 May 24, 2016 22:21
Blockmesh problem with more than one block sven82 OpenFOAM Pre-Processing 1 June 4, 2013 18:08
foamLog not solving for Ux, Uy, Uz aerospain OpenFOAM Post-Processing 5 April 18, 2012 11:01
[blockMesh] Trouble with blockMesh kupiainen OpenFOAM Meshing & Mesh Conversion 40 January 10, 2009 18:44


All times are GMT -4. The time now is 16:04.