CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Salome] Salome-OpenFOAM external flow (around a ship)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 11, 2009, 12:51
Default
  #21
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by linnemann View Post
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.

Best regards, and thank you very much,

Tomislav
tomislav_maric is offline   Reply With Quote

Old   August 11, 2009, 13:28
Default
  #22
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
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
linnemann is offline   Reply With Quote

Old   August 11, 2009, 13:33
Default
  #23
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
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 is offline   Reply With Quote

Old   August 11, 2009, 13:35
Default
  #24
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
sorry again: I meant: When I have worked my way (as I have worked so far) I was tapping around in the dark...
tomislav_maric is offline   Reply With Quote

Old   August 11, 2009, 13:36
Default
  #25
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
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.
linnemann is offline   Reply With Quote

Old   August 11, 2009, 13:42
Default
  #26
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by linnemann View Post
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.
tomislav_maric is offline   Reply With Quote

Old   August 11, 2009, 13:58
Default
  #27
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

Knock yourself out

We need more tutorials on the forum.

Best Regards
Linnemann
linnemann is offline   Reply With Quote

Old   August 11, 2009, 18:33
Default
  #28
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
ok I will! I'm already knocked down by this mesh generation, so a knock-out is the natural way to go from here.

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!



Tomislav
tomislav_maric is offline   Reply With Quote

Old   August 12, 2009, 11:47
Default
  #29
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
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
tomislav_maric is offline   Reply With Quote

Old   August 12, 2009, 12:00
Default
  #30
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
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
linnemann is offline   Reply With Quote

Old   August 12, 2009, 13:08
Default
  #31
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by linnemann View Post
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.

Best regards,
Tomislav
tomislav_maric is offline   Reply With Quote

Old   August 13, 2009, 09:20
Default
  #32
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
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
tomislav_maric is offline   Reply With Quote

Old   August 13, 2009, 09:47
Default
  #33
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

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

This it not something I've encountered.

Regards
linnemann is offline   Reply With Quote

Old   August 13, 2009, 10:19
Default
  #34
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Ok thanks, I'll do that and try and use other algorithms for the mesh.

Best regards,
Tomislav
tomislav_maric is offline   Reply With Quote

Old   August 13, 2009, 10:30
Default
  #35
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
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
tomislav_maric is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
Simulation of flow around a ship hull using fluent and Openfoam manoj_nav FLUENT 0 December 17, 2015 02:05
Volume flow rate boundary condition in OpenFOAM mayank.dce2k7 OpenFOAM Running, Solving & CFD 13 August 11, 2014 21:16
[Salome] Mesh conversion Salome to OpenFOAM VMartinez OpenFOAM Meshing & Mesh Conversion 11 April 21, 2014 03:54
internal flow and external flow ? Pathway0320 FLUENT 1 November 17, 2006 04:37


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