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

[snappyHexMesh] Merged geometry after snappy

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 5, 2016, 11:23
Default Merged geometry after snappy
  #1
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 9
BakedAlmonds is on a distinguished road
Hi,

I am trying to simulate flow over a city. For this, i used blockMesh > surfaceFeatureExtract > snappyHexMesh

But after this, the buildings in the city (which are in close proximity) got merged together.

Currently I have played around with the snappyhexmeshdict but have yet to find a solution. Any one have any idea on how to resolved it?
BakedAlmonds is offline   Reply With Quote

Old   July 6, 2016, 02:53
Default
  #2
Member
 
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12
Astrodan is on a distinguished road
Maybe use a finer blockMesh, more detailed refining in the snappyHexMeshDict or check whether the positions of your buildings are correct in the first place.

If this doesn't help, you'll definitely need to provide more details.
Astrodan is offline   Reply With Quote

Old   July 6, 2016, 08:47
Default
  #3
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 9
BakedAlmonds is on a distinguished road
Thank you for the comments!!

The domain created is huge of 3.4 by 3.4 by 1.7 km. Currently, I specified a mesh size of 100m in blockmesh uniformly. I cant go too much finer as the number of cells generated will be insane.
As for refinementSurface, i specified <2 6> which will give a surface meshing of <min of 1.5m and max of 25m> right?

The buildings in the city that i wish to generate is larger that 1.5m so I wasnt sure how to stop the buildings from merging.

Edit: Also, I tried playing with resolveFeatureAngle (5, 30, 100) but basically i see no difference from 30 and below (no idea what this do).
BakedAlmonds is offline   Reply With Quote

Old   July 6, 2016, 10:27
Default
  #4
Member
 
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12
Astrodan is on a distinguished road
I'm not entirely sure how snappyHexMesh works, it just does for me (with randomly tuned settings).

However, I would suggest you to try a more simple example, i.e. a smaller geometry. You can still use your STL file, but you could use a blockMesh of just 100mx100m, making sure that there is at least one building in the given domain. Then have something like 10 cells in every direction, which would give you a base resolution of 10m which should roughly be in the order of a house/street, so that now the separation probably will be easier.

If it works that way, the problem appears to be your base mesh. If that also doesn't help, some other config is off.
Astrodan is offline   Reply With Quote

Old   July 6, 2016, 10:56
Default
  #5
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 9
BakedAlmonds is on a distinguished road
HEY ASTRODAN!!! THANK YOU!!

I scaled down the domain and started to analysis it. It appears that the surface refinement has to be really high (I did not change the base mesh size but rather I increase the surface refinement like crazy). However, in this case the number of faces for my actual (entire) domain will be mad.

To solve this, I incorporated a really large min value of 0 refinement. However, the mesh turns out weird. The ground (flat) became heavily defined. See attachment for example. How can I make the mesh at the ground coarser as fine mesh are not really required there? Initially I though it has something to do with resolveFeatureAngle but I put it as 30 so BY RIGHT the max refinement should not be done on the ground (>180degree) or is my idea of this feature mistaken?

Once again thank you very much!!!!
Attached Images
File Type: jpg merge.jpg (187.4 KB, 24 views)
BakedAlmonds is offline   Reply With Quote

Old   July 11, 2016, 09:15
Default
  #6
Member
 
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12
Astrodan is on a distinguished road
Quote:
Originally Posted by BakedAlmonds View Post
How can I make the mesh at the ground coarser as fine mesh are not really required there?
I don't know about resolve feature angle, but what I have done lately is to split my STL file into multiple files, where one only contains the elements that should be handled the same. An example where this is used is the tutorial tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer. Then you can set different refinements depending on the surface you select.

However, splitting the surface is not that trivial as it seems. I have written a tool in MATLAB which helps (a lot), but am not as far as to publish it here.
__________________
PhD Student at the Institute of Biochemical Engineering at TU München
Modelling of fluid dynamics in open photobioreactors.

System:
OpenFOAM 2.3.x, 64bit, 8 Core Xeon Workstation
Astrodan is offline   Reply With Quote

Old   July 11, 2016, 09:35
Default
  #7
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 9
BakedAlmonds is on a distinguished road
Once again thank you so much!!!
I have been trying to work on that as well via salome. But as the stl via contains many MANY faces, I am still working on it slowly.
Is there other software that you would recommend? (I am a cfd noob)
BakedAlmonds is offline   Reply With Quote

Old   July 11, 2016, 09:58
Default
  #8
Member
 
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12
Astrodan is on a distinguished road
Quote:
Originally Posted by BakedAlmonds View Post
Once again thank you so much!!!
I have been trying to work on that as well via salome. But as the stl via contains many MANY faces, I am still working on it slowly.
Is there other software that you would recommend? (I am a cfd noob)
I found somewhere that some version of autocad (I think) can do this, search for splitting the stl file. Otherwise, I have no clue. Do you have access to MATLAB? I could try to push my tool a little...
Astrodan is offline   Reply With Quote

Old   July 11, 2016, 10:02
Default
  #9
Member
 
Almond Wong
Join Date: May 2016
Posts: 68
Rep Power: 9
BakedAlmonds is on a distinguished road
I have access to MatLAB but I am not familiar with it . Plus I am really bad at coding and stuff.

I will search around for the splitting function. Will update once I find some
BakedAlmonds 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
[ICEM] Holes in complex ICEM geometry alecbann ANSYS Meshing & Geometry 2 April 4, 2019 03:40
[Workbench] Workbench 18.2 SpaceClaim->Mechanical geometry accuracy/tolerance problem sultzan ANSYS Meshing & Geometry 0 December 13, 2018 17:41
Error while running pisoFoam with snappy but ran smoothly without snappy in empty dm faiazk OpenFOAM Running, Solving & CFD 0 October 24, 2018 13:51
Export geometry file from ansys mechanical browns6 Structural Mechanics 0 August 27, 2013 16:19
Problem Importing Geometry ProE to CFX fatb0y CFX 3 January 14, 2012 19:42


All times are GMT -4. The time now is 15:31.