|
[Sponsors] |
May 25, 2010, 05:15 |
|
#21 |
Member
Join Date: May 2010
Posts: 42
Rep Power: 16 |
Hi elvis,
Yes, it is an in-house file format based on unstructured dataformat. I don't know much about it yet. I'll get it one of the next weeks. Right now I am dealing with some stability problems of OpenFOAM. With the fine Mesh (enGrid) the time steps get too low as the courant number increases. With the snappy Mesh the simulation works fine. I guess the problems occurs due to the too fine mesh and the already mentioned high number of severly non-orthogonal faces. Btw. I am using icoFoam right now. By switching the number of non-orthogonal-correctors higher the problem even gets worse. This is quite strange to me. I'll now try the advices of philippose to get a better grid. |
|
May 25, 2010, 09:24 |
|
#22 | |
Senior Member
|
Quote:
read page 8 and following for unstructured grid. It is rather easy to write VTK-files. And of course you can convert (via paraview or mayavi) VTK-files easiliy to other file formats like STL and so on. =>You can use Filters like extract, this is really a benefit if you want to extract only surfaces and get rid of other parts of a mesh. I tried freecad 0.09 it offers to import OBJ-files and STL-files. But I had no luck when i tried it! elvis |
||
May 25, 2010, 16:18 |
|
#23 | |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Hi, philippose,
Can you point a direction where I can get the format for the *.msz file? I might give it a try using perl. Thanks! Pei Quote:
|
||
May 25, 2010, 18:04 |
|
#24 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello Pei,
A Good Evening to you!! Sorry for not having replied to your earlier post yet..... Yes.... the idea of calling the library version of Netgen (nglib) from OpenFOAM has also been my idea for over a year now :-)! Unfortunately, I have never had the time or the opportunity to sit down in a focused manner, and define the interface(s) and concepts required to make that work..... It would be great if someone actually had the requirement to do something like that coupled with the dedicated time to implement it.......! As for your question regarding the MSZ file format..... its a very simple format..... and goes like this: # ------ Start of MSZ file format ------ <num of points> x1 y1 z1 h1 x2 y2 z2 h2 x3 y3 z3 h3 ..... ..... ..... ..... xn yn zn hn <num of lines> x11 y11 z11 x12 y12 z12 h1 x21 y21 z21 x22 y22 z22 h2 x31 y31 z31 x32 y32 z32 h3 ..... ..... ..... ..... xn1 yn1 zn1 xn2 yn2 yn2 hn # ------ End of MSZ file format ------ In the above format: * <num of points> is the number of points you want to specify at which the mesh size should be limited. * each of the following co-ordinates (x,y,z) define the point in 3D * "h" is the maximum mesh size at the specified point * After the list of points, you can optionally also limit the size of a mesh along lines.... here, you need to provide the (x,y,z) co-ordinates of the start and the end of the line, followed by the maximum mesh size allowed. * Discretising the line into points along the line is done internally by Netgen. * In case you only want to limit the mesh size along lines, then specify "0" as number of points, and in the next line, directly specify the number of lines, followed by the line definitions themselves..... As an example.... here is a snippet for limiting at points: 6766 0.000000 -0.000000 -0.000000 0.500000 20.000000 -0.000000 -0.000000 0.500000 0.000000 -0.000000 -20.000000 0.500000 20.000000 -0.000000 -20.000000 0.500000 0.000000 20.000000 -20.000000 0.500000 20.000000 20.000000 -20.000000 0.500000 0.000000 20.000000 0.000000 0.500000 20.000000 20.000000 0.000000 0.500000 1.000000 -0.000000 -0.000000 0.500000 2.000000 -0.000000 -0.000000 0.500000 3.000000 -0.000000 -0.000000 0.500000 4.000000 -0.000000 -0.000000 0.500000 5.000000 -0.000000 -0.000000 0.500000 6.000000 -0.000000 -0.000000 0.500000 7.000000 -0.000000 -0.000000 0.500000 8.000000 -0.000000 -0.000000 0.500000 9.000000 -0.000000 -0.000000 0.500000 10.000000 -0.000000 -0.000000 0.500000 11.000000 -0.000000 -0.000000 0.500000 12.000000 -0.000000 -0.000000 0.500000 13.000000 -0.000000 -0.000000 0.500000 14.000000 -0.000000 -0.000000 0.500000 15.000000 -0.000000 -0.000000 0.500000 16.000000 -0.000000 -0.000000 0.500000 17.000000 -0.000000 -0.000000 0.500000 18.000000 -0.000000 -0.000000 0.500000 19.000000 -0.000000 -0.000000 0.500000 0.000000 -0.000000 -1.000000 0.500000 0.000000 -0.000000 -2.000000 0.500000 0.000000 -0.000000 -3.020000 0.500000 0.000000 -0.000000 -4.020000 0.500000 0.000000 -0.000000 -5.000000 0.500000 0.000000 -0.000000 -6.000000 0.500000 0.000000 -0.000000 -7.020000 0.500000 0.000000 -0.000000 -8.020000 0.500000 0.000000 -0.000000 -9.020000 0.500000 0.000000 -0.000000 -10.000000 0.500000 0.000000 -0.000000 -11.000000 0.500000 0.000000 -0.000000 -12.000000 0.500000 0.000000 -0.000000 -13.000000 0.500000 0.000000 -0.000000 -14.020000 0.500000 0.000000 -0.000000 -15.020000 0.500000 ...... ...... ...... Hope this helps....! Have a great day ahead! Philippose |
|
May 26, 2010, 09:35 |
|
#25 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Hi, Philippose,
Thanks a lot for the MSZ format! I will give it a try as soon as possible. I believe that the library version of netgen will be very helpful for dynamic mesh cases. I do not think that I am capable of helping the development part, but, I will be glad to help in testing. We are all very busy at work. So, thank you for spending your personal time on netgen development + helping others how to use it. Pei |
|
May 26, 2010, 12:38 |
|
#26 |
Member
Join Date: May 2010
Posts: 42
Rep Power: 16 |
I have now a rather good Surface Mesh (with Netgen), what you can see in picture 1 and 2. But the Volume Mesh generated with Netgen is a catastrophe. The element sizes and positions are ordered almost randomly. In picture 3 you can see a detailed view of the mesh around the orifice. And in picture 4 you can see what I mean. Is this common? And does the min mesh-size also hold for cell elements (because this doesn't seem so)? A satisfying numerical simulation is of course not possible with this mesh. The snappyHexMesh Generator has at least some structure in its mesh. I am still wondering if the surface mesh of the model has any effect on the result of snappy. As long as I have understood the algorithm this is not the case.
Btw. I now have another solution to my very first question. It is also possible with paraview to save certain parts of the model as an stl file. The OpenFOAM export of Netgen works also fine. At first I tried to save it to C:\documents and settings\... . It then wants to save it in C:\documents what doesn't exist, so it can't handle spaces. |
|
May 26, 2010, 14:27 |
|
#27 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello there,
What you are seeing are artefacts created by ParaView :-)! And not the real cell structure within the mesh.... you really didn't believe that the internal mesh generated by Netgen looked like that did you :-) !? If that was the case, checkMesh (the mesh checking utility in OpenFOAM which you should always be using), would scream so loud that it will drown out a concorde :-) :-)! You are post-processing the mesh using ParaView, and using the option of showing the mesh along with the edges in a cut or slice view..... this mode shows the edges of all the cells along the depth direction, and not just those visible at the top plane.....ending up in basically what looks like a "jumble of lines" rather than reality.... I think the best way to look at the structure of the internal mesh created by Netgen is to use Netgen itself..... The following screenshots show you how you can make a clipping plane through the mesh generated within Netgen, and switch on the internal Mesh view. For performance reasons, a graphical output of the internal mesh is not enabled by default.... And yes.... the size controls and size limitations specified in Netgen are valid for both, the surface mesh as well as the internal tetrahedral mesh. Have a nice day....! Philippose |
|
May 27, 2010, 06:05 |
|
#28 |
Member
Join Date: May 2010
Posts: 42
Rep Power: 16 |
Yeah, I knew that it is not a good idea to evaluate the quality of the mesh by looking at slides, because of the 3D effects you already mentioned. But I thought that it should at least give an impression of the structure of the cells. And such structures, as seen in my picture, seemed strange to me. And actually I didn't know another way to look at the mesh , so thanks! It would be nice, if one could set the values in the clipping plane option directly and not just sliding them. The sliding is a bit imprecise. CheckMesh is always the first thing I do, when dealing with a new mesh.
Now I have done a simulation and am doing the post-processing in paraview by slicing the object. It is quite good, but I am not yet happy with the interpolation of the results around the orifice, it is rather edged. But most likely a finer mesh here would improve this. I think I now know enough to play around a bit Thanks for all the help! But I guess new questions will arise soon... What I really would like to know (it's also important for my thesis) is what algorithms is used for the meshing in Netgen. Did you stick to some published papers or books or did you create an in-house algorithm? I should have a look at the source code, but this is quite time-consuming. Best wishes, Zymon |
|
May 27, 2010, 07:50 |
|
#29 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello and a Good day to you :-)!
Nice to see that you were able to perform a half-way ok looking simulation with the mesh.... I think you should atleast double the mesh density at the orifice.... since your geometry is not too complex, I think the easiest method is to use an MSZ (mesh size file.... as detailed in a post below) file to define a point cloud around the orifice where you limit the maximum mesh size..... that will help keep the mesh density in the other non-critical parts of the geometry small. As for the meshing algorithms used..... I must make it clear, that I am not one of the original developers of Netgen :-)! I only joined the team around 2 years ago, and help mainly with the Opencascade parts, Windows porting and the library version of Netgen (nglib). The core meshing parts are a product of Dr. Joachim Schoeberl and his team, who is currently head of the "Computational Mathematics in Engineering" department at TU-Wien (Austria). The main paper which details the algorithms used in Netgen can be downloaded from the following location: http://www.asc.tuwien.ac.at/~schoebe...p/Publications Check publication number 40: NETGEN - An advancing front 2D/3D-mesh generator based on abstract rules. Hope this helps...! have a nice day! Philippose |
|
May 28, 2010, 06:17 |
|
#30 |
Member
Join Date: May 2010
Posts: 42
Rep Power: 16 |
The MSZ is awesome! It really works great. I now did the file semi-automatic with Excel, mine is not the best solution to do it yet. But when I use this for the complex geometry, I'll write a Matlab tool. Like your littel prgramm with the cuboids, but maybe with more complex geometries. But as I have seen it, it is not important that the defined points lie inside the model. So it would be enough to specify a cuboid or a hexahedron (for the point cloud) around several parts of the model, right? Hmm, maybe it is not even necessary to use more complex geometries.
With the MSZ I refined the orifice and the right area behind it. Right now I am running a simulation with it. It seems to be stable, quite slow due to the fine mesh of course. |
|
May 28, 2010, 15:12 |
|
#31 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hi there,
Happy I was able to help you :-)! I think your internal mesh in the "non-critical" parts are unnecessarily fine.... so if your simulation is too slow, I guess you should make those parts coarser as a first step... Have a nice day ahead! Philippose |
|
August 29, 2011, 14:40 |
|
#32 |
New Member
Luke Ionno
Join Date: May 2010
Posts: 1
Rep Power: 0 |
Philippose,
Quick question about the MSZ file interpretation... When generating a point-cloud for use in the MSZ file, I'm assuming the 3D separation of the points should be roughly the desired element size, correct? (i.e. the longest line between any two adjacent points should be less than or equal to the specified element size.) Also, what is the proper method to save a meshing case in Netgen? Is there a "native" Netgen format, or should I just export a neutral-format mesh, and then import it back into Netgen to continue working on it? Thanks! ~Luke |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CAD -> gMsh -> enGrid -> OpenFOAM Problem | AlGates | OpenFOAM | 7 | August 6, 2010 13:46 |