CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [Other] Enosh: A New Structured Mesh Generator (https://www.cfd-online.com/Forums/openfoam-community-contributions/125849-enosh-new-structured-mesh-generator.html)

lakeat November 1, 2013 13:40

Enosh: A New Structured Mesh Generator
 
2 Attachment(s)
I have spent a few months in writing a 2D structured mesh generator for external aerodynamic flow simulations purely seeking for generating high-quality structured meshes, which is not possible right now with OpenFOAM's blockMesh. Before I go any further, I am just wondering how many people is interested in using it in OpenFOAM community? It is C++, QT and VTK based (so linux and mac version will be readily available), very fast as far as I can tell. It generates smoothed mesh (not just winslow smoothing), but also with wall grid space control and orthogonal boundary grids, tests so far have shown that the convergence speed is not too bad. I'd like to make it free, even though not open source for the moment. Here are two screenshots:

Attachment 26534Attachment 26535

vatavuk November 3, 2013 08:08

Hi Daniel,
I would be interested in using your mesh generator. Have you considered using mesquite for mesh smoothing?
Best Regards,
Paulo

lakeat November 4, 2013 08:09

Thanks a lot for your interest. I'll start writing an OpenFOAM mesh exporter soon.

mesquite? Not yet. Currently I have just finished the old winslow method and a more powerful elliptic method with forcing terms and also one of my own algorithm.

zhengzh5 February 24, 2014 18:25

Quote:

Originally Posted by lakeat (Post 460453)
Thanks a lot for your interest. I'll start writing an OpenFOAM mesh exporter soon.

mesquite? Not yet. Currently I have just finished the old winslow method and a more powerful elliptic method with forcing terms and also one of my own algorithm.

Hi,

is there any plan to release the source code for your mesh generator?

thanks!

lakeat February 24, 2014 20:56

Sorry, I don't have this plan for the moment. I am now rewriting the whole code all over again to handle multi-blocks. So hopefully, it will be at least a good alternative of OpenFOAM's native blockmesh utility

leguichet February 25, 2014 02:50

Is it possible to convert your mesh to gmsh format? So it could be used in many other open source software.

taxalian February 27, 2014 15:26

Quote:

Originally Posted by lakeat (Post 476588)
Sorry, I don't have this plan for the moment. I am now rewriting the whole code all over again to handle multi-blocks. So hopefully, it will be at least a good alternative of OpenFOAM's native blockmesh utility

Hi Daniel,
I really appreciate your efforts for this excellent initiative. Secondly i would like to know is it possible to use normal hyperbolic extrusion with your mesher. Also away from the wall at far distance outside the boundary layer thickness can the rest of the domain be filled by triangles/tetrahedrals. So kind of hybrid meshing approach.

Thanks.

lakeat February 27, 2014 15:41

hyperbolic extrusion is definitely the thing I would do in the near future. But not hybrid for the time being. Currently my goal is solely for academic, so converter to other non-FOAM mesh format like "Gmsh format" will propably come later.

Here is a leak of current input file format:
Code:

// ------------------------------------------------------------------------- //
//                                                                          //
//            ENOSH, a multi-block structured mesh generator                //
//                        Copyright 2014 Daniel Wei                          //
//                                                                          //
//                        Mesh Configuration File                          //
// ------------------------------------------------------------------------- //

// --------------------
// Description: A horseshoe mesh
// --------------------

// --------------------
// Geometry: NODES
// Format: NODE $NEWID $POINT
// --------------------
NODE 1 (0.0 0.0 0);
NODE 2 (5.0,0.0,0);
NODE 3 (5.0,5.0,0);
NODE 4 (0.0,5.0,0);
NODE 5 (2.0,0.0,0);
NODE 6 (2.0,1.0,0);
NODE 7 (3.0,1.0,0);
NODE 8 (3.0,0.0,0);

// --------------------
// Geometry: Special Edges
// Format: ARC $NODE1ID $NODE2ID $POINT
// --------------------
ARC 1 2 (1,0.5,0);

// --------------------
// Geometry: Edges and Their Dimensions
// Format: EDGE $NODE1ID-$NODE2ID [$DIMENSION] [$DELTA1] [$DELTA2] [$SMOOTHERBCTYPE] [$CAEBD]
// The order of node IDs is NOT important!
// Any bdName:bdType for the internal lines will be ignored
// --------------------
EDGE 1-5 4 0 0 0 bdName:bdType;
EDGE 5-6 4 0 0 0 bdName:bdType;
EDGE 6-7 4 0 0 0 bdName:bdType;
EDGE 7-8 4 0 0 0 bdName:bdType;
EDGE 8-2 4 0 0 0 bdName:bdType;
EDGE 2-3 4 0 0 0 bdName:bdType;
EDGE 3-4 4 0 0 0 bdName:bdType;
EDGE 4-1 4 0 0 0 bdName:bdType;
EDGE 6-4 4 0 0 0 bdName:bdType;
EDGE 7-3 4 0 0 0 bdName:bdType;
EDGE 5-8 4 0 0 0 bdName:bdType;

// --------------------
// Geometry: Blocks
// Format: BLOCK $NEWID ($IDLIST1 $IDLIST2 $IDLIST3 $IDLIST4)
// Note: The order of these IDLISTs IS important!
// --------------------
// Single block tests
// BLOCK 1 (1-5-6-7-8-2 2-3 3-4 4-1);
// BLOCK 1 (5-6-7-8 8-2 2-3-4-1 1-5);

// Multi-block test
BLOCK 1 (5-6 6-4 4-1 1-5);
BLOCK 2 (6-7 7-3 3-4 4-6);
BLOCK 3 (7-8 8-2 2-3 3-7);
BLOCK 4 (5-8 8-7 7-6 6-5);

As you can see, the format is quite similar to OpenFOAM's blockMeshDict. But it has some more powerful switches for structured grid control. :)

taxalian February 28, 2014 01:07

Quote:

Originally Posted by lakeat (Post 477179)
hyperbolic extrusion is definitely the thing I would do in the near future. But not hybrid for the time being. Currently my goal is solely for academic, so converter to other non-FOAM mesh format like "Gmsh format" will propably come later.

Here is a leak of current input file format:
Code:

// ------------------------------------------------------------------------- //
//                                                                          //
//            ENOSH, a multi-block structured mesh generator                //
//                        Copyright 2014 Daniel Wei                          //
//                                                                          //
//                        Mesh Configuration File                          //
// ------------------------------------------------------------------------- //

// --------------------
// Description: A horseshoe mesh
// --------------------

// --------------------
// Geometry: NODES
// Format: NODE $NEWID $POINT
// --------------------
NODE 1 (0.0 0.0 0);
NODE 2 (5.0,0.0,0);
NODE 3 (5.0,5.0,0);
NODE 4 (0.0,5.0,0);
NODE 5 (2.0,0.0,0);
NODE 6 (2.0,1.0,0);
NODE 7 (3.0,1.0,0);
NODE 8 (3.0,0.0,0);

// --------------------
// Geometry: Special Edges
// Format: ARC $NODE1ID $NODE2ID $POINT
// --------------------
ARC 1 2 (1,0.5,0);

// --------------------
// Geometry: Edges and Their Dimensions
// Format: EDGE $NODE1ID-$NODE2ID [$DIMENSION] [$DELTA1] [$DELTA2] [$SMOOTHERBCTYPE] [$CAEBD]
// The order of node IDs is NOT important!
// Any bdName:bdType for the internal lines will be ignored
// --------------------
EDGE 1-5 4 0 0 0 bdName:bdType;
EDGE 5-6 4 0 0 0 bdName:bdType;
EDGE 6-7 4 0 0 0 bdName:bdType;
EDGE 7-8 4 0 0 0 bdName:bdType;
EDGE 8-2 4 0 0 0 bdName:bdType;
EDGE 2-3 4 0 0 0 bdName:bdType;
EDGE 3-4 4 0 0 0 bdName:bdType;
EDGE 4-1 4 0 0 0 bdName:bdType;
EDGE 6-4 4 0 0 0 bdName:bdType;
EDGE 7-3 4 0 0 0 bdName:bdType;
EDGE 5-8 4 0 0 0 bdName:bdType;

// --------------------
// Geometry: Blocks
// Format: BLOCK $NEWID ($IDLIST1 $IDLIST2 $IDLIST3 $IDLIST4)
// Note: The order of these IDLISTs IS important!
// --------------------
// Single block tests
// BLOCK 1 (1-5-6-7-8-2 2-3 3-4 4-1);
// BLOCK 1 (5-6-7-8 8-2 2-3-4-1 1-5);

// Multi-block test
BLOCK 1 (5-6 6-4 4-1 1-5);
BLOCK 2 (6-7 7-3 3-4 4-6);
BLOCK 3 (7-8 8-2 2-3 3-7);
BLOCK 4 (5-8 8-7 7-6 6-5);

As you can see, the format is quite similar to OpenFOAM's blockMeshDict. But it has some more powerful switches for structured grid control. :)

Cool that seems to be a nice bottom up approach, is the mesh generator will able to do import for native cad files like stl, iges or stp etc. Just import the geometry and then descretize the nodes, edges and faces respectively.

lakeat March 10, 2014 13:59

Hi everyone, you may find the download link on http://lakeat.co.nf/. :)

wc34071209 April 23, 2014 08:21

Hello,

You did great job, but have you ever thought to extend it to 3D meshing?

lakeat April 23, 2014 09:44

Thanks, I'd like to but I just don't have time. :)

Paulli May 20, 2014 03:28

can not run enosh
 
HI, 老魏
Thanks for what you done. However I can not run your application in my computer.
the response is:
./enosh: error while loading shared libraries: libQVTK.so.5.8: cannot open shared object file: No such file or directory
Could you please tell me how to fix it. Thanks a lot.


li

Paulli May 21, 2014 07:47

Very useful
 
1 Attachment(s)
Thanks, I use your software create some meshes. It is very simple when dealing with 2D meshes.
When can you add the ARC function to this software, I can wait to download.


All times are GMT -4. The time now is 12:06.