you only have to move the 3/polyMesh/points to the constant/polyMesh directory.
|
@ 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 |
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. |
2 Attachment(s)
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. |
Quote:
I still have a couple of troublesome cells in the two-phase simulation, but those are snappyHexMesh issues and not related to snapEdge. |
Quote:
|
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 |
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. |
Great, waiting for it!
Regards, Gonzalo |
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. |
Sorry Niklas,
it was just a problem of my OpenFOAM-1.7.x version. Now your tool works again. Stephane. |
3 Attachment(s)
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. |
3 Attachment(s)
More pictures (rear view).
Stephane. |
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 |
example case?
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 |
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. |
1 Attachment(s)
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. |
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 |
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. |
1 Attachment(s)
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 |
All times are GMT -4. The time now is 13:42. |