Gmsh + Elmer - Strange result depending on mesh type

Numerical methods and mathematical models of Elmer
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by kevinarden »

Can you post the geo file for testing?
sabrina
Posts: 27
Joined: 16 Sep 2019, 14:26
Antispam: Yes

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by sabrina »

Yes, I can: I should explain that there are several files (one for each element of the total geometry), and the file that should be executed is the one called '2d_main.geo'. You can find them in this link: https://ikpcloud.ikp.physik.tu-darmstad ... OnpkilmZLe

Thank you again,
Sabrina
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by kevinarden »

I did it as mesh.format=1 and the Numbering of boundary types is reported as ok using ElmerGrid 14 2
Elmergrid creating and manipulating meshes:
-------------------------------------------
Removing lower dimensional boundaries
Maximum elementtype is 303 and dimension 2
Minimum elementtype is 303 and dimension 2
Removed 0 (out of 8956) less than 1D boundary elements
Removing 7 unused nodes (out of 120098) from the mesh
Initial boundary interval [-643,654]
boundary index changed -643 -> 1 in 428 1D elements
boundary index changed 642 -> 2 in 860 1D elements
boundary index changed 643 -> 3 in 2522 1D elements
boundary index changed 644 -> 4 in 70 1D elements
boundary index changed 645 -> 5 in 312 1D elements
boundary index changed 646 -> 6 in 476 1D elements
boundary index changed 647 -> 7 in 636 1D elements
boundary index changed 648 -> 8 in 476 1D elements
boundary index changed 649 -> 9 in 476 1D elements
boundary index changed 650 -> 10 in 636 1D elements
boundary index changed 651 -> 11 in 476 1D elements
boundary index changed 652 -> 12 in 476 1D elements
boundary index changed 653 -> 13 in 636 1D elements
boundary index changed 654 -> 14 in 476 1D elements
Numbering of boundary types is already ok
Initial body interval [640,641]
body index changed 640 -> 1 in 162436 elements
body index changed 641 -> 2 in 68808 elements
Mapping material types from [640 641] to [1 2]
sabrina
Posts: 27
Joined: 16 Sep 2019, 14:26
Antispam: Yes

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by sabrina »

Thank you for reporting that. Unfortunately, I don't get the same. Could you please tell me which version of Gmsh and elmer you're using? On my side I have Elmer 8.4 and Gmsh 4.6.

Cheers,
Sabrina
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by raback »

Hi, I can see that Kevin has ElmerGrid fresh from the oven.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by kevinarden »

My gmsh is 4.5.3
I get and install the daily updates of Elmer.
sabrina
Posts: 27
Joined: 16 Sep 2019, 14:26
Antispam: Yes

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by sabrina »

Well, I tried that and even though I get the same message ('Numbering of boundary types is already ok') the output is still wrong. I am guessing it must be related to that first -643 boundary that shows up in Elmer but does not exist in Gmsh...
sabrina
Posts: 27
Joined: 16 Sep 2019, 14:26
Antispam: Yes

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by sabrina »

Hi again,

After inspecting the .msh file, I realized that those elements with negative physical tag are there, and if I manually change them to be positive, the output is finally right. I don't really know if this is normal for Gmsh or something that could be fixable in elmer, so that ElmerGrid doesn't fail. Anyway, I will write in their mailing list to ask.

Thank you everyone for your inputs!

Sabrina
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by kevinarden »

There is a bug in ElmerGrid it says it is renumbering the boundaries from 1, but when it writes the file they are not renumbered

boundary index changed -643 -> 1 in 214 1D elements
boundary index changed 642 -> 2 in 430 1D elements
boundary index changed 643 -> 3 in 1261 1D elements
boundary index changed 644 -> 4 in 35 1D elements
boundary index changed 645 -> 5 in 156 1D elements
boundary index changed 646 -> 6 in 238 1D elements
boundary index changed 647 -> 7 in 318 1D elements
boundary index changed 648 -> 8 in 238 1D elements
boundary index changed 649 -> 9 in 238 1D elements
boundary index changed 650 -> 10 in 318 1D elements
boundary index changed 651 -> 11 in 238 1D elements
boundary index changed 652 -> 12 in 238 1D elements
boundary index changed 653 -> 13 in 318 1D elements
boundary index changed 654 -> 14 in 238 1D elements

mesh.boundary file second number is the boundary label
3947 654 57586 0 202 4269 4270
3948 654 57561 0 202 4270 4271
3949 654 57575 0 202 4271 4272
3950 654 57591 0 202 4272 4273
3951 654 57602 0 202 4273 4274
3952 654 57684 0 202 4274 244
3953 -643 40852 0 202 54 4451
3954 -643 41342 0 202 4451 4452
3955 -643 41336 0 202 4452 4453
3956 -643 41332 0 202 4453 4454
3957 -643 41328 0 202 4454 4455
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Gmsh + Elmer - Strange result depending on mesh type

Post by raback »

Hi Kevin,

Yes, I realized there was a bug introduced. Quick tests were passed but many others were not.

The current devel version hopefully works better. Last commit was just minutes ago.

Thanx for testing & reporting!

-Peter
Post Reply