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

[Other] best mesh generator

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By GerhardHolzinger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2014, 15:26
Smile best mesh generator
  #1
Member
 
Tommy Sp
Join Date: Jan 2014
Posts: 51
Rep Power: 12
vitorspadeto is on a distinguished road
what's the best mesh generation software for OpenFOAM?!

I have Ubuntu. My computer is 32 bits. I tried install salome, but it is 64 bits.
vitorspadeto is offline   Reply With Quote

Old   January 28, 2014, 15:35
Default
  #2
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Quote:
what's the best mesh generation software for OpenFOAM?!
snappyHexMesh of course! There are some presentations on the subject located at

There is also some official explanation located here and then a few GUIs to do some setup for you:

If you aren't keen on snappyHexmesh, there are also a few other mesh generation tools that I suggest

Other than that, OpenFOAM can import many formats and you can use pretty much any tool to generate meshes.
chegdan is offline   Reply With Quote

Old   January 29, 2014, 04:25
Default
  #3
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Depending on your ability to enjoy a good days pain in the brain, it can also be blockMesh in conjunction with m4 or Python.

This is the parametric mesh of a stirred tank with a Rushton impeller.

The features are

  • A variable number of stator baffles (1,2,4,6,12)
  • A variable number of rotor blades (1,2,4,6,12)
  • The geometry is parametrized (Tank diameter, height, etc.)
Attached Images
File Type: jpg stirredTankMesh_fullViewCut.jpg (72.5 KB, 168 views)
GerhardHolzinger is offline   Reply With Quote

Old   February 14, 2014, 14:24
Default BlockMesh
  #4
New Member
 
Thomas Walsh
Join Date: Nov 2010
Posts: 18
Rep Power: 16
thomasnwalshiii is on a distinguished road
Gerhard,

Very nice tank model you have created. Curious if you could post an example of how to implement an m4 or python script to generate the blockmesh and baffle files?

Thanks,
Tom Walsh
thomasnwalshiii is offline   Reply With Quote

Old   February 17, 2014, 13:52
Default
  #5
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Hi,

I stopped using m4 for my meshes because Python is much better to read and it is also much more flexible. However, the attached image of a small pipe joining a larger cylinder was created with m4.

I won't post my mesh creation script - sorry for that, but I can elaborate on the workflow.

  1. Draw a sketch of the geometry. If you can draw the geometry using only quads you can build the mesh with blockMesh
  2. Identify a logical structure between the vertices in your geometry
  3. Find a naming scheme that obeys the logical relations.
    1. E.g. the vertices that made up the tank had a four character name 'RThH'. The 'R' is the radial identifier, the outermost vertices were named 'a???'. The vertices of the next inner layer were named 'b???', and so forth.
    2. The second character is the tangential coordinate. The vertices on the x-axis were named '?0??', the next ones in angular direction were named '?1??'.
    3. The third character is only a seperator
    4. The last character is the vertical coordinate. E.g. 'a2h0' lies in the x-y plane, 'c3h2' has a non-zero height.
  4. Translate the logical relations between the vertices in code, e.g. when computing the coordinates.
  5. Use the naming scheme to access the point coordinates using a map in Python, that's a very handy thing m4 is not able of.
  6. Write methods that receive vertex names as an argument and return e.g. a valid OF-block definition as a string.
  7. Put everything together in a script that:
    1. computes the coordinates of the vertices based on input parameters and other relations
    2. writes a valid blockMeshDict including vertex definition, block definition, boundary definition and if necessary edge definition (don't forget to compute the interpolation points).
My current stirred tank mesh-generation script is at around 1200 lines of code.
Attached Images
File Type: jpg junction.jpg (69.1 KB, 108 views)
GerhardHolzinger 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
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! divergence OpenFOAM Meshing & Mesh Conversion 0 January 23, 2019 05:17
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
Help with UDF to change mesh by external mesh generator zou_mo Fluent UDF and Scheme Programming 1 July 1, 2009 05:57
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 19:10


All times are GMT -4. The time now is 03:36.