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

Max Orok morok at mevex.com
Mon Nov 26 17:06:11 CET 2018


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.
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: image.png]
[image: 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20181126/2e03dc60/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 148576 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20181126/2e03dc60/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 44303 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20181126/2e03dc60/attachment-0003.png>


More information about the gmsh mailing list