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/)
-   -   [snappyHexMesh] jagged, ragged edges... (https://www.cfd-online.com/Forums/openfoam-meshing/72595-jagged-ragged-edges.html)

rob3rt 0ng December 8, 2010 08:45

Hi,

I have a rather stupid question. When I type in snapEdge, it gives me an error message saying it can't read the designated stl file name. I'm sure the name of both the one in the snapEdgeDict and triSurface is the same. Sorry for posting up this question in this forum, as there is no other where else in the forum disccusing this matter.

Kind Regards,
Robert

Arnoldinho December 8, 2010 08:56

For snapEdge, the stl files must be in the main case directory (together with 0, system, constant etc.). So just create a link to the triSurface folder, or simply copy the stl files.

gtampier December 20, 2010 17:51

Hi,

amazing tool. I've been working with several "tricks" trying to solve the snappy problem with sharp edges... but only very specific and time consuming solutions!
I've been trying to download snapEdge.tgz for many hours w/o success from the openfoamwiki.net link (http://openfoam.nequam.se/cases/snapEdge.tgz). Is it a temporary problem or is there a new link or mirror somewhere?
Thanks in advance,
Gonzalo Tampier

niklas December 21, 2010 02:10

The link is permanent.
Works fine for me.

namCFD December 30, 2010 13:58

small orifice in a very large room
 
3 Attachment(s)
Hello Niklas,

I am trying to use snappyHexMesh and snapEdge to insert a very small orifice (9mm diameter & 10 cm long) inside a very big room (20m L x 8 m H x 10 m W). My goal is to use dieselFoam to simulate water droplet distribution with incoming gas from the orifice (inlet) to increase the initial momentum of the droplets. Without the incoming gas, the initial/injection droplet velocity is about 6 m/sec. The incoming gas is about 340 m/sec. With the gas, the initial droplet velocity increases to about 160 m/sec. Improved momentum increases the distribution distance and area. I get this by placing the injector in front of the orifice/inlet. Basically, I combine your ammonium problem with aachenbomb.

I am new to all this snappyHexMesh and snapEdge, in particular, and OpenFOAM/dieselFoam in general. I have a few questions:

1) Is this a hopeless case since the orifice/inlet is sooo small as compared to the room dimensions that the mesh will never work out? Using checkMesh fails all the time.

2) What files after snappyHexMesh and snapEdge must I use to run the case?

3) Is there away to use dieselFoam solver and the injector to inject both gas and liquid at the same time? What must I modify if injecting both gas and liquid is possible?

Thank you for your help.

Nam

namCFD December 30, 2010 14:04

Forget a file
 
1 Attachment(s)
Oops, I forget to include the snappyHexMeshDict.

lakeat March 10, 2011 15:40

3 Attachment(s)
Great job! Thanks, Niklas.

Well, will snappyHexMesh next release includes your snapEdge feature?

I am meshing a building case, that is flow around building, and snapEdge works very good, though I still need help to improve the mesh quality.
Attachment 6848
Attachment 6849
Attachment 6850

niklas March 11, 2011 01:39

Quote:

Originally Posted by lakeat (Post 298910)
Well, will snappyHexMesh next release includes your snapEdge feature?

Nope, I would not recommend it either. Its by no means a finished product and it works
quite slow and only on 1 processor.
I am using it on a daily basis though for which it does exactly what I want and that is
to get a correct inflow/outflow area on pipe-flow simulations.

owayz March 18, 2011 11:21

snapEdge
 
Hi Nikalas,
Have you ever tried to addlayers after using snapEdge. I feel like I have a problem adding layers after snapEdge. I don't have much experience with sHM but my aim is to create a mesh that captures the edge features well.
Problem
: After using snapEdge when I try adding layers, I see a very strange kind of behavior. Like some kind of baffles being created on surfaces and some sort of hanging cells. I was curious if anyone has seen you have ever seen this kind of behavior before and found any solution.:)
Regards,
Awais

lakeat March 18, 2011 11:38

