<div dir="ltr">It seems there is some problems with images, I'll post it later.<br><br>El sábado, 16 de mayo de 2015, 15:42:33 (UTC+2), Javier de la Sierra  escribió:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Hi again,<br>I finally could mesh my 2D airfoil with boundary layer. I was trying to mesh it selecting only the surfaces to apply the BL field. After selecting also all the edges and points in surfaces boundaries it meshes is ok. I attach the files because it could be usefull for other users (whitcomb2). <br>This is the result in 2D mesh.<br><img alt="" height="167" width="400"><br><br>If anyone can answer general questions about BL field I asked in my previous message I would be really thankful because I don't understand very well the field working. <br><br>Now, I am trying to mesh a 3D wing with a winglet but I have problems since gmsh is not able to mesh the surfaces. I attach the files ("ala.stp" and "ala.geo") and a image of the weird mesh.<br>As seen in the first picture the BL seems ok, at least in 2D.<br><img alt="" height="270" width="400"><br><br>However the rest of the mesh is not good:<br><img alt="" height="240" width="400">   <img alt="" height="217" width="400"><br>I attach also the step and geo files of the wing so anyone can help me.<br>Thanks for your help!!<br><br>El viernes, 15 de mayo de 2015, 14:08:20 (UTC+2), Javier de la Sierra  escribió:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Alexander,<br>I know it has been a while since your last answer, but I have to try.<br>I need to create a boundary layer arround a wing imported in STEP. I try with Boundary Layer Field but I can't make it work. Could you make your boundary layer? Can you explain to me how this field works? A general explanation of size fields would be really helpful. <br>I attach my code so you can take a look.<br><br>Please take into account that my wing is shaped by surfaces 5 and 6 (intrados and extrados). Since I want to run a 2D case the wing is placed between two planes.<br><br><div style="background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-width:1px;word-wrap:break-word"><code><div><span style="color:#800">//Boundary Layer</span><span style="color:#000"><br></span><span style="color:#606">Field</span><span style="color:#660">[</span><span style="color:#066">2</span><span style="color:#660">]</span><span style="color:#000"> </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#606">BoundaryLayer</span><span style="color:#660">;</span><span style="color:#000"><br></span><span style="color:#606">Field</span><span style="color:#660">[</span><span style="color:#066">2</span><span style="color:#660">].</span><span style="color:#606">Quads</span><span style="color:#000"> </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#066">0</span><span style="color:#660">;</span><span style="color:#000"><br></span><span style="color:#606">Field</span><span style="color:#660">[</span><span style="color:#066">2</span><span style="color:#660">].</span><span style="color:#000">hfar </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#066">1</span><span style="color:#660">;</span><span style="color:#000"><br></span><span style="color:#606">Field</span><span style="color:#660">[</span><span style="color:#066">2</span><span style="color:#660">].</span><span style="color:#000">hwall_n </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#066">1</span><span style="color:#660">;</span><span style="color:#000"><br></span><span style="color:#606">Field</span><span style="color:#660">[</span><span style="color:#066">2</span><span style="color:#660">].</span><span style="color:#000">hwall_t </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#066">2</span><span style="color:#660">;</span><span style="color:#000"><br></span><span style="color:#606">Field</span><span style="color:#660">[</span><span style="color:#066">2</span><span style="color:#660">].</span><span style="color:#000">thickness </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#066">10</span><span style="color:#660">;</span><span style="color:#000"><br></span><span style="color:#606">Field</span><span style="color:#660">[</span><span style="color:#066">2</span><span style="color:#660">].</span><span style="color:#606">FacesList</span><span style="color:#000"> </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#660">{</span><span style="color:#066">5</span><span style="color:#660">,</span><span style="color:#000"> </span><span style="color:#066">6</span><span style="color:#660">};</span><span style="color:#000"><br></span><span style="color:#606">Field</span><span style="color:#660">[</span><span style="color:#066">2</span><span style="color:#660">].</span><span style="color:#606">AnisoMax</span><span style="color:#000"> </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#066">1000000</span><span style="color:#660">;</span><span style="color:#000"><br></span><span style="color:#606">Field</span><span style="color:#660">[</span><span style="color:#066">2</span><span style="color:#660">].</span><span style="color:#606">IntersectMetrics</span><span style="color:#000"> </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#066">1</span><span style="color:#660">;</span><span style="color:#000"><br></span><span style="color:#606">Background</span><span style="color:#000"> </span><span style="color:#606">Field</span><span style="color:#000"> </span><span style="color:#660">=</span><span style="color:#000"> </span><span style="color:#066">2</span><span style="color:#660">;</span><span style="color:#000"> <br></span></div></code></div><br>I don't even know how big must be hwall and hfar parameters. If my chord is 1000 mm, how large should these parameters be if I want a 10 mm BL? I know boundary layer depends on y+, I just want to know if these parameters are mm, m or some kind of ratio.<br>And finally I'd like to know how "Background Field" works. If I set my Boundary Layer field [2] as background, the whole mesh is refined with the same size (tetra). If I set another field as background, the boundary layer field is not noticed. <br><br>Thank you very much and I hope you can help me,<br><br>El domingo, 9 de febrero de 2014, 15:04:26 (UTC+1), Alexander Tismer  escribió:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Christophe,
<br>
<br>many thanks for your help.
<br>
<br>If I try to create the layer by extrusion I get an error:
<br>
<br>"Impossible to extrude entity 8 (of type 306)"
<br>
<br>As I mentioned in the first post I create my geometry using my own-written subclasses of GFace, GVertex and GEdge. 
<br>Is it necessary to code the extrusion-function for my own geometry entity types?
<br>
<br>After spending some hours to the gmsh code and to the manual I figured out another way. I used a BoundaryLayer field. 
<br>
<br>Field[1] = BoundaryLayer;
<br>Field[1].FacesList = {1,3,8,9};
<br>Field[1].hfar = .5;
<br>Field[1].hwall_n = .5;
<br>Field[1].hwall_t = .5;
<br>Field[1].thickness = 10.;
<br>Field[1].ratio = 1.1;
<br>Field[1].Quads = 0;
<br>Field[1].IntersectMetrics = 1;
<br>BoundaryLayer Field = 1;
<br>
<br>Using the mentioned field I get a mesh with a boundary layer. The mesh looks nice, but if I convert it by using "gmshToFoam" and check it with "checkMesh" I get some errors. The mesh fails the open boundary check.
<br>
<br>***Boundary openness (-0.00152301 -0.000276836 -0.00087618) possible hole in boundary description.
<br> ***Open cells found, max cell openness: 1, number of open cells 21
<br>
<br>The boundary layer looks very fine. Please find attached two pictures.
<br>
<br>If I don't create a boundary layer then my mesh is ok (according to checkMesh). But openfoam runs into problems with the periodic patches (cyclicAMI). I figured out that it is possible to set a master surface to a surface and gmsh copies the mesh from the master surface. I try to do that with my own function:
<br>
<br>void gmshVolume::<wbr>setPeriodicPairOfFaces( GModel *gm, int const numFaceMaster, std::vector<int> const & EdgeListMaster,int const numFaceSlave, std::vector<int> const & EdgeListSlave) const {
<br>                
<br>int NEdges=EdgeListMaster.size();
<br>GFace *gf = gm->getFaceByTag(abs(<wbr>numFaceSlave));
<br>gf->setMeshMaster(<wbr>numFaceMaster);
<br>        for (int i = 0; i < NEdges; i++){
<br>                gf-><wbr>edgeCounterparts[<wbr>EdgeListSlave[i]] = EdgeListMaster[i];
<br>                GEdge *ges = gm->getEdgeByTag(abs(<wbr>EdgeListSlave[i]));
<br>                ges-><wbr>setMeshMaster(EdgeListMaster[<wbr>i]);
<br>        }
<br>}
<br>
<br>Gmsh tries to mesh but ends with
<br>
<br>Error   : Only rotations or translations can be currently taken into account for periodic faces: face 2 not meshed
<br>
<br>Isn't it enough to set the master edges to edgeCounterparts on the slave surface? Because I'm sure that my two surfaces are axially symmetric.
<br>
<br>Thanks
<br>Alex
<br>
<br>
<br>
<br>
<br>
<br>-----Ursprüngliche Nachricht-----
<br>Von: Christophe Geuzaine [mailto:<a rel="nofollow">cgeu...@ulg.ac.be</a>] 
<br>Gesendet: Freitag, 7. Februar 2014 19:12
<br>An: Alexander Tismer
<br>Cc: <a rel="nofollow">gm...@geuz.org</a>
<br>Betreff: Re: [Gmsh] Create a Boundary Layer around a blade
<br>
<br>
<br>On 07 Feb 2014, at 19:10, Christophe Geuzaine <<a rel="nofollow">cgeu...@ulg.ac.be</a>> wrote:
<br>
<br>> 
<br>> On 06 Feb 2014, at 10:05, Alexander Tismer <<a rel="nofollow">alexande...@ihs.uni-<wbr>stuttgart.de</a>> wrote:
<br>> 
<br>>> Hello,
<br>>> 
<br>>> I try to create a boundary layer around a blade of a hydraulic turbine with gmsh.
<br>>> 
<br>>> According to the paper “Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities” (page 18-19) gmsh is able to create such a layer from a set of source surfaces. For me it is not really clear how to do it.
<br>>> Has anybody an example geo file?
<br>>> Furthermore I want to do that with my own written subclasses of GEdge, GFace and GVertex using gmsh as a library. Is this also possible? Currently I created a 3-d mesh of my channel using my own written classes successfully. However I’m in trouble with the boundary layer creation around the blade, hub and shroud.
<br>>> 
<br>> 
<br>> Dear Alexander,
<br>> 
<br>> The feature mentioned in the paper can be accessed by simply using the "Extrude" command (see the attached example).
<br>
<br>With the attachment:
<br>
<br>
<br>> This creates actual geometrical entities for the layer. A more "classical" boundary layer mesh generator (which does not create new entities, but simply extrudes a layer inside the volume) is also under development, but it's not documented yet.
<br>> 
<br>> Christophe
<br>> 
<br>>> Any help is really appreciated.
<br>>> 
<br>>> Many Thanks
<br>>> Alex
<br>>> ______________________________<wbr>_________________
<br>>> gmsh mailing list
<br>>> <a rel="nofollow">gm...@geuz.org</a>
<br>>> <a href="http://www.geuz.org/mailman/listinfo/gmsh" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.geuz.org%2Fmailman%2Flistinfo%2Fgmsh\46sa\75D\46sntz\0751\46usg\75AFQjCNEJ3QLvAdHWrw4QzBDqKw4PAU6GzA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.geuz.org%2Fmailman%2Flistinfo%2Fgmsh\46sa\75D\46sntz\0751\46usg\75AFQjCNEJ3QLvAdHWrw4QzBDqKw4PAU6GzA';return true;">http://www.geuz.org/mailman/<wbr>listinfo/gmsh</a>
<br>> 
<br>> --
<br>> Prof. Christophe Geuzaine
<br>> University of Liege, Electrical Engineering and Computer Science 
<br>> <a href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.montefiore.ulg.ac.be%2F~geuzaine\46sa\75D\46sntz\0751\46usg\75AFQjCNEmdacRlcY6sK29fZnmB1uwQmsWWQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.montefiore.ulg.ac.be%2F~geuzaine\46sa\75D\46sntz\0751\46usg\75AFQjCNEmdacRlcY6sK29fZnmB1uwQmsWWQ';return true;">http://www.montefiore.ulg.ac.<wbr>be/~geuzaine</a>
<br>> 
<br>> 
<br>> 
<br>
<br>--
<br>Prof. Christophe Geuzaine
<br>University of Liege, Electrical Engineering and Computer Science <a href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.montefiore.ulg.ac.be%2F~geuzaine\46sa\75D\46sntz\0751\46usg\75AFQjCNEmdacRlcY6sK29fZnmB1uwQmsWWQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.montefiore.ulg.ac.be%2F~geuzaine\46sa\75D\46sntz\0751\46usg\75AFQjCNEmdacRlcY6sK29fZnmB1uwQmsWWQ';return true;">http://www.montefiore.ulg.ac.<wbr>be/~geuzaine</a>
<br>
<br>
<br>
<br></blockquote></div></blockquote></div></blockquote></div>