[Gmsh] listing elements according to which physical volume they belong to

Christophe Geuzaine cgeuzaine at uliege.be
Mon Nov 26 18:43:38 CET 2018



> On 26 Nov 2018, at 17:06, Max Orok <morok at mevex.com> wrote:
> 
> Hello Adil, 
> 
> I think the mesh is definitely more dense or refined around the spheres. 
> My first guess is that the mesher makes more points on the spheres because it needs more points to model them accurately. 

There is indeed a default minimum of points for some entities: for circles it's 7.

To get the coarsest possible mesh you can change this default value by setting the following option in your script:

Mesh.MinimumCirclePoints  = 2;

Christophe




> For the outer box, less points suffice for an accurate mesh. 
> 
> For a 2D example, if you are trying to discretize a straight line, you can get away with the start and end points and not lose any info. 
> For a curve however, you'll need more points along it for a good approximation. 
> 
> For a look at the mesh, you can use a clipping plane: Tools -> Clipping -> (Click mesh in left hand pane) -> Click and drag in D box
> 
> Here are some example pictures for a model with a sphere on one side only 
> 
> The sparser one was done using Tools -> Clipping -> (Check "keep whole elements" and "only draw volume layer")
> <image.png>
> <image.png>
> 
> On Mon, Nov 26, 2018 at 4:22 AM Abiti Adili <aadili1 at lsu.edu> wrote:
> Thank you very much. Now I have the lists of the elements with the physical volume tags they belong to.
> 
> I have attached a png file of the 3D view of the mesh generated, geomtry.geo and omnibus.geo.
> 
> It seems to me that
>  when I clicked on 3D in Mesh option  it seems like it started generating more densely around those two balls.
> 
> when clicked on "refine by splitting", it still gets dense around those two balls.
> 
> You can see it from the attached file of the 3D view of the mesh.
> 
> Is there any reason for this mesh to be denser around the ball and not so dense in  the complement of the balls? Or I am just judging this by my eyes while it is not actually like that? Is there any way I can confirm that it is indeed denser around the balls? and If that is true, am I doing something wrong in the geo files?
> 
> Thank you very much.
> 
> Adil
> 
> 
> ________________________________________
> From: G. D. McBain <gdmcbain at protonmail.com>
> Sent: Sunday, November 25, 2018 11:43:56 PM
> To: Abiti Adili
> Cc: gmsh at onelab.info
> Subject: Re: [Gmsh] listing elements according to which physical volume they belong to
> 
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> Le lundi, novembre 26, 2018 12:43 PM, Abiti Adili <aadili1 at lsu.edu> a écrit :
> 
> > Hello,
> >
> > I have a geometry.geo file that creates a box with two small balls in it. I used omnibus.geo file that utilize the geometry.geo. Using this file, I created a 3D mesh over the box(as well as the two balls in it). I need to be able to have a mesh( created over the box) so that the gmsh file lists the tetrahedral elements according which physical volume( ball1, ball2, or the complement of them in the box) they belong to.
> >
> > The files I currently have are not quite generating what I wanted, it is only listing the elements belong to the complement. I would greatly appreciate if someone can take a look at them and point out the mistakes I made.
> 
> The last lines of geometry.geo have:
> 
>     Volume(1) = {2};
>     Volume(2) = {3};
>     Volume(3) = {1, 2};
> 
> The last should read
> 
>     Volume(3) = {1, 2, 3};
> 
> if the second sphere is also to internally bound it.
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
> 
> 
> -- 
> Max Orok
> Contractor
> www.mevex.com
> 
> 
> _______________________________________________
> 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