|
[Sponsors] |
July 13, 2010, 11:10 |
|
#41 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
you only have to move the 3/polyMesh/points to the constant/polyMesh directory.
|
|
July 14, 2010, 08:06 |
|
#42 | |
Member
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17 |
@ Stephane:
Thanks for your input! It works indeed, so the fpe problem is solved. @ Niklas: After disabling smoothing, snapEdge runs fine but I'm still not getting nice edges over the patch. At the moment I'm testing with different tolerances of 0.2 to 0.8. I also reduced relaxation to 0.9 but the effect was hardly visible. I'll try to recreate the stl geometry I used for this test to reduce filesize so that I can send it to you or upload it somewhere to provide you with a 'challenging' testcase. Quote:
Best regards, Johannes |
||
July 14, 2010, 10:02 |
|
#43 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
I'm playing with your case and there are faces that are more on the gas inlets than on the walls, but they still belong to the walls, so this will never work.
I've increased the cell resolution at the inlets and that improves the starting mesh alot and makes life alot easier for snapEdge, but for some weird reason, that I havent figured out yet, it just ignores some of the edges. |
|
July 15, 2010, 12:59 |
|
#44 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Can you download the latest version from the wiki and try these settings.
If you want it better around the capillaries/walls intersection you have to refine it more. |
|
July 26, 2010, 08:55 |
|
#45 | |
Member
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 89
Rep Power: 17 |
Quote:
I still have a couple of troublesome cells in the two-phase simulation, but those are snappyHexMesh issues and not related to snapEdge. |
||
July 28, 2010, 08:35 |
|
#46 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
||
July 29, 2010, 05:49 |
|
#47 |
New Member
GRD
Join Date: Jun 2009
Posts: 28
Rep Power: 17 |
Great job Niklas,
I was wondering how do you handle layers of prisms. My guess is that it would be better first to run SHM without prisms, then snapEdge and last SHM for prisms (don't know if possible). Otherwise snapEdge would deform the first layer. Anyway, what's your opinion or best practice about this? Regards, Gonzalo |
|
July 29, 2010, 06:05 |
|
#48 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Gonzalo,
yes, you are right. First use sHM without prism layers, then snapEdge and finally sHM with only layers. I will soon put pictures about it with the ahmed body. Work in progress ... Regards, Stephane. |
|
July 29, 2010, 06:11 |
|
#49 |
New Member
GRD
Join Date: Jun 2009
Posts: 28
Rep Power: 17 |
Great, waiting for it!
Regards, Gonzalo |
|
July 29, 2010, 08:40 |
|
#50 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Niklas,
this morning I have updated the GIT version of OpenFOAM-1.7.x. And I have the following error message when using snapEdge: ---------------------------------- [110]cfs10-sanchi /shared/sanchi/OpenFOAM/sanchi-1.7.x/ahmed12.5deg25072010 % snapEdge /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7.x | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 1.7.x-40d9ee1a008d Exec : snapEdge Date : Jul 29 2010 Time : 13:34:44 Host : cfs10 PID : 8370 Case : /shared/sanchi/OpenFOAM/sanchi-1.7.x/ahmed12.5deg25072010 nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 2 --> FOAM FATAL IO ERROR: keyword stlFileName is undefined in dictionary "/shared/sanchi/OpenFOAM/sanchi-1.7.x/ahmed12.5deg25072010/constant/snapEdgeDict" file: /shared/sanchi/OpenFOAM/sanchi-1.7.x/ahmed12.5deg25072010/constant/snapEdgeDict from line 18 to line 62. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 395. FOAM exiting ----------------------- Regards, Stephane. |
|
July 29, 2010, 14:22 |
|
#51 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Sorry Niklas,
it was just a problem of my OpenFOAM-1.7.x version. Now your tool works again. Stephane. |
|
July 30, 2010, 11:00 |
|
#52 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Attached are some pictures (front view) about the mesh generation process with snappyHexMesh and the snapEdge tool developed by Niklas Nordin.
The geometry is the Ahmed body. First step : cell splitting at feature edges and surfaces (sHM) Second step : snapping to features on STL surfaces (snapEdge) Third step : add layers (sHM) I have add 10 layers of cells with snappyHexMesh (addLayers). The final mesh has 6.8 M cells. At the end the checkMesh utility gives MESH OK. Best Regards, Stephane. |
|
July 30, 2010, 11:01 |
|
#53 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
More pictures (rear view).
Stephane. |
|
July 30, 2010, 12:34 |
|
#54 |
New Member
GRD
Join Date: Jun 2009
Posts: 28
Rep Power: 17 |
Nice!
It would be really nice if you can explain the process show your Dict files for each step. This could be added to the wiki. Regards, Gonzalo |
|
August 15, 2010, 20:57 |
example case?
|
#55 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Hi,
The snapEdge utility looks like a very useful tool. I tried a simple geometry. All patches were set to Walls just to test. I used the same stl for both snappyHexMesh and snapEdge. But, there basically are no differences before and after snapEdge. I probably did something wrong. Can someone post a simple example case or provide some more detailed explanation? Thanks! Pei |
|
August 16, 2010, 03:54 |
|
#56 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
if you only have 1 patch (walls) you probably didnt use
includeInterior yes; with only 1 patch you do not have any feature edges that defines the boundary of the patch, since the patch must be a closed surface. |
|
August 16, 2010, 04:02 |
|
#57 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi,
I have attached a cube.tar.gz file. Do the following commands: tar xvzf cube.tar.gz cd cube blockMesh snappyHexMesh ln -s constant/triSurface/cube.stl snapEdge paraFoam and compare times 1, 2 and 3 for CUBE and you will see that the edges are at the end (time 3) correct ! Have a look at the files: /cube/system/snappyHexMesh /cube/constant/snapEdge Hope it will help you. PS : I use OpenFOAM-1.7.x (last available git version) Best regards, Stephane. |
|
August 16, 2010, 09:55 |
|
#58 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Thanks niklas and openfoam_user!
The new cube.tar.gz example worked great! I am wondering about few things: 1. what is the general rule for specifying the tolerance value? 2. if I have 6 faces, but only 3 patches. For example, inlet, outlet, and walls. How to prepare the stl for it? Should I have 3 stl files, ie., inlet.stl, outlet.stl, and walls.stl? Or, 1 stl, but, with inlet/outlet/walls specified inside the stl? 3. can I perform snapEdge several times? That is, do inlet first, then, outlet, then walls. Each with a different snapEdgeDict? The cell size for each feature might be different. Pei |
|
August 16, 2010, 10:23 |
|
#59 | |||
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Quote:
If you have includeInterior yes, then it will definitely not work with a value larger than 1.0. The program just checks for proximity of lines. so if you have a (square) face covering a feature it can attract both lines on opposite sides of the feature line, thus making the face of zero size. Quote:
Quote:
usually I just set snapPatches ( inlet outlet); and ignore the features on the walls. using includeInterior no is faaar more robust than setting it to yes. |
||||
August 18, 2010, 14:00 |
|
#60 |
Member
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17 |
Hi Niklas,
I'm still trying to get an improved mesh using snapEdge's includeInterior feature. At first sight the resulting mesh looks quite well but there are still some skips and the checkMesh result always shows at least two missed tests. If you have some time left it would be great if you could have a look at my case (see attached .tar.gz file with my actual settings and files) and maybe you're able to locate a potential for improvement (e.g. snapEdge or sHM parameters, stl file precision, etc...). I know that you're still working on snapEdge, so I don't expect a 'perfect' mesh, a checkMesh result without errors would be absolutely ok. Many thanks in advance! Best regards, Johannes |
|
Tags |
edges, jagged edges, snappyhexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh sticking point | natty_king | OpenFOAM Meshing & Mesh Conversion | 11 | February 20, 2024 10:12 |
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 18:16 |
[snappyHexMesh] sHM layer process keeps getting killed | MBttR | OpenFOAM Meshing & Mesh Conversion | 4 | August 15, 2016 04:21 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |