[Gmsh] Labeling the physical entities and extracting nodes on the surface of one physical entity

Max Orok morok at mevex.com
Sun Apr 28 19:01:38 CEST 2019


Hello Adil,

As far as I can see, your labels are correct!

Here is a picture of the labels after using Tools -> Options -> Geometry
[left sidebar] -> Volume labels [checkbox]. Yellow is a little hard to see
but they all look OK. You can also see the Physical Surface by clicking the
Surface checkbox in the same menu, although it is hard to distinguish from
all the other surfaces.

You can also use the visibility settings to check this (Tools -> Visibility
-> Physical groups [dropdown menu at the bottom]. The four physical groups
will then be shown as in the picture.

As far as volume boundaries go, you could use the Boundary function in a
geo file like so:

// example usage taken from t14.geo

bnd[] = Boundary{ Volume{1}; };
Physical Surface(80) = bnd[];

http://gmsh.info/doc/texinfo/gmsh.html#t14_002egeo is the link to the full
script

or try looking at the getBoundary function in the API.

[image: image.png]

Sincerely,
Max


On Sun, Apr 28, 2019 at 1:24 AM Abiti Adili <aadili1 at lsu.edu> wrote:

> Hello,
>
> I am a  new learner of Gmsh. I have  the above attached geometry.geo and
> omnibus.geo files that  are supposed to create a box mesh with two balls
> inside. A  cross section of  the box and the labels of the regions is
> attached above in pdf file.
>
> I am trying to  have 4 different  physical entities which are
>
> 1. The first  ball denoted by R.
> 2. The second ball denoted by P.
> 3. The complement of  union(R,P) in the box which is  denoted by H.
> 4. The physical surface which is the boundary of  R.
>
> Upon checking the coordinates of nodes supposedly on the boundary of R, I
> found that a lot of them are  outside the ball R.
>
> I was wondering if  anyone could help me take a look at the geometry.geo
> and omnibus.geo and tell me if I have  labelled them correctly so that they
> correspond to the above 4 entities that I want to have.
>
> Also, how can I extract the indices of nodes on the boundary of R once I
> have  their coordinates?
>
> Thank you very much.
>
> Adil_______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190428/1456a8b5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 67057 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20190428/1456a8b5/attachment-0001.png>


More information about the gmsh mailing list