|
[Sponsors] |
[Gmsh] Extrude stl surface for building a prismatic layer |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 11, 2015, 12:21 |
Extrude stl surface for building a prismatic layer
|
#1 |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Hello everybody,
I am trying to create a proper prismatic layer with gmsh now, since I did not succeed with enGrid. My geometry has been approved both with blender and enGrid, so I guess this is not the problem. This is what I have done so far: 1) Import the stl file in gmsh (File -> Merge...) 2) I tried to make an elementary ruled surface (Elementary entities -> Add -> Ruled surface -> Click on the geometry -> Press "E" -> Nothing happens) 3) I tried to create a physical surface (Physical groups -> Add -> Surface -> Click on the geometry -> Press "E" -> The system seemed to accept it, at least it appeared in the geo file) 4) I tried to extrude the surface. Therefore I added Code:
Extrude{Surface{5};Layers{{10},{0.5}};} Code:
Warning : '/Users/kateeisenhower/Documents/gmsh/data/project/mygeometry.geo', line 8 : Unknown surface 5 Code:
Merge "mygeometry.stl"; Physical Surface(5) = {2}; Extrude{Surface{5};Layers{{10},{0.5}};} Best regards, Kate |
|
May 12, 2015, 11:28 |
May this will help you
|
#2 |
New Member
Goth ydamil
Join Date: Mar 2013
Posts: 13
Rep Power: 13 |
hello
May this will help you for your problem with prismatic mesh, just copy it in geo file and mesh it. best wishes |
|
May 13, 2015, 02:47 |
|
#3 | |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Quote:
Code:
// Gmsh project created on Tue May 12 14:54:30 2015 cl=35; b=100;//140 Point(1) = {b, b, 0,cl}; Point(2) = {-b, -b, 0,cl}; Point(3) = {b, -b, 0,cl}; Point(4) = {-b, b, 0,cl}; Line(1) = {1, 4}; Line(2) = {4, 2}; Line(3) = {2, 3}; Line(4) = {3, 1}; Line Loop(5) = {1, 2, 3, 4}; Plane Surface(6) = {5}; Extrude {0, 0, 40}{Surface{6};Layers{6} ;Recombine;}Physical Volume(29) = {1}; - Why do you give your physical volume the identification number 29, instead of, for example 1? Is there a reason for this? - How do you know that the elementary volume (that one you want to regroup as a physical volume) has the identification number 1? Again, thank you for your answer. Any comment is welcome! Kate |
||
May 13, 2015, 03:39 |
is a choice
|
#4 |
New Member
Goth ydamil
Join Date: Mar 2013
Posts: 13
Rep Power: 13 |
Hello
the number of volume isn't necessary be 29 , you can change it. Go to the mesh file you will find in one of the columns the number of volume that you make. example 1 6 3 29 1 0 69 68 61 229 224 189 29 : physical volume (you can change it in geo file) 69 68 61 229 224 189 : nodes of volume 1 best wishes. |
|
May 13, 2015, 03:53 |
|
#5 | |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Quote:
thank you for the explanation. The problem is I cannot even create a surface from my stl which I want to extrude later on. Best regards, Kate |
||
May 13, 2015, 03:56 |
ok
|
#6 |
New Member
Goth ydamil
Join Date: Mar 2013
Posts: 13
Rep Power: 13 |
then where is the problem
if you want send me the geo file to try here. |
|
May 13, 2015, 04:39 |
may be
|
#7 |
New Member
Goth ydamil
Join Date: Mar 2013
Posts: 13
Rep Power: 13 |
may be your problem is the physical surface, for me I needed physical volume, then i did plane surface ---- extrude----- physical volume.
for your problem i don't know if you need physical surface ? good luck |
|
May 13, 2015, 04:59 |
|
#8 | |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Quote:
Thanks for your help |
||
July 14, 2015, 05:43 |
|
#9 |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Hello there,
finally I got my prismatic layer with the following command: Code:
out[]=Extrude{Surface{4}; Layers{30, -0.02};}; But these 30 layers now have each the same height (0.0006666.. m). How can I achieve the following? Code:
layer one height: x layer two height: x*1.5 layer two height: x*1.5^2 layer three height: x*1.5^3 . . . Kate |
|
April 5, 2016, 14:30 |
|
#10 |
New Member
Join Date: Jul 2013
Posts: 4
Rep Power: 13 |
Hello,
I have a similar problem, and cant find a solution.. I have an STL with a single surface (a wing). I want to generate a sublayer with prisms, and on top, the rest of the volume, filled with tetrahedra. The attached geo-file generates the prisms, but does not generate the tetrahedra correctly. If I replace line 32 Surface Loop(1002) = {bl[0]}; // wing bl with Surface Loop(1002) = {1}; // wing where surface 1 is the wing surface, the tetrahedra are generated, but not sitting on top of the prisms, but directly attached to the wing (see picture attached). This behavior is correct.. What I dont understand is, why the initial version, where the surface loop 1002 is built from the outside surface of the BL, does not work.. Maybe someone has a hint.. Thanks in advance! Kind regards, Johannes |
|
April 15, 2016, 12:34 |
|
#11 | ||
New Member
Abdulhaq
Join Date: Oct 2012
Posts: 27
Rep Power: 14 |
Quote:
However, tetrahedra attached to the wing isn't the best solution. I have a case for which the solution diverges and I came to the conclusion that it's because of this interaction. What you can do is change line 18 from: Code:
box[] = Extrude {100,0,0} { Surface{101};}; Code:
box[] = Extrude {100,0,0} { Surface{101}; QuadTriAddVerts RecombLaterals; }; Quote:
|
|||
April 21, 2016, 03:24 |
|
#12 |
New Member
Join Date: Jul 2013
Posts: 4
Rep Power: 13 |
Hello aljazari,
thanks for your help and sorry about getting back so late. I tried the modification, but the problem remains the same. I uploaded the stl file, hope it works http://www.filedropper.com/wing I also attached here a geo-file as suggested by gmsh-programmer Christoph. The disadvantage of this solution is that the prism-layer has to be scaled and thus thickness of the prisms cant be defined. Thanks a lot! Kind regards, Johannes |
|
April 21, 2016, 17:54 |
|
#13 |
Member
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11 |
Hi,
You might also try to use the boundary layer field(s) in Gmsh (v10 or v11). See attached thumbnail for example, and attached geo file for input example (automatically generated with the SketchUp Meshkit extension). Regards, Peter P.S.: Alternatively, if you're using OpenFOAM, you can generate your mesh with Gmsh and add layers with snappyHexMesh. Good luck! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Help with Snappy: no layers growing | GianF | OpenFOAM Meshing & Mesh Conversion | 2 | September 23, 2020 09:26 |
[snappyHexMesh] snappyHexMesh generates not planar surface | krzychu111 | OpenFOAM Meshing & Mesh Conversion | 2 | April 23, 2020 17:38 |
[snappyHexMesh] SHM addLayers doesnt work on the small surface | handicraft | OpenFOAM Meshing & Mesh Conversion | 4 | October 5, 2018 04:50 |
[snappyHexMesh] Collapsing Layers | Tim_Simon | OpenFOAM Meshing & Mesh Conversion | 5 | August 2, 2015 23:51 |
errors | Fahad | Main CFD Forum | 0 | March 23, 2004 14:20 |