CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   Salome-OpenFOAM external flow (around a ship) (http://www.cfd-online.com/Forums/openfoam-meshing/67240-salome-openfoam-external-flow-around-ship.html)

tomislav_maric August 8, 2009 14:57

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

Ahmed August 8, 2009 16:14

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

tomislav_maric August 8, 2009 19:03

Quote:

Originally Posted by Ahmed (Post 225704)
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

Thank you, I've studied these, but they are not related to my problem at all.

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

linnemann August 9, 2009 02:49

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.

tomislav_maric August 9, 2009 05:44

Quote:

Originally Posted by linnemann (Post 225719)
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.

:eek: I can only hope that this is not true. That would mean I have spent 10 days learning meshing in Salome and there's no way I can mesh a ship. :D

Thank you, I'll try and play around with extrusion, maybe I manage to make something useful.

linnemann August 9, 2009 15:20

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.

tomislav_maric August 10, 2009 04:19

@linneman

Thank you very much for the advice! :D Of course I'll try that!

Best regards,
Tomislav

santos August 10, 2009 05:00

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

linnemann August 10, 2009 05:05

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

santos August 10, 2009 05:12

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

tomislav_maric August 10, 2009 05:17

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!

santos August 10, 2009 05:30

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

tomislav_maric August 10, 2009 05:41

Quote:

Originally Posted by santos (Post 225805)
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

I did try this, and I have used ./setup under root and it installed the binaries without an error. Then when I tried to run it I got this:

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

tomislav_maric August 10, 2009 05:58

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.

linnemann August 10, 2009 06:00

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

tomislav_maric August 10, 2009 11:30

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

tomislav_maric August 10, 2009 12:51

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

tomislav_maric August 11, 2009 11:00

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

tomislav_maric August 11, 2009 11:02

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

linnemann August 11, 2009 11:35

Hi

Quote:

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?
Yes I think that's whats going on

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


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