CFD Online Discussion Forums

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

tomislav_maric August 11, 2009 11:51

Quote:

Originally Posted by linnemann (Post 225964)
Hi



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

I did export it as a single entity. I have created a compound mesh out of two separate surface meshes. Then I have exported it. Maybe I'm approaching the mesh generation in Salome the wrong way:

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

linnemann August 11, 2009 12:28

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

tomislav_maric August 11, 2009 12:33

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

tomislav_maric August 11, 2009 12:35

sorry again: I meant: When I have worked my way (as I have worked so far) I was tapping around in the dark... :D

linnemann August 11, 2009 12:36

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.

tomislav_maric August 11, 2009 12:42

Quote:

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


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. :)

linnemann August 11, 2009 12:58

Hi

Knock yourself out :)

We need more tutorials on the forum.

Best Regards
Linnemann

tomislav_maric August 11, 2009 17:33

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

tomislav_maric August 12, 2009 10:47

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

linnemann August 12, 2009 11:00

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

tomislav_maric August 12, 2009 12:08

Quote:

Originally Posted by linnemann (Post 226109)
1) Generate 2 mesh one which is air above the water and one which is water (partition solid with a face in Salome).

Thank you again very much! I'm on it.

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

tomislav_maric August 13, 2009 08:20

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
 

file: seedsimpleprismaticlayer.cpp
 line:140

What could this mean? For this first mesh I haven't used any refinement, I just wanted to see if the meshing will work on grouped objects that are part of the partitioned geometry.

I'm using Netgen 1D-2D for the entire mesh, that proved ok for the unrefined, not partitioned geometry.

Best regards,
Tomislav

linnemann August 13, 2009 08:47

Hi

I think it would be a good idea to ask on the Engrid forum.

This it not something I've encountered.

Regards

tomislav_maric August 13, 2009 09:19

Ok thanks, I'll do that and try and use other algorithms for the mesh.

Best regards,
Tomislav

tomislav_maric August 13, 2009 09:30

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 17:14.