[Gmsh] Getting Surfaces and Volumes per coordinates after importing a step file

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon Jul 31 12:33:32 CEST 2017


> On 29 Jul 2017, at 22:22, David Colignon <David.Colignon at ulg.ac.be> wrote:
> 
> 
> On 29/07/17 13:28, faber.mueller at t-online.de wrote:
> 
>> Dear Professor Geuzaine,
>> I want to show my group at my working place, that the combination of gmsh and getdp is at least as powerful as an commercial FEA Software or even more powerful. For that purpose I have imported a model of an Claw Pole Alternator as a step file into gmsh. That worked very well and it is no problem to pick the faces and volumes with the gui. But because of the fact that I have imported the geometry I have no information about the elementary entities in the geo file. So I can't change the characteristic lengths individually for the interesting lines/points.
>> Is it possible to get for example the volume or a surface with a command like 'get volume at point (x,y,z)' ? That would be awesome to automate the picking of the areas and volumes for defining the physical entities.

You can use the BoundingBox commands for this. For example:

  s() = Volume In BoundingBox {xmin, ymin, zmin, xmax, ymax, zmax};

will get you all the volumes in the provided bounding box. The same can be used for surfaces, curves or vertices.


>> Is there a function / command to get the surfaces that define a volume  or the lines that define an area? The problem is that the geometry is very complicated and I need to define the elements for every volume or area seperately to get a fine mesh in the airgap and a coarse mesh in the outer air and so on.
> 
> Hi,
> 
> Here it is:
> 
> http://gmsh.info/doc/texinfo/gmsh.html#Transformations
> 
> Boundary { transform-list }
> 

+1

Note that to associate mesh sizes with geometry vertices a useful command is also PointsOf. For example, 

  p() = PointsOf{ Volume{1}; };

will get you all the points from volume 1, so that you could do

  Characteristic Length { PointsOf{ Volume{1}; } } = mylc;

Christophe





>    (Not a transformation per-se.) Returns the entities on the boundary of the elementary entities in transform-list, with signs indicating their orientation in the boundary. To get unsigned tags (e.g. to reuse the output in other commands), apply the Abs function on the returned list.
> 
> Regards,
> 
> Dave
> 
> -- 
> David Colignon, Ph.D.
> 1er Logisticien de Recherche
> Université de Liège
> ACE - Applied & Computational Electromagnetics
> Quartier POLYTECH 1 - Montefiore B28
> Allée de la découverte 10
> 4000 Liège - BELGIQUE
> Tél: +32 (0)4 366 37 32
> http://www.ulg.ac.be/nic4
> 
>> Is there a way to combine several fields for every volume to one field and set it as the background field?
>> Sorry for so many questions and thanks for your time reading this.
>> Best regards
>> Fabian Müller
>> 
>> _______________________________________________
>> gmsh mailing list
>> gmsh at onelab.info
>> http://onelab.info/mailman/listinfo/gmsh
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list