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

[snappyHexMesh] SnappyHexMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By wikstrom

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2008, 06:56
Default SnappyHexMesh
  #1
erik023
Guest
 
Posts: n/a
dear all, thank you for help with my last Q. now i have another:
i have created a .stl file, in 3D, and i like to try the snappyHexMesh.

what do i need to do?
i do not find the user manual in 1.4.1 sufficient for me to get the whole thing working.
what files do i need to create and how do i order thm, in what catalog structure i mean?
has anybody a simple example i could use? a snappyHexMeshDict file!?
i would like to do some multiphase simulations on my .stl geometry

thankful for help!
erik ekedahl
  Reply With Quote

Old   September 10, 2008, 07:31
Default I doubt you will find any usef
  #2
Member
 
Martin Aunskjaer
Join Date: Mar 2009
Location: Denmark
Posts: 53
Rep Power: 17
aunola is on a distinguished road
I doubt you will find any useful information on snappyHexMesh in the 1.4.1 manual as it was released only in 1.5. Before going any further, can I ask if you have indeed installed 1.5 and had a look at the motorcycle example?

Having said that, I find the description of snappyHexMesh in the 1.5 manual somewhat terse. I am left with the impression that an underlying paper or report would come in handy in understanding some of the parameters.
aunola is offline   Reply With Quote

Old   September 10, 2008, 08:27
Default Thank you Martin for this resp
  #3
erik023
Guest
 
Posts: n/a
Thank you Martin for this response!
I have the 1.4.1 version and will try to install 1.5 right away!
  Reply With Quote

Old   October 16, 2008, 01:33
Default Dear all! I got the polyMe
  #4
New Member
 
Yang Luchun
Join Date: Mar 2009
Posts: 10
Rep Power: 17
young is on a distinguished road
Dear all!
I got the polyMesh from SnappyHexMesh in OF-1.5, but I acctually use the OF-1.4.1-dev's solver. I copy the polyMesh directory into my case, however the solver cannot work!
what's wrong?

thankful for help
Yang Luchun
young is offline   Reply With Quote

Old   October 27, 2008, 05:20
Default Hi, appending a different m
  #5
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Hi,

appending a different matter to this thread:

I have gotten into snappy-troubles; Creating a mesh around a STL-geometry (fairly complex with bluff and slender bodies, built from many surfaces of which a bunch is overlapping etc. ugly geometry, achieved from architects...)

All looks well during testing stages with very moderate refinement levels. Then, getting serious, during a shell refinement step,snappyHexMesh bails out with this:


Could not find point 129196 in the anchorPoints for cell 97678

Does your original mesh obey the 2:1 constraint and did you use consistentRefinement to make your cells to refine obey this constraint as well?#0 Foam::error::printStack(Foam:stream&) in "/home/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libOpenFOAM.so"


Does anyone have a clue as to whence the problem originates?
Cheers
/Niklas
wikstrom is offline   Reply With Quote

Old   October 27, 2008, 10:41
Default I had the same error whilst ge
  #6
Member
 
Martin Aunskjaer
Join Date: Mar 2009
Location: Denmark
Posts: 53
Rep Power: 17
aunola is on a distinguished road
I had the same error whilst generating a mesh around a sphere using snappy. If memory serves me right this error occurred with a graded background mesh. Changing the background mesh to uniform cell size alleviated the problem. I could be mistaking this for some of the other errors I have seen though.
aunola is offline   Reply With Quote

Old   October 27, 2008, 11:20
Default Hi again, that was my initi
  #7
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Hi again,

that was my initial thought too. However, removing grading in my case did not solve the problem.

But, I had tried to keep the cell expansion slow with nCellsBetweenLevels 3;. Reducing to nCellsBetweenLevels 2; "solved" the problem. Maby this is an issue of "meeting" refinement regions? I.e. when refining two opposite surfaces, the "second" surface can get refinement troubles when refining into the "first" surface refinement zone?

