[Gmsh] Create a Boundary Layer around a blade

Alexander Tismer alexander.tismer at ihs.uni-stuttgart.de
Sun Feb 9 15:04:26 CET 2014


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:cgeuzaine at ulg.ac.be] 
Gesendet: Freitag, 7. Februar 2014 19:12
An: Alexander Tismer
Cc: gmsh at geuz.org
Betreff: Re: [Gmsh] Create a Boundary Layer around a blade


On 07 Feb 2014, at 19:10, Christophe Geuzaine <cgeuzaine at ulg.ac.be> wrote:

> 
> On 06 Feb 2014, at 10:05, Alexander Tismer <alexander.tismer 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
>> gmsh 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 --------------
A non-text attachment was scrubbed...
Name: mesh_boundary.png
Type: image/png
Size: 197443 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20140209/706fbe30/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mesh_boundary2.png
Type: image/png
Size: 108874 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20140209/706fbe30/attachment-0001.png>