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

[snappyHexMesh] Problem Meshing a V-notch Weir with snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By linnemann
  • 1 Post By linnemann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 14, 2011, 22:50
Default Problem Meshing a V-notch Weir with snappyHexMesh
  #1
New Member
 
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 17
Rep Power: 16
kflora is on a distinguished road
Hi Foamers,

I am trying to create a mesh using snappyHexMesh and am coming to the conclusion that even with the new Surface Feature Extract in 2.0.x, SHM is probably not the right tool to create the mesh for a Sharp-crested V-notch weir due to the sharp angles in both the vertical and transverse directions of the notch.

As you can see in the Snapped picture, the hex cells don't see to be able to me snapped onto the sharp edge of the weir crest, but generate a very uneven surface.

I have tried the AddLayers some, but mostly snapping to achieve using the following snap controls which I have tried to modify without success:

// Settings for the snapping.
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;

//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 1.0;

//- Number of mesh displacement relaxation iterations.
nSolveIter 300;

//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;

//- Highly experimental and wip: number of feature edge snapping
// iterations. Leave out altogether to disable.
nFeatureSnapIter 10;
}

Does anyone have any suggestion for how to get SHM to work in this case or an alternative program for creating the mesh?

Thanks in advance.
Attached Images
File Type: jpeg STL.jpeg (9.1 KB, 76 views)
File Type: jpeg Castellated.jpeg (45.2 KB, 84 views)
File Type: jpeg Snapped.jpeg (45.2 KB, 78 views)
kflora is offline   Reply With Quote

Old   November 19, 2011, 14:16
Default
  #2
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Hi kflora,

SHM can definitely do what you are trying to do. I am not at my work computer right now, where I have notes on how to do it, but I know you need to extract the edges and use them as input to SHM.

Checkout this link:

http://www.cfd-online.com/Forums/ope...ture-edge.html

MD
mgdenno is offline   Reply With Quote

Old   November 19, 2011, 20:15
Default
  #3
New Member
 
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 17
Rep Power: 16
kflora is on a distinguished road
Thanks Matthew for taking interest in this problem. I have run the edge feature extraction utility (surfaceFeatureExtract ) as was suggested in the link you provided and can see in ParaView the lines that were extracted (see attached image). I have also used the command in snapppyHexMeshDict as was suggested:

//- Highly experimental and wip: number of feature edge snapping
// iterations. Leave out altogether to disable.
nFeatureSnapIter 10;

Still, I am not able to achieve a smooth mesh along the crest of the weir. Attached is the zip of the my case directory if you want try your hand at it.

I would love to see your notes if you can get it to work.

Kevin
Attached Images
File Type: jpeg EdgeMesh.jpeg (12.3 KB, 28 views)
Attached Files
File Type: zip vWeir.zip (13.1 KB, 9 views)
kflora is offline   Reply With Quote

Old   November 20, 2011, 04:42
Default
  #4
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Hi

Why not use Salome to create the geometry and mesh?

The geometry is so simple that you will be able to do a fully structured mesh.

If you send me a step/brep/iges or a sketch I would be able to create the mesh in 5min, with perfect matching of the edges.

EDIT: Or blockmesh would be relative easy.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   November 20, 2011, 11:33
Default
  #5
New Member
 
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 17
Rep Power: 16
kflora is on a distinguished road
Niels,

I haven't used Salome, but that's a program I will look into. Attached is a iges file I created using FreeCad which I have never used before either, so hopefully it gives you what you need. Basically, the weir is located 4m down in the flume, is 1 m wide by 1.5 m high with a thickness of 0.05 m. The V-notch is 0.5 m deep with a angle of 2V:1H down (-0.1 m down across the 0.05 m thickness of the weir).

Thanks for you help and idea.
Attached Files
File Type: zip vNotch.igs.zip (1.4 KB, 13 views)
kflora is offline   Reply With Quote

Old   November 21, 2011, 05:26
Default
  #6
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Hi

Here it is in Salome format. Right click on the mesh and push compute. If you want another grading you can adjust the mesh hypothesis.

http://dl.dropbox.com/u/15968063/Vnotch.hdf

After compute export as UNV format (right click the mesh in the tree).

