Query about external meshing software

62 views
Skip to first unread message

krishan...@gmail.com

unread,
Mar 9, 2021, 12:33:00 PM3/9/21
to deal.II User Group

I am wondering what meshing software produces output files that would work best with deal.ii. I have tried Gmsh, but it seems when this mesh (generated by Gmsh) is imported in deal.ii, it is facing the issue of negative volume fraction of a cell (could be because of the order of nodes written in Gmsh?). Any suggestion about any other meshing software that could be used which would avoid this issue?

Thanks

Paras Kumar

unread,
Mar 9, 2021, 1:14:27 PM3/9/21
to dea...@googlegroups.com
I use the .inp format of Abaqus, since my code relies on material-IDs which (in my limited experience) are easy to handle with .inp format. I generate meshes using both GMSH (here as you mentioned, one needs to be careful to add curves/surface parts in the correct order to avoid negative volumes) and Abaqus CAE (works fine for relatively simple geometries) to generate such meshes. Not aware of other quad/hex generating open source codes. The dealii::GridGenerator namespace also offers possibilities to generate meshes for certain primitive shapes and combinations thereof.

Best,
Paras

On Tue, Mar 9, 2021 at 6:33 PM krishan...@gmail.com <krishan...@gmail.com> wrote:

I am wondering what meshing software produces output files that would work best with deal.ii. I have tried Gmsh, but it seems when this mesh (generated by Gmsh) is imported in deal.ii, it is facing the issue of negative volume fraction of a cell (could be because of the order of nodes written in Gmsh?). Any suggestion about any other meshing software that could be used which would avoid this issue?

Thanks

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/33e38481-07dd-487f-ba04-91ab2d456e5dn%40googlegroups.com.

krishan...@gmail.com

unread,
Mar 9, 2021, 3:20:58 PM3/9/21
to deal.II User Group
Hello Paras,

Thanks for your response. I have been using the GUI of Gmsh to generate the mesh. Do you have any suggestions about what to do in Gmsh to avoid the negative volume issue?

Do meshes generated with Abaqus, are able to avoid the above-mentioned issue of negative volume?

Thanks in advance.

Krishanu

Zelu Xu

unread,
Mar 9, 2021, 3:33:55 PM3/9/21
to dea...@googlegroups.com
Hello Krishna:
I had this issue before. It just means that when you select mesh entities (vertex) to form a surface, you have to pay attention to the order of which entity goes first, second,... it would be clear if you look at the geometry txt file.
Best regards
Jane 

krishan...@gmail.com

unread,
Mar 9, 2021, 9:31:06 PM3/9/21
to deal.II User Group
Hello Jane,

Thanks for the response. I understand why there could be an issue with the ordering. But I am using the GUI of Gmsh and the mesh created has about 400 elements. So it is a little difficult to manually check the ordering of the vertices of each element. Do you know if there is any other way to enforce the ordering in the GUI?

Thanks,
Krishanu

Zelu Xu

unread,
Mar 9, 2021, 9:44:36 PM3/9/21
to deal.II user group
Hello Krishanu:
The error is made when you define the line/surface. You don’t have to check the mesh file or each mesh element but the .geo file. 
For example, here  my line loop defines the surface bounded by vertex in the order of [3.7,8,4], but I defined my line as the following. 
So when I define the surface, line 1 and 16 are negative.
Line(1) = {4, 8};
Line(16) = {3, 4};
Line(17) = {3, 7};
Line(18) = {7, 8};
Line Loop(53) = {17, 18, -1, -16};
Ruled Surface(54) = {53};
And you just need to make sure all line/surface are defined with the same notation (left or right hand)

Paras Kumar

unread,
Mar 10, 2021, 10:28:29 AM3/10/21
to dea...@googlegroups.com
Hi Krishanu,

The GMSH issue has been already explained by Jane. In nutshell: to make a square surface ABCD, you must ensure that  when creating the lines you go A->B and not B->A.

Yes, Abaqus takes care of the ordering automatically and you usually don't get such errors.

Best,
Paras


Zelu Xu

unread,
Mar 10, 2021, 12:12:16 PM3/10/21
to deal.II user group
Hello Krishanu:
I should explain it a bit more clearly.
So for the example I give you. There are two ways to define the Line loop. 
One is Line Loop(53) = {17, 18, -1, -16};
The other is clockwise: Line Loop(53) = {-18, -17, 16, 1};
For all surfaces in your .geo file, you have to pick one direction and stick with it.
Best
Jane

Praveen C

unread,
Mar 10, 2021, 9:50:03 PM3/10/21
to Deal. II Googlegroup
In your geo file, you can check orientation of boundary normals by adding

Geometry.Normals = 100; // adjust 100 if needed

Then check that all normals are pointing outward. If some surface has opposite normal, then flip sign

for example, if

Line Loop(53) = {17, 18, -1, -16};
Ruled Surface(54) = {53};

this surface has wrong normal, define it as

Ruled Surface(54) = {-53};

I think fixing this orientation should fix your issue.

best
praveen

krishan...@gmail.com

unread,
Mar 19, 2021, 6:00:33 PM3/19/21
to deal.II User Group
Thanks everyone for the responses. I found that the mesh created using the GUI of Gmsh was not working for me. But using the example.geo file from step-49, and using the above suggestions, it seems to be working.

Thanks
Reply all
Reply to author
Forward
0 new messages