Hmm, I forgot to report, that last time, a week ago, when I used snapEdge, and then, the simulation went wrong, floating points exaception, I think it is something related with snapEdge. But Im not sure

usergk March 25, 2011 12:40

SnapEdge and snappyHexMesh
 
1 Attachment(s)
Hi

I am a new user of OpenFoam and am trying to generate a mesh for a slightly complicated geometry involving swirler blades.
I tried snappyHexMesh on the stl file, and it seemed to work fine; however, I am getting a floating point error with snapEdge.
The files are attached. Could someone more experienced look at it and suggest how I may improve the mesh (using both snappyHexMesh and snapEdge)?
I would like a coarser mesh (to reduce computation time), so perhaps snapEdge could be a useful tool.

Many thanks,
GK

[Edit: zip file modified]

jantheron October 6, 2011 16:45

snapEdge tested on OF 2.0.1?
 
Has anybody tested snapEdge on OpenFOAM 2.0.1? I have a sparseimage distro on my Mac and have been happy with all functionality working. I'd like to check that snapEdge has been tested before risking mucking up my precompiled OF with a recompile...

Jan
www.kanoefabrik.com

ziad October 6, 2011 17:06

Quote:

Originally Posted by jantheron (Post 326960)
Has anybody tested snapEdge on OpenFOAM 2.0.1? I have a sparseimage distro on my Mac and have been happy with all functionality working. I'd like to check that snapEdge has been tested before risking mucking up my precompiled OF with a recompile...

Jan
www.kanoefabrik.com

You should not need to use snapEdge on OpenFOAM 2.x. The ragged edges bug is apparently fixed in snappyHexMesh now.

http://www.openfoam.com/news/snappyH...ature-edge.php

jantheron October 6, 2011 17:52

3 Attachment(s)
Quote:

Originally Posted by ziad (Post 326963)
You should not need to use snapEdge on OpenFOAM 2.x. The ragged edges bug is apparently fixed in snappyHexMesh now.

http://www.openfoam.com/news/snappyH...ature-edge.php

Hmmm.. I must be doing something wrong, for my stl file and the resulting openfoam grid after snappyHexMesh are quite different. I attached pics of both as well as my snappyHexMeshDict. Is there something obvious you can pick up?

openfoam_user October 7, 2011 03:42

Hi Jan,

you can try the flange tutorial:

OpenFOAM-2.0.x/tutorials/mesh/snappyHexMesh/flange

Following lines are needed to capture sharp edges:


// Explicit feature edge refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now.
features
(
{
file "flange.eMesh";
level 0;
}
);

Then you have to run surfaceFeatureExtract before snappyHexMesh.

runApplication surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/flange.stl flange
runApplication snappyHexMesh -overwrite

Regards,
Stephane.

jantheron October 9, 2011 03:20

Stephane

Thank you! Lovely tip. Just one question: How would one visualize these edges that are produced?

Jan

wyldckat October 9, 2011 06:59

Greetings to all!

@Jan: You can open the ".obj" files generated by surfaceFeatureExtract directly in ParaView, without any need for additional file conversion!

By the way, a thread where are already a few discussions about this new feature in OF 2.0 is this: http://www.cfd-online.com/Forums/ope...ture-edge.html

Best regards,
Bruno

jantheron October 9, 2011 18:50

Quote:

Originally Posted by wyldckat (Post 327197)
Greetings to all!

@Jan: You can open the ".obj" files generated by surfaceFeatureExtract directly in ParaView, without any need for additional file conversion!

By the way, a thread where are already a few discussions about this new feature in OF 2.0 is this: http://www.cfd-online.com/Forums/ope...ture-edge.html

Best regards,
Bruno

Thanks, Bruno

Worked like a charm!

Jan
www.kanoefabrik.com

jkim July 23, 2012 23:41

Hello Niklas,

SnapEdge works for obj file.
It is interesting.

///////////////////////////////////////////
Hello Niklas,

Do you have any idea to use obj files instead of stl files?
Currently I have obj files only.
If you help me to modify the code, I would like to use it.

Many thanks.
Tj


All times are GMT -4. The time now is 16:27.