<br>Hi All,<br><br>I have found two mysterious  problem. Let me explain what i have done.<br>I have found one gmsh example in cfd-online and try to replicate it.<br><br><a href="http://www.cfd-online.com/Forums/openfoam-meshing-gmsh/61876-default-faces-boundary-layer.html">http://www.cfd-online.com/Forums/openfoam-meshing-gmsh/61876-default-faces-boundary-layer.html</a><br>
<br>It works fine.<br><br>Then i Import the stl file and create the external domain{bounding box}.<br><br>Now created the prism layer using extrusion command upto certain height. Then try to create the volume from extrusion height to external domain.<br>
<br>But i'm facing a problem<br><br>nfo    : Meshing volume 1 (extruded)<br>You are trying to generate a mixed structured/unstructured grid using<br>the 3D Delaunay algorithm. This algorithm cannot garantee that the<br>
final mesh will be conforming. You should probably use the Frontal<br>Netgen algorithm instead. Do you really want to continue?<br><br>(To disable this warning in the future, select `Enable expert mode'<br>in the option dialog.)<br>
<br>[Continue] or [Cancel]? (default=Continue) <br>Info    : Meshing volume 31 (Tetgen+Delaunay)<br>Constructing Delaunay tetrahedralization.<br>Delaunay seconds:  0.45<br>Creating surface mesh.<br>Perturbing vertices.<br>
Delaunizing segments.<br>Constraining facets.<br><b>Error:  Invalid PLC.</b><br>  Two subfaces (4676, 2508, 2788) and (2507, 2508, 3905)<br>  are found intersecting each other.<br>  Hint:  Use -d switch to find all intersecting facets.<br>
<b>Error   : Self intersecting surface mesh, computing intersections (this could take a while)</b><br>Constructing Delaunay tetrahedralization.<br>  Creating initial tetrahedralization.<br>  Incrementally inserting points.<br>
  87097 Flips (T23 51371, T32 32804, T22 211, T44 2711)<br>Delaunay seconds:  0.44<br><br><br>When i visualize those mesh, i found that volume was created from the surface of stl file not from surface of extrusion layer.<br>
<br>When i try to mesh using <b>netgen</b> algorithm, <br><br>Info    : Region 31 Face 4, 1 intersect<br>Info    : CalcLocalH: 4672 Points 0 Elements 9336 Surface Elements <br>Info    : WARNING: Intersecting elements 2429 and 8321 <br>
el1 = np = 3 3904 3905 4036<br>el2 = np = 3 2508 2788 3275<br>layer1 = 1<br>layer2 = 1<br>Info    : WARNING: Intersecting elements 4954 and 8321 <br>el1 = np = 3 2507 4036 3905<br>el2 = np = 3 2508 2788 3275<br><br><br>Without prism layer, meshing was perfect. But i need to add some prism layer near the surface. <br>
<br><b>Is it possible to add prism layer and volume mesh from the latest surface of prism layer ?</b><br><br>Second problem was, <br><br>Imported the stl file. Created extrusion layer and try to create again extrusion layer from the latest surface of previous extrusion layer. But i am getting error of<br>
<br><b>Error   : Impossible to extrude entity 3 (of type 303)</b><br><br>So, we <b>cant</b> extrude layer from the lastest surface of the extrusion using stl file ?<br><br><br><br><br>lc=50;<br>length=1500;<br>dec=1000;<br>
<br>Coherence;<br>Merge "combine.stl";<br>Coherence;<br><br>s1 = news ;<br>s2 = s1 -1 ;<br>sl1 = newsl ; Surface Loop (sl1) = {s2} ;<br><br>Transfinite Surface {s2}; Recombine Surface {s2};<br><br>v2[] = Extrude{Surface{s2};Layers{8,1};Recombine;};<br>
<br><br>sl2 = newsl ; Surface Loop (sl2) = {-v2[0]} ;<br><br>// External Domain<br>xmin = -length + dec;<br>xmax =  length ;<br>ymin = -length + dec;<br>ymax =  length - dec;<br>zmin = -length + dec;<br>zmax =  length - dec;<br>
<br>p1 = newp ; Point (p1) = { xmin, ymin, zmin ,lc }; p2 = newp ; Point (p2) = { xmax, ymin, zmin ,lc };<br>p3 = newp ; Point (p3) = { xmax, ymax, zmin ,lc }; p4 = newp ; Point (p4) = { xmin, ymax, zmin ,lc };<br>p5 = newp ; Point (p5) = { xmin, ymin, zmax ,lc }; p6 = newp ; Point (p6) = { xmax, ymin, zmax ,lc };<br>
p7 = newp ; Point (p7) = { xmax, ymax, zmax ,lc }; p8 = newp ; Point (p8) = { xmin, ymax, zmax ,lc };<br><br>l1 = newl ; Line(l1)   = {p1, p4}; l2 = newl ; Line(l2)   = {p4, p8}; l3 = newl ; Line(l3)   = {p8, p5}; l4 = newl ; Line(l4)   = {p5, p1};<br>
l5 = newl ; Line(l5)   = {p2, p3}; l6 = newl ; Line(l6)   = {p3, p7}; l7 = newl ; Line(l7)   = {p7, p6}; l8 = newl ; Line(l8)   = {p6, p2};<br>l9 = newl ; Line(l9)   = {p1, p2}; l10 = newl ; Line(l10) = {p4, p3}; l11 = newl ; Line(l11) = {p5, p6}; l12 = newl ; Line(l12) = {p8, p7};<br>
ll1 = newll ; Line Loop (ll1) = { l1,l2,l3,l4};     s3 = news ; Plane Surface (s3) ={ll1} ;<br>ll2 = newll ; Line Loop (ll2) = { l5,l6,l7,l8};     s4 = news ; Plane Surface (s4) ={ll2} ;<br>ll3 = newll ; Line Loop (ll3) = { -l3,l12,l7,-l11}; s5 = news ; Plane Surface (s5) ={ll3} ;<br>
ll4 = newll ; Line Loop (ll4) = { l1,l10,-l5,-l9};  s6 = news ; Plane Surface (s6) ={ll4} ;<br>ll5 = newll ; Line Loop (ll5) = { l4,l9,-l8,-l11};  s7 = news ; Plane Surface (s7) ={ll5} ;<br>ll6 = newll ; Line Loop (ll6) = { -l2,l10,l6,-l12}; s8 = news ; Plane Surface (s8) ={ll6} ;<br>
sl3 = newsl ; Surface Loop (sl3) = {s3,s4,s5,s6,s7,s8} ;<br><br>ps1=newreg ; Physical Surface("body") = {s2};<br>ps2=newreg ; Physical Surface("xmin") = {s3};<br>ps3=newreg ; Physical Surface("xmax") = {s4};<br>
ps4=newreg ; Physical Surface("ymin") = {s5};<br>ps5=newreg ; Physical Surface("ymax") = {s6};<br>ps6=newreg ; Physical Surface("zmin") = {s7};<br>ps7=newreg ; Physical Surface("zmax") = {s8};<br>
<br>v3=newv ; Volume(v3) = {sl3,sl2};<br>v4=newv ; Physical Volume (v4) = { v3, v2[1]} ;<br><br><br>Thanks<br> - Ranjith<br>