CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

best mesh generator

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

Like Tree3Likes
  • 3 Post By GerhardHolzinger

Reply
 
LinkBack Thread Tools Display Modes
Old   January 28, 2014, 15:26
Smile best mesh generator
  #1
Member
 
Tommy Sp
Join Date: Jan 2014
Posts: 51
Rep Power: 3
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
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan 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.
__________________
Dan

Find me on twitter @dancombest and LinkedIn
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: 165
Rep Power: 14
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, 109 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: 17
Rep Power: 6
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: 165
Rep Power: 14
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, 64 views)
GerhardHolzinger 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
[ICEM] Hexa mesh, curve mesh setup, bunching law Anorky ANSYS Meshing & Geometry 4 November 12, 2014 01:27
3D Hybrid Mesh Errors DarrenC ANSYS Meshing & Geometry 11 August 5, 2013 06:42
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 2 November 25, 2012 09:54
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10


All times are GMT -4. The time now is 14:10.