Salome-OpenFOAM external flow (around a ship)
Hello everyone,
I'm trying to use Salome-MECA for meshing a ship. I've search all over the net and posted on Salome forum but I've hit a dead end. Has anyone here used Salome-MECA to create hex. mesh for external 3D flows? I have gone through all the tutorials and I'm really familiar with the GUI (and TUI for automatic geometry generation), but I just can't mesh a ship or anything with external 3D flow. :confused: Tetrahedron mesh is really not a problem, but hex is a big one. Best regards, Tomislav |
It might help you
There are several ship cases on the following page http://www.salome-platform.org/UserSection/salome_use/ I guess you can expand them to your needs |
Quote:
As I have written in my latter post, the problem is meshing external 3d flows. I have already done complicated 2D hex meshes of S60 ship hull, but I have problems creating 3D hex meshes for external flows. So, if anyone has used Salome to generate 3D mesh for external flow please let me know, I'm having problems in this area. Best, Tomislav |
Hi
I actually don't think Salome has 3D hex volume meshing capabilities unless you extrude the hex 2D mesh, but I could be wrong. |
Quote:
Thank you, I'll try and play around with extrusion, maybe I manage to make something useful. |
Hi
What I would do. Create a 2D tet mesh for all the patches (just as you have before just without volume mesh and no 2d hex) and then right-click the mesh and export to STL. Then use the STL in engrid and create a prismatic boundary mesh where your hull is. Do this right and you will get as good results, since the prismatic boundary mesh captures the BL (guessing that's what you want) as good as Hexes. Engrid has the possibility to export directly to OpenFOAM and even with polyhedra mesh, and polys give a good solution from my experience. So you will have a prismatic BL at the patches you choose in engrid and you get the nice polyhedra cells in the volume = win-win :-) Just what I would do. |
@linneman
Thank you very much for the advice! :D Of course I'll try that! Best regards, Tomislav |
Hi Tomislav,
Another option: use Salome to create your geometry, export the patches in STL format (you can do it already in the Geometry module, no need to use the Mesh module), and use snappyHexMesh to create your hex/poly mesh. Regards, Jose Santos |
You could do that.
But as I recall snappyHexMesh doesn't have support for refining the surface mesh but uses the surface mesh to generate the volume mesh. Exporting to an STL directly from the GEO module will give you VERY coarse tet cells on the surface. A plane surface will just be 2 triangles. But if snappyHexMesh has surface remesh capabilities that will surely be a good approach. Regards |
I think sHM doesnt work like that. It uses a blockMesh background mesh to define the surface mesh. Moreover, you can really refine the surface mesh, you even have a section for that in snappyHexMeshDict. Look in the User Guide for a more detailed description.
Regards, Jose Santos |
There are problems with snappy and ships. I'm actually working on ship simulations with two colleagues and they have tried using snappy for generating the mesh around the ship for a while and they had lots of problems with it. That's why I decided to try and use Salome or something other than snappy, and if I succeed in generating a good mesh, then we would all use that software.
here are their (and consequently mine) experiences: [Sun Aug 9 2009 19:04:19] … the problems with snappy... allright: 1) There is no possibility to create a smooth transition area between the different refinement levels. A "step" does always exist [Sun Aug 9 2009 19:04:37] … 2) sharp edges cannot be meshed easily [Sun Aug 9 2009 19:05:18] … 3) getting a good mesh (area ratio, angles, determinants) etc. is a tough and nerve-killing issue I'm trying to compile engrid with VTK from OpenFOAM ThirdParty directory and I'm having trouble finding VTKLIBDIR and VTKINCDIR... there are tons of headers and libs inside $ParaView_INST_DIR.. help? :confused: Thank you both for the information! |
Have you tried the pre-compiled binaries from:
ftp://loerrach.engits.de/ ? If you happen to use OpenSUSE, you can grab recent RPMs from: http://download.opensuse.org/reposit.../openSUSE_11.1 Regards, Jose Santos |
Quote:
tomislav@icarus:enGrid_linux32bit_1.0$ start_engrid /opt/enGrid/engrid: relocation error: /opt/enGrid/libc.so.6: symbol _dl_out_of_memory, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference I'm running Ubuntu 8.10 Intrepid Ibex, had to switch from SUSE because I coulnd't find a way to connect via pptp protocol to the net, but that's another tale. :D |
I have used the .deb package reluctantly and it worked! :D I like to keep my applications local, especially when they are not listed in the official repos. I'll try and create the mesh now. Thank you both very much for your advice.
|
I unfortunately cant help you there since I'm not using Ubuntu.
But I've made a precompiled package available for CentoS 64Bit https://sourceforge.net/projects/centfoam I just checked what Santos wrote and he is correct about SnappyHexMesh, seems like a good approach. I have only one advice, explode the volume into faces and export each face to a separate ASCII stl's and open them and give them meaningful names this will make the meshing in SHM easier. see here Regards Linnemann |
I have managed to create a 2D tet mesh of ship and domain faces in Salome.
Now I'm trying to import .stl in engrid, but there's nothing on the screen (even after I click redraw), and information bar on the bottom of the window states 0 mesh elements (both 2D and 3D). Am I doing something wrong? Is there some option to set in Salome? I only clicked "Import STL" and selected the .stl file. I have tried to use .vtk and it worked fine. Best regards, Tomislav |
It's me again,
there is a problem with meshing 2D surfaces using Netgen 1D-2D automatic algorithm for generation of the mesh. The mesh looks great (to my layman eyes) but when I export it to .stl, the file has only begin solid end solid and nothing in between. I'll try and get a good mesh with some other algorithms. Best regards, Tomislav |
This works only when using Netgen 2D for surfaces, then wire discretisation, than 0d node distance.
After battling with it for a while, I have managed to save a .stl file and read it into Engrid. When I tried to make the prismatic BL, I got this error: p, li { white-space: pre-wrap; } CalcLocalH: 4104 Points 0 Elements 8200 Surface Elements Check subdomain 1 / 1 8200 open elements ERROR: Edge 2313 - 3335 multiple times in surface mesh ERROR: Edge 2313 - 3336 multiple times in surface mesh ERROR: Edge 3335 - 3336 multiple times in surface mesh ERROR: Surface mesh not consistent ERROR: Stop meshing since surface mesh not consistent deleting Operation 0xa8e04a4 in the engrid output screen. Now, I had to manipulate the mesh by hand an create two additional triangles, because this kind of meshing in Salome gave me two/three really deformed triangles at the bow and stern corner of the deck face. Could this cause this problem? How do I fix this? Thanks in advance, Tomislav |
sorry, I forgot to add:
I have made two separate meshes, one of the bounding box shell feature and one mesh of the ship hull shell feature in salome. Could this mean that some mesh elements ended up with the same ID number? Best regards, Tomislav |
Hi
Quote:
When using Engrid I don't think exporting the faces by themselves and then after wards combining will work (this was for SnappyHexMesh). Try to export it as a single entity from Salome, you can always split the patches in Engrid, as per the manual (mouse + P then S). Regards Linnemann |
Quote:
1) create all the surface Meshes with submeshing and refinement 2) join the meshes in a compound 3) export to .stl because maybe Salome numbers the mesh elements from the start within each separate surface mesh? Should I create a shell geometry that holds all the necessary faces and then mesh/submesh that one geometrical entity? Maybe that would cause the proper numbering of nodes. I have tried to renumber the nodes and the elements in this compound mesh, and I'll try to import it now and create the BL. Can you please give me some insight in your general procedure for mesh generation in Salome in the way I have described mine above? I'm asking because I know not any more what to do. :confused: Best regards, and thank you very much, Tomislav |
Hi
The way I do it is to create a single solid. Create groups, based in the single solid, containing the faces/edges you want to use as submeshes. In the Mesh section mesh the whole solid with 2d tets only and then create submeshes from the groups you have created which is only based on faces and edges. Then right-click the "master mesh (Mesh_1)" end export that to .stl This approach have always worked for me. Regards Linnemann |
Thank you,
I will try this method, it is much easier to work now that I know that the method works for you. This way I'm just tapping around in the dark not being able to even learn from the mistakes I make because I have no info on what I'm actually doing. Any thoughts on Netgen 1D-2D algorithm? Have you had any problems exporting the resulting mesh to .stl such as an empty file I've mentioned below? I find this algorithm easiest to set up and it gives great results compared to others. Best regards, Tomislav |
sorry again: I meant: When I have worked my way (as I have worked so far) I was tapping around in the dark... :D
|
Hi
I've always used netgen for this kind of work but usually i don't use netgen-2d-1d, I only use 2d and then specify an average length in 1d tab, but that should be the same. |
Quote:
Ok thanks, I'll try and reproduce your exact steps. I have now created the final solid by boolean cut operation on hull solid and domain box solid. I'm on to meshing. If this turns out ok I will most definately write a detailed tutorial about this, that is if it's ok with you, since without your advice I would be nowhere. :) |
Hi
Knock yourself out :) We need more tutorials on the forum. Best Regards Linnemann |
ok I will! :) I'm already knocked down by this mesh generation, so a knock-out is the natural way to go from here. :D
I have succeeded! Salome acts funny though. When I mesh the entire solid in 2D using Netgen 1D-2D then it can export to .stl and Engrid can read it perfectly fine. But, if I Use Netgen 1D-2D on the whole mesh then refine either some edge or some face using submeshing, it generates lot's of errors (can't mesh a face, something about ID mapping, etc.) I have a really coarse grid now, so considering these issues, I'll probably be back with questions as soon as I get this puppy to run on a LAN at the Department. Thank you! :D Tomislav |
Hello again. :)
I have two entirely new questions: 1) What is the best way to refine the mesh in the plane where I expect the free surface to be when creating 2D tet mesh in Salome? I was thinking about creating additional horizontal plane and using boolean cut operation with hull as the tool. Then I will try to mesh this plane with very fine mesh and see how the mesh density dissipates vertically above and below the plane. My second plan is to submesh the edges of the domain, but since I didn't fine any "split edge" options in Salome that would allow me to use scaled density distribution on separate parts of a large edge, I will have to think of an analytical function that would suit the targeted mesh refinement. I'm thinking that the problem with this approach is that Engrid will, while creating volume mesh, dissipate the density of the mesh radially in space so that I won't get the desired refinement where I expect the free surface to be. 2) How do I make the prismatic boundary layer thicker? The only option in Engrid is to split the existing boundary layer, but when I do this operation, my mesh fails checkMesh test because of the highly skewed cells (as written in the Engrid tutorial - OpenFOAM dislikes thin prisms). For now I have left the generated BL unsplit, and so the mesh looks ok, meaning that the ratio between the size of a BL prism and the adjacent tetrahedron is visualy very close. Any advice on this problem? Best regards, Tomislav |
1) Generate 2 mesh one which is air above the water and one which is water (partition solid with a face in Salome). use mergeMesh and stitchMesh tools in OpenFOAM to merge them together. make sure the 2 mesh you want to stitch together has the same edge/face refinement where you want to stitch them. You have 2 do it in this manner because Salome and Engrid (netgen) don't support free/shared faces in the volume. But try and make a case with only water first this way you will have some intermediate results and its always nice to have some successes among all the fails :-).
With regards to grading you can make the bounding box around the hull fairly small and then use Engrids extrude option to make the boundingbox bigger, this way you will also get a nice mesh in the inlet/outlet/sides. 2) You have to go into Engrids options to mess around with the thickness and growth of the prismatic boundary layer. Ignore the checkMesh warning, I don't think it does the right checks with regards to prismatic boundary mesh since I got good results just ignoring it, y+ around 30-100 avg 50, on other geometries (not ship hull). Regards Linnemann |
Quote:
I just have to calculate the waterline height based on Cb coefficient in Salome. That way I can have the case set up to match the experimental setup. I can only wish for fair winds from now on, I hope. :D Best regards, Tomislav |
I have successfully meshed the lower part of the geometry that is immersed in water, and the export to .stl went ok. The problem occurs when I try to generate the prismatic boundary layer:
Code:
This seems to be a bug in enGrid I'm using Netgen 1D-2D for the entire mesh, that proved ok for the unrefined, not partitioned geometry. Best regards, Tomislav |
Hi
I think it would be a good idea to ask on the Engrid forum. This it not something I've encountered. Regards |
Ok thanks, I'll do that and try and use other algorithms for the mesh.
Best regards, Tomislav |
I have used a plane to partition the solid geometry, but this should be valid, because I have followed the partitioning tutorial on CAE Linux site to the word.
Best regards, Tomislav |
All times are GMT -4. The time now is 13:43. |