Use ideasUnvToFoam on the unv file and it will convert to OF format.

Read some nice tutorials here.

http://www.salome-platform.org/user-...alome-tutorial

You can also create groups on the faces which will be converted into pathes when running the ideaUnvToFoam command.
Otherwise you can always use autoPatch 45 to split the mesh into patches where face angle exceeds 45°.

Hope this helps.

kflora likes this.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   December 11, 2011, 13:23
Default
  #7
New Member
 
nofrizal
Join Date: Dec 2011
Location: Malaysia
Posts: 5
Rep Power: 14
nofrizal is on a distinguished road
hi linneman,

i am new of using salome-meca, i want to ask
where can I see the dimmension I am working with?
nofrizal is offline   Reply With Quote

Old   December 11, 2011, 14:17
Default
  #8
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Hi

Its always mm
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   December 11, 2011, 18:18
Default
  #9
New Member
 
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 17
Rep Power: 16
kflora is on a distinguished road
Niels,

Thanks for your help with Salome. I have been looking Salome over and working through the tutorials which are helpful. One question I had was how to generate a mesh with the V-notch weir such that the weir is the obstacle and flow goes over it. Does one need to cut the mesh you developed out of a bigger box mesh? or is there a another way to generate a mesh for flow over the weir to be used in openfoam?
kflora is offline   Reply With Quote

Old   December 15, 2011, 02:06
Default
  #10
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Hi

Well sure there are many ways to obtain what you want, but I would do the following.

Again use Salome but instead of making the "Solid" part you have to think inverse and design the "Fluid" part.

This will consists of multiple smaller boxes in order to create a fully structured mesh.

This will not be difficult but a little more time consuming.

Just remember in Salome to create a structured mesh, each block must have 12 edges and 6 faces, no more no less.

The easy fast, and in my opinion, slightly worse way would be to take the solid already made in Salome, make a bigger box around it (the fluid part) and cut the V-notch away from the big box.

Export the Geometry, not mesh, to BREP file format and open in Netgen compiled with OCC (OpenCasCade). My centFOAM packages for CentOS have that. Netgen creates unstructured tet cells but they are quite good and it will snap completely to the edges. Netgen can also assign boundary numbers and export directly to OF format.

Hope this helps.
kflora likes this.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.

Last edited by linnemann; December 19, 2011 at 01:59.
linnemann is offline   Reply With Quote

Old   December 16, 2011, 13:16
Default
  #11
New Member
 
Kevin Flora
Join Date: Oct 2009
Location: California, USA
Posts: 17
Rep Power: 16
kflora is on a distinguished road
Thanks for the advice. In your preferred appoach, it sounds like if the geometry were significanty more complex than the V-notch weir (e.g., a large group of piles under a bridge foundation), then this may to too involved and no longer the best option. Correct?

I had thought about the second approach you mentioned. I don't quite understand why the need to go through Netgen, however. Can't one create a mesh in Salome using this approach as well?
kflora is offline   Reply With Quote

Old   December 19, 2011, 01:58
Default
  #12
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Hi,

No it just means that instead of two blocks, like the Salome geometry I've uploaded, you need to have 34 blocks to have a fully structured mesh.
Again its not any more difficult just a bit more tedious.

I just use Netgen because even though Salome tet mesher is based on Netgen, Netgen itself produces a slightly better mesh and faster, and it has direct support for OF mesh export.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Reply

Tags
mesh control, snapping, snappyhexmesh


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
[ANSYS Meshing] ANSYS Meshing Problem Saikat_FM ANSYS Meshing & Geometry 1 September 15, 2016 02:25
[ICEM] ICEM 3d meshing problem Eng.Mahmoud abd elsalam ANSYS Meshing & Geometry 0 June 24, 2016 23:16
[ANSYS Meshing] Problem with meshing a complex Geometry (Hex) fluent_beiyo ANSYS Meshing & Geometry 8 April 26, 2014 04:55
[ICEM] Meshing problem in Formula one Far ANSYS Meshing & Geometry 113 April 23, 2013 12:36
GAMBIT meshing problem Gauthier Lambert Main CFD Forum 1 August 3, 2000 09:22


All times are GMT -4. The time now is 18:41.