/N
wikstrom is offline   Reply With Quote

Old   October 27, 2008, 16:17
Default It should not depend on geomet
  #8
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
It should not depend on geometry. You checked you don't have a cellLevel or pointLevel file hanging around (e.g. in constant/)? There might be a problem in the refinement expansion nCellsBetweenLevels. Can you produce a testcase and report a bug on OpenFOAM-bugs?
mattijs is offline   Reply With Quote

Old   October 29, 2008, 14:50
Default No *Level files haning around.
  #9
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
No *Level files haning around. I'll ask the customer if it's ok to publish the geometry tomorrow. Not easily reproduceable on simple test stl, I guess.

/N
wikstrom is offline   Reply With Quote

Old   December 5, 2008, 05:50
Default Hi again, In some cases, th
  #10
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Hi again,

In some cases, the BL generation produces "spikes" at the boundary. It allways occurs at geometry features and in most cases, but not all it occur at the intersection of two STL-regions (solids). How come? The image show the boundary mesh after snapping (on top) and after layering (bottom).


wikstrom is offline   Reply With Quote

Old   December 5, 2008, 05:59
Default Hi again, In some cases, th
  #11
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Hi again,

In some cases, the BL generation produces "spikes" at the boundary. It allways occurs at geometry features and in most cases, but not all it occur at the intersection of two STL-regions (solids). How come? The images show the boundary mesh after snapping and after layering.




Any ideas? Parameters?
Tanks
Niklas
altinel likes this.
wikstrom is offline   Reply With Quote

Old   December 9, 2008, 05:37
Default Hi Niklas, Seems a bit weir
  #12
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Hi Niklas,

Seems a bit weird. Is it an small testcase? Can you send it?
mattijs is offline   Reply With Quote

Old   December 12, 2008, 14:48
Default Hi dear foamers I'm using S
  #13
Member
 
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 17
fabrizio is on a distinguished road
Hi dear foamers

I'm using Snappy too, I find it a very powerful tool; I have 3 questions for you:

1 - after meshing with Snappy I obtain cells with 9,10 even 12 faces, so they are no hex cells. How can I obtain only hex cells after meshing with Snappy?

2 - In general, does Snappy support other cells shapes (tet for example) in addition to hex?

3 - After converting the mesh with foamToVTK, is it possible to export the .vtk files in stl format from Paraview?

Thanks to all for help

Fabrizio
fabrizio is offline   Reply With Quote

Old   December 13, 2008, 12:43
Default 1 - you cannot. Or you can hav
  #14
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
1 - you cannot. Or you can have a look at how paraFoam/foamToVTK decomposes non-hex cells into pyramids and tets.
2 - the starting mesh has to be hex only. These might get refined.
3 - stl is a surface format. Do you want to extract the surface of the mesh as an stl file? Use surfaceMeshTriangulate for that.
mattijs is offline   Reply With Quote

Old   December 15, 2008, 12:40
Default Hi Mattijs thank you for your
  #15
Member
 
fabrizio
Join Date: Mar 2009
Posts: 33
Rep Power: 17
fabrizio is on a distinguished road
Hi Mattijs thank you for your advice. I find surfaceMeshTriangulate very useful for me, but I have a problem. If I type

surfaceMeshTriangulate -case analisi ext.stl

I can correctly export the outside mesh created with BlockMesh; after using SnappyHexMesh in the boundary file there is a new patch, named part2, that I want to convert in stl; but when I type

surfaceMeshTriangulate -case analisi -patches part2 ext.stl

I obtain this output:

Create time

Extracting triSurface from boundaryMesh ...

Reading mesh from time 0
Create polyMesh for time = 0



incorrect first token, expected <int> or '(', found on line 0 the word 'part2'

file: IStringStream.sourceFile at line 0.

From function operator>>(Istream&, List<t>&)
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/ListIO.C at line 155.

FOAM exiting

I receive the same output even changing the patch.
Can you help me?

This is mu boundary file:

5
(
inlet
{
type patch;
nFaces 1600;
startFace 223232;
}
outlet
{
type patch;
nFaces 1600;
startFace 224832;
}
walls
{
type wall;
nFaces 7680;
startFace 226432;
}
cocco
{
type empty;
nFaces 0;
startFace 234112;
}
part2
{
type wall;
nFaces 384;
startFace 234112;
}
)

Thank you

Fabrizio
fabrizio is offline   Reply With Quote

Old   January 12, 2009, 02:46
Default Hi, is there a chance to di
  #16
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19
braennstroem is on a distinguished road
Hi,

is there a chance to display the distance between the stl and snappyHex meshes? If so, could it be a good approach to keep those hexa cells, which don't get snapped to the stl features, in place and use an immersed boundary approach for these regions!?

Fabian
braennstroem is offline   Reply With Quote

Old   February 5, 2010, 11:36
Default Uniform Boundary layer in snappyhexmesh
  #17
Member
 
Maruthamuthu Venkatraman
Join Date: Mar 2009
Location: Norway
Posts: 80
Rep Power: 17
maruthamuthu_venkatraman is on a distinguished road
Dear Foamers,
I am a quite new user with Snappyhexmesh. I would like to generate a uniform boundarylayer normal to the walls for an aerofoil section. Due to curvature the cell levels has been increased to attach to the the surface. When the boundary layer i.e addlayer is set to 4 or 5 with the expansion ratio set as 0.3 (constant) due to large cells at flat surface locations boundary layers are non-uniform.

Is there is any way to make a uniform boundary layer along the curvature of the profile?Attached herewith the cutsection for the profile.
Attached Files
File Type: doc profile.doc (32.5 KB, 45 views)
maruthamuthu_venkatraman is offline   Reply With Quote

Old   October 16, 2010, 23:58
Default
  #18
Member
 
Greg Givogue
Join Date: Aug 2010
Location: Ottawa Canada
Posts: 57
Rep Power: 15
Greg Givogue is on a distinguished road
I've had this problem before and resorted to setting addLayers to false and refining the BL using the distance option in refinement regions... how did you solve this problem? Were you able to use addLayers? Thanks
Greg Givogue is offline   Reply With Quote

Old   October 17, 2010, 09:16
Default
  #19
Member
 
Maruthamuthu Venkatraman
Join Date: Mar 2009
Location: Norway
Posts: 80
Rep Power: 17
maruthamuthu_venkatraman is on a distinguished road
Thanks for your interest in posting this reply.

I will try to use it in my next case. Actually I heard, snappyhex mesh is not a good choice for meshing geometries involving sharp corners. So I havent spend much time in investigated it.

May be this new OpenFOAM version can resolve it ?
maruthamuthu_venkatraman is offline   Reply With Quote

Old   October 17, 2010, 11:09
Default
  #20
Member
 
Greg Givogue
Join Date: Aug 2010
Location: Ottawa Canada
Posts: 57
Rep Power: 15
Greg Givogue is on a distinguished road
Yeah it's pretty cumbersome and very RAM intensive. It can deal with sharp edges and thin plates if you specify edges (.emesh) in features. I've spent a lot of time playing around with sHM and I think your better off using gmesh... good luck!
Greg Givogue is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[CAD formats] Creating waterproof STL using snappyHexMesh or salome Tobi OpenFOAM Meshing & Mesh Conversion 58 May 13, 2020 07:01
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing peterhess OpenFOAM Meshing & Mesh Conversion 2 January 3, 2018 03:54
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. jasv OpenFOAM Meshing & Mesh Conversion 4 May 10, 2016 03:55
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? klausb OpenFOAM Meshing & Mesh Conversion 1 March 7, 2015 12:55
[snappyHexMesh] stitchMesh and snappyHexMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 0 December 23, 2009 03:09


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