|
[Sponsors] |
[snappyHexMesh] Patch Names in STL file for snappyHexMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 4, 2011, 13:24 |
Patch Names in STL file for snappyHexMesh
|
#1 |
New Member
Kattie Smilovsky
Join Date: Jan 2011
Posts: 10
Rep Power: 15 |
Good Day Everyone,
I'm trying my first hand at snappyHexMesh, using a simple cylinder inside a rectangular prism domain. The cylinder is an stl file output from HyperMesh. I've named the component in HyperMesh, but that does not seem to show up in the STL file. My problem arises when I attempt to run snappyHexMesh using this STL file. When it is to add layers to the geometry it writes out: No layers to generate ... Layer mesh : cells(local):720 faces(local):2436 points(local):1029 Cells per refinement level: 0 720 Writing mesh to time 14 Written mesh in = 0.01 s. Layers added in = 0.02 s. Finished meshing in = 0.19 s. End A patch is added during the process of meshing, as far as I can tell: Adding patches for surface regions ---------------------------------- Patch Region ----- ------ cylinder: 5 cylinder_part Added patches in = 0 s I am using OpenFOAM 1.7.1. I think that I have the correct patch names, but is there a function within OpenFOAM to tell you the names of all the included patches? This would be particularly useful for those contained in the STL file. My best guess is that I have the incorrect patch name in my snappyHexMeshDict file, but could there be another reason for snappyHexMesh not producing a mesh? I've attached my snappyHexMeshDict file for reference. Any ideas or suggestions would be much appreciated. Kattie |
|
February 5, 2011, 06:50 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 51 |
Hi Kattie,
in your STL File you have to name your boundary's. I am working with Catia and have to generate the boundary's with Salome. Here an example: Catia STL Code:
CATIASTL solid facet normal -6.087614e-01 7.933533e-01 0.000000e+00 outer loop vertex 3.974695e-03 2.625305e-03 6.000000e-02 vertex 4.275000e-03 2.855737e-03 6.000000e-02 vertex 4.275000e-03 2.855737e-03 0.000000e+00 endloop endfacet . . . ENDSOLID In this example you got the whole STL Surface with just one boundary called "solid" if you don 't know how the boundary is called do the follow: this name you have to use in your sHMD after Meshing you have to make a Slice in paraFoam to make that visible. Hope it 's helpful Tobi |
|
February 7, 2011, 08:04 |
|
#3 |
New Member
Kattie Smilovsky
Join Date: Jan 2011
Posts: 10
Rep Power: 15 |
Hi Tobi,
Thanks for the reply. I tried to name the patch "solid" as you suggested in my sHMD, but even then it wouldn't construct any layers. My STL file is just one part (a cylinder) as well, so it should only be one part (or patch). My STL file starts as: solid part facet normal 0.0 0.0 1.0 outer loop vertex -6.132972E-03 -5.692454E-03 0.000000E+00 vertex -8.145442E-03 -5.839178E-03 0.000000E+00 vertex -6.511647E-03 -7.611832E-03 0.000000E+00 endloop endfacet Any ideas on how the naming should be reproduced in sHMDict would be welcome. Thanks in advance, Kattie |
|
February 7, 2011, 13:25 |
|
#4 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 51 |
Quote:
I ll make a sHM + STL file for you - there you 'll see it. |
||
February 7, 2011, 13:59 |
|
#5 |
New Member
Kattie Smilovsky
Join Date: Jan 2011
Posts: 10
Rep Power: 15 |
Hi Tobi,
That is very kind of you - thank you! It seems very odd that the cylinder doesn't show up in my mesh, but perhaps with your example files I'll find out I've been naming a patch incorrectly. Have a good evening, Kattie |
|
February 7, 2011, 16:30 |
|
#7 |
New Member
Kattie Smilovsky
Join Date: Jan 2011
Posts: 10
Rep Power: 15 |
Hi Tobi,
Thank you so much. I've run your files and they work perfectly. I think it's also helped me to identify the root of my own error. I am trying to simulate a cylinder within a rectangular prism of fluid, so I thought that the blockMesh would create the extents of the domain of fluid, and the cylinder would be a solid within that fluid volume. I'm now thinking that the volume domain must also be specified in the STL file to create the outer edges (inlet, outlet, etc.). Kattie |
|
February 7, 2011, 16:47 |
|
#8 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 51 |
Hey ...
no problem maybe that would be very helpful http://www.discretizer.org/node/21 check it out - i am working with that discretizer too - but just for generation of mesh. Tobi |
|
October 12, 2011, 18:35 |
|
#9 |
New Member
Miguel
Join Date: Jan 2010
Posts: 12
Rep Power: 16 |
Sorry guys, but i do have the same problem, instead of a cylinder i have an sphere that doesn't show up after executing 'snapHexMesh' and then 'paraFoam'.
I have checked names of the patches of my STL and of my sHMD, and they seem okey. I think is that my sphere has coordenates outside the boundaries, but I don't know how to check that. I attach my stl and bMD and sHMD in case you can show me where is the error. Thanks in advance! |
|
October 13, 2011, 12:07 |
|
#10 |
New Member
Kattie Smilovsky
Join Date: Jan 2011
Posts: 10
Rep Power: 15 |
Hi Miguel,
It would seem that your blockMesh has z-coordinates from 0 to 8, but your sphere STL contains negative z-coordinates. My first suggestion would be to extend the bounds of your blockMesh to much further than they are now. Perhaps try z from -8 to +8 first, and to be even more careful, try y from -7 to +7 and x from from -10 to +15. If you still don't see the sphere, double check that your locationInMesh point lies outside of the volume the sphere occupies. Hope this helps, Kattie |
|
October 15, 2011, 12:41 |
|
#11 |
New Member
Miguel
Join Date: Jan 2010
Posts: 12
Rep Power: 16 |
It worked Kattie!, thanks a lot
Now I can see the little icosphere after sHMeshing in paraFoam. But since i didn't remember the solvers from the motorbike case (now I see it executes potentialFoam and simpleFoam). I ran ./Allrun script, and then paraFoam and the icosphere wasn't there!, it blew away hehehe. Looking for the error there must be sth wrong in my sHMD, because actually in the output of the sHD i see 2 warnings, here -> Code:
miguelfg@laptopubuntu:~/OpenFOAM/miguelfg-2.0.1/run/mis_casos/icosphere1_motorbike$ cat sHMout5.out | grep 'Warning' -A 3 --> FOAM Warning : Displacement (-0.0179286 0.0108571 -0.00502026) at mesh point 2403 coord (0.588107 -0.22063 0.00119238) points through the surrounding patch faces Smoothing displacement ... Displacement smoothed in = 0.01 s -- --> FOAM Warning : From function layerParameters::layerParameters(..) in file autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C at line 378 Reading "/home/miguelfg/OpenFOAM/miguelfg-2.0.1/run/mis_casos/icosphere1_motorbike/system/snappyHexMeshDict::addLayersControls::layers" from line 218 to line 218 Code:
miguelfg@laptopubuntu:~/OpenFOAM/miguelfg-2.0.1/run/mis_casos/icosphere1_motorbike$ ll ../../tutorials/incompressible/simpleFoam/motorBikeBACKUP/300/ total 13208 drwxr-xr-x 3 miguelfg miguelfg 4096 2011-10-15 14:23 ./ drwxr-xr-x 14 miguelfg miguelfg 4096 2011-10-15 14:23 ../ -rw-r--r-- 1 miguelfg miguelfg 1331188 2011-10-15 14:23 k.gz -rw-r--r-- 1 miguelfg miguelfg 1416266 2011-10-15 14:23 nut.gz -rw-r--r-- 1 miguelfg miguelfg 1359652 2011-10-15 14:23 omega.gz -rw-r--r-- 1 miguelfg miguelfg 1280176 2011-10-15 14:23 p.gz -rw-r--r-- 1 miguelfg miguelfg 4201623 2011-10-15 14:23 phi.gz -rw-r--r-- 1 miguelfg miguelfg 3916712 2011-10-15 14:23 U.gz drwxr-xr-x 2 miguelfg miguelfg 4096 2011-10-15 14:23 uniform/ Code:
miguelfg@laptopubuntu:~/OpenFOAM/miguelfg-2.0.1/run/mis_casos/icosphere1_motorbike$ ll 3/ total 20 drwxr-xr-x 3 miguelfg miguelfg 4096 2011-10-15 18:25 ./ drwxr-xr-x 8 miguelfg miguelfg 4096 2011-10-15 18:25 ../ -rw-r--r-- 1 miguelfg miguelfg 971 2011-10-15 18:25 cellLevel.gz -rw-r--r-- 1 miguelfg miguelfg 1389 2011-10-15 18:25 pointLevel.gz drwxr-xr-x 2 miguelfg miguelfg 4096 2011-10-15 18:25 polyMesh/ And I tried running 'potentialFoam' instead ./Allrun , and it yells at me because it can find /3/p subdirectory. (Maybe i should post this in a new one) |
|
October 18, 2011, 11:05 |
|
#12 |
Member
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 17 |
Hi All,
I created a dummy case for testing the naming convention in different file formats and fortunately OpenFOAM can process OBJ files with named faces. I would like to specify a layer where snappyHexMesh should add some prescribed number of layers. Everything works fine when I define a boundary from the blockMesh, but OpenFOAM gives an error with surfaces in sHM geometry list. Tested with OBJ and STL as well. Code:
Wildcard layer specification for "objGeom_patchName" does not match any patch. Valid patches are 12 ( ... objGeom_patchName ... ) There's some information about the issue in the official documentation - 5.4.1 The mesh generation process of snappyHexMesh. I didn't specify any patch name but the result is the same with "objFile.obj_pathcName". |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam for OpenFOAM 4.0 | mnikku | OpenFOAM Community Contributions | 80 | May 17, 2022 08:06 |
how to calculate mass flow rate on patches and summation of that during the run? | immortality | OpenFOAM Post-Processing | 104 | February 16, 2021 08:46 |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 16:18 |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 18:13 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 16:02 |