[Gmsh] Create a Boundary Layer around a blade

Javier de la Sierra jawisr at gmail.com
Sat May 16 15:48:01 CEST 2015


It seems there is some problems with images, I'll post it later.

El sábado, 16 de mayo de 2015, 15:42:33 (UTC+2), Javier de la Sierra 
escribió:
>
> Hi again,
> 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). 
> This is the result in 2D mesh.
>
>
> 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. 
>
> 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.
> As seen in the first picture the BL seems ok, at least in 2D.
>
>
> However the rest of the mesh is not good:
>    
> I attach also the step and geo files of the wing so anyone can help me.
> Thanks for your help!!
>
> El viernes, 15 de mayo de 2015, 14:08:20 (UTC+2), Javier de la Sierra 
> escribió:
>>
>> Hi Alexander,
>> I know it has been a while since your last answer, but I have to try.
>> 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. 
>> I attach my code so you can take a look.
>>
>> 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.
>>
>> //Boundary Layer
>> Field[2] = BoundaryLayer;
>> Field[2].Quads = 0;
>> Field[2].hfar = 1;
>> Field[2].hwall_n = 1;
>> Field[2].hwall_t = 2;
>> Field[2].thickness = 10;
>> Field[2].FacesList = {5, 6};
>> Field[2].AnisoMax = 1000000;
>> Field[2].IntersectMetrics = 1;
>> Background Field = 2; 
>>
>> 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.
>> 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. 
>>
>> Thank you very much and I hope you can help me,
>>
>> El domingo, 9 de febrero de 2014, 15:04:26 (UTC+1), Alexander Tismer 
>> escribió:
>>>
>>> Dear Christophe, 
>>>
>>> many thanks for your help. 
>>>
>>> If I try to create the layer by extrusion I get an error: 
>>>
>>> "Impossible to extrude entity 8 (of type 306)" 
>>>
>>> As I mentioned in the first post I create my geometry using my 
>>> own-written subclasses of GFace, GVertex and GEdge. 
>>> Is it necessary to code the extrusion-function for my own geometry 
>>> entity types? 
>>>
>>> After spending some hours to the gmsh code and to the manual I figured 
>>> out another way. I used a BoundaryLayer field. 
>>>
>>> Field[1] = BoundaryLayer; 
>>> Field[1].FacesList = {1,3,8,9}; 
>>> Field[1].hfar = .5; 
>>> Field[1].hwall_n = .5; 
>>> Field[1].hwall_t = .5; 
>>> Field[1].thickness = 10.; 
>>> Field[1].ratio = 1.1; 
>>> Field[1].Quads = 0; 
>>> Field[1].IntersectMetrics = 1; 
>>> BoundaryLayer Field = 1; 
>>>
>>> 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. 
>>>
>>> ***Boundary openness (-0.00152301 -0.000276836 -0.00087618) possible 
>>> hole in boundary description. 
>>>  ***Open cells found, max cell openness: 1, number of open cells 21 
>>>
>>> The boundary layer looks very fine. Please find attached two pictures. 
>>>
>>> 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: 
>>>
>>> void gmshVolume::setPeriodicPairOfFaces( GModel *gm, int const 
>>> numFaceMaster, std::vector<int> const & EdgeListMaster,int const 
>>> numFaceSlave, std::vector<int> const & EdgeListSlave) const { 
>>>                  
>>> int NEdges=EdgeListMaster.size(); 
>>> GFace *gf = gm->getFaceByTag(abs(numFaceSlave)); 
>>> gf->setMeshMaster(numFaceMaster); 
>>>         for (int i = 0; i < NEdges; i++){ 
>>>                 gf->edgeCounterparts[EdgeListSlave[i]] = 
>>> EdgeListMaster[i]; 
>>>                 GEdge *ges = gm->getEdgeByTag(abs(EdgeListSlave[i])); 
>>>                 ges->setMeshMaster(EdgeListMaster[i]); 
>>>         } 
>>> } 
>>>
>>> Gmsh tries to mesh but ends with 
>>>
>>> Error   : Only rotations or translations can be currently taken into 
>>> account for periodic faces: face 2 not meshed 
>>>
>>> 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. 
>>>
>>> Thanks 
>>> Alex 
>>>
>>>
>>>
>>>
>>>
>>> -----Ursprüngliche Nachricht----- 
>>> Von: Christophe Geuzaine [mailto:cgeu... at ulg.ac.be] 
>>> Gesendet: Freitag, 7. Februar 2014 19:12 
>>> An: Alexander Tismer 
>>> Cc: gm... at geuz.org 
>>> Betreff: Re: [Gmsh] Create a Boundary Layer around a blade 
>>>
>>>
>>> On 07 Feb 2014, at 19:10, Christophe Geuzaine <cgeu... at ulg.ac.be> 
>>> wrote: 
>>>
>>> > 
>>> > On 06 Feb 2014, at 10:05, Alexander Tismer <
>>> alexande... at ihs.uni-stuttgart.de> wrote: 
>>> > 
>>> >> Hello, 
>>> >> 
>>> >> I try to create a boundary layer around a blade of a hydraulic 
>>> turbine with gmsh. 
>>> >> 
>>> >> 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. 
>>> >> Has anybody an example geo file? 
>>> >> 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. 
>>> >> 
>>> > 
>>> > Dear Alexander, 
>>> > 
>>> > The feature mentioned in the paper can be accessed by simply using the 
>>> "Extrude" command (see the attached example). 
>>>
>>> With the attachment: 
>>>
>>>
>>> > 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. 
>>> > 
>>> > Christophe 
>>> > 
>>> >> Any help is really appreciated. 
>>> >> 
>>> >> Many Thanks 
>>> >> Alex 
>>> >> _______________________________________________ 
>>> >> gmsh mailing list 
>>> >> gm... at geuz.org 
>>> >> http://www.geuz.org/mailman/listinfo/gmsh 
>>> > 
>>> > -- 
>>> > Prof. Christophe Geuzaine 
>>> > University of Liege, Electrical Engineering and Computer Science 
>>> > http://www.montefiore.ulg.ac.be/~geuzaine 
>>> > 
>>> > 
>>> > 
>>>
>>> -- 
>>> Prof. Christophe Geuzaine 
>>> University of Liege, Electrical Engineering and Computer Science 
>>> http://www.montefiore.ulg.ac.be/~geuzaine 
>>>
>>>
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20150516/471a7714/attachment-0001